:root {
    --primary: #10b981;  /* Light medical blue */
    --primary-light: #ecfdf5;  /* Lighter mint */
    --primary-dark: #059669;  /* Darker emerald */
    --secondary: #64748b;  /* Slate gray */
    --accent: #6366f1;  /* Indigo 500 */
    --success: #10b981;  /* Emerald */
    --warning: #f59e0b;  /* Amber */
    --danger: #ef4444;   /* Red */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 14px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 10px -4px rgba(0, 0, 0, 0.08);
}

/* Base Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25rem;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    gap: 0.5rem;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); /* Matches primary but soft */
}

.btn i {
    font-size: 1.1em;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669; /* Darker emerald */
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626; /* Darker red */
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff !important;
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: rgba(248, 250, 252, 0.8); /* Slightly transparent gray-50 */
    backdrop-filter: blur(8px);
}

.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Forms */
.form-input, .form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background: #ffffff;
    color: var(--gray-900);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); /* Soft primary glow */
}

.form-input::placeholder, .form-control::placeholder {
    color: var(--gray-400);
}

.form-label, label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-error {
    margin-top: 0.375rem;
    font-size: 0.85rem;
    color: var(--danger);
}

/* Navigation */
.nav-link {
    color: var(--gray-600);
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.08); /* Faint primary hover */
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error, .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom utilities */
.shadow-soft {
    box-shadow: var(--shadow-md);
}

.rounded-xl {
    border-radius: 1rem;
}

.rounded-2xl {
    border-radius: 1.5rem;
}

/* Responsive table */
.responsive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
}

.responsive-table thead {
    background: var(--gray-50);
}

.responsive-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

.responsive-table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.2s;
}

.responsive-table tbody tr {
    background: #ffffff;
    transition: all 0.2s ease;
}

.responsive-table tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.002); /* Slight pop effect */
}

/* Dashboard widgets */
.dashboard-widget {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.dashboard-widget:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Patient status badges */
.status-badge, .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.status-active, .badge.bg-success {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0;
}

.status-pending, .badge.bg-warning {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a;
}

.status-inactive, .badge.bg-secondary {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1;
}

.status-urgent, .badge.bg-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca;
}

.badge.bg-info {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe;
}

