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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: #eef2ff;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0.85rem 2rem;
}
.nav-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white;
}
.logo span { font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary);
    font-size: 0.9rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-status {
    display: flex; align-items: center; gap: 0.4rem;
    color: var(--success); font-size: 0.8rem; font-weight: 500;
    background: var(--success-bg); padding: 0.35rem 0.75rem;
    border-radius: 20px;
}
.pulse {
    width: 7px; height: 7px; background: var(--success); border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* ===== HERO ===== */
.hero {
    position: relative;
    padding: 10rem 2rem 6rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
    position: absolute; border-radius: 50%;
    opacity: 0.15; filter: blur(60px);
}
.shape-1 { width: 500px; height: 500px; background: #6366f1; top: -100px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: #ec4899; bottom: -50px; left: -100px; }
.shape-3 { width: 300px; height: 300px; background: #7c3aed; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge {
    display: inline-block; padding: 0.4rem 1rem;
    background: rgba(99,102,241,0.1); color: var(--primary);
    border-radius: 20px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.5rem; border: 1px solid rgba(99,102,241,0.15);
}
.hero h1 {
    font-size: 3.5rem; font-weight: 800; line-height: 1.1;
    letter-spacing: -1.5px; margin-bottom: 1.25rem; color: var(--text);
}
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 40%, #ec4899 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem; color: var(--text-secondary);
    line-height: 1.7; max-width: 540px; margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 2.5rem; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.75rem; background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; border-radius: 12px; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }
.btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.75rem; background: var(--card);
    color: var(--text); border-radius: 12px; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; transition: all 0.25s;
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary-light); background: var(--primary-bg); }

.hero-trust { display: flex; align-items: center; gap: 0.75rem; justify-content: center; }
.trust-avatars { display: flex; }
.trust-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 0.75rem;
    border: 2px solid white; margin-left: -8px;
}
.trust-avatar:first-child { margin-left: 0; }
.hero-trust span { font-size: 0.85rem; color: var(--text-muted); }

/* ===== FEATURES ===== */
.features { padding: 5rem 2rem; background: var(--card); }
.features-content { max-width: 1100px; margin: 0 auto; text-align: center; }
.section-label {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--primary); margin-bottom: 0.75rem;
}
.section-title {
    font-size: 2rem; font-weight: 700; letter-spacing: -0.5px;
    margin-bottom: 3rem; color: var(--text);
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
    text-align: left; padding: 2rem;
    border-radius: var(--radius); border: 1px solid var(--border);
    transition: all 0.3s; background: var(--card);
}
.feature-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== PRICING ===== */
.pricing-section { padding: 5rem 2rem; background: var(--bg); }
.pricing-content { max-width: 1100px; margin: 0 auto; text-align: center; }
.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; margin-top: 1rem; align-items: start;
}
.pricing-card {
    position: relative;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2.25rem 1.75rem;
    text-align: left; transition: all 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}
.popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; font-size: 0.75rem; font-weight: 700;
    padding: 0.3rem 1rem; border-radius: 20px; white-space: nowrap;
}
.pricing-header { margin-bottom: 1.5rem; }
.pricing-header h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-amount {
    font-size: 3rem; font-weight: 800; line-height: 1;
    letter-spacing: -1px; color: var(--text); margin-bottom: 0.5rem;
}
.pricing-amount .currency { font-size: 1.5rem; vertical-align: super; font-weight: 600; }
.pricing-amount .pricing-cents { font-size: 1.5rem; font-weight: 600; }
.pricing-amount .period { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-desc { font-size: 0.85rem; color: var(--text-secondary); }
.pricing-features {
    list-style: none; padding: 0; margin-bottom: 2rem;
    display: flex; flex-direction: column; gap: 0.65rem;
}
.pricing-features li {
    font-size: 0.9rem; color: var(--text-secondary);
    padding-left: 1.5rem; position: relative;
}
.pricing-features li::before {
    content: "✓"; position: absolute; left: 0;
    color: var(--success); font-weight: 700;
}
.pricing-btn {
    width: 100%; padding: 0.85rem; border: none; border-radius: 12px;
    font-size: 0.95rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.25s;
    background: var(--bg); color: var(--text); border: 1px solid var(--border);
}
.pricing-btn:hover { border-color: var(--primary-light); background: var(--primary-bg); color: var(--primary); }
.pricing-card.popular .pricing-btn {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; border: none;
    box-shadow: 0 4px 15px rgba(99,102,241,0.35);
}
.pricing-card.popular .pricing-btn:hover {
    transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4);
}

/* ===== APP SECTION ===== */
.app-section { padding: 4rem 2rem 5rem; }
.app-content { max-width: 1200px; margin: 0 auto; }

/* Stats Bar */
.stats-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem; border-radius: var(--radius-sm);
    background: var(--card); border: 1px solid var(--border);
    transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { font-size: 1.5rem; }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

/* Layout */
.main-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.5rem; align-items: start;
}

/* Dashboard */
.dashboard {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    border: 1px solid var(--border);
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.panel-header h2 { font-size: 1.05rem; font-weight: 600; }
.date-nav { display: flex; align-items: center; gap: 0.5rem; }
.date-btn {
    width: 32px; height: 32px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--card); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 0.9rem; transition: all 0.15s;
}
.date-btn:hover { background: var(--primary-bg); border-color: var(--primary-light); color: var(--primary); }
#selected-date {
    padding: 0.4rem 0.75rem; border: 1px solid var(--border);
    border-radius: 8px; font-size: 0.85rem; font-family: inherit;
    color: var(--text); background: var(--card);
}

#appointments-list { padding: 1rem 1.5rem; }
.appointment-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; margin-bottom: 0.75rem; border-radius: var(--radius-sm);
    background: var(--bg); transition: all 0.2s; border: 1px solid transparent;
}
.appointment-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.appt-time {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; padding: 0.4rem 0.75rem;
    border-radius: 8px; font-weight: 600; font-size: 0.85rem; white-space: nowrap;
}
.appt-details { flex: 1; }
.appt-name { font-weight: 600; font-size: 0.95rem; }
.appt-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.empty-state {
    color: var(--text-muted); text-align: center;
    padding: 2rem 1rem; font-size: 0.9rem;
}

/* Slots */
.slots-section { padding: 0 1.5rem 1.5rem; }
.slots-section h3 {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); margin-bottom: 0.75rem; font-weight: 600;
}
.slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.slot {
    padding: 0.5rem; text-align: center; border-radius: 8px;
    font-size: 0.8rem; font-weight: 500; border: 1px solid var(--border);
    transition: all 0.15s; cursor: default;
}
.slot.available { background: var(--success-bg); color: #059669; border-color: #a7f3d0; }
.slot.booked { background: var(--danger-bg); color: #dc2626; border-color: #fecaca; text-decoration: line-through; opacity: 0.6; }

/* ===== CHAT PANEL ===== */
.chat-panel {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex;
    flex-direction: column; height: 620px; overflow: hidden;
    border: 1px solid var(--border);
}
.chat-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0.75rem;
    background: linear-gradient(135deg, #faf5ff 0%, #eef2ff 100%);
}
.chat-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: white;
}
.chat-header-info { display: flex; flex-direction: column; }
.chat-title { font-weight: 600; font-size: 0.95rem; }
.chat-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    background: linear-gradient(180deg, #fafbfc, #f8fafc);
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.message { display: flex; gap: 0.5rem; align-items: flex-end; animation: fadeIn 0.3s ease; }
.message.user { justify-content: flex-end; }
.message p {
    padding: 0.75rem 1rem; border-radius: 16px;
    max-width: 80%; font-size: 0.9rem; line-height: 1.55;
}
.message.bot p {
    background: var(--card); color: var(--text);
    border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.message.user p {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; border-bottom-right-radius: 4px;
}
.bot-avatar {
    width: 28px; height: 28px; min-width: 28px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.65rem; font-weight: 700;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-input-area {
    display: flex; gap: 0.5rem; padding: 1rem 1.5rem;
    border-top: 1px solid var(--border); background: var(--card);
}
.chat-input-area input {
    flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border);
    border-radius: 12px; font-size: 0.9rem; outline: none;
    font-family: inherit; background: var(--bg); transition: all 0.2s;
}
.chat-input-area input:focus {
    border-color: var(--primary); background: var(--card);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.chat-input-area button {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white; border: none; border-radius: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.chat-input-area button:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.chat-input-area button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Typing Indicator */
.typing-indicator {
    display: flex; gap: 5px; padding: 0.75rem 1rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; border-bottom-left-radius: 4px; width: fit-content;
}
.typing-indicator span {
    width: 7px; height: 7px; background: var(--primary-light);
    border-radius: 50%; animation: bounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* ===== CTA / EMAIL CAPTURE ===== */
.cta-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    text-align: center;
}
.cta-content { max-width: 560px; margin: 0 auto; }
.cta-content h2 {
    font-size: 2rem; font-weight: 800; color: white;
    letter-spacing: -0.5px; margin-bottom: 0.75rem;
}
.cta-content > p { font-size: 1rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; line-height: 1.6; }
.email-form {
    display: flex; gap: 0.5rem; max-width: 440px; margin: 0 auto;
}
.email-form input {
    flex: 1; padding: 0.85rem 1.25rem; border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px; font-size: 0.95rem; font-family: inherit;
    background: rgba(255,255,255,0.1); color: white; outline: none;
    transition: all 0.2s; backdrop-filter: blur(10px);
}
.email-form input::placeholder { color: rgba(255,255,255,0.5); }
.email-form input:focus { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }
.email-form button {
    padding: 0.85rem 1.5rem; background: white; color: #4f46e5;
    border: none; border-radius: 12px; font-weight: 700;
    font-size: 0.9rem; font-family: inherit; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.email-form button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.email-success { color: rgba(255,255,255,0.9); font-size: 0.9rem; margin-top: 1rem; }

/* ===== FOOTER ===== */
.footer {
    background: var(--card); border-top: 1px solid var(--border);
    padding: 2rem;
}
.footer-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-logo { font-weight: 700; font-size: 1rem; color: var(--text); }
.footer-tagline { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
    text-decoration: none; color: var(--text-secondary);
    font-size: 0.85rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; }
    .nav-links a:not(.nav-status) { display: none; }
    .hero { padding: 8rem 1.5rem 4rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .features { padding: 3rem 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 1rem auto 0; }
    .section-title { font-size: 1.5rem; }
    .app-section { padding: 2rem 1rem; }
    .stats-bar { grid-template-columns: 1fr; }
    .main-grid { grid-template-columns: 1fr; }
    .slots-grid { grid-template-columns: repeat(3, 1fr); }
    .chat-panel { height: 500px; }
    .cta-content h2 { font-size: 1.5rem; }
    .email-form { flex-direction: column; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
}
