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

:root {
    --bg-primary: #13131a;
    --bg-secondary: #0d0d14;
    --bg-sidebar: #0a0a12;
    --bg-card: #1a1a26;
    --bg-card-hover: #202030;
    --accent: #25d366;
    --accent-dark: #1aab52;
    --accent-glow: rgba(37, 211, 102, 0.12);
    --violet: #7c6fff;
    --violet-dark: #6358e8;
    --violet-glow: rgba(124, 111, 255, 0.12);
    --text-primary: #eeeef5;
    --text-secondary: #9898b8;
    --text-muted: #55556a;
    --border: rgba(255,255,255,0.06);
    --border-accent: rgba(37, 211, 102, 0.25);
    --border-violet: rgba(124, 111, 255, 0.25);
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.5);
    --shadow-accent: 0 0 30px rgba(37, 211, 102, 0.12);
    --shadow-violet: 0 0 30px rgba(124, 111, 255, 0.12);
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 60px;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

a {
    text-decoration: none;
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

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

.btn-violet {
    background: var(--violet);
    color: #fff;
    font-weight: 600;
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

    .btn-ghost:hover {
        color: var(--text-primary);
        border-color: var(--border-violet);
        background: var(--violet-glow);
    }

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

    .btn-outline:hover {
        background: var(--accent-glow);
        transform: translateY(-1px);
    }

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

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
}

/* ===================== NAVBAR PUBLIC ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

    .navbar-brand span {
        color: var(--accent);
    }

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), #00c98a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===================== HERO ===================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37,211,102,0.1) 0%, transparent 55%), radial-gradient(ellipse 50% 40% at 85% 85%, rgba(124,111,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

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

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3.5rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat {
    text-align: center;
}

    .hero-stat strong {
        display: block;
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--accent);
    }

    .hero-stat span {
        font-size: 0.82rem;
        color: var(--text-muted);
    }

/* ===================== PUBLIC SECTIONS ===================== */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    background: var(--violet-glow);
    border: 1px solid var(--border-violet);
    color: var(--violet);
    padding: 0.25rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s ease;
}

    .feature-card:hover {
        border-color: var(--border-violet);
        transform: translateY(-3px);
        box-shadow: var(--shadow-violet);
    }

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--violet-glow);
    border: 1px solid var(--border-violet);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* PRICING */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
    transition: all 0.3s ease;
}

    .pricing-card.popular {
        border-color: var(--accent);
        background: linear-gradient(135deg, var(--bg-card), rgba(37,211,102,0.04));
    }

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.9rem;
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.pricing-price {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

    .pricing-price span {
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--text-muted);
    }

.pricing-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

    .pricing-features li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.88rem;
        color: var(--text-secondary);
    }

        .pricing-features li::before {
            content: "?";
            color: var(--accent);
            font-weight: 700;
            flex-shrink: 0;
        }

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

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.testimonial-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.85rem;
}

.testimonial-author span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* FAQ */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.1rem 1.25rem;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
    transition: color 0.2s;
}

    .faq-question:hover {
        color: var(--violet);
    }

.faq-answer {
    padding: 0 1.25rem 1.1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* FOOTER */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3.5rem 2rem 2rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    max-width: 260px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .footer-col ul li a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.88rem;
        transition: color 0.2s;
    }

        .footer-col ul li a:hover {
            color: var(--accent);
        }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ===================== AUTH ===================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(ellipse 70% 50% at 30% 50%, rgba(124,111,255,0.07) 0%, transparent 55%), radial-gradient(ellipse 70% 50% at 70% 50%, rgba(37,211,102,0.07) 0%, transparent 55%), var(--bg-primary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.3rem;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1.1rem;
}

    .form-group label {
        display: block;
        font-size: 0.82rem;
        font-weight: 500;
        color: var(--text-secondary);
        margin-bottom: 0.35rem;
    }

.form-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

    .form-input:focus {
        border-color: var(--border-violet);
        box-shadow: 0 0 0 3px var(--violet-glow);
    }

    .form-input::placeholder {
        color: var(--text-muted);
    }

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 1.1rem;
}

.alert-success {
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 1.1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

    .auth-footer a {
        color: var(--violet);
        font-weight: 500;
    }

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

/* ===================== WIZARD ===================== */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

    .wizard-step span {
        font-size: 0.72rem;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .wizard-step.active span {
        color: var(--violet);
    }

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wizard-step.active .step-circle {
    background: var(--violet-glow);
    border-color: var(--violet);
    color: var(--violet);
}

.wizard-step.done .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.wizard-line {
    height: 2px;
    width: 55px;
    background: var(--border);
    margin-bottom: 1.1rem;
    transition: background 0.3s ease;
}

    .wizard-line.active {
        background: var(--accent);
    }

/* ===================== APP LAYOUT ===================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: width 0.25s ease, min-width 0.25s ease;
    overflow: hidden;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
        min-width: var(--sidebar-collapsed-width);
    }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 56px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
    flex-direction: column;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
}

    .sidebar-brand span {
        font-weight: 400;
        color: var(--text-secondary);
    }

    .sidebar-brand strong {
        font-weight: 700;
        color: var(--text-primary);
    }

.brand-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
}

    .sidebar-toggle:hover {
        border-color: var(--border-violet);
        color: var(--violet);
        background: var(--violet-glow);
    }

/* NAV */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.6rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-group {
    margin-bottom: 0.25rem;
}

.nav-group-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.6rem 0.6rem 0.3rem;
    white-space: nowrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 7px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.855rem;
    font-weight: 450;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: -0.01em;
}

    .nav-link:hover {
        background: rgba(255,255,255,0.04);
        color: var(--text-primary);
    }

    .nav-link.active {
        background: var(--violet-glow);
        color: var(--violet);
        font-weight: 500;
    }

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0.6rem;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    padding: 0.75rem 0.6rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    overflow: hidden;
    cursor: default;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.72rem;
    color: #fff;
    flex-shrink: 0;
}

.user-details {
    overflow: hidden;
    min-width: 0;
}

    .user-details strong {
        display: block;
        font-size: 0.8rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--text-primary);
    }

    .user-details span {
        font-size: 0.7rem;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.7rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
}

    .btn-logout:hover {
        background: rgba(239, 68, 68, 0.08);
        color: #f87171;
    }

/* MAIN */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-primary);
    transition: margin-left 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

    .app-main.collapsed {
        margin-left: var(--sidebar-collapsed-width);
    }

.app-content {
    padding: 2rem 2.5rem;
    width: 100%;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

/* TOPBAR */
.app-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

    .app-topbar h1 {
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: -0.02em;
        color: var(--text-primary);
    }

    .app-topbar p {
        color: var(--text-muted);
        font-size: 0.82rem;
        margin-top: 0.15rem;
    }

/* STAT CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    transition: all 0.2s;
}

    .stat-card:hover {
        border-color: rgba(255,255,255,0.1);
        transform: translateY(-1px);
    }

.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

    .stat-card-icon.green {
        background: var(--accent-glow);
        color: var(--accent);
    }

    .stat-card-icon.violet {
        background: var(--violet-glow);
        color: var(--violet);
    }

    .stat-card-icon.yellow {
        background: rgba(251,191,36,0.1);
        color: #fbbf24;
    }

    .stat-card-icon.red {
        background: rgba(239,68,68,0.1);
        color: #f87171;
    }

.stat-card h3 {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

    .stat-value.green {
        color: var(--accent);
    }

    .stat-value.violet {
        color: var(--violet);
    }

    .stat-value.yellow {
        color: #fbbf24;
    }

    .stat-value.red {
        color: #f87171;
    }

    .stat-value.white {
        color: var(--text-primary);
    }

/* CARD */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .card-header h3 {
        font-size: 0.88rem;
        font-weight: 600;
        letter-spacing: -0.01em;
    }

.card-body {
    padding: 0;
}

/* TABLE */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.855rem;
}

    .data-table th {
        text-align: left;
        padding: 0.7rem 1.4rem;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--text-muted);
        border-bottom: 1px solid var(--border);
        background: rgba(255,255,255,0.015);
    }

    .data-table td {
        padding: 0.85rem 1.4rem;
        border-bottom: 1px solid var(--border);
        color: var(--text-secondary);
        font-size: 0.855rem;
    }

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

    .data-table tbody tr:hover td {
        background: rgba(255,255,255,0.02);
        color: var(--text-primary);
    }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-green {
    background: var(--accent-glow);
    color: var(--accent);
}

.badge-violet {
    background: var(--violet-glow);
    color: var(--violet);
}

.badge-yellow {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
}

.badge-red {
    background: rgba(239,68,68,0.1);
    color: #f87171;
}

.badge-gray {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
}

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

.form-select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

    .form-select:focus {
        border-color: var(--border-violet);
        box-shadow: 0 0 0 3px var(--violet-glow);
    }

    .form-select option {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .app-content {
        padding: 1.25rem;
    }

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

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ===================== CHAT ===================== */
.chat-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    min-width: 300px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 1.25rem 1rem 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

    .chat-sidebar-header h2 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

.chat-tabs {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
    justify-content: center;
}

.chat-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

    .chat-tab:hover {
        color: var(--text-primary);
    }

    .chat-tab.active {
        color: var(--violet);
        border-bottom-color: var(--violet);
    }

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}

    .chat-item:hover {
        background: var(--bg-card-hover);
    }

    .chat-item.active {
        background: var(--violet-glow);
    }

.chat-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

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

.chat-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
}

.chat-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.chat-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* CHAT MAIN */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    min-width: 0;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-header {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    flex-shrink: 0;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.chat-input-area-modern {
    flex-shrink: 0;
}

.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

    .chat-bubble-wrapper.left {
        align-self: flex-start;
        align-items: flex-start;
    }

    .chat-bubble-wrapper.right {
        align-self: flex-end;
        align-items: flex-end;
    }

.chat-bubble {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
}

.bubble-client {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 3px;
}

.bubble-agent {
    background: var(--violet);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-bubble-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    padding: 0 0.25rem;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--bg-card);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    margin-bottom: 0;
}

/* ===================== MODAL ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

    .modal-header h3 {
        font-size: 1rem;
        font-weight: 600;
    }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: var(--text-primary);
    }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* ===================== BTN ORDER ===================== */
.btn-order {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
    padding: 0;
}

    .btn-order:hover {
        border-color: var(--border-violet);
        color: var(--violet);
        background: var(--violet-glow);
    }
.chat-wrapper-full {
    height: calc(100vh);
    overflow: hidden;
    padding: 0;
}

/* ===================== CHAT ATALHOS ===================== */
.chat-atalhos {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}

.chat-atalho-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: inherit;
}

    .chat-atalho-btn:hover {
        border-color: var(--border-violet);
        background: var(--violet-glow);
    }

.chat-atalho-key {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--violet);
    font-family: monospace;
}

.chat-atalho-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CHAT INFO PANEL */
.chat-info-panel {
    width: 260px;
    min-width: 260px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

    .chat-info-header h4 {
        font-size: 0.88rem;
        font-weight: 600;
    }

.chat-info-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

.chat-info-section {
    margin-bottom: 0.75rem;
}

.chat-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.chat-info-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* COLUNA CENTRAL DO CHAT */
.chat-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    flex-shrink: 0;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: transparent;
}

.chat-atalhos {
    flex-shrink: 0;
}

/* MENSAGENS */
.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

    .chat-bubble-wrapper.left {
        align-self: flex-start;
        text-align: left;
    }

    .chat-bubble-wrapper.right {
        align-self: flex-end;
        text-align: left;
    }

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    word-break: break-word;
}

.bubble-client {
    background: var(--bg-card);
    color: var(--text-primary);
}

.bubble-agent {
    background: #7c6fff;
    color: #fff;
}

.bubble-interna {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.chat-bubble-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    padding: 0 0.2rem;
}

/* INPUT */
.chat-input-area {
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.chat-input-area-modern {
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    padding: 0.3rem 0.9rem 0.45rem 0.9rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    box-sizing: border-box;
}

.chat-composer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 0.3rem 0.65rem;
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    box-sizing: border-box;
}

    .chat-composer.modo-interno {
        border-color: rgba(245, 158, 11, 0.35);
        box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
    }

.chat-composer-icon {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .chat-composer-icon:hover {
        background: rgba(255,255,255,0.06);
        color: var(--text-primary);
    }

.chat-input-modern {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-primary);
    padding: 0;
    font-size: 0.92rem;
    line-height: 1;
    height: 24px;
}

    .chat-input-modern:focus {
        outline: none;
    }

.chat-interno-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
}

    .chat-interno-toggle input {
        display: none;
    }

.chat-interno-box {
    width: 15px;
    height: 15px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-interno-text {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1;
}

.chat-interno-toggle input:checked + .chat-interno-box {
    background: #f59e0b;
    border-color: #f59e0b;
}

    .chat-interno-toggle input:checked + .chat-interno-box::after {
        content: "?";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
        font-weight: 700;
        color: #111;
    }

.chat-send-btn {
    min-width: 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* SCROLLBAR DO CHAT */
.chat-messages::-webkit-scrollbar,
.chat-list::-webkit-scrollbar,
.chat-info-body::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-list::-webkit-scrollbar-track,
.chat-info-body::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb,
.chat-info-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--violet), var(--accent));
    border-radius: 999px;
    border: 2px solid var(--bg-card);
}

    .chat-messages::-webkit-scrollbar-thumb:hover,
    .chat-list::-webkit-scrollbar-thumb:hover,
    .chat-info-body::-webkit-scrollbar-thumb:hover {
        filter: brightness(1.08);
    }

.chat-messages,
.chat-list,
.chat-info-body {
    scrollbar-width: thin;
    scrollbar-color: var(--violet) var(--bg-card);
}