/* ═══════════════════════════════════════════════════════════
   WA Platform — Enterprise UI v3
   Font: Inter (Google Fonts)
═══════════════════════════════════════════════════════════ */
:root {
    --primary:        #25D366;
    --primary-dark:   #128C7E;
    --primary-light:  #d1fae5;
    --secondary:      #075E54;
    --accent:         #34B7F1;
    --danger:         #ef4444;
    --warning:        #f59e0b;
    --info:           #3b82f6;
    --success:        #10b981;

    --sidebar-bg:     #0b1120;
    --sidebar-border: rgba(255,255,255,.06);
    --sidebar-text:   #8b9bb4;
    --sidebar-active: #25D366;
    --sidebar-hover:  rgba(255,255,255,.05);

    --body-bg:        #f0f2f5;
    --card-bg:        #ffffff;
    --card-border:    rgba(0,0,0,.05);
    --card-shadow:    0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    --card-shadow-lg: 0 4px 12px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.06);

    --text-primary:   #111827;
    --text-secondary: #6b7280;
    --text-muted:     #9ca3af;
    --border:         #e5e7eb;
    --radius:         12px;
    --radius-sm:      8px;
    --radius-lg:      16px;
    --radius-xl:      20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-border);
}

/* Brand */
.sidebar-brand {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37,211,102,.3);
}
.brand-logo-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.brand-name { font-size: .88rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub  { font-size: .68rem; color: var(--sidebar-text); margin-top: 1px; }

/* Nav sections */
.sidebar-section { padding: 6px 0; }
.sidebar-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.2);
    padding: 10px 16px 4px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0;
    transition: all .15s;
    font-size: .84rem;
    font-weight: 500;
    position: relative;
    margin: 1px 8px;
    border-radius: 8px;
}
.sidebar-link i { width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0; }
.sidebar-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active {
    background: rgba(37,211,102,.12);
    color: var(--sidebar-active);
    font-weight: 600;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -8px; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--sidebar-active);
    border-radius: 0 3px 3px 0;
}
.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    border-radius: 50px;
    font-size: .63rem;
    font-weight: 700;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
}

/* User footer */
.sidebar-user {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: white;
    flex-shrink: 0;
}
.user-name { font-size: .82rem; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .68rem; color: var(--sidebar-text); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT / TOPBAR
═══════════════════════════════════════════════════════════ */
.main-content {
    margin-left: 248px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}
.topbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.01em;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.notif-btn {
    width: 36px; height: 36px;
    background: var(--body-bg);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .15s;
}
.notif-btn:hover { background: var(--border); color: var(--text-primary); }
.page-body { padding: 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.02em; }
.page-header p  { color: var(--text-secondary); font-size: .85rem; margin-top: 3px; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}
.card-header h5 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    transition: all .2s;
}
.stat-card:hover { box-shadow: var(--card-shadow-lg); transform: translateY(-2px); }
.stat-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 90px; height: 90px;
    background: var(--stat-color, #25D366);
    opacity: .06;
    border-radius: 50%;
}
.stat-icon {
    width: 46px; height: 46px;
    background: var(--stat-color, #25D366);
    opacity: .1;
    border-radius: 11px;
    margin-bottom: 14px;
}
.stat-icon-inner {
    position: absolute;
    width: 46px; height: 46px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
}
.stat-num   { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.02em; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-secondary); margin-top: 5px; font-weight: 500; }
.stat-change { font-size: .75rem; margin-top: 8px; font-weight: 600; }
.stat-up   { color: var(--success); }
.stat-down { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table {
    font-size: .85rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    background: #fafafa;
    white-space: nowrap;
}
.table td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
    color: var(--text-primary);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #f8fffe; }

/* Badges */
.badge {
    font-size: .68rem;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-active     { background: #d1fae5; color: #065f46; }
.status-pending    { background: #fef3c7; color: #92400e; }
.status-suspended  { background: #fee2e2; color: #991b1b; }
.status-open       { background: #dbeafe; color: #1e40af; }
.status-resolved   { background: #d1fae5; color: #065f46; }
.status-in_progress{ background: #fef3c7; color: #92400e; }
.status-closed     { background: #f3f4f6; color: #4b5563; }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-size: .88rem;
    font-family: inherit;
    transition: all .2s;
    background: #fafafa;
    color: var(--text-primary);
    width: 100%;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,211,102,.12);
    background: #fff;
    outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 5px;
    letter-spacing: .01em;
    text-transform: uppercase;
    display: block;
}
.form-text { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }
.input-group-text {
    background: #f9fafb;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    font-size: .85rem;
}
.font-monospace { font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace !important; font-size: .82rem !important; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .84rem;
    padding: 8px 16px;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
}
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,211,102,.18); }
.btn-primary  { background: var(--primary); border: 1.5px solid var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,.25); color: #fff; }
.btn-success  { background: var(--success); border: 1.5px solid var(--success); color: #fff; }
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-danger   { background: var(--danger); border: 1.5px solid var(--danger); color: #fff; }
.btn-warning  { background: var(--warning); border: 1.5px solid var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-secondary { background: #6b7280; border: 1.5px solid #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; border-color: #4b5563; color: #fff; }
.btn-outline-primary   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: rgba(37,211,102,.08); color: var(--primary); }
.btn-outline-secondary { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline-secondary:hover { background: var(--body-bg); color: var(--text-primary); }
.btn-sm  { padding: 5px 11px; font-size: .78rem; border-radius: 7px; }
.btn-xs  { padding: 3px 8px; font-size: .72rem; border-radius: 6px; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════ */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: .85rem;
    border: none;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.alert-success { background: #f0fdf4; color: #065f46; border-left: 3px solid var(--success); }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--warning); }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 3px solid var(--info); }
.alert-dismissible .btn-close { padding: 8px; }

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════════════════ */
.landing-hero {
    background: linear-gradient(135deg, #071a16 0%, #0a2e27 35%, #1a4f43 60%, #25D366 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(37,211,102,.12), transparent 70%);
    top: -200px; right: -100px;
    border-radius: 50%;
}
.landing-hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(52,183,241,.08), transparent 70%);
    bottom: -100px; left: -100px;
    border-radius: 50%;
}
.hero-badge {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: .78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255,255,255,.9);
}
.hero-badge-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; animation: pulse 2s infinite; }
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -.03em; }
.hero-title span { color: #DCF8C6; }
.hero-desc { font-size: 1rem; opacity: .8; line-height: 1.75; max-width: 480px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-primary {
    background: #25D366; color: #fff;
    padding: 13px 28px; border-radius: 50px;
    font-weight: 700; text-decoration: none;
    transition: all .2s; font-size: .95rem;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 8px 24px rgba(37,211,102,.3);
    border: none;
}
.btn-hero-primary:hover { background: #1db954; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,211,102,.4); color: #fff; }
.btn-hero-outline {
    border: 1.5px solid rgba(255,255,255,.35); color: white;
    padding: 13px 28px; border-radius: 50px;
    font-weight: 600; text-decoration: none;
    transition: all .2s; font-size: .95rem;
    display: inline-flex; align-items: center; gap: 8px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,.05);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.5); }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stat-label { font-size: .78rem; opacity: .6; margin-top: 2px; }
.hero-visual {
    background: rgba(255,255,255,.06);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.12);
    padding: 22px;
    max-width: 360px; width: 100%;
}
.mock-phone {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.mock-phone-header {
    background: var(--secondary);
    color: white;
    padding: 13px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: .85rem;
}
.mock-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.mock-chat { padding: 12px; background: #e5ddd5; min-height: 180px; }
.mock-bubble {
    background: white;
    border-radius: 6px 12px 12px 2px;
    padding: 8px 12px;
    margin-bottom: 8px;
    max-width: 85%; font-size: 12px; line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.mock-bubble.sent { background: #DCF8C6; border-radius: 12px 12px 2px 12px; margin-left: auto; }
.features-section { padding: 80px 0; background: white; }
.feature-card {
    background: #f8fffe;
    border-radius: var(--radius);
    padding: 28px;
    height: 100%;
    transition: all .2s;
    border: 1.5px solid #e8f5f0;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-lg); border-color: var(--primary-light); }
.feature-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(37,211,102,.25);
}
.pricing-section { padding: 80px 0; background: var(--body-bg); }
.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all .2s;
}
.pricing-card.featured { border-color: var(--primary); position: relative; box-shadow: 0 8px 32px rgba(37,211,102,.15); }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-lg); }
.pricing-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white;
    padding: 3px 18px; border-radius: 50px; font-size: .75rem; font-weight: 700;
}
.price-num { font-size: 2.6rem; font-weight: 800; color: var(--secondary); letter-spacing: -.03em; }

/* ═══════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #071a16 0%, #0a2e27 50%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,211,102,.1), transparent 70%);
    top: -100px; right: -100px;
}
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    position: relative;
    z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: white;
    margin: 0 auto 12px;
    box-shadow: 0 8px 24px rgba(37,211,102,.3);
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════════════════════ */
.settings-nav .nav-link {
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: .84rem;
    font-weight: 500;
    padding: 8px 12px;
}
.settings-nav .nav-link.active { background: var(--primary); color: white; font-weight: 600; }
.settings-nav .nav-link:hover:not(.active) { background: var(--body-bg); }
.greeting-type-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all .2s;
}
.greeting-type-card:hover { border-color: var(--primary); background: rgba(37,211,102,.02); }
.greeting-type-card.selected { border-color: var(--primary); background: rgba(37,211,102,.04); box-shadow: 0 0 0 4px rgba(37,211,102,.08); }
.greeting-preview {
    background: var(--body-bg);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: .83rem;
    line-height: 1.75;
    white-space: pre-wrap;
    border-left: 3px solid var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   WEB CHAT (Public)
═══════════════════════════════════════════════════════════ */
.webchat-container {
    max-width: 520px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #e5ddd5;
    position: relative;
}
.webchat-header {
    background: linear-gradient(135deg, #075E54, #128C7E);
    color: white;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    flex-shrink: 0;
}
.webchat-company-avatar {
    width: 42px; height: 42px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    border: 2px solid rgba(255,255,255,.25);
    flex-shrink: 0;
}
.webchat-company-name { font-size: .95rem; font-weight: 700; line-height: 1.2; }
.webchat-company-sub  { font-size: .72rem; opacity: .7; }
.webchat-online { display: inline-block; width: 8px; height: 8px; background: #4ade80; border-radius: 50%; margin-right: 4px; animation: pulse 2s infinite; }
.webchat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.webchat-bubble {
    padding: 9px 13px;
    border-radius: 16px;
    font-size: .88rem;
    line-height: 1.55;
    max-width: 82%;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.webchat-bubble.bot {
    background: white;
    border-radius: 4px 16px 16px 16px;
    align-self: flex-start;
}
.webchat-bubble.user {
    background: #DCF8C6;
    border-radius: 16px 16px 4px 16px;
    align-self: flex-end;
}
.webchat-img { max-width: 220px; border-radius: 12px; margin: 4px 0; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.webchat-time { font-size: .63rem; color: #999; margin-top: 3px; }
.webchat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    align-self: flex-start;
    max-width: 88%;
}
.webchat-btn {
    background: white;
    color: var(--secondary);
    border: 1.5px solid rgba(7,94,84,.25);
    border-radius: 50px;
    padding: 7px 16px;
    font-size: .83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.webchat-btn:hover { background: var(--secondary); color: white; border-color: var(--secondary); transform: translateY(-1px); }
.webchat-input-area {
    background: rgba(240,242,245,.95);
    padding: 12px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
}
.webchat-input {
    flex: 1;
    background: white;
    border: 1.5px solid transparent;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: .88rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.webchat-input:focus { border-color: var(--primary); }
.webchat-send {
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(37,211,102,.3);
}
.webchat-send:hover { background: var(--primary-dark); transform: scale(1.05); }
.webchat-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-radius: 4px 16px 16px 16px;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.webchat-typing span {
    width: 7px; height: 7px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing .8s ease-in-out infinite;
}
.webchat-typing span:nth-child(2) { animation-delay: .15s; }
.webchat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,80%,100% { transform: scale(.7); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* ═══════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════ */
.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.bg-primary-soft{ background: rgba(37,211,102,.08); }

.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.divider   { height: 1px; background: var(--border); margin: 14px 0; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 14px; opacity: .25; display: block; }
.empty-state p { font-size: .88rem; line-height: 1.7; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-item {
    background: #1a1a2e;
    color: #fff;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: .84rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 380px;
    animation: slideUp .25s ease;
    border-left: 3px solid #25D366;
}
.toast-item.danger  { border-left-color: var(--danger); }
.toast-item.warning { border-left-color: var(--warning); }
.toast-item.info    { border-left-color: var(--info); }
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-body { padding: 16px; }
    .hero-visual { display: none; }
    .hero-stats { gap: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn .25s ease; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.45; } }
.pulse { animation: pulse 2s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-border { animation: spin .75s linear infinite; display: inline-block; width: 1rem; height: 1rem; border: .2em solid currentColor; border-right-color: transparent; border-radius: 50%; }
.spinner-border-sm { width: .75rem; height: .75rem; border-width: .18em; }
