/* ── Variables ─────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --zofi-bg:          #f9fafb;
    --zofi-bg-card:     #ffffff;
    --zofi-bg-glass:    rgba(255,255,255,0.85);
    --zofi-border:      #e5e7eb;
    --zofi-border-soft: #f3f4f6;

    /* Brand */
    --zofi-teal:        #00789E;
    --zofi-teal-dark:   #006080;
    --zofi-green:       #10B981;
    --zofi-green-dark:  #059669;

    /* Aliases used throughout templates */
    --zofi-purple:      #00789E;
    --zofi-purple-2:    #10B981;
    --zofi-blue:        #00789E;

    /* Text */
    --zofi-text:        #58595B;
    --zofi-muted:       #6b7280;

    /* Gradients */
    --zofi-grad:        linear-gradient(135deg, #00789E, #10B981);
    --zofi-grad-text:   linear-gradient(90deg, #00789E, #10B981);

    /* Shadows */
    --zofi-shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --zofi-shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    --zofi-shadow-lg:   0 12px 40px rgba(0,120,158,.12);
}

/* ── Landing dark scope ────────────────────────────────────── */
/* Overrides light variables only inside the landing page wrapper */
.zofi-landing {
    --zofi-bg:          #07151C;
    --zofi-bg-card:     #0d1f2d;
    --zofi-bg-glass:    rgba(255,255,255,0.04);
    --zofi-border:      rgba(255,255,255,.08);
    --zofi-border-soft: rgba(255,255,255,.06);
    --zofi-text:        #e2e8f0;
    --zofi-muted:       #94a3b8;
    background-color: var(--zofi-bg);
    color: var(--zofi-text);
}

/* Bootstrap accordion overrides inside dark landing */
.zofi-landing .accordion-button {
    color: var(--zofi-text);
    background: transparent;
}
.zofi-landing .accordion-button:not(.collapsed) {
    color: var(--zofi-text);
    background: transparent;
    box-shadow: none;
}
.zofi-landing .accordion-button::after {
    filter: invert(1);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--zofi-bg);
    color: var(--zofi-text);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Gradient text ─────────────────────────────────────────── */
.text-grad {
    background: var(--zofi-grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-zofi {
    background: var(--zofi-teal);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: 12px;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: var(--zofi-shadow-md);
}
.btn-zofi:hover {
    background: var(--zofi-teal-dark);
    transform: translateY(-1px);
    box-shadow: var(--zofi-shadow-lg);
    color: #fff;
}

.btn-zofi-outline {
    background: transparent;
    border: 1px solid var(--zofi-border);
    color: var(--zofi-muted);
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: 12px;
    transition: all .2s;
}
.btn-zofi-outline:hover {
    background: var(--zofi-bg);
    border-color: var(--zofi-teal);
    color: var(--zofi-teal);
}

/* ── Cards ─────────────────────────────────────────────────── */
.glass-card {
    background: var(--zofi-bg-card);
    border: 1px solid var(--zofi-border-soft);
    border-radius: 16px;
    box-shadow: var(--zofi-shadow-sm);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.glass-card:hover {
    border-color: rgba(0,120,158,.25);
    transform: translateY(-4px);
    box-shadow: var(--zofi-shadow-lg);
}

/* ── Navbar ────────────────────────────────────────────────── */
.zofi-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--zofi-border);
    box-shadow: var(--zofi-shadow-sm);
    transition: box-shadow .3s;
}
.zofi-navbar .navbar-brand span { font-weight: 800; font-size: 1.4rem; }
.zofi-navbar .nav-link { color: var(--zofi-muted) !important; font-weight: 500; transition: color .2s; }
.zofi-navbar .nav-link:hover { color: var(--zofi-teal) !important; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Keep dark hero for landing impact, with new brand colors */
    background: #07151C;
    color: #e2e8f0;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .2;
    pointer-events: none;
}
.hero-glow-1 { background: var(--zofi-teal);  top: -100px; left: -100px; }
.hero-glow-2 { background: var(--zofi-green); bottom: -100px; right: -100px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(0,120,158,.15);
    border: 1px solid rgba(0,120,158,.35);
    color: #5dc8f0;
    border-radius: 50px;
    padding: .35rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Chat mockup (landing) */
.chat-mockup {
    background: #0d1f2d;
    border: 1px solid rgba(0,120,158,.25);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
    position: relative;
}
.chat-mockup::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: var(--zofi-grad);
    z-index: -1;
    opacity: .25;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 1rem;
}
.chat-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--zofi-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700; color: #fff;
}
.chat-bubble {
    padding: .65rem 1rem;
    border-radius: 12px;
    font-size: .88rem;
    margin-bottom: .5rem;
    max-width: 85%;
    line-height: 1.5;
}
.bubble-bot {
    background: rgba(0,120,158,.18);
    border: 1px solid rgba(0,120,158,.25);
    color: #e2e8f0;
}
.bubble-user {
    background: rgba(16,185,129,.15);
    border: 1px solid rgba(16,185,129,.2);
    color: #e2e8f0;
    margin-left: auto;
}
.typing-dots span {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--zofi-teal);
    margin: 0 2px;
    animation: blink 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* ── Sections (landing) ────────────────────────────────────── */
.section-label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--zofi-teal);
    margin-bottom: .75rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.section-sub {
    color: var(--zofi-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
}

/* ── Feature icon ──────────────────────────────────────────── */
.feature-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(0,120,158,.1);
    border: 1px solid rgba(0,120,158,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    transition: background .25s;
}
.glass-card:hover .feature-icon {
    background: rgba(0,120,158,.18);
}

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-card {
    background: var(--zofi-bg-card);
    border: 1px solid var(--zofi-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: border-color .25s, transform .25s, box-shadow .25s;
    height: 100%;
    box-shadow: var(--zofi-shadow-sm);
}
.pricing-card.featured {
    border-color: var(--zofi-teal);
    box-shadow: 0 0 0 1px rgba(0,120,158,.15), var(--zofi-shadow-lg);
    position: relative;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--zofi-shadow-lg);
}
.pricing-badge {
    position: absolute;
    top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--zofi-grad);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .9rem;
    border-radius: 50px;
    white-space: nowrap;
}
.price-amount {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--zofi-text);
}
.price-unit { font-size: .9rem; color: var(--zofi-muted); }
.pricing-list li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--zofi-border-soft);
    font-size: .92rem;
    color: var(--zofi-muted);
    display: flex; align-items: center; gap: .6rem;
}
.pricing-list li:last-child { border-bottom: none; }
.pricing-list .check { color: var(--zofi-green); }

/* ── Stat counter ──────────────────────────────────────────── */
.stat-card {
    text-align: center;
    padding: 2rem;
}
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--zofi-grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Footer ────────────────────────────────────────────────── */
.zofi-footer {
    border-top: 1px solid var(--zofi-border);
    padding: 3rem 0;
    color: var(--zofi-muted);
    font-size: .9rem;
}

/* ── Dashboard navbar ──────────────────────────────────────── */
.dash-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--zofi-border);
    box-shadow: var(--zofi-shadow-sm);
}

/* ── Dashboard sidebar ─────────────────────────────────────── */
.dash-sidebar {
    width: 240px;
    min-height: calc(100vh - 60px);
    background: #ffffff;
    border-right: 1px solid var(--zofi-border);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}
.dash-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border-radius: 10px;
    color: var(--zofi-muted);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s;
    margin-bottom: .25rem;
}
.dash-nav-link:hover {
    background: rgba(0,120,158,.07);
    color: var(--zofi-teal);
}
.dash-nav-link.active {
    background: var(--zofi-teal);
    color: #ffffff;
}
.dash-nav-link .bi { font-size: 1.05rem; }

/* ── Dashboard stat cards ──────────────────────────────────── */
.dash-stat-card {
    background: var(--zofi-bg-card);
    border: 1px solid var(--zofi-border-soft);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--zofi-shadow-sm);
    transition: border-color .2s, box-shadow .2s;
}
.dash-stat-card:hover {
    border-color: rgba(0,120,158,.2);
    box-shadow: var(--zofi-shadow-md);
}

/* ── Progress bar ──────────────────────────────────────────── */
.progress-zofi {
    height: 6px;
    border-radius: 50px;
    background: #f3f4f6;
    overflow: hidden;
}
.progress-zofi .progress-bar {
    border-radius: 50px;
    background: var(--zofi-grad);
}

/* ── Login ─────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--zofi-bg);
}

.login-card {
    background: rgba(13,31,45,.7);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
    /* Gradient border glow (same trick as chat-mockup) */
    outline: 1px solid transparent;
}
.login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: var(--zofi-grad);
    z-index: -1;
    opacity: .2;
}

.login-card .form-control {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #e2e8f0;
    border-radius: 10px;
    padding: .8rem 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.login-card .form-control:focus {
    background: rgba(255,255,255,.09);
    border-color: var(--zofi-teal);
    box-shadow: 0 0 0 3px rgba(0,120,158,.2);
    color: #e2e8f0;
}
.login-card .form-control::placeholder { color: #475569; }

/* ── Misc ──────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--zofi-border);
    margin: 5rem 0;
}