﻿/* =====================================================================
   Frantal Siberia — Admin theme  ·  Professional DARK design system
   Aligned with the public site (deep navy + #00d9bd).
   Single source of truth for: login, setup, dashboard, account,
   products-services, promocao, monitor.
   NOTE: the neutral scale is intentionally INVERTED to dark surfaces,
   so existing markup that used var(--ad-neutral-0) as "white card" now
   renders as a dark card automatically.
   ===================================================================== */
:root {
  /* Brand / accent (matches public site) */
  --ad-accent-500: #00d9bd;
  --ad-accent-600: #00b8a2;
  --ad-accent-700: #019683;
  --ad-accent-soft: rgba(0, 217, 189, .14);
  --ad-accent-glow: rgba(0, 217, 189, .35);

  /* Bright blue used for primary buttons / focus / numbers on dark */
  --ad-primary-100: #16314f;
  --ad-primary-600: #3b82f6;
  --ad-primary-700: #4f93f7;
  /* Deep navies for sidebar / hero gradients (kept dark) */
  --ad-primary-800: #0a1f3a;
  --ad-primary-900: #061226;

  /* Neutral scale — INVERTED to dark.
     low numbers = surfaces, high numbers = text. */
  --ad-neutral-0:   #0f2742;   /* card / panel surface            */
  --ad-neutral-50:  #0a1a30;   /* page background                 */
  --ad-neutral-100: #16314f;   /* hairline borders / soft fills   */
  --ad-neutral-200: #1f3c5c;   /* borders                         */
  --ad-neutral-300: #2b4a6d;   /* input borders                   */
  --ad-neutral-500: #9db0c7;   /* muted / secondary text          */
  --ad-neutral-700: #c4d2e3;   /* labels / strong secondary text  */
  --ad-neutral-900: #e8eef6;   /* primary text / headings         */

  /* Extra surfaces */
  --ad-surface:     #0f2742;
  --ad-surface-2:   #13314f;   /* inputs / elevated rows          */
  --ad-surface-3:   #18395c;   /* hover                           */
  --ad-border:      rgba(255, 255, 255, .09);
  --ad-border-2:    rgba(255, 255, 255, .16);

  /* States */
  --ad-success-bg: rgba(16, 185, 129, .16);
  --ad-success-fg: #6ee7b7;
  --ad-danger-bg:  rgba(239, 68, 68, .16);
  --ad-danger-fg:  #fca5a5;
  --ad-warn-bg:    rgba(245, 158, 11, .16);
  --ad-warn-fg:    #fcd34d;
  --ad-info-bg:    rgba(59, 130, 246, .16);
  --ad-info-fg:    #93c5fd;

  --ad-radius-sm: 9px;
  --ad-radius-md: 14px;
  --ad-radius-lg: 20px;
  --ad-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --ad-shadow-md: 0 10px 30px rgba(0, 0, 0, .35);
  --ad-shadow-lg: 0 24px 60px rgba(0, 0, 0, .50);

  --ad-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ad-display: 'Sora', var(--ad-sans);
  --ad-sidebar-w: 268px;
}

* { font-family: var(--ad-sans); }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(0, 217, 189, .06), transparent 46%),
    radial-gradient(120% 120% at 0% 100%, rgba(59, 130, 246, .07), transparent 48%),
    var(--ad-neutral-50);
  color: var(--ad-neutral-900);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .card-title, .stat-number { font-family: var(--ad-display); color: var(--ad-neutral-900); }
a { color: var(--ad-accent-500); }
p { color: var(--ad-neutral-700); }
small { color: var(--ad-neutral-500); }
hr { border: 0; border-top: 1px solid var(--ad-border); }

/* Scrollbars */
* { scrollbar-color: rgba(255,255,255,.18) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }

/* ---------------------------------------------------------------------
   Sidebar
   --------------------------------------------------------------------- */
.sidebar {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(0,217,189,.10), transparent 60%),
    linear-gradient(180deg, var(--ad-primary-900) 0%, #08182e 100%);
  height: 100vh; padding: 22px 16px; color: #fff;
  position: fixed; left: 0; top: 0; width: var(--ad-sidebar-w);
  display: flex; flex-direction: column; overflow: hidden; z-index: 1000;
  border-right: 1px solid var(--ad-border);
}
.sidebar-brand { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--ad-border); flex: 0 0 auto; }
.sidebar-logo { height: 40px; margin-bottom: 12px; }
.sidebar h2 { font-size: 1.12rem; font-weight: 800; margin: 0; letter-spacing: -.01em; color: #fff; }
.sidebar small { color: rgba(255,255,255,.6) !important; font-size: .78rem; }
.sidebar-menu {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  margin: 0 -8px; padding: 0 8px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 8px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.sidebar-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; color: rgba(255,255,255,.74);
  text-decoration: none; border-radius: var(--ad-radius-sm);
  font-weight: 600; font-size: .92rem; position: relative;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sidebar-menu a i { width: 18px; text-align: center; opacity: .85; transition: opacity .18s ease; }
.sidebar-menu a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px); }
.sidebar-menu a:hover i { opacity: 1; }
.sidebar-menu a.active {
  background: linear-gradient(90deg, var(--ad-accent-soft), rgba(0,217,189,.04));
  color: #fff;
}
.sidebar-menu a.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--ad-accent-500); box-shadow: 0 0 12px var(--ad-accent-glow);
}
.sidebar-menu a.active i { color: var(--ad-accent-500); opacity: 1; }
.sidebar-menu hr, .sidebar hr { border: 0; border-top: 1px solid var(--ad-border); margin: 12px 0; }
.sidebar-section-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.4); font-weight: 800; padding: 14px 13px 6px; }

/* ---------------------------------------------------------------------
   Main content + topbar
   --------------------------------------------------------------------- */
.main-content { margin-left: var(--ad-sidebar-w); padding: 24px 28px 70px; min-height: 100vh; }
.topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--ad-surface);
  padding: 16px 22px;
  border-radius: var(--ad-radius-md); margin-bottom: 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  box-shadow: var(--ad-shadow-sm); border: 1px solid var(--ad-border);
}
.topbar h1 { margin: 0; font-size: 1.22rem; font-weight: 800; color: var(--ad-neutral-900); display: flex; align-items: center; gap: 10px; }
.topbar h1 i { color: var(--ad-accent-500); }
.topbar__meta { display: flex; align-items: center; gap: 14px; }
.topbar__user { display: flex; align-items: center; gap: 10px; color: var(--ad-neutral-500); font-size: .86rem; font-weight: 600; }
.topbar__avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #062d28; background: var(--ad-accent-500); }

.btn-logout {
  background: var(--ad-surface-2); color: var(--ad-neutral-700);
  border: 1px solid var(--ad-border); padding: 9px 15px;
  border-radius: var(--ad-radius-sm); cursor: pointer; text-decoration: none; font-weight: 700; font-size: .86rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .18s ease;
}
.btn-logout:hover { background: var(--ad-danger-bg); color: var(--ad-danger-fg); border-color: rgba(239,68,68,.4); }

/* ---------------------------------------------------------------------
   Stats
   --------------------------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card {
  background: var(--ad-surface); padding: 22px; border-radius: var(--ad-radius-md);
  box-shadow: var(--ad-shadow-sm); border: 1px solid var(--ad-border);
  text-align: left; position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ad-accent-500); opacity: 0; transition: opacity .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--ad-shadow-md); border-color: var(--ad-border-2); }
.stat-card:hover::before { opacity: 1; }
.stat-number { font-size: 2.1rem; font-weight: 800; color: var(--ad-accent-500); margin-bottom: 4px; line-height: 1; }
.stat-label { color: var(--ad-neutral-500); font-size: .86rem; font-weight: 600; }

/* ---------------------------------------------------------------------
   Cards / panels
   --------------------------------------------------------------------- */
.card, .panel {
  background: var(--ad-surface); border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-md); box-shadow: var(--ad-shadow-sm); margin-bottom: 22px; color: var(--ad-neutral-900);
}
.card-header, .panel-header {
  background: transparent; border-bottom: 1px solid var(--ad-border);
  padding: 18px 22px; border-radius: var(--ad-radius-md) var(--ad-radius-md) 0 0;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-title { font-size: 1.1rem; font-weight: 800; color: var(--ad-neutral-900); margin: 0; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--ad-accent-500); }
.card-body { padding: 22px; color: var(--ad-neutral-700); }
.muted { color: var(--ad-neutral-500); }

/* ---------------------------------------------------------------------
   Page hero (reusable)
   --------------------------------------------------------------------- */
.ad-hero {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--ad-radius-lg); padding: 26px 30px; margin-bottom: 24px;
  background:
    radial-gradient(120% 140% at 88% 12%, rgba(0,217,189,.30), transparent 55%),
    linear-gradient(140deg, var(--ad-primary-900) 0%, var(--ad-primary-800) 55%, #123c63 100%);
  box-shadow: var(--ad-shadow-md); border: 1px solid var(--ad-border);
}
.ad-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(70% 80% at 82% 10%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 80% at 82% 10%, #000 30%, transparent 100%);
}
.ad-hero__row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.ad-hero__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ad-accent-500); display: inline-flex; align-items: center; gap: 8px; }
.ad-hero__title { font-family: var(--ad-display); font-size: 1.7rem; font-weight: 800; margin: 8px 0 4px; line-height: 1.12; color: #fff; }
.ad-hero__sub { color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 500; margin: 0; }
.ad-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.ad-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; margin-top: 16px; }
.ad-hero__chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 14px; font-size: .82rem; font-weight: 700; color: #fff; }
.ad-hero__chip i { color: var(--ad-accent-500); }
.ad-hbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--ad-radius-sm); font-weight: 700; font-size: .88rem; text-decoration: none; transition: all .18s ease; border: 1px solid transparent; cursor: pointer; }
.ad-hbtn--solid { background: var(--ad-accent-500); color: #06302a; }
.ad-hbtn--solid:hover { background: #fff; color: var(--ad-primary-900); transform: translateY(-2px); }
.ad-hbtn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.ad-hbtn--ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
@media (max-width: 575px){ .ad-hero__title { font-size: 1.4rem; } }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label, label.form-label, .card-body label, form label { font-weight: 700; color: var(--ad-neutral-700); margin-bottom: 7px; display: block; font-size: .88rem; }
.form-hint { color: var(--ad-neutral-500); font-size: .8rem; font-weight: 500; margin-top: 6px; }
.form-control, .form-select, textarea,
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="number"], input[type="search"], input[type="tel"], input[type="date"],
input[type="datetime-local"], input[type="month"], input[type="week"], input[type="time"],
select {
  border: 1.5px solid var(--ad-neutral-300); border-radius: var(--ad-radius-sm);
  padding: 11px 13px; font-size: .94rem; width: 100%;
  /* Forçar cor clara — Bootstrap redefine para #212529 no :focus e sobrescreve */
  color: var(--ad-neutral-900) !important;
  -webkit-text-fill-color: var(--ad-neutral-900) !important;
  background: var(--ad-surface-2) !important;
  caret-color: var(--ad-accent-500);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control::placeholder, textarea::placeholder, input::placeholder {
  color: var(--ad-neutral-500) !important;
  -webkit-text-fill-color: var(--ad-neutral-500) !important;
  opacity: .7;
}
.form-control:focus, .form-select:focus, textarea:focus, input:focus, select:focus {
  border-color: var(--ad-accent-500);
  box-shadow: 0 0 0 4px var(--ad-accent-soft);
  outline: none;
  /* Garantir que cor e fundo se mantêm corretos no estado focus */
  color: var(--ad-neutral-900) !important;
  -webkit-text-fill-color: var(--ad-neutral-900) !important;
  background: var(--ad-surface-3) !important;
}
/* Override do autofill do browser (Chrome/Edge injetam fundo amarelo/azul) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ad-neutral-900) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--ad-surface-2) inset !important;
  box-shadow: 0 0 0 1000px var(--ad-surface-2) inset !important;
  caret-color: var(--ad-accent-500);
  /* Delay enorme para o browser não reverter o fundo */
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}
select option { background: #0d2038; color: var(--ad-neutral-900); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input[type="file"] { color: var(--ad-neutral-500) !important; -webkit-text-fill-color: var(--ad-neutral-500) !important; font-size: .88rem; }
input[type="file"]::file-selector-button {
  background: var(--ad-surface-3); color: var(--ad-neutral-900); border: 1px solid var(--ad-border);
  padding: 9px 14px; border-radius: var(--ad-radius-sm); font-weight: 700; cursor: pointer; margin-right: 12px; transition: all .18s ease;
}
input[type="file"]::file-selector-button:hover { background: var(--ad-accent-soft); border-color: var(--ad-accent-500); color: #fff; }
input[type="color"] { -webkit-appearance: none; appearance: none; width: 48px; height: 40px; padding: 2px; border: 1.5px solid var(--ad-neutral-300); border-radius: var(--ad-radius-sm); background: var(--ad-surface-2); cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: var(--ad-surface-3); border: 1px solid var(--ad-border-2); position: relative; transition: background .18s ease; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch input:checked + .track { background: var(--ad-accent-500); border-color: var(--ad-accent-500); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch .switch-label { font-weight: 700; color: var(--ad-neutral-700); font-size: .9rem; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn-submit, .btn-primary, .btn-accent, .btn-ghost, .btn-danger, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--ad-radius-sm); font-weight: 700; cursor: pointer; text-decoration: none;
  transition: all .18s ease; border: 1px solid transparent; font-size: .9rem; line-height: 1;
}
.btn-submit, .btn-primary { background: var(--ad-primary-600); color: #fff; padding: 11px 24px; border-color: var(--ad-primary-600); }
.btn-submit:hover, .btn-primary:hover { background: #2f74ec; border-color: #2f74ec; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(59,130,246,.35); }
.btn-accent { background: var(--ad-accent-500); border-color: var(--ad-accent-500); color: #06302a; padding: 11px 24px; }
.btn-accent:hover { background: var(--ad-accent-600); border-color: var(--ad-accent-600); color: #06302a; transform: translateY(-2px); box-shadow: 0 8px 22px var(--ad-accent-glow); }
.btn-ghost { background: var(--ad-surface-2); border-color: var(--ad-border); color: var(--ad-neutral-700); padding: 11px 20px; }
.btn-ghost:hover { background: var(--ad-surface-3); color: var(--ad-neutral-900); border-color: var(--ad-border-2); }
.btn-danger { background: var(--ad-danger-bg); border-color: rgba(239,68,68,.4); color: var(--ad-danger-fg); padding: 11px 20px; }
.btn-danger:hover { background: rgba(239,68,68,.28); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .82rem; background: var(--ad-surface-2); border-color: var(--ad-border); color: var(--ad-neutral-700); }
.btn-sm:hover { background: var(--ad-surface-3); color: var(--ad-neutral-900); }

/* ---------------------------------------------------------------------
   Alerts (kept for fallback; toasts preferred)
   --------------------------------------------------------------------- */
.alert { border-radius: var(--ad-radius-sm); border: 1px solid transparent; padding: 13px 16px; margin-bottom: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--ad-success-bg); color: var(--ad-success-fg); border-color: rgba(16,185,129,.35); }
.alert-danger { background: var(--ad-danger-bg); color: var(--ad-danger-fg); border-color: rgba(239,68,68,.35); }
.alert-warning { background: var(--ad-warn-bg); color: var(--ad-warn-fg); border-color: rgba(245,158,11,.35); }
.alert-info { background: var(--ad-info-bg); color: var(--ad-info-fg); border-color: rgba(59,130,246,.35); }

/* ---------------------------------------------------------------------
   Badges / pills
   --------------------------------------------------------------------- */
.badge-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .02em; }
.badge-on  { background: var(--ad-success-bg); color: var(--ad-success-fg); }
.badge-off { background: var(--ad-danger-bg);  color: var(--ad-danger-fg); }
.badge-muted { background: var(--ad-surface-3); color: var(--ad-neutral-500); }
.badge-accent { background: var(--ad-accent-soft); color: var(--ad-accent-500); }

/* ---------------------------------------------------------------------
   Tabs
   --------------------------------------------------------------------- */
.ad-tabs { display: inline-flex; gap: 4px; background: var(--ad-surface-2); border: 1px solid var(--ad-border); border-radius: 999px; padding: 5px; margin-bottom: 22px; }
.ad-tabs a, .ad-tabs button { border: 0; background: transparent; color: var(--ad-neutral-500); font-weight: 700; font-size: .88rem; padding: 8px 18px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: all .18s ease; display: inline-flex; align-items: center; gap: 8px; }
.ad-tabs a:hover, .ad-tabs button:hover { color: var(--ad-neutral-900); }
.ad-tabs a.active, .ad-tabs button.active { background: var(--ad-accent-500); color: #06302a; }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table, table.table { width: 100%; border-collapse: collapse; color: var(--ad-neutral-700); }
.table th, table.table th { text-align: left; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ad-neutral-500); font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--ad-border); }
.table td, table.table td { padding: 13px 14px; border-bottom: 1px solid var(--ad-border); vertical-align: middle; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--ad-surface-2); }
.table--card { background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: var(--ad-radius-md); overflow: hidden; }

/* ---------------------------------------------------------------------
   List item rows (blog/services/startups cards)
   --------------------------------------------------------------------- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.list-item {
  background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: var(--ad-radius-md);
  overflow: hidden; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.list-item:hover { transform: translateY(-3px); border-color: var(--ad-border-2); box-shadow: var(--ad-shadow-md); }
.list-item__main { display: flex; flex-direction: column; gap: 3px; padding: 15px 16px 10px; }
.list-item__main strong { color: var(--ad-neutral-900); font-size: .95rem; }
.list-item__main .muted { font-size: .78rem; }
.list-item__side { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }
.list-item__side .btn-sm { padding: 6px 10px; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--ad-neutral-500); }
.empty-state i { font-size: 2.4rem; color: var(--ad-neutral-300); margin-bottom: 14px; display: block; }
.empty-state h3 { color: var(--ad-neutral-700); margin: 0 0 6px; }

/* ---------------------------------------------------------------------
   Media library grid
   --------------------------------------------------------------------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-tile { background: var(--ad-surface-2); border: 1px solid var(--ad-border); border-radius: var(--ad-radius-md); overflow: hidden; position: relative; transition: border-color .18s ease, transform .18s ease; }
.media-tile:hover { border-color: var(--ad-accent-500); transform: translateY(-2px); }
.media-tile img { width: 100%; height: 120px; object-fit: cover; display: block; background: #0a1a30; }
.media-tile__bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; }
.media-tile__name { font-size: .72rem; color: var(--ad-neutral-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------------
   Toasts (replaces alert())
   --------------------------------------------------------------------- */
.fc-toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.fc-toast {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-radius: var(--ad-radius-md);
  background: var(--ad-surface-3); color: var(--ad-neutral-900); border: 1px solid var(--ad-border-2);
  box-shadow: var(--ad-shadow-lg); font-weight: 600; font-size: .9rem;
  transform: translateY(14px); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .26s ease;
}
.fc-toast.show { transform: translateY(0); opacity: 1; }
.fc-toast__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; font-size: .95rem; }
.fc-toast--success .fc-toast__icon { background: var(--ad-success-bg); color: var(--ad-success-fg); }
.fc-toast--error .fc-toast__icon { background: var(--ad-danger-bg); color: var(--ad-danger-fg); }
.fc-toast--info .fc-toast__icon { background: var(--ad-info-bg); color: var(--ad-info-fg); }
.fc-toast--warning .fc-toast__icon { background: var(--ad-warn-bg); color: var(--ad-warn-fg); }
.fc-toast__body { flex: 1; padding-top: 4px; color: var(--ad-neutral-900); }
.fc-toast__close { background: transparent; border: 0; color: var(--ad-neutral-500); cursor: pointer; font-size: 1rem; padding: 2px 4px; line-height: 1; }
.fc-toast__close:hover { color: var(--ad-neutral-900); }

/* ---------------------------------------------------------------------
   Sections (legacy tabbed views) + bootstrap overrides
   --------------------------------------------------------------------- */
.section { display: none; }
.section.active { display: block; }
.container, .container-fluid { color: var(--ad-neutral-900); }
.text-muted { color: var(--ad-neutral-500) !important; }
.bg-white { background: var(--ad-surface) !important; }
.border { border-color: var(--ad-border) !important; }
hr.text-muted { opacity: .2; }

/* ---------------------------------------------------------------------
   Dark-mode safety net — neutralise legacy hardcoded light inline styles
   (stylesheet !important overrides inline styles without !important).
   Scoped to .main-content so the sidebar / hero whites are untouched.
   --------------------------------------------------------------------- */
.main-content [style*="background: white"],
.main-content [style*="background:white"],
.main-content [style*="background: #fff"],
.main-content [style*="background:#fff"],
.main-content [style*="background: #ffffff"],
.main-content [style*="background:#ffffff"],
.main-content [style*="background: #f9fafb"],
.main-content [style*="background:#f9fafb"],
.main-content [style*="background: #f3f4f6"],
.main-content [style*="background:#f3f4f6"],
.main-content [style*="background: #fafbfc"],
.main-content [style*="background:#fafbfc"],
.main-content [style*="background: #f8fafc"],
.main-content [style*="background: #f0f0f0"] { background: var(--ad-surface-2) !important; }

.main-content [style*="color: #111827"],
.main-content [style*="color:#111827"],
.main-content [style*="color: #1f2937"],
.main-content [style*="color: #0f172a"],
.main-content [style*="color: #374151"] { color: var(--ad-neutral-900) !important; }

.main-content [style*="color: #6b7280"],
.main-content [style*="color: #9ca3af"],
.main-content [style*="color: #999"],
.main-content [style*="color:#999"],
.main-content [style*="color: #666"],
.main-content [style*="color: #bbb"] { color: var(--ad-neutral-500) !important; }

.main-content [style*="border: 1px solid #e5e7eb"],
.main-content [style*="border: 2px solid #e5e7eb"],
.main-content [style*="border-top: 1px solid #e5e7eb"],
.main-content [style*="border-bottom: 1px solid #f0f0f0"] { border-color: var(--ad-border) !important; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 18px 16px 60px; }
  .sidebar-toggle { display: inline-flex !important; }
}
.sidebar-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--ad-radius-sm); background: var(--ad-surface-2); border: 1px solid var(--ad-border); color: var(--ad-neutral-900); cursor: pointer; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(2,8,18,.6); z-index: 999; }
.sidebar-backdrop.show { display: block; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVIDADE MOBILE — adicionado para full coverage
   ═══════════════════════════════════════════════════════════════ */

/* Particles in hero area */
.ad-hero { overflow: hidden; }
.ad-hero canvas { opacity: .22; }

/* Tables — scroll horizontal em vez de transbordar */
.table-responsive, .sub-history, .acc-history {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { min-width: 480px; }

/* Admin main content padding mobile */
@media (max-width: 640px) {
  .main-content { padding: 14px 12px 60px !important; }
  .topbar h1 { font-size: .95rem !important; }
  .topbar { flex-wrap: wrap; gap: .5rem; }
  .topbar__meta { font-size: .75rem; }

  /* Stats grids */
  .iban-stats,
  .acc-stats,
  .acc-currencies,
  .cl-currencies,
  .sec-stat-grid,
  .health-grid,
  .sub-plan-grid { grid-template-columns: 1fr 1fr !important; gap: .625rem !important; }

  .acc-currencies { grid-template-columns: 1fr 1fr !important; }

  /* Hero accounting */
  .acc-hero { padding: 1.25rem !important; }
  .acc-hero .d-flex { flex-direction: column !important; }

  /* Chat */
  .chat-wrap { height: calc(100vh - 160px) !important; min-height: 380px !important; }
  .chat-body { padding: .75rem !important; }

  /* Demo phone */
  .dm-phone { width: 240px !important; }
  .dm-amount { font-size: 1.4rem !important; }

  /* IBAN cards */
  .iban-card__footer { flex-direction: column; gap: .5rem; }
  .iban-card__footer .ms-auto { display: none !important; }
  .iban-detail { grid-template-columns: 1fr !important; }

  /* Subscription plan grid */
  .sub-plan-grid { grid-template-columns: 1fr !important; }

  /* Accounting merchant grid */
  .iban-history-row { grid-template-columns: 1fr 1fr !important; font-size: .74rem; }
  .iban-history-row span:last-child, .iban-history-row div:last-child { display: none; }

  /* Tables: hide less important columns on mobile */
  .table th:nth-child(n+5),
  .table td:nth-child(n+5) { display: none; }

  /* Card panels account */
  .ig-wrap { padding: 0 .25rem; }
  .ig-card { border-radius: 10px; }
  .perm-grid { grid-template-columns: 1fr !important; }
  .dm-grid { grid-template-columns: 1fr !important; }

  /* Buttons */
  .fc-btn { padding: 11px 20px !important; font-size: .88rem !important; }

  /* Sub status */
  .sub-status .row { flex-direction: column; }
  .sub-status .col-lg-4 { margin-top: .875rem; }
  .sub-status .d-flex.flex-column { flex-direction: row !important; flex-wrap: wrap; gap: .5rem; }
}

@media (max-width: 480px) {
  .iban-stats,
  .acc-stat-grid,
  .sec-stat-grid { grid-template-columns: 1fr !important; }

  .sub-plan-grid { grid-template-columns: 1fr !important; }

  .dm-phone { width: 210px !important; }

  /* Hide extra table columns */
  .table th:nth-child(n+4),
  .table td:nth-child(n+4) { display: none; }

  /* Accounting hero currencies */
  .acc-currencies, .cl-currencies { grid-template-columns: 1fr 1fr !important; }

  /* Demo section */
  .demo-grid { grid-template-columns: 1fr !important; }
  #tab-simulator .col-lg-7 { display: none; }
}
/* ═══════ RESPONSIVIDADE MOBILE ═══════ */
html, body { overflow-x: hidden; max-width: 100%; }
.table-responsive, .sub-history { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { min-width: 480px; }
@media (max-width: 640px) {
  .main-content { padding: 14px 12px 60px !important; }
  .topbar h1 { font-size: .95rem !important; }
  .iban-stats, .acc-currencies, .cl-currencies, .sec-stat-grid, .health-grid { grid-template-columns: 1fr 1fr !important; gap: .625rem !important; }
  .sub-plan-grid { grid-template-columns: 1fr !important; }
  .acc-hero { padding: 1.25rem !important; }
  .chat-wrap { height: calc(100vh - 160px) !important; min-height: 380px !important; }
  .dm-phone { width: 240px !important; }
  .iban-card__footer { flex-direction: column; }
  .iban-card__footer .ms-auto { display: none !important; }
  .iban-detail { grid-template-columns: 1fr !important; }
  .perm-grid { grid-template-columns: 1fr !important; }
  .fc-btn { padding: 11px 20px !important; font-size: .88rem !important; }
  .acc-stat { min-width: 0; }
  .sub-status .col-lg-4 { margin-top: .875rem; }
}
@media (max-width: 480px) {
  .iban-stats, .sec-stat-grid { grid-template-columns: 1fr !important; }
  .dm-phone { width: 210px !important; }
  .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
  .acc-currencies, .cl-currencies { grid-template-columns: 1fr 1fr !important; }
}
/* ═══════ RESPONSIVIDADE MOBILE ═══════ */
html, body { overflow-x: hidden; max-width: 100%; }
.table-responsive, .sub-history { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { min-width: 480px; }
@media (max-width: 640px) {
  .main-content { padding: 14px 12px 60px !important; }
  .topbar h1 { font-size: .95rem !important; }
  .topbar { flex-wrap: wrap; gap: .4rem; }
  .iban-stats { grid-template-columns: 1fr 1fr !important; gap: .625rem !important; }
  .sec-stat-grid, .health-grid { grid-template-columns: 1fr 1fr !important; gap: .625rem !important; }
  .sub-plan-grid { grid-template-columns: 1fr !important; }
  .acc-hero { padding: 1.25rem !important; }
  .acc-hero > div:first-child { flex-direction: column !important; }
  .acc-currencies { grid-template-columns: 1fr 1fr !important; }
  .cl-currencies { grid-template-columns: 1fr 1fr !important; }
  .chat-wrap { height: calc(100vh - 160px) !important; min-height: 380px !important; }
  .dm-phone { width: 240px !important; }
  .iban-card__footer { flex-direction: column; }
  .iban-card__footer .ms-auto { display: none !important; }
  .iban-detail { grid-template-columns: 1fr !important; }
  .perm-grid { grid-template-columns: 1fr !important; }
  .fc-btn { padding: 11px 20px !important; font-size: .88rem !important; }
  .sub-status .col-lg-4 { margin-top: .875rem; }
}
@media (max-width: 480px) {
  .iban-stats, .sec-stat-grid { grid-template-columns: 1fr !important; }
  .dm-phone { width: 210px !important; }
  .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
  .acc-currencies, .cl-currencies { grid-template-columns: 1fr 1fr !important; }
  .ig-wrap { padding: 0 .25rem; }
}

.badge-info { background: var(--ad-info-bg); color: var(--ad-info-fg); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Frantal Siberia Dashboard
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet (≤900px) — sidebar fecha, main content expande ── */
@media (max-width: 900px) {
  /* 2-col grids → 1 col */
  .cred-grid             { display: block !important; }
  .cred-grid > *         { margin-bottom: 20px; }
  .cred-grid > *:last-child { margin-bottom: 0; }

  /* Topbar meta — ocultar labels longos */
  .topbar__user span:not(.topbar__avatar) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Stats grid — 2 colunas em tablet */
  .stats-grid { grid-template-columns: 1fr 1fr !important; }

  /* Assistant cards — 1 col se só há espaço */
  .asst-grid { grid-template-columns: 1fr !important; }

  /* List grid */
  .list-grid { grid-template-columns: 1fr !important; }
}

/* ── Mobile (≤640px) — full single column ── */
@media (max-width: 640px) {
  /* Stats grid — 2 col mantém-se */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-card { padding: 14px !important; }
  .stat-number { font-size: 1.4rem !important; }

  /* Hero */
  .ad-hero { padding: 18px 16px !important; border-radius: var(--ad-radius-md) !important; }
  .ad-hero__title { font-size: 1.35rem !important; }
  .ad-hero__actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .ad-hbtn { flex: 1; justify-content: center; min-width: 120px; padding: 9px 14px !important; font-size: .82rem !important; }
  .ad-hero__chips { width: 100%; }

  /* Cards */
  .card-header { flex-wrap: wrap; gap: 8px; padding: 12px 14px !important; }
  .card-body { padding: 14px !important; }

  /* Topbar — compacto */
  .topbar { padding: 10px 14px !important; gap: 8px; }
  .topbar h1 { font-size: .9rem !important; }
  .badge-pill.badge-accent { display: none; }  /* ocultar badge do plano no topbar */

  /* Notificações dropdown — largura total */
  #sbNotifDrop { width: 260px !important; right: -60px !important; }

  /* Form rows — 1 col */
  .form-row { grid-template-columns: 1fr !important; }

  /* Tabela — ocultar colunas menos importantes */
  .table th:nth-child(n+4),
  .table td:nth-child(n+4) { display: none; }

  /* Botões de acção inline */
  .btn-sm { padding: 5px 10px !important; font-size: .74rem !important; }

  /* Leads grid */
  .lead-row { grid-template-columns: 38px 1fr !important; gap: 10px; }
  .lead-actions { display: none !important; } /* acções via clique na linha */

  /* Usage log rows */
  .log-row { grid-template-columns: 1fr auto !important; }
  .log-row > div:last-child { display: none; }

  /* Asst card grid */
  .asst-grid { grid-template-columns: 1fr !important; }

  /* Sidebar toggle visível */
  .sidebar-toggle { display: inline-flex !important; }
}

/* ── Extra small (≤400px) ── */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .ad-hero__title { font-size: 1.15rem !important; }
  .topbar__user { display: none !important; } /* ocultar nome, manter avatar via bell + initials */
  .main-content { padding: 10px 10px 60px !important; }

  /* Notification drop full width */
  #sbNotifDrop { left: 0 !important; right: 0 !important; width: auto !important; }
}
