/* Custom Styles for MediService Pro */

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navigation active state */
.nav-link.active {
    background-color: #3b82f6;
    color: white;
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: fadeIn 0.2s ease-out;
}

/* Table row hover effect */
tbody tr:hover {
    background-color: #f9fafb;
}

/* Checkbox custom styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Status badges */
.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-paid {
    background-color: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-overdue {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .print-only {
        display: block !important;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background-color: #10b981;
}

.toast-error {
    background-color: #ef4444;
}

.toast-info {
    background-color: #3b82f6;
}

/* Estimate/Invoice print template */
.estimate-template {
    font-family: 'Arial', sans-serif;
    padding: 40px;
    background: white;
}

.estimate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3b82f6;
}

.estimate-logo {
    width: 80px;
    height: 80px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.estimate-title {
    text-align: right;
}

.estimate-title h1 {
    color: #1f2937;
    margin: 0;
    font-size: 28px;
}

.estimate-title p {
    color: #6b7280;
    margin: 5px 0 0 0;
}

.estimate-section {
    margin-bottom: 25px;
}

.estimate-section h3 {
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 5px;
}

.estimate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.estimate-field {
    margin-bottom: 10px;
}

.estimate-field label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 3px;
}

.estimate-field p {
    color: #1f2937;
    font-weight: 500;
    margin: 0;
}

.estimate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.estimate-table th {
    background: #f3f4f6;
    color: #1f2937;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.estimate-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.estimate-table tr:last-child td {
    border-bottom: none;
}

.estimate-totals {
    margin-left: auto;
    width: 300px;
}

.estimate-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.estimate-total-row:last-child {
    border-bottom: none;
    border-top: 2px solid #1f2937;
    padding-top: 12px;
    font-weight: bold;
    font-size: 18px;
}

.estimate-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.estimate-notes {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.estimate-signature {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.signature-box {
    text-align: center;
    width: 200px;
}

.signature-line {
    border-top: 1px solid #1f2937;
    margin-top: 60px;
    padding-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .estimate-grid {
        grid-template-columns: 1fr;
    }
    
    .estimate-totals {
        width: 100%;
    }
    
    .estimate-signature {
        flex-direction: column;
        gap: 30px;
    }
    
    .signature-box {
        width: 100%;
    }
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Button variants */
.btn-primary {
    background-color: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-yellow {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background-color: #ede9fe;
    color: #6d28d9;
}
