* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0891b2;
    --primary-light: #06b6d4;
    --primary-dark: #0e7490;
    --primary-bg: rgba(8, 145, 178, 0.08);
    --primary-glow: rgba(8, 145, 178, 0.15);
    --secondary: #6366f1;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --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;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-text {
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: var(--primary);
}

.navbar-menu {
    display: flex;
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.navbar-nav a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.btn-logout {
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.btn-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-register {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
}

.btn-register:hover {
    background: var(--primary-dark);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-600);
    border-radius: 2px;
    transition: var(--transition);
}

main {
    flex: 1;
}

.hero {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #f0f9ff 0%, #ecfeff 50%, #f0fdf4 100%);
}

.hero-bg-shape {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(8,145,178,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(8,145,178,0.15);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-weight: 500;
}

.section {
    padding: 4rem 0;
}

.section-dark {
    background: var(--gray-900);
    margin-top: 2rem;
    border-radius: 0;
}

.section-label {
    display: inline-flex;
    padding: 0.25rem 0.875rem;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.section-desc {
    color: var(--gray-500);
    font-size: 1.0625rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

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

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.feature-icon-blue { background: rgba(8,145,178,0.1); }
.feature-icon-green { background: rgba(16,185,129,0.1); }
.feature-icon-purple { background: rgba(99,102,241,0.1); }
.feature-icon-orange { background: rgba(245,158,11,0.1); }
.feature-icon-red { background: rgba(239,68,68,0.1); }
.feature-icon-cyan { background: rgba(6,182,212,0.1); }

.feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.7;
}

.cta-content {
    text-align: center;
    padding: 2rem;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: var(--gray-400);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

.cta-content .btn {
    background: white;
    color: var(--gray-900);
    border: none;
}

.cta-content .btn:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.welcome-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.welcome-avatar-clinic {
    background: rgba(255,255,255,0.2);
}

.welcome-content h1 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.welcome-subtitle {
    font-size: 0.875rem;
    opacity: 0.85;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.stat-icon-blue { background: rgba(8,145,178,0.1); }
.stat-icon-green { background: rgba(16,185,129,0.1); }
.stat-icon-purple { background: rgba(99,102,241,0.1); }
.stat-icon-orange { background: rgba(245,158,11,0.1); }
.stat-icon-red { background: rgba(239,68,68,0.1); }

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 0.375rem;
}

.section > .container {
    padding: 0;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: white;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: var(--gray-50);
}

.empty-state {
    text-align: center;
    color: var(--gray-400);
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-scheduled { background: #eff6ff; color: #2563eb; }
.status-confirmed { background: #f0fdf4; color: #16a34a; }
.status-completed { background: var(--gray-100); color: var(--gray-600); }
.status-cancelled { background: #fef2f2; color: #dc2626; }

.actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    flex-wrap: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: var(--gray-700);
    background: white;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: white;
    border-color: var(--gray-400);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

.auth-section {
    padding: 3rem 1.5rem;
    min-height: calc(100vh - 64px - 60px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    border: 1px solid var(--gray-100);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-50);
}

.auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.5rem;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    background: transparent;
    transition: var(--transition);
}

.auth-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-tab:hover:not(.active) {
    color: var(--gray-700);
    background: rgba(255,255,255,0.5);
}

.tab-icon {
    font-size: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-800);
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8,145,178,0.12);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    border: 1px solid transparent;
}

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

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    background: none;
    border: none;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.doctor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.doctor-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    min-width: 200px;
    transition: var(--transition);
}

.doctor-chip:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.chip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.chip-info {
    flex: 1;
    min-width: 0;
}

.chip-info strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-800);
    font-weight: 600;
}

.chip-info span {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.chip-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chip-status.active {
    background: var(--success);
    box-shadow: 0 0 0 2px var(--success-bg);
}

.chip-status.inactive {
    background: var(--gray-300);
}

.footer {
    background: var(--gray-900);
    color: var(--gray-500);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    font-size: 0.8125rem;
}

.admin-body {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.admin-login .auth-card {
    border: 1px solid rgba(255,255,255,0.08);
}

.module-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.module-badge-select {
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid var(--gray-200);
    background: white;
    cursor: pointer;
}

.module-consultorio { background: rgba(8,145,178,0.12); color: #0891b2; }
.module-dentista { background: rgba(14,165,233,0.12); color: #0ea5e9; }
.module-clinica { background: rgba(99,102,241,0.12); color: #6366f1; }
.module-veterinaria { background: rgba(132,204,22,0.12); color: #84cc16; }
.module-fisioterapia { background: rgba(6,182,212,0.12); color: #06b6d4; }
.module-psicologia { background: rgba(168,85,247,0.12); color: #a855f7; }
.module-nutricao { background: rgba(34,197,94,0.12); color: #22c55e; }
.module-acupuntura { background: rgba(236,72,153,0.12); color: #ec4899; }
.module-estetica { background: rgba(244,63,94,0.12); color: #f43f5e; }
.module-laboratorio { background: rgba(16,185,129,0.12); color: #10b981; }
.module-farmacia { background: rgba(245,158,11,0.12); color: #f59e0b; }

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.module-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.module-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.module-card-featured {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 3px solid var(--module-color, var(--primary));
}

.module-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.module-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.module-card p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.module-features-list {
    list-style: none;
    text-align: left;
}

.module-features-list li {
    font-size: 0.8125rem;
    color: var(--gray-600);
    padding: 0.25rem 0;
}

.nav-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

.search-form {
    margin-bottom: 1rem;
}

.search-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 0.75rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.chart-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.chart-box h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.doc-preview {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.8;
}

.doc-preview h2 { text-align: center; font-size: 1.25rem; margin-bottom: 1.5rem; }
.doc-preview h3 { text-align: center; font-size: 1.1rem; margin: 1rem 0; }
.doc-preview hr { border: none; border-top: 1px dashed var(--gray-300); margin: 1.5rem 0; }
.doc-footer { text-align: center; margin-top: 2rem; }
.doc-footer p { margin: 0.25rem 0; }

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 2.75rem !important;
    width: 100% !important;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    color: var(--gray-400);
    transition: color 0.2s;
    z-index: 2;
}

.toggle-password:hover { color: var(--gray-600); }

.stars { font-size: 1.1rem; letter-spacing: 2px; white-space: nowrap; }

@media (max-width: 768px) {
    .search-form .form-row {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.5rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
    }

    .navbar-nav a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .auth-tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .auth-tab {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }

    .doctor-chip {
        min-width: 100%;
    }

    .dashboard-welcome {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section {
        padding: 2.5rem 0;
    }
}
