/* FINAL CORRECTED STYLES - 2025-08-19 */

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* --- LOGIN PAGE STYLES --- */
.login-page-container { display: none; align-items: center; justify-content: center; min-height: 100vh; width: 100%; background-color: #f0f2f5; }
.login-form-wrapper { width: 100%; max-width: 420px; background-color: #ffffff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.login-page-logo { display: block; margin: 0 auto 30px auto; max-width: 250px; }
.login-form-container { width: 100%; }
.login-form-container h2 { font-size: 2em; margin-bottom: 10px; color: #1c1e21; text-align: center; }
.login-form-container p { margin-bottom: 20px; color: #606770; text-align: center; }
.form-input-group { position: relative; margin-bottom: 20px; }
.form-input-group input { width: 100%; padding: 14px; border: 1px solid #dddfe2; border-radius: 6px; font-size: 1em; background: #f5f6f7; transition: background-color 0.2s; }
.form-input-group input:focus { outline: none; border-color: #667eea; background-color: #fff; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.login-button-group { display: flex; gap: 10px; margin-top: 15px; }
#recaptcha-widget-container { display: none; justify-content: center; margin-bottom: 20px; }
#switchAuthMessage { text-align: center; margin-top: 20px; }
#switchAuthMessage a, #forgotPasswordLink { color: #667eea; font-weight: 500; text-decoration: none; }
#switchAuthMessage a:hover, #forgotPasswordLink:hover { text-decoration: underline; }
.login-footer { text-align: center; margin-top: 20px; font-size: 0.8em; }
.login-footer a { color: #606770; text-decoration: none; margin: 0 10px; }
.login-footer a:hover { text-decoration: underline; }

/* --- DASHBOARD & APP STYLES --- */
.dashboard-wrapper, .app-container { display: none; flex-direction: column; min-height: 100vh; background-color: #f8f9fa; }
.app-container { background-color: white; }
.dashboard-content, .app-content { padding: 30px; flex-grow: 1; max-width: 1200px; margin: 0 auto; width: 100%; }
.app-content { padding: 15px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dashboard-header h1 { font-size: 2em; color: #2c3e50; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dashboard-stats .stat-card { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 15px; }
.dashboard-stats .stat-card .stat-icon { font-size: 2em; background-color: #eef2ff; color: #667eea; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.dashboard-stats .stat-card .number { font-size: 1.8em; font-weight: 600; }
.dashboard-stats .stat-card .label { font-size: 0.9em; color: #606770; }
.patient-list-container { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.patient-list-container h2 { margin-bottom: 20px; font-size: 1.4em; color: #2c3e50; }
.table-wrapper { overflow-x: auto; }
.patient-table { width: 100%; border-collapse: collapse; }
.patient-table th, .patient-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ecf0f1; }
.patient-table th { background-color: #f8f9fa; font-weight: 600; color: #7f8c8d; text-transform: uppercase; font-size: 0.8em; }
.patient-table tbody tr:hover { background-color: #f8f9fa; }
.patient-table .action-btn { padding: 6px 12px; font-size: 0.8em; margin-right: 5px; border-radius: 6px; }
.patient-table .view-tracker-btn { background-color: #667eea; color: white; }
.progress-bar-container { width: 100%; background-color: #ecf0f1; border-radius: 5px; height: 8px; margin-bottom: 4px; }
.progress-bar { height: 100%; background-color: #667eea; border-radius: 5px; }
.progress-text { font-size: 0.8em; color: #7f8c8d; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.status-dot.on-track { background-color: #2ecc71; }
.status-dot.pending { background-color: #bdc3c7; }
.view-mode-banner { display: none; background-color: #1c4ed8; color: white; text-align: center; padding: 8px; font-weight: bold; font-size: 0.9em; width: 100%; }
[data-view-mode="clinic"] { background-color: #f4f7fc; }
[data-view-mode="clinic"] .view-mode-banner { display: block; }
[data-view-mode="clinic"] #inButton, [data-view-mode="clinic"] #outButton, [data-view-mode="clinic"] #emailDrButton { display: none; }
.app-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.app-title { display: flex; align-items: center; }
.app-title h1 { margin: 0; font-size: 1.4em; line-height: 1.2; }
.app-emoji { font-size: 1.2em; margin-right: 8px; }
.subtitle { font-size: 0.7em; opacity: 0.9; margin-top: 2px; }
.patient-info-header { text-align: right; max-width: 50%; }
.patient-name-header { font-weight: bold; font-size: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.patient-actions-header { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.header-action-btn { background: none; border: none; color: rgba(255, 255, 255, 0.9); text-decoration: none; font-size: 0.8em; font-weight: 500; cursor: pointer; padding: 0; font-family: inherit; }
.header-action-btn:hover { text-decoration: underline; }
.input-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.input-group { margin-bottom: 12px; }
.input-grid .input-group { margin-bottom: 0; }
.input-group label { display: block; margin-bottom: 4px; font-weight: 600; color: #555; font-size: 0.9em; }
.input-group input, .input-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 1em; transition: all 0.3s ease; }
.input-group input:hover, .input-group select:hover { border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.input-group input:focus, .input-group select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3); }
.field-note { font-size: 0.75em; color: #777; margin-top: 4px; font-style: italic; }
.aligner-control { display: flex; align-items: center; }
.aligner-control button { padding: 5px 10px; min-width: 40px; font-size: 0.9em; }
.aligner-control input { flex: 1; margin: 0 5px; text-align: center; font-weight: bold; -moz-appearance: textfield; }
.aligner-control input::-webkit-outer-spin-button, .aligner-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dashboard-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; margin-bottom: 20px; }
.key-stats-grid { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 150px; }
.stat-card { background: #f8f9fa; border-radius: 8px; padding: 10px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.stat-card .number { font-size: 1.4em; font-weight: bold; color: #667eea; }
.stat-card .label { color: #777; font-size: 0.75em; white-space: normal; line-height: 1.2; }
.label-title { font-size: 0.6em; font-weight: 700; color: #95a5a6; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.card-progress-bar-container { height: 8px; width: 90%; background-color: #e9ecef; border-radius: 4px; margin: 8px auto; overflow: hidden; }
.card-progress-bar { height: 100%; width: 0%; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 4px; transition: width 0.5s ease-in-out; }
.timer-controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.progress-ring-container { position: relative; width: 200px; height: 200px; }
.progress-ring__svg { transform: rotate(-90deg); }
.progress-ring__circle-bg { stroke: #e9ecef; }
.progress-ring__circle { stroke: #667eea; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease; }
.progress-ring-container.out-status .progress-ring__circle { stroke: #ff9800; }
.progress-ring__text-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.progress-ring__time { font-family: 'Courier New', monospace; font-size: 1.7em; font-weight: bold; color: #2c3e50; line-height: 1; margin-bottom: 2px; }
.progress-ring__label { font-size: 0.65em; font-weight: 600; color: #7f8c8d; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.progress-ring__total { font-size: 0.8em; color: #7f8c8d; margin-top: 5px; font-weight: 700; }
.btn { padding: 10px 12px; border: none; border-radius: 50px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; font-size: 0.9em; text-align: center; flex: 1; }
.btn:disabled { cursor: not-allowed; opacity: 0.7; }
.btn-in { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.btn-in:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); }
.btn-in.active { background: linear-gradient(135deg, #4CAF50, #45a049); }
.btn-out { background: linear-gradient(135deg, #ff9800, #ff5722); color: white; }
.btn-out:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4); }
.btn-out.active { background: linear-gradient(135deg, #FF9800, #F57C00); }
.communication-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.btn-email { background: linear-gradient(135deg, #4facfe, #00f2fe); color: white; }
.btn-email:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4); }
.btn-remote { background: linear-gradient(135deg, #56ab2f, #a8e0cf); color: white; }
.btn-remote:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4); }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 10px; }
.modal { background: white; border-radius: 15px; padding: 20px; width: 100%; max-width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal h2 { margin-top: 0; color: #667eea; font-size: 1.3em; }
.modal .input-group { margin-bottom: 15px; }
.modal .input-group:last-of-type { margin-bottom: 0; }
.modal .input-group input { margin: 0; }
.modal textarea { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; height: 80px; resize: vertical; }
.profile-item { display: flex; flex-direction: column; padding: 12px; border-bottom: 1px solid #eee; }
.profile-item-name { font-weight: 500; margin-bottom: 8px; }
.patient-select-item:hover { background-color: #f8f9fa; }
.profile-item-actions { display: flex; gap: 10px; }
.action-btn { padding: 5px 10px; border: none; border-radius: 5px; cursor: pointer; font-size: 0.8em; flex: 1; }
.edit-btn { background: #667eea; color: white; }
.archive-btn { background: #f5576c; color: white; }
.confetti-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }
.badges-container { margin-top: 10px; text-align: center; }
.badge { display: inline-block; background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 4px 10px; border-radius: 15px; margin: 3px; font-weight: bold; font-size: 0.75em; box-shadow: 0 2px 5px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.badge:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
#calendar-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#calendar-nav h3 { margin: 0; color: #667eea; }
#calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 15px; }
.calendar-header { text-align: center; font-weight: bold; color: #667eea; padding: 5px 0; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; font-size: 0.8em; font-weight: bold; position: relative; }
.calendar-day.other-month { color: #ccc; }
.calendar-day.goal-met { background-color: #4CAF50; color: white; }
.calendar-day.goal-close { background-color: #FFC107; color: #333; }
.calendar-day.goal-missed { background-color: #F44336; color: white; }
.calendar-day.no-data { background-color: #f0f0f0; color: #999; }
#calendar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 15px; }
.legend-item { display: flex; align-items: center; font-size: 0.8em; }
.legend-item::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; }
.legend-item.goal-met::before { background-color: #4CAF50; }
.legend-item.goal-close::before { background-color: #FFC107; }
.legend-item.goal-missed::before { background-color: #F44336; }
.legend-item.no-data::before { background-color: #f0f0f0; }
.calendar-day .tooltip { visibility: hidden; width: 140px; background-color: #333; color: #fff; text-align: center; border-radius: 6px; padding: 8px; position: absolute; z-index: 10; bottom: 115%; left: 50%; margin-left: -70px; opacity: 0; transition: opacity 0.3s ease; font-size: 0.9em; pointer-events: none; }
.calendar-day .tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #333 transparent transparent transparent; }
.calendar-day:hover .tooltip, .calendar-day .tooltip.show-tooltip { visibility: visible; opacity: 1; }
.warning-details { background-color: #f8f9fa; border-left: 4px solid #ff9800; padding: 10px 15px; margin: 15px 0; border-radius: 0 8px 8px 0; }
.warning-details ul { padding-left: 20px; margin-top: 8px; }
.warning-details li { margin-bottom: 6px; line-height: 1.4; }
.warning-confirmation { margin-top: 20px; text-align: center; }
.warning-confirmation p { font-weight: 600; margin-bottom: 15px; color: #555; }
.warning-buttons { display: flex; gap: 10px; justify-content: center; }
.btn-danger { background: linear-gradient(135deg, #f5576c, #f093fb); color: white; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4); }
.help-modal { max-width: 800px; max-height: 90vh; overflow-y: auto; }
.help-content { text-align: left; max-height: 70vh; overflow-y: auto; padding-right: 10px; }
.help-content h3 { color: #667eea; margin-top: 20px; margin-bottom: 10px; font-size: 1.2em; border-bottom: 1px solid #eee; padding-bottom: 5px;}
.help-content p, .help-content li { margin-bottom: 10px; line-height: 1.6; }
.help-content ul, .help-content ol { padding-left: 20px; }
.help-content strong { color: #333; }
#toastContainer { position: fixed; top: 20px; right: 20px; z-index: 10001; display: flex; flex-direction: column; gap: 10px; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: scale(0.9); } }
.toast { padding: 12px 18px; color: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 3.5s forwards; min-width: 250px; max-width: 350px; font-size: 0.9em; font-weight: 500; }
.toast-success { background: linear-gradient(135deg, #4CAF50, #5cb85c); }
.toast-error { background: linear-gradient(135deg, #F44336, #d9534f); }
.toast-info { background: linear-gradient(135deg, #4facfe, #00f2fe); }

/* --- REFINED MARKETING PAGE STYLES --- */
:root { --brand-primary: #667eea; --brand-secondary: #5a67d8; --text-dark: #2c3e50; --text-light: #5a6a7a; --bg-light: #ffffff; --bg-off-white: #f8f9fa; --border-color: #eef2ff; }
#marketingPageContainer { display: none; flex-direction: column; background-color: var(--bg-light); color: var(--text-dark); }
.marketing-main { flex-grow: 1; }
.section-container, .nav-container, .hero-container, .footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.marketing-nav { background: var(--bg-light); padding: 15px 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); background-color: rgba(255, 255, 255, 0.8); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { height: 40px; width: auto; }
.marketing-nav nav a { margin: 0 15px; text-decoration: none; color: var(--text-light); font-weight: 600; transition: color 0.2s ease; }
.marketing-nav nav a:hover { color: var(--brand-primary); }
.nav-button-secondary, .nav-button-primary { padding: 8px 18px; border-radius: 50px; border: 2px solid var(--brand-primary); margin-left: 15px; font-weight: 600; transition: all 0.2s ease; }
.nav-button-secondary { color: var(--brand-primary); }
.nav-button-secondary:hover { background-color: var(--brand-primary); color: white; }
.marketing-nav nav a.nav-button-primary { background-color: var(--brand-primary); color: white; }
.marketing-nav nav a.nav-button-primary:hover { background-color: var(--brand-secondary); border-color: var(--brand-secondary); }
.hero-section { padding: 80px 0; background-color: var(--bg-off-white); }
.hero-container { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 60px; }
.hero-content h1 { font-size: 3em; line-height: 1.2; margin-bottom: 20px; color: var(--text-dark); }
.hero-subtitle { font-size: 1.2em; color: var(--text-light); margin-bottom: 40px; max-width: 550px; }
.hero-button { background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); color: white; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; font-size: 1.1em; box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); transition: transform 0.2s ease, box-shadow 0.2s ease; display: inline-block; }
.hero-button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); }
.hero-image-container img { width: 100%; }
.hero-image-placeholder { max-width: 400px; margin: 0 auto; }
.how-it-works-section, .features-section, .pricing-section, .testimonials-section, .cta-section, .faq-section { padding: 80px 0; text-align: center; }
.how-it-works-section h2, .features-section h2, .pricing-section h2, .testimonials-section h2, .cta-section h2, .faq-section h2 { font-size: 2.5em; margin-bottom: 15px; }
.how-it-works-section > .section-container > p, .features-section > .section-container > p, .pricing-section > .section-container > p, .testimonials-section > .section-container > p, .faq-section > .section-container > p { max-width: 700px; margin: 0 auto 50px auto; color: var(--text-light); font-size: 1.1em;}
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.step-card { background: var(--bg-light); padding: 30px; border-radius: 8px; }
.step-number { width: 50px; height: 50px; border-radius: 50%; background-color: var(--brand-primary); color: white; font-size: 1.5em; font-weight: bold; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }
.step-card h3 { font-size: 1.4em; margin-bottom: 10px; }
.step-card p { color: var(--text-light); font-size: 1em; margin-bottom: 0; }
.features-section { background-color: var(--bg-off-white); }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; text-align: left; }
.benefit-card { background: var(--bg-light); padding: 30px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.benefit-card h3 { font-size: 1.5em; margin-bottom: 15px; color: var(--brand-primary); }
.benefit-card p { font-size: 1em; margin-bottom: 0; max-width: none; color: var(--text-light); }
.testimonials-section { background-color: #fff; }
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.testimonial-card { background: var(--bg-off-white); padding: 30px; border-radius: 8px; border-left: 5px solid var(--brand-primary); text-align: left; }
.testimonial-card blockquote { font-style: italic; font-size: 1.1em; color: var(--text-light); border: none; padding: 0; margin: 0 0 15px 0; }
.testimonial-card cite { font-weight: bold; color: var(--text-dark); }
.pricing-section { background-color: var(--bg-off-white); }
.pricing-card-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1200px; margin: 0 auto; align-items: stretch; padding: 20px; }
.pricing-card { background: var(--bg-light); border-radius: 8px; padding: 30px; box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1); display: flex; flex-direction: column; text-align: left; border: 2px solid transparent; position: relative; width: 330px; flex-basis: 330px; }
.pricing-card.popular { border-color: var(--brand-primary); transform: scale(1.05); z-index: 10; margin: 0 20px; }
.popular-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); color: white; padding: 5px 15px; border-radius: 50px; font-size: 0.8em; font-weight: bold; }
.pricing-card h3 { font-size: 1.5em; }
.price { font-size: 3em; font-weight: bold; color: var(--text-dark); margin: 5px 0; }
.price-subtitle { font-size: 1em; color: var(--text-light); margin-bottom: 25px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 30px 0; flex-grow: 1; }
.pricing-card li { margin-bottom: 12px; font-size: 1em; }
.pricing-button { display: block; text-align: center; background: var(--brand-primary); color: white; padding: 12px 25px; text-decoration: none; border-radius: 50px; font-weight: bold; transition: background-color 0.2s ease; margin-top: auto; }
.pricing-button:hover { background-color: var(--brand-secondary); }
.pricing-button-secondary { display: block; text-align: center; background: none; border: 2px solid var(--brand-primary); color: var(--brand-primary); padding: 12px 25px; text-decoration: none; border-radius: 50px; font-weight: bold; transition: all 0.2s ease; margin-top: auto; }
.pricing-button-secondary:hover { background-color: var(--brand-primary); color: white; }
.pricing-note { margin-top: 40px; font-size: 0.9em; color: var(--text-light); flex-basis: 100%; text-align: center; }
.faq-section { background-color: #fff; }
.faq-grid { max-width: 800px; margin: 0 auto; text-align: left; }
.faq-item { border-bottom: 1px solid var(--border-color); }
/* --- FINAL FIX for FAQ --- */
.faq-question { width: 100%; background: none; border: none; text-align: left; padding-top: 20px; padding-bottom: 10px; font-size: 1.3em; font-weight: 600; color: var(--text-dark); }
.faq-question::after { content: none; }
.faq-answer { max-height: none; overflow: visible; }
.faq-answer p { color: var(--text-light); padding: 0 0 20px 0; margin: 0; }
.cta-section { background: linear-gradient(135deg, #5a67d8, #6b2f9c); color: white; }
.cta-section h2 { color: white; }
.cta-section > .section-container > p { max-width: 700px; margin: 0 auto 30px auto; font-size: 1.1em; color: rgba(255,255,255,0.95); }
.cta-section .hero-button { background: white; color: var(--brand-primary); }
.cta-section .hero-button:hover { box-shadow: 0 8px 20px rgba(0,0,0, 0.3); transform: translateY(-3px); }
.marketing-footer { padding: 40px 0 0 0; background: var(--text-dark); color: #bdc3c7; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-logo img { height: 40px; margin-bottom: 10px; }
.footer-logo p { font-size: 0.9em; }
.footer-links h4 { color: white; margin-bottom: 15px; }
.footer-links a { display: block; text-decoration: none; margin-bottom: 10px; transition: color 0.2s ease; }
.footer-links a { color: #e0e0e0; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid #4a5568; padding: 20px 0; text-align: center; font-size: 0.9em; }

/* --- RESPONSIVE STYLES --- */
@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 2; }
    .hero-image-container { order: 1; max-width: 350px; margin: 0 auto; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .pricing-card-container { flex-direction: column; align-items: center; padding: 10px; gap: 30px; }
    .pricing-card { width: 100%; max-width: 500px; margin: 0; }
    .pricing-card.popular { transform: scale(1); margin: 0; }
}

@media (max-width: 767px) {
    .input-grid { grid-template-columns: 1fr; gap: 15px; }
    .app-header { padding: 8px 15px; }
    .patient-info-header { text-align: right; }
    .patient-name-header { font-size: 1.3em; font-weight: 600; }
    .patient-actions-header { margin-top: 2px; }
    .progress-ring__time { font-size: 1.7em; }
    .progress-ring__label { font-size: 0.65em; }
    .progress-ring__total { font-size: 0.8em; font-weight: 700; }
    .btn { padding: 10px 15px; font-size: 0.9em; min-height: 40px; }
    .btn-remote { font-size: 0.8em; padding: 10px 12px; }
    .aligner-control input { padding: 12px 8px; font-size: 1.2em; font-weight: bold; min-height: 44px; }
    .aligner-control button { padding: 8px 12px; min-width: 44px; font-size: 1.1em; min-height: 44px; }
    .key-stats-grid { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .stat-card { padding: 12px; flex: 1 1 100%; }
    @media (min-width: 400px) { .key-stats-grid { grid-template-columns: 1fr 1fr; } }
    .stat-card .number { font-size: 1.4em; }
    .stat-card .label { font-size: 0.7em; }
    .calendar-day { font-size: 0.7em; }
    #calendar-legend { gap: 5px; }
    .legend-item { font-size: 0.7em; }
    .help-modal { max-width: 95%; padding: 15px; }
    .help-content { max-height: 60vh; }
    #toastContainer { top: 10px; right: 10px; left: 10px; width: auto; }
    
    /* Marketing Page Responsive */
    .marketing-nav nav { display: none; }
    .hero-content h1 { font-size: 2.5em; }
    .steps-grid, .testimonial-grid, .footer-container { grid-template-columns: 1fr; }
    .footer-container { text-align: center; }
    
    .pricing-card-container { padding: 0 10px; }
    .pricing-card { width: 100%; max-width: none; }
}