/* widget-redesign.css — SCOPED LAYER (wgsite2fix6)
   Every rule forced inside #section-website-widget.
   Page-wide rules (body/html/root/sidebar restyle) dropped →
   the rest of the dashboard keeps the PROD (v6 redesign.css) look.
 */

/* ═══════════════════════════════════════════════════════════════════════
   AutoKul — Dashboard Redesign layer (redesign.css)
   Loaded LAST (end of <body>) so it wins over style.css / dashboard-components.css
   / inbox.css / the inline <style> blocks.  CSS ONLY — no ids, handlers, data-*
   or JS were touched.  Safe to remove: deleting the <link> restores the old look.

   1. Design tokens  (dark refined · LIGHT rebuilt)
   2. Base / canvas / scrollbars
   3. Sidebar
   4. Page header + account cluster + theme switch
   5. Cards, stats, charts, live terminal
   6. Forms, buttons, toggles, badges
   7. Inbox
   8. Modals / menus / toasts
   9. Mobile  (≤ 767px)  +  small tablets
═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────── 1. TOKENS ───────────────────────── */

/* ── LIGHT — clean slate canvas, white cards, indigo brand, strong readable text ── */
html.theme-light #section-website-widget {
  color-scheme: light;

  --bg:        #f2f4f9;       /* canvas */
  --surface:   #ffffff;       /* sidebar / bars */
  --card:      #ffffff;
  --elevated:  #ffffff;
  --border:    rgba(16, 24, 40, 0.09);
  --border-h:  rgba(16, 24, 40, 0.18);
  --text:      #0b1220;
  --sec:       #3a4558;
  --muted:     #66728a;

  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-soft:   rgba(79, 70, 229, 0.09);
  --accent-text:   #4338ca;
  --on-accent:     #ffffff;   /* text colour ON the accent (indigo) */
  --accent-glow:   0 0 0 1px rgba(79,70,229,.25), 0 8px 24px -8px rgba(79,70,229,.35);

  --success: #047857;  --success-em: #047857;
  --warning: #b45309;  --warn-em:    #b45309;
  --error:   #d92d20;  --error-em:   #d92d20;

  /* legacy aliases that style.css re-declares for light — pin them to our palette */
  --bg-base:    var(--bg);
  --bg-surface: var(--surface);
  --bg-card:    var(--card);
  --bg-card-2:  #f6f7fb;
  --bg-input:   #ffffff;
  --bg-hover:   rgba(16, 24, 40, 0.04);
  --border-md:  rgba(16, 24, 40, 0.14);
  --border-accent: rgba(79, 70, 229, 0.35);
  --text-primary:   #0b1220;
  --text-secondary: #3a4558;
  --text-muted:     #66728a;
  --text-bright:    #020617;
  --accent-2:   #4338ca;
  --accent-3:   #3730a3;
  --accent-dim: rgba(79, 70, 229, 0.09);
  --amber:      #b45309;

  --shadow-card: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px -8px rgba(16,24,40,.10);
  --rd-shadow-pop: 0 20px 50px -12px rgba(16,24,40,.28);
  --rd-canvas-glow:
    radial-gradient(1000px 460px at 88% -10%, rgba(99,102,241,.13), transparent 62%),
    radial-gradient(800px 420px at -6% 108%, rgba(14,165,233,.09), transparent 62%);
  --rd-hover: rgba(16, 24, 40, 0.045);
  --rd-field: #ffffff;
  --rd-track-off: #c3cad6;
  --rd-thumb-shadow: 0 1px 3px rgba(16,24,40,.35);
}

/* ───────────────────────── 2. BASE ───────────────────────── */
#section-website-widget #client-view, #section-website-widget #admin-view, #section-website-widget #reseller-view, #section-website-widget #no-sub-view { background: var(--bg); }
#section-website-widget .client-layout { background: var(--bg); }
#section-website-widget .client-layout > main, #section-website-widget .client-main, #section-website-widget #client-main, #section-website-widget .client-content {
  background: var(--rd-canvas-glow), var(--bg);
}
#section-website-widget ::-webkit-scrollbar { width: 8px; height: 8px; }
#section-website-widget ::-webkit-scrollbar-thumb { background: rgba(127,138,160,.35); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
#section-website-widget ::-webkit-scrollbar-thumb:hover { background: rgba(127,138,160,.6); background-clip: padding-box; border: 2px solid transparent; }
html.theme-light ::-webkit-scrollbar-thumb #section-website-widget { background: rgba(71,85,105,.28); background-clip: padding-box; border: 2px solid transparent; }
#section-website-widget ::selection { background: var(--accent-soft); color: var(--text); }
#section-website-widget :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#section-website-widget button:focus:not(:focus-visible), #section-website-widget a:focus:not(:focus-visible) { outline: none; }

/* ───────────────────────── 3. SIDEBAR ───────────────────────── */
#section-website-widget .client-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(255,255,255,0.0);
}
html.theme-light .client-sidebar #section-website-widget {
  background: #ffffff;
  border-right: 1px solid rgba(16,24,40,.08);
  box-shadow: 4px 0 24px -16px rgba(16,24,40,.12);
}
#section-website-widget .sidebar-brand, html.theme-light .sidebar-brand #section-website-widget {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 16px 16px 14px;
  min-height: 68px;
}
#section-website-widget .sidebar-brand-wordmark img { height: 30px; width: auto; object-fit: contain; display: block; }
#section-website-widget .sidebar-toggle {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--sec); background: transparent; border: 1px solid transparent; transition: background .15s, color .15s;
}
#section-website-widget .sidebar-toggle:hover { background: var(--rd-hover); color: var(--text); }
#section-website-widget .sidebar-nav { padding: 10px 10px 16px; scrollbar-width: thin; }
#section-website-widget .sidebar-group-label, html.theme-light .sidebar-group-label #section-website-widget {
  color: var(--muted);
  font-size: 0.66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
html.theme-light .sidebar-group-label #section-website-widget { color: #6b7790; }
#section-website-widget .sidebar-group-label:hover { color: var(--text); }
#section-website-widget .sidebar-nav-item {
  border-radius: 12px; padding: 9px 12px; gap: 12px; min-height: 46px;
  color: var(--sec); border: 1px solid transparent;
  transition: background .15s var(--rd-ease), color .15s, border-color .15s, transform .15s;
}
#section-website-widget .sidebar-nav-item .sidebar-nav-label { color: inherit; font-weight: 600; font-size: .88rem; letter-spacing: -.01em; }
#section-website-widget .sidebar-nav-hint, html.theme-light .sidebar-nav-hint #section-website-widget { color: var(--muted); font-size: .7rem; font-weight: 500; }
#section-website-widget .sidebar-nav-item:hover, html.theme-light .sidebar-nav-item:hover #section-website-widget { background: var(--rd-hover); color: var(--text); border-color: transparent; }
#section-website-widget .sidebar-nav-item:hover .sidebar-nav-icon { color: var(--text); }
#section-website-widget .sidebar-nav-item.active, html.theme-light .sidebar-nav-item.active #section-website-widget {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: none;
}
#section-website-widget .sidebar-nav-item.active .sidebar-nav-label, html.theme-light .sidebar-nav-item.active .sidebar-nav-label #section-website-widget { color: var(--accent-text); font-weight: 700; }
#section-website-widget .sidebar-nav-item.active .sidebar-nav-hint, html.theme-light .sidebar-nav-item.active .sidebar-nav-hint #section-website-widget { color: color-mix(in srgb, var(--accent-text) 70%, var(--muted)); }
#section-website-widget .sidebar-nav-item.active::before {
  left: -10px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent);
}
#section-website-widget .sidebar-nav-item.active .sidebar-nav-icon:not([class*="sidebar-nav-icon--"]) { color: var(--accent); }
#section-website-widget .sidebar-nav-icon { color: var(--muted); }
html.theme-light .sidebar-nav-icon #section-website-widget { color: #5b6880; }
#section-website-widget .sidebar-nav-item.feature-locked { opacity: .55; }
#section-website-widget .sidebar-bottom, html.theme-light .sidebar-bottom #section-website-widget {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px;
}
html.theme-light .sidebar-bottom #section-website-widget { background: #fbfcfe; }
#section-website-widget .sidebar-user-avatar, #section-website-widget .sidebar-avatar, #section-website-widget .sidebar-bottom [class*="avatar"] {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px -4px rgba(99,102,241,.6);
}
html.theme-light .sidebar-user-name #section-website-widget { color: #0b1220; font-weight: 700; }

/* ───────────────────────── 4. HEADER ───────────────────────── */
#section-website-widget .section-header { padding: 26px 32px 12px; align-items: center; }
#section-website-widget .section-body { padding-top: 12px; }
#section-website-widget .section-body[style*="padding-top:0"] { padding-top: 6px !important; }
#section-website-widget #section-dashboard .section-header { padding-right: 32px !important; }
#section-website-widget #section-dashboard .dash-header-actions { margin-right: 0; }
#section-website-widget .section-title, html.theme-light .section-title #section-website-widget {
  font-size: 1.55rem; font-weight: 750; letter-spacing: -0.03em; color: var(--text);
}
#section-website-widget .section-subtitle { font-size: .86rem; color: var(--muted); margin-top: 4px; font-weight: 500; }
#section-website-widget .section-body { padding: 24px 32px 48px; gap: 22px; }
#section-website-widget .dash-header-actions { display: flex; align-items: center; gap: 10px; }
#section-website-widget .dash-account-cluster { display: flex; align-items: center; gap: 8px; }
#section-website-widget .dash-topup-chip, html.theme-light .dash-topup-chip #section-website-widget {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px 14px; box-shadow: var(--shadow-card);
}
#section-website-widget .dash-topup-label, html.theme-light .dash-topup-label #section-website-widget { color: var(--muted) !important; font-weight: 700; font-size: .6rem; letter-spacing: .08em; }
#section-website-widget .dash-topup-value, html.theme-light .dash-topup-value #section-website-widget { color: var(--text) !important; font-weight: 800; }
#section-website-widget .dash-topup-unit, html.theme-light .dash-topup-unit #section-website-widget { color: var(--sec) !important; }
#section-website-widget .dash-topup-add-btn {
  background: var(--accent); color: var(--on-accent, #0a0a0a); border-radius: 9px; width: 28px; height: 28px; font-weight: 700;
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
}
#section-website-widget .dash-account-btn, html.theme-light .dash-account-btn #section-website-widget {
  background: var(--card) !important; color: var(--text) !important; border: 1px solid var(--border-h) !important;
  border-radius: 12px; padding: 9px 16px; font-size: .8rem; font-weight: 650; box-shadow: var(--shadow-card);
}
#section-website-widget .dash-account-btn:hover, html.theme-light .dash-account-btn:hover #section-website-widget {
  background: var(--accent-soft) !important; border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; color: var(--accent-text) !important;
}
#section-website-widget .ak-bell-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--sec); border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
#section-website-widget .ak-bell-btn:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* Theme switch (sun/moon pill) */
#section-website-widget .theme-toggle-btn, html.theme-light .theme-toggle-btn #section-website-widget {
  background: var(--card); border: 1px solid var(--border-h); color: var(--sec);
  box-shadow: var(--shadow-card);
}
#section-website-widget .theme-switch-dual { height: 40px; padding: 0 6px; border-radius: 999px; }
#section-website-widget .theme-toggle-btn--header { width: auto; min-width: 66px; height: 40px; border-radius: 999px; }

/* ───────────────────────── 5. CARDS ───────────────────────── */
#section-website-widget .integration-card, #section-website-widget .card, #section-website-widget .sub-card, #section-website-widget .bi-card.card, #section-website-widget .bi-stat-card, #section-website-widget .chat-log-card, #section-website-widget #dash-ai-control, #section-website-widget .catalog-card, #section-website-widget .plan-card, #section-website-widget .store-setup-panel, #section-website-widget .profile-card, #section-website-widget .prod-modal-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--rd-radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .2s var(--rd-ease), box-shadow .2s var(--rd-ease), transform .2s var(--rd-ease);
}
html.theme-light .integration-card #section-website-widget, html.theme-light .sub-card #section-website-widget, html.theme-light .chat-log-card #section-website-widget, html.theme-light #dash-ai-control #section-website-widget, html.theme-light [style*="background:var(--bg-card)"] #section-website-widget {
  background: #ffffff; border: 1px solid rgba(16,24,40,.09); box-shadow: var(--shadow-card);
}
#section-website-widget .integration-card { padding: 22px 26px; }
#section-website-widget .integration-card:hover, #section-website-widget .bi-stat-card:hover, #section-website-widget .bi-card.card:hover, #section-website-widget .sub-card:hover { border-color: var(--border-h); }
html.theme-light .integration-card:hover #section-website-widget, html.theme-light .sub-card:hover #section-website-widget {
  border-color: rgba(79,70,229,.28); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 28px -10px rgba(79,70,229,.16);
}
#section-website-widget .card-title, #section-website-widget .bi-card-title {
  font-size: .68rem; font-weight: 750; letter-spacing: .09em; color: var(--muted); text-transform: uppercase;
}
html.theme-light .card-title #section-website-widget, html.theme-light .bi-card-title #section-website-widget { color: #55627a; }

/* Quick AI Control */
#section-website-widget #dash-ai-control { padding: 18px 20px !important; border-radius: var(--rd-radius-lg) !important; }
#section-website-widget #dash-ai-control > div:first-child { font-size: .72rem !important; letter-spacing: .09em; text-transform: uppercase; color: var(--muted) !important; font-weight: 750 !important; }
#section-website-widget #dash-ai-control > div:nth-child(2) { gap: 12px !important; }
#section-website-widget #dash-ai-control > div:nth-child(2) > div {
  background: var(--bg-hover) !important; border: 1px solid var(--border); border-radius: 12px !important;
  padding: 12px 14px !important; transition: border-color .15s, background .15s;
}
html.theme-light #dash-ai-control > div:nth-child(2) > div #section-website-widget { background: #f6f7fb !important; border-color: rgba(16,24,40,.07); }
#section-website-widget #dash-ai-control > div:nth-child(2) > div:hover { border-color: var(--border-h); }
#section-website-widget #dash-ai-control span[data-i18n], #section-website-widget #dash-ai-control span[style*="font-weight:600"] { color: var(--text); }

/* BI stats */
#section-website-widget .bi-stats-row { gap: 16px; }
#section-website-widget .bi-stat-card, html.theme-light .bi-stat-card #section-website-widget { padding: 20px 22px; position: relative; overflow: hidden; }
#section-website-widget .bi-stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none;
}
#section-website-widget .bi-stat-label, html.theme-light .bi-stat-label #section-website-widget { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .09em; }
#section-website-widget .bi-stat-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
#section-website-widget .bi-stat-value--accent { color: var(--accent-text); }
#section-website-widget .bi-stat-value--success { color: var(--success); }
#section-website-widget .bi-charts-row { gap: 16px; }
#section-website-widget .bi-card.card { padding: 20px 22px; }

/* Live terminal */
#section-website-widget .live-activity-card { border-radius: var(--rd-radius-lg); }
html.theme-light .live-activity-card #section-website-widget {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fd 100%);
  border: 1px solid rgba(16,24,40,.1);
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 16px 36px -18px rgba(79,70,229,.22);
}
html.theme-light .live-activity-card::before #section-website-widget {
  background:
    radial-gradient(circle at 22px 20px, #ff5f57 5px, transparent 5.6px),
    radial-gradient(circle at 40px 20px, #febc2e 5px, transparent 5.6px),
    radial-gradient(circle at 58px 20px, #28c840 5px, transparent 5.6px),
    linear-gradient(180deg, rgba(79,70,229,.06), rgba(79,70,229,.015));
  border-bottom: 1px solid rgba(16,24,40,.08);
}
html.theme-light .live-log-line--idle #section-website-widget { color: #5b6880; }
html.theme-light .live-log-prompt #section-website-widget { color: #4f46e5; }

/* ───────────────────────── 5b. HARDCODED-DARK SURFACES (found by audit) ───────────────────────── */

/* Catalog / Products: no heavy panel around the page — cards float on the canvas */
#section-website-widget .catalog-shell, html.theme-light .catalog-shell #section-website-widget {
  background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0; padding-left: 32px; padding-right: 32px;
}
html.theme-light .catalog-filter #section-website-widget, html.theme-light .catalog-stat #section-website-widget { background: #ffffff; border: 1px solid rgba(16,24,40,.1); box-shadow: var(--shadow-card); }
#section-website-widget .catalog-filter, #section-website-widget .catalog-stat { border-radius: 14px; }
#section-website-widget .catalog-card { overflow: hidden; }
#section-website-widget .catalog-card:hover { transform: translateY(-2px); }

/* WhatsApp / channel connection cards (were dark gradient in BOTH themes) */
#section-website-widget .wa-premium-card {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16,185,129,.08), transparent 56%),
    radial-gradient(120% 140% at 100% 0%, rgba(99,102,241,.09), transparent 52%),
    var(--card) !important;
  border: 1px solid var(--border);
  border-left: 3px solid var(--wa);
  box-shadow: var(--shadow-card) !important;
}
html.theme-light .wa-premium-card .bot-status-pill #section-website-widget { background: var(--accent-soft); border-color: rgba(79,70,229,.25); }

/* "Upgrade to connect" lock layer */
html.theme-light .connection-lock-overlay #section-website-widget {
  background: rgba(242, 244, 249, .74); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(79,70,229,.22);
}
html.theme-light .connection-lock-overlay .lock-card #section-website-widget {
  background: #ffffff; border: 1px solid rgba(16,24,40,.1); color: #3a4558; padding: 20px 24px; border-radius: 16px;
  box-shadow: 0 20px 44px -16px rgba(16,24,40,.3);
}
html.theme-light .connection-lock-overlay .lock-card [style*="fef3c7"] #section-website-widget { color: #0b1220 !important; }
html.theme-light .connection-lock-overlay .lock-card [style*="254 #section-website-widget, #section-website-widget 243, #section-website-widget 199"] { color: #55627a !important; }
#section-website-widget .connection-lock-overlay { border-radius: var(--rd-radius-lg); }
#section-website-widget .connection-lock-overlay .lock-card button { border-radius: 10px !important; padding: 10px 24px !important; box-shadow: 0 8px 18px -8px rgba(99,102,241,.7); }
html.theme-light .fb-btn-test #section-website-widget { background: #ffffff !important; color: #3a4558 !important; border: 1px solid rgba(16,24,40,.18) !important; }
html.theme-light .order-fields-disclosure__body #section-website-widget { background: #f6f7fb; }
html.theme-light .fb-copy-field #section-website-widget { background: #f6f7fb; color: #0b1220; border-color: rgba(16,24,40,.14); }
html.theme-light .topup-input #section-website-widget { background: #ffffff; color: #0b1220; border: 1px solid rgba(16,24,40,.18); }
html.theme-light .order-bulk-modal-panel #section-website-widget, html.theme-light .modal-box #section-website-widget, html.theme-light .prod-modal-panel #section-website-widget { background: #ffffff; }

/* ───────────────────────── 5c. LIGHT-MODE CONTRAST FIXES (from automated audit) ───────────────────────── */

/* Brand-colored headings/labels are pale on white → use deep brand shades */
html.theme-light .section-title.text-wa #section-website-widget, html.theme-light .card-title.text-wa #section-website-widget, html.theme-light .section-title[style*="color:#25D366"] #section-website-widget, html.theme-light .card-title[style*="color:#25D366"] #section-website-widget, html.theme-light .section-title[style*="color:var(--wa)"] #section-website-widget, html.theme-light .card-title[style*="color:var(--wa)"] #section-website-widget { color: #0e8a47 !important; }
html.theme-light [style*="color:#25f4ee"] #section-website-widget, html.theme-light [style*="color:#25F4EE"] #section-website-widget { color: #0e7490 !important; }
html.theme-light .section-title[style*="color:var(--tg)"] #section-website-widget, html.theme-light .card-title[style*="color:var(--tg)"] #section-website-widget, html.theme-light .card-title.text-tg #section-website-widget { color: #0b78ae !important; }
html.theme-light [style*="color:#22c55e"] #section-website-widget { color: #15803d !important; }
html.theme-light [style*="color:#f59e0b"] #section-website-widget { color: #b45309 !important; }
html.theme-light .section-title.text-amber #section-website-widget, html.theme-light .text-amber.section-title #section-website-widget { color: var(--text) !important; }
html.theme-light [style*="color:#fda4af"] #section-website-widget, html.theme-light [style*="color:#f87171"]:not(button) #section-website-widget { color: #be123c !important; }
html.theme-light .tt-copy-btn #section-website-widget { color: #be123c; background: rgba(254,44,85,.08); border-color: rgba(254,44,85,.35); }
html.theme-light #section-inbox .inbox-chat-empty-state p #section-website-widget { color: #5b6880; }
html.theme-light #section-inbox .inbox-chat-empty-state h3 #section-website-widget { color: #0b1220; }

/* white-on-pale / white-on-light-green buttons — both themes */
#section-website-widget #waba-oauth-connect-btn { background: #128c4a !important; border-color: #128c4a !important; color: #fff !important; }
#section-website-widget .btn-save[style*="10b981"], #section-website-widget #section-followup .btn-save { background: #047857 !important; border-color: #047857 !important; color: #fff !important; }

/* Courier cards: heading was hard white */
html.theme-light .courier-card-header h3 #section-website-widget, html.theme-light #section-courier h3 #section-website-widget { color: #0b1220; }

/* push-alert switch in bell panel: visible OFF state in light */
html.theme-light .ak-push-tr #section-website-widget { background: var(--rd-track-off) !important; }
html.theme-light .ak-push-sw input:checked ~ .ak-push-tr #section-website-widget { background: #16a34a !important; }

/* ───────────────────────── 6. FORMS · BUTTONS · TOGGLES ───────────────────────── */
#section-website-widget .form-group label { color: var(--sec); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
html.theme-light .form-group label #section-website-widget { color: #3a4558; }
#section-website-widget .form-group input, #section-website-widget .form-group textarea, #section-website-widget .form-group select, #section-website-widget input[type="text"].form-control, #section-website-widget select.form-control, #section-website-widget textarea.form-control {
  background: var(--rd-field);
  border: 1px solid var(--border-h);
  border-radius: 11px;
  color: var(--text);
  padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
html.theme-light .form-group input #section-website-widget, html.theme-light .form-group textarea #section-website-widget, html.theme-light .form-group select #section-website-widget {
  background: #ffffff; border: 1px solid rgba(16,24,40,.18); color: #0b1220;
  box-shadow: 0 1px 1px rgba(16,24,40,.03);
}
#section-website-widget .form-group input::placeholder, #section-website-widget .form-group textarea::placeholder { color: var(--muted); opacity: .85; }
#section-website-widget .form-group input:hover, #section-website-widget .form-group textarea:hover, #section-website-widget .form-group select:hover { border-color: var(--border-h); }
#section-website-widget .form-group input:focus, #section-website-widget .form-group textarea:focus, #section-website-widget .form-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); background: var(--rd-field);
}
html.theme-light .form-group input:focus #section-website-widget, html.theme-light .form-group textarea:focus #section-website-widget, html.theme-light .form-group select:focus #section-website-widget { background: #fff; }
#section-website-widget .form-group input:disabled, #section-website-widget .form-group textarea:disabled, #section-website-widget .form-group select:disabled { opacity: .6; cursor: not-allowed; }
html.theme-light .form-group input:disabled #section-website-widget, html.theme-light .form-group textarea:disabled #section-website-widget, html.theme-light .form-group select:disabled #section-website-widget { background: #f1f3f8; }
html.theme-light .form-group input[readonly] #section-website-widget { background: #f6f7fb; }
#section-website-widget .btn-save {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent) 100%);
  color: var(--on-accent, #0a0a0a); border-radius: 11px; font-weight: 650; padding: 10px 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
#section-website-widget .btn-save:hover { background: linear-gradient(180deg, var(--accent-hover), var(--accent)); transform: translateY(-1px); }
#section-website-widget .btn-save:active { transform: translateY(0); filter: brightness(.96); }
#section-website-widget .btn-ghost, html.theme-light .btn-ghost #section-website-widget {
  background: var(--card); color: var(--text); border: 1px solid var(--border-h); border-radius: 11px; font-weight: 600;
  box-shadow: 0 1px 1px rgba(16,24,40,.04);
}
#section-website-widget .btn-ghost:hover, html.theme-light .btn-ghost:hover #section-website-widget { background: var(--rd-hover); border-color: var(--border-h); color: var(--text); }
#section-website-widget .btn-delete-sm { border-radius: 8px; }
html.theme-light .btn-delete-sm #section-website-widget { background: #fff5f4; border-color: rgba(217,45,32,.3); color: #b42318; }

/* Bot power toggle (36x20 → 44x24, clearly visible OFF + ON states) */
#section-website-widget .bot-power-toggle { width: 44px; height: 24px; }
#section-website-widget .power-track {
  background: var(--rd-track-off);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
  transition: background .2s var(--rd-ease);
}
#section-website-widget .power-thumb {
  width: 20px; height: 20px; top: 2px; left: 2px; background: #fff; box-shadow: var(--rd-thumb-shadow);
  transition: transform .22s var(--rd-ease);
}
#section-website-widget .bot-power-toggle input:checked + .power-track { background: var(--accent); box-shadow: inset 0 1px 2px rgba(0,0,0,.2), 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#section-website-widget .bot-power-toggle input:checked + .power-track .power-thumb, #section-website-widget .bot-power-toggle input:checked:active + .power-track .power-thumb { transform: translateX(20px); }
#section-website-widget .bot-power-toggle:active .power-thumb { width: 20px; }
#section-website-widget #dash-ai-control .bot-power-toggle { width: 44px; height: 24px; }
#section-website-widget .bot-power-toggle input:disabled + .power-track { opacity: .6; }

/* Generic .toggle-switch (44x24) */
#section-website-widget .toggle-track { background: var(--rd-track-off) !important; border: 0 !important; box-shadow: inset 0 1px 2px rgba(0,0,0,.18); }
#section-website-widget .toggle-track::after { background: #fff !important; box-shadow: var(--rd-thumb-shadow); }
#section-website-widget .toggle-switch input:checked + .toggle-track { background: var(--accent) !important; }

/* Order-collection switch (Orders / Store): lighter OFF track in light mode, green ON stays */
html.theme-light .order-collection-track #section-website-widget { background: var(--rd-track-off); box-shadow: inset 0 1px 2px rgba(16,24,40,.22); }
html.theme-light .order-collection-switch input:checked ~ .order-collection-track #section-website-widget { background: linear-gradient(180deg, #34d399, #059669); }
html.theme-light .order-collection-thumb #section-website-widget { box-shadow: 0 1px 3px rgba(16,24,40,.4); }

/* Order-mgmt quick bar / state pill */
#section-website-widget .order-mgmt-quickbar {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--rd-radius-lg); box-shadow: var(--shadow-card);
}
html.theme-light .order-mgmt-quickbar #section-website-widget { background: #ffffff; }
#section-website-widget .order-mgmt-quickbar__state { color: var(--sec); font-weight: 800; letter-spacing: .08em; }

/* Section-level "locked until enabled" overlays should read as disabled, not smudged */
html.theme-light .section-body [style*="opacity:0.5"] #section-website-widget, html.theme-light .section-body [style*="opacity: 0.5"] #section-website-widget { opacity: .6 !important; }

/* Tables */
html.theme-light table th #section-website-widget { color: #55627a; }
html.theme-light table td #section-website-widget, html.theme-light table th #section-website-widget { border-color: rgba(16,24,40,.08) !important; }

/* Floating chat/help launcher */
#section-website-widget .ak-help-fab, #section-website-widget #ak-help-fab, #section-website-widget .ak-help-btn {
  background: linear-gradient(135deg, #6366f1, #7c3aed) !important; color: #fff !important;
  box-shadow: 0 10px 24px -8px rgba(99,102,241,.7) !important;
}

/* ───────────────────────── 7. INBOX ───────────────────────── */
html.theme-light .inbox-layout #section-website-widget { background: #ffffff; }
html.theme-light .inbox-sidebar #section-website-widget { background: #ffffff; border-right: 1px solid rgba(16,24,40,.09); }
html.theme-light .inbox-sidebar-search #section-website-widget {
  background: #f3f5fa; border: 1px solid rgba(16,24,40,.1); border-radius: 12px;
}
html.theme-light .inbox-sidebar-search input #section-website-widget { color: #0b1220; }
html.theme-light .inbox-sidebar-search input::placeholder #section-website-widget { color: #66728a; }
#section-website-widget .inbox-filter-pill {
  border-radius: 999px; font-weight: 600; font-size: .78rem; transition: background .15s, color .15s, border-color .15s;
}
html.theme-light .inbox-filter-pill #section-website-widget { color: #3a4558; background: transparent; border: 1px solid transparent; }
html.theme-light .inbox-filter-pill:hover #section-website-widget { background: rgba(16,24,40,.05); }
html.theme-light .inbox-filter-pill--active #section-website-widget { background: #4f46e5 !important; color: #fff !important; border-color: #4f46e5 !important; box-shadow: 0 4px 10px -4px rgba(79,70,229,.6); }
#section-website-widget .inbox-filter-pill--active { background: var(--accent) !important; color: var(--on-accent, #0a0a0a) !important; }
html.theme-light .inbox-main #section-website-widget, html.theme-light .inbox-chat #section-website-widget, html.theme-light .inbox-thread #section-website-widget { background: #f2f4f9; }
html.theme-light .uni-export-btn #section-website-widget { background: rgba(4,120,87,.08); color: #047857 !important; border: 1px solid rgba(4,120,87,.25); }
html.theme-light .inbox-empty-state p #section-website-widget, html.theme-light [class*="inbox-empty"] p #section-website-widget, html.theme-light [class*="inbox-empty"] #section-website-widget { color: #5b6880; }
html.theme-light .btn-danger #section-website-widget { background: #fff1f0; color: #b42318 !important; border: 1px solid rgba(217,45,32,.3); }
html.theme-light .btn-danger:hover #section-website-widget { background: #ffe4e1; }

/* ───────────────────────── 8. MODALS · MENUS · TOASTS ───────────────────────── */
#section-website-widget .modal, #section-website-widget .ak-dialog-box, #section-website-widget .ak-help-menu, #section-website-widget .ak-bell-panel, #section-website-widget .topup-modal-box {
  border-radius: var(--rd-radius-lg); box-shadow: var(--rd-shadow-pop);
}
html.theme-light .ak-bell-panel #section-website-widget { background: #fff; border: 1px solid rgba(16,24,40,.1); }
html.theme-light .custom-toast #section-website-widget { box-shadow: 0 12px 30px -10px rgba(16,24,40,.3); }

/* ───────────────────────── 9. MOBILE ───────────────────────── */

  #section-website-widget .section-header { padding: 22px 22px 0; }
  #section-website-widget .section-body { padding: 20px 22px 40px; }
}

  #section-website-widget #section-dashboard .section-header { padding: 12px 14px !important; }
  
  /* canvas + safe areas */
  #section-website-widget .section-header { padding: 16px 16px 0; gap: 10px; }
  #section-website-widget .section-title, html.theme-light .section-title #section-website-widget { font-size: 1.3rem; }
  #section-website-widget .section-subtitle { font-size: .8rem; }
  #section-website-widget .section-body { padding: 14px 14px calc(var(--bottom-nav-h, 64px) + 28px); gap: 14px; }
  #section-website-widget .integration-card { padding: 16px; border-radius: 16px; }
  

  /* header actions → compact single row */
  #section-website-widget .dash-header-actions { gap: 8px; }
  #section-website-widget .dash-account-cluster {
    gap: 4px; padding: 4px; border-radius: 14px; background: var(--card);
    border: 1px solid var(--border); box-shadow: var(--shadow-card);
  }
  #section-website-widget .dash-balance-chip {
    display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: .8rem; border: 0;
  }
  #section-website-widget .dash-balance-chip .dash-topup-value { color: var(--accent-text) !important; }
  #section-website-widget .ak-bell-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; box-shadow: none; background: transparent; }
  #section-website-widget .dash-account-btn, html.theme-light .dash-account-btn #section-website-widget {
    height: 34px; padding: 0 10px; border-radius: 10px; font-size: .76rem; box-shadow: none;
    border-color: transparent !important; background: var(--rd-hover) !important;
  }
  #section-website-widget .theme-toggle-btn--header, #section-website-widget .theme-switch-dual { height: 36px; }
  

  /* Quick AI control: 1 column list rows */
  #section-website-widget #dash-ai-control { padding: 14px !important; border-radius: 16px !important; }
  #section-website-widget #dash-ai-control > div:nth-child(2) { gap: 8px !important; }
  #section-website-widget #dash-ai-control > div:nth-child(2) > div { min-width: 100% !important; padding: 11px 12px !important; }
  

  /* stats → 3 compact tiles in a row when they fit, otherwise 1 */
  #section-website-widget .bi-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  #section-website-widget .bi-stat-card, html.theme-light .bi-stat-card #section-website-widget { padding: 14px 12px; border-radius: 14px; }
  #section-website-widget .bi-stat-label, html.theme-light .bi-stat-label #section-website-widget { font-size: .58rem; letter-spacing: .06em; line-height: 1.25; min-height: 2.5em; }
  #section-website-widget .bi-stat-value { font-size: 1.45rem; margin-top: 4px; }
  #section-website-widget .bi-stat-card::after { width: 70px; height: 70px; right: -20px; top: -20px; }
  #section-website-widget .bi-charts-row { grid-template-columns: 1fr; gap: 12px; }
  #section-website-widget .bi-card.card { padding: 16px; }
  #section-website-widget .bi-chart-wrap { height: 200px; }
  #section-website-widget .bi-chart-wrap--pie { height: 200px; }
  #section-website-widget .live-activity-list { height: 180px; font-size: .74rem; }
  

  /* bottom nav — floating, clear active state */
  #section-website-widget .mobile-bottom-nav, html.theme-light .mobile-bottom-nav #section-website-widget {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px -18px rgba(16,24,40,.25);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  html.theme-light .mobile-bottom-nav #section-website-widget { background: rgba(255,255,255,.94); }
  #section-website-widget .mobile-nav-btn { color: var(--muted); font-weight: 700; font-size: .62rem; letter-spacing: .04em; transition: color .15s; }
  #section-website-widget .mobile-nav-btn.active, html.theme-light .mobile-nav-btn.active #section-website-widget { color: var(--accent-text); }
  #section-website-widget .mobile-nav-btn.active svg { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 45%, transparent)); }
  

  /* forms: 16px prevents iOS zoom-on-focus */
  #section-website-widget .form-group input, #section-website-widget .form-group textarea, #section-website-widget .form-group select { font-size: 16px; padding: 12px 14px; }
  #section-website-widget .btn-save { padding: 12px 18px; }
  

  /* inbox mobile */
  html.theme-light .inbox-sidebar #section-website-widget { border-right: 0; }
  

  /* modals become bottom-sheets-ish */
  #section-website-widget .modal { max-width: calc(100vw - 24px); }
}

  #section-website-widget .bi-stats-row { grid-template-columns: 1fr; }
  #section-website-widget .bi-stat-label { min-height: 0; }
}

/* ───────────────────────── 10. DARK-ONLY PREMIUM PALETTE (graphite + gold) ─────────────────────────
   Everything here is scoped to dark so the light theme (indigo) is untouched.
   Text sitting ON the gold accent is near-black for contrast. */
#section-website-widget html:not(.theme-light) .btn-save, #section-website-widget html:not(.theme-light) .inbox-filter-pill--active, #section-website-widget html:not(.theme-light) .dash-topup-add-btn, #section-website-widget html:not(.theme-light) [style*="background:var(--accent)"], #section-website-widget html:not(.theme-light) [style*="background: var(--accent)"] { color: #1a1306 !important; }
#section-website-widget html:not(.theme-light) .btn-save { background: linear-gradient(180deg, #e6c78a 0%, #cfa660 100%); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px -8px rgba(212,173,103,.55); }
#section-website-widget html:not(.theme-light) .btn-save:hover { background: linear-gradient(180deg, #f0d7a3, #d9b36c); }
#section-website-widget html:not(.theme-light) .btn-save svg, #section-website-widget html:not(.theme-light) .btn-save * { color: inherit; }
#section-website-widget html:not(.theme-light) .power-track { box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
#section-website-widget html:not(.theme-light) .bot-power-toggle input:checked + .power-track { background: linear-gradient(180deg,#e6c78a,#cfa660); }
#section-website-widget html:not(.theme-light) .bot-power-toggle input:checked + .power-track .power-thumb { background: #1a1306; }
#section-website-widget html:not(.theme-light) .sidebar-user-avatar, #section-website-widget html:not(.theme-light) .sidebar-avatar, #section-website-widget html:not(.theme-light) .sidebar-bottom [class*="avatar"] {
  background: linear-gradient(135deg, #e6c78a, #b88a43) !important; color: #1a1306 !important; box-shadow: 0 4px 12px -4px rgba(212,173,103,.55);
}
#section-website-widget html:not(.theme-light) .ak-help-fab, #section-website-widget html:not(.theme-light) #ak-help-fab, #section-website-widget html:not(.theme-light) .ak-help-btn {
  background: linear-gradient(135deg, #e6c78a, #b88a43) !important; color: #1a1306 !important; box-shadow: 0 10px 24px -8px rgba(212,173,103,.6) !important;
}
#section-website-widget html:not(.theme-light) .sidebar-nav-item.active { border-color: rgba(212,173,103,.28); }
#section-website-widget html:not(.theme-light) .bi-stat-card::after { background: radial-gradient(circle, rgba(212,173,103,.14), transparent 70%); }
#section-website-widget html:not(.theme-light) .wa-premium-card {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16,185,129,.07), transparent 56%),
    radial-gradient(120% 140% at 100% 0%, rgba(212,173,103,.08), transparent 52%),
    var(--card) !important;
}
#section-website-widget html:not(.theme-light) .live-activity-card { background: linear-gradient(180deg, #141311, #0f0e0c); border-color: rgba(255,238,210,.09); }
#section-website-widget html:not(.theme-light) .live-log-prompt { color: #d4ad67; }
#section-website-widget html:not(.theme-light) .inbox-layout, #section-website-widget html:not(.theme-light) .inbox-sidebar { background: var(--surface); }
#section-website-widget html:not(.theme-light) .inbox-main, #section-website-widget html:not(.theme-light) .inbox-chat { background: var(--bg); }
#section-website-widget html:not(.theme-light) ::-webkit-scrollbar-thumb { background: rgba(255,238,210,.16); background-clip: padding-box; border: 2px solid transparent; }
#section-website-widget html:not(.theme-light) .connection-lock-overlay .lock-card button { box-shadow: 0 8px 18px -8px rgba(212,173,103,.6); }
#section-website-widget html:not(.theme-light) .mobile-bottom-nav { background: rgba(17,16,14,.92); }
#section-website-widget html:not(.theme-light) .mobile-nav-btn.active svg { filter: drop-shadow(0 2px 6px rgba(212,173,103,.5)); }
#section-website-widget html:not(.theme-light) ::selection { background: rgba(212,173,103,.3); }

  #section-website-widget * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}