/* ============================================================
   Dropper Admin — design system responsivo
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-elev: #ffffff;
  --bg-elev-2: #f6f7fb;
  --card: #ffffff;
  --surface-dark: #11141c;
  --surface-dark-2: #181c26;
  --border: #e6e8ef;
  --border-2: #d9dce6;
  --text: #171923;
  --text-dim: #616779;
  --text-mute: #9197a8;
  --brand: #6257f6;
  --brand-2: #766cf9;
  --brand-soft: #efedff;
  --accent: #c8f169;
  --green: #159a68;
  --green-soft: #eaf8f2;
  --amber: #b77906;
  --amber-soft: #fff7e5;
  --red: #d94d5c;
  --red-soft: #fff0f1;
  --blue: #2777d3;
  --blue-soft: #edf5ff;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(22, 25, 35, .04);
  --shadow-sm: 0 8px 24px rgba(22, 25, 35, .06);
  --shadow: 0 24px 64px rgba(22, 25, 35, .14);
  --font: Inter, "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(98, 87, 246, .2); outline-offset: 2px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }

/* ---------- Utilitários ---------- */
.muted { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }
.grid { display: grid; gap: 16px; }
.grow { min-width: 0; flex: 1; }
.eyebrow { color: var(--brand); font-size: 10.5px; font-weight: 800; letter-spacing: .13em; }
.eyebrow.light { color: var(--accent); }

/* ---------- Botões ---------- */
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: border-color .16s, box-shadow .16s, transform .16s, background .16s;
}
.btn:hover { border-color: #bbb7fa; box-shadow: 0 5px 14px rgba(44, 38, 113, .08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.btn.primary { color: #fff; border-color: var(--brand); background: linear-gradient(135deg, var(--brand), #7568f8); box-shadow: 0 8px 20px rgba(98, 87, 246, .22); }
.btn.primary:hover { box-shadow: 0 10px 24px rgba(98, 87, 246, .3); filter: brightness(1.03); }
.btn.soft { color: var(--brand); border-color: transparent; background: var(--brand-soft); box-shadow: none; }
.btn.ghost { background: transparent; border-color: var(--border); box-shadow: none; }
.btn.danger { color: var(--red); border-color: #f1c8cd; background: #fff; }
.btn.danger:hover { background: var(--red-soft); border-color: #e9a8b0; }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 12.5px; }
.btn.lg { min-height: 48px; padding: 12px 18px; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; }
.icon-btn {
  width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text-dim); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.icon-btn:hover { color: var(--brand); border-color: #c9c5fc; background: var(--brand-soft); }
.icon-btn.inverse { color: #9aa2b5; border-color: transparent; background: rgba(255,255,255,.06); }
.icon-btn.inverse:hover { color: #fff; background: rgba(255,255,255,.11); }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: #4d5363; font-size: 12.5px; font-weight: 700; }
.input, .select, textarea.input {
  width: 100%; min-height: 42px; padding: 10px 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.select { appearance: auto; }
.input::placeholder { color: #a1a6b4; }
.input:hover, .select:hover { border-color: #c6c9d4; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(98, 87, 246, .1); }
.input-group, .input-shell { position: relative; }
.input-group .prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-mute); z-index: 1; }
.input-group .input { padding-left: 39px; }
.input-shell > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-mute); z-index: 1; }
.input-shell > .input { padding-left: 40px; }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cdd1dc; border-radius: 30px; transition: .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.16); transition: .2s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(19px); }

/* ============================================================
   Estrutura principal
   ============================================================ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 254px; flex: none; position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; overflow: hidden;
  color: #e9ecf3; background:
    radial-gradient(circle at -20% -10%, rgba(119, 101, 255, .32), transparent 30%),
    linear-gradient(180deg, #151821 0%, #10131a 100%);
  border-right: 1px solid #232735;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.brand b { font-weight: 850; }
.brand-inverse { color: #fff; padding: 24px 22px 20px; }
.brand .logo, .topbar-mobile-logo .logo, .auth-mobile-brand .logo {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  color: #12151d; border-radius: 11px; background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 8px 24px rgba(200, 241, 105, .16);
}
.nav-label { padding: 11px 23px 7px; color: #666e81; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.nav { display: flex; flex-direction: column; gap: 5px; padding: 5px 13px; overflow-y: auto; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  color: #969daf; border-radius: 11px; font-size: 13.5px; font-weight: 650;
  transition: color .22s ease, background .22s ease, transform .22s ease;
}
.nav a .ico { width: 22px; height: 22px; display: grid; place-items: center; transition: color .22s ease, transform .22s ease; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav a:hover .ico { transform: translateX(2px); }
.nav a.active { color: #fff; background: rgba(255,255,255,.085); box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
.nav a.active::before { content: ""; position: absolute; left: -13px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); box-shadow: 0 0 14px rgba(200,241,105,.35); }
.nav a.active .ico { color: var(--accent); }
.sidebar .foot { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.support-card { display: flex; gap: 9px; align-items: center; margin-bottom: 12px; padding: 11px; color: #dce0e9; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.055); border-radius: 12px; transition: background .22s ease, border-color .22s ease, transform .22s ease; }
.support-card:hover { background: rgba(255,255,255,.075); }
.support-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--accent); border-radius: 9px; background: rgba(200,241,105,.09); }
.support-card > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.support-card b { font-size: 11.5px; }
.support-card small { color: #757d8f; font-size: 9.5px; }
.user-card { display: flex; align-items: center; gap: 9px; }
.avatar, .top-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #191c24; background: #eef1f6; font-size: 11px; font-weight: 800; }
.user-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-meta b { overflow: hidden; color: #f4f5f8; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { overflow: hidden; color: #747c8f; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  min-height: 74px; display: flex; align-items: center; gap: 13px; position: sticky; top: 0; z-index: 25;
  padding: 12px clamp(20px, 3vw, 38px); border-bottom: 1px solid rgba(222,225,233,.9);
  background: rgba(255,255,255,.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.topbar-copy { display: flex; flex-direction: column; }
.topbar-copy > span { color: var(--text-mute); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 780; letter-spacing: -.025em; }
.live-chip { display: flex; align-items: center; gap: 8px; padding: 7px 11px; color: #4e596a; border: 1px solid var(--border); border-radius: 30px; background: #fff; font-size: 11.5px; font-weight: 700; }
.status-pulse { width: 8px; height: 8px; position: relative; display: inline-block; flex: none; border-radius: 50%; background: #27b778; box-shadow: 0 0 0 4px rgba(39,183,120,.12); }
.top-avatar { color: #fff; background: linear-gradient(135deg, #292d3a, #171a23); transition: transform .22s ease, box-shadow .22s ease; }
.top-avatar:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(22,25,35,.2); }
.topbar-mobile-logo { display: none; }
.content { width: 100%; max-width: none; min-height: calc(100vh - 74px); padding: 28px clamp(20px, 2.6vw, 52px) 44px; }
.route-view { width: 100%; min-width: 0; }
.content.view-enter { animation: viewEnter .3s cubic-bezier(.22,.7,.3,1) both; }
@keyframes viewEnter { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.mobile-nav { display: none; }

/* ============================================================
   Login
   ============================================================ */
.auth-wrap { min-height: 100vh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 28px; background: #eef1f7; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.auth-orb-one { width: 420px; height: 420px; left: -180px; top: -170px; background: rgba(107,91,246,.16); }
.auth-orb-two { width: 360px; height: 360px; right: -150px; bottom: -170px; background: rgba(200,241,105,.24); }
.auth-shell { width: min(970px, 100%); min-height: 590px; position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid rgba(255,255,255,.65); border-radius: 26px; background: #fff; box-shadow: 0 35px 100px rgba(27,31,45,.17); }
.auth-story { position: relative; display: flex; flex-direction: column; overflow: hidden; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(103,89,247,.48), transparent 28%), linear-gradient(150deg,#191c27,#101218 70%); }
.auth-story::after { content: ""; width: 320px; height: 320px; position: absolute; right: -180px; bottom: -120px; border: 58px solid rgba(200,241,105,.08); border-radius: 50%; }
.auth-copy { max-width: 470px; margin: auto 48px; position: relative; z-index: 1; }
.auth-copy h1 { margin: 17px 0; color: #fff; font-size: clamp(38px, 4vw, 55px); line-height: 1.03; letter-spacing: -.055em; }
.auth-copy h1 span { color: var(--accent); }
.auth-copy > p { max-width: 420px; color: #9299aa; font-size: 15px; }
.auth-benefits { display: grid; gap: 16px; margin-top: 34px; }
.auth-benefits > div { display: flex; align-items: center; gap: 13px; }
.auth-benefits > div > .icon { width: 36px; height: 36px; padding: 8px; color: var(--accent); border-radius: 10px; background: rgba(200,241,105,.08); }
.auth-benefits span { display: flex; flex-direction: column; }
.auth-benefits b { font-size: 12.5px; }
.auth-benefits small { color: #737b8d; font-size: 10.5px; }
.auth-proof { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0 48px 31px; color: #697185; font-size: 10.5px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 5vw, 65px); }
.auth-mobile-brand { display: none; }
.auth-form-head h2 { margin: 9px 0 4px; color: #1c1f2a; font-size: 27px; letter-spacing: -.04em; }
.auth-form-head p { margin: 0 0 28px; color: var(--text-dim); font-size: 13px; }
.auth-form { gap: 17px; }
.auth-form .btn { margin-top: 7px; }
.auth-security { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; color: var(--text-mute); font-size: 9.5px; }

/* ============================================================
   Cabeçalhos, cards e dashboard
   ============================================================ */
.page-heading { display: flex; align-items: flex-end; gap: 18px; margin: 0 0 22px; }
.page-heading h2 { margin: 3px 0 2px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -.045em; }
.page-heading p { margin: 0; color: var(--text-dim); font-size: 13px; }
.card { padding: 19px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: border-color .22s ease, box-shadow .22s ease, background .22s ease; }
.card.pad-sm { padding: 14px; }
.card-title { margin: 0 0 4px; color: #242734; font-size: 14px; font-weight: 780; letter-spacing: -.015em; }
.interactive-card { transition: transform .18s, box-shadow .18s, border-color .18s; }
.interactive-card:hover { transform: translateY(-2px); border-color: #d5d1fd; box-shadow: var(--shadow-sm); }
.hero-card { position: relative; display: grid; grid-template-columns: 1.35fr .65fr; overflow: hidden; margin-bottom: 18px; padding: clamp(22px, 3vw, 34px); color: #fff; background: radial-gradient(circle at 82% 5%, rgba(117,104,248,.55), transparent 25%), linear-gradient(135deg,#191c27,#11131a 75%); border: none; box-shadow: 0 18px 45px rgba(24,27,39,.14); }
.hero-card::after { content: ""; width: 230px; height: 230px; position: absolute; right: -85px; bottom: -130px; border: 44px solid rgba(200,241,105,.08); border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h2 { max-width: 630px; margin: 8px 0 9px; color: #fff; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.045em; }
.hero-copy p { max-width: 610px; margin: 0; color: #939aad; font-size: 13px; }
.hero-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 9px; position: relative; z-index: 1; }
.hero-actions .btn.ghost { color: #fff; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.hero-actions .btn.primary { color: #161920; border-color: var(--accent); background: var(--accent); box-shadow: 0 10px 24px rgba(200,241,105,.14); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { min-width: 0; position: relative; padding: 18px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--brand); border-radius: 11px; background: var(--brand-soft); }
.kpi-icon.green { color: var(--green); background: var(--green-soft); }
.kpi-icon.amber { color: var(--amber); background: var(--amber-soft); }
.kpi-icon.blue { color: var(--blue); background: var(--blue-soft); }
.kpi .label { color: var(--text-dim); font-size: 11px; font-weight: 750; letter-spacing: .01em; }
.kpi .value { margin-top: 9px; color: #20232e; font-size: 27px; font-weight: 820; line-height: 1; letter-spacing: -.045em; }
.kpi .sub { margin-top: 7px; color: var(--text-mute); font-size: 10.5px; }
.kpi .value.brand { color: var(--brand); }
.kpi .value.green { color: var(--green); }
.kpi .value.amber { color: var(--amber); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); gap: 16px; margin-top: 16px; }
.engine-card { min-height: 190px; }
.engine-head { display: flex; align-items: center; gap: 12px; }
.engine-orb { width: 43px; height: 43px; display: grid; place-items: center; color: var(--green); border-radius: 13px; background: var(--green-soft); }
.engine-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--border); }
.engine-stats span { display: flex; flex-direction: column; }
.engine-stats b { color: #252936; font-size: 14px; }
.engine-stats small { color: var(--text-mute); font-size: 9.5px; }
.progress-ring { --pct: 0; width: 86px; height: 86px; display: grid; place-items: center; margin: 12px auto; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--pct) * 1%), #ebeaf2 0); position: relative; }
.progress-ring::before { content: ""; width: 66px; height: 66px; position: absolute; border-radius: 50%; background: #fff; }
.progress-ring span { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; font-size: 17px; font-weight: 800; }
.progress-ring small { color: var(--text-mute); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.quick-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.quick-link .q-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: none; color: var(--brand); border-radius: 12px; background: var(--brand-soft); }
.quick-link > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.quick-link b { font-size: 12.5px; }
.quick-link small { color: var(--text-mute); font-size: 10px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 30px; color: var(--text-dim); background: #f7f8fa; font-size: 10.5px; font-weight: 750; white-space: nowrap; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.badge.green { color: var(--green); border-color: #c4eadb; background: var(--green-soft); }
.badge.red { color: var(--red); border-color: #f2cbd0; background: var(--red-soft); }
.badge.amber { color: var(--amber); border-color: #f1ddad; background: var(--amber-soft); }
.badge.blue { color: var(--blue); border-color: #cce1f9; background: var(--blue-soft); }
.badge.brand { color: var(--brand); border-color: #d8d4fd; background: var(--brand-soft); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-mute); }
.dot.green { background: var(--green); } .dot.red { background: var(--red); } .dot.amber { background: var(--amber); }

/* ============================================================
   Produtos e filtros
   ============================================================ */
.filter-panel { margin-bottom: 16px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: border-color .22s ease, box-shadow .22s ease; }
.filter-main { display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(180px, auto) auto; gap: 10px; align-items: center; }
.search-box .input { min-height: 44px; background: #f8f9fb; border-color: transparent; }
.filter-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 5px; color: #fff; border-radius: 9px; background: var(--brand); font-size: 9px; }
.filter-count:empty { display: none; }
.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: #f7f8fa; }
.view-toggle button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: var(--text-mute); border: 0; border-radius: 8px; background: transparent; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.view-toggle button.active { color: var(--brand); background: #fff; box-shadow: 0 2px 8px rgba(21,24,34,.08); }
.quick-filters { display: flex; gap: 7px; overflow-x: auto; margin-top: 12px; padding: 1px 1px 3px; scrollbar-width: none; }
.quick-filters::-webkit-scrollbar { display: none; }
.filter-chip { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: #606676; border: 1px solid var(--border); border-radius: 20px; background: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.filter-chip:active { transform: scale(.98); }
.filter-chip span { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; color: #858b9a; border-radius: 9px; background: #f0f1f5; font-size: 9px; }
.filter-chip:hover, .filter-chip.active { color: var(--brand); border-color: #ccc7fc; background: var(--brand-soft); }
.filter-chip.active span { color: #fff; background: var(--brand); }
.advanced-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 11px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); animation: filtersOpen .24s cubic-bezier(.22,.7,.3,1) both; transform-origin: top; }
@keyframes filtersOpen { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.advanced-filters .field label { font-size: 10.5px; }
.advanced-filters .input, .advanced-filters .select { min-height: 38px; padding-top: 8px; padding-bottom: 8px; font-size: 12px; }
.advanced-actions { display: flex; align-items: flex-end; gap: 7px; }
.catalog-summary { display: flex; align-items: center; gap: 12px; margin: 16px 2px 10px; }
.catalog-summary b { color: #252936; font-size: 12.5px; }
.catalog-summary span { color: var(--text-mute); font-size: 11px; }
.active-filter-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); animation: contentReveal .28s ease both; }
@keyframes contentReveal { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
table.tbl { width: 100%; min-width: 960px; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 13px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid #eff0f4; }
table.tbl th { position: sticky; top: 0; z-index: 2; color: #8a90a0; background: #fafbfc; font-size: 9.5px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .14s; }
table.tbl tbody tr:hover { background: #fafaff; }
table.tbl tbody tr.selected { background: #f4f2ff; }
.check-cell { width: 40px; padding-right: 2px !important; }
.check-input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.prod-cell { min-width: 240px; display: flex; align-items: center; gap: 11px; }
.prod-cell img { width: 46px; height: 46px; flex: none; object-fit: cover; border: 1px solid #eceef3; border-radius: 11px; background: #f1f2f5; }
.prod-cell .t { max-width: 330px; overflow: hidden; color: #242733; font-size: 12.5px; font-weight: 720; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.prod-cell .s { margin-top: 3px; color: var(--text-mute); font-size: 9.8px; }
.price-main { color: #242733; font-size: 13px; font-weight: 760; }
.price-sub { margin-top: 2px; color: var(--text-mute); font-size: 9.5px; }
.market-price.bad { color: var(--red); }
.market-price.good { color: var(--green); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions .icon-btn { width: 32px; height: 32px; border-color: transparent; background: #f7f8fa; }
.last-check { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--text-mute); font-size: 9px; }
.error-mark { color: var(--red); cursor: help; }

.prod-cards, .product-grid { display: grid; gap: 13px; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.prod-card { position: relative; padding: 15px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: border-color .16s, transform .16s, box-shadow .16s; }
.prod-card:hover { transform: translateY(-2px); border-color: #d7d4f8; box-shadow: var(--shadow-sm); }
.prod-card.selected { border-color: #bdb7fb; background: #fbfaff; }
.prod-card .head { display: flex; gap: 11px; }
.prod-card .head img { width: 57px; height: 57px; flex: none; object-fit: cover; border: 1px solid #eceef3; border-radius: 12px; background: #f1f2f5; }
.prod-card .select-card { position: absolute; top: 11px; right: 11px; z-index: 1; }
.prod-card .card-copy { min-width: 0; flex: 1; padding-right: 22px; }
.prod-card .card-copy .t { display: -webkit-box; overflow: hidden; font-size: 12.5px; font-weight: 730; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod-card .card-copy .s { margin-top: 3px; color: var(--text-mute); font-size: 9.5px; }
.prod-card .card-badges { min-height: 24px; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.prod-card .pricebar, .pricebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.pricebox { min-width: 0; padding: 9px; border: 1px solid #eceef3; border-radius: 10px; background: #f8f9fb; transition: border-color .2s ease, background .2s ease; }
.pricebox .k { overflow: hidden; color: var(--text-mute); font-size: 8.5px; font-weight: 750; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.pricebox .v { overflow: hidden; margin-top: 2px; color: #262a35; font-size: 13px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.pricebox .v.green { color: var(--green); } .pricebox .v.red { color: var(--red); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }

.bulk-bar { display: flex; align-items: center; gap: 10px; position: sticky; bottom: 18px; z-index: 16; width: fit-content; max-width: 100%; margin: 14px auto 0; padding: 9px 10px 9px 14px; color: #fff; background: rgba(25,28,39,.96); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 18px 40px rgba(19,22,31,.28); backdrop-filter: blur(12px); }
.bulk-bar .select { width: auto; min-width: 190px; min-height: 36px; color: #e9ebf2; border-color: rgba(255,255,255,.12); background: #242834; font-size: 12px; }
.bulk-bar .btn.primary { min-height: 36px; }
.bulk-bar .icon-btn { width: 34px; height: 34px; color: #aeb4c2; border-color: transparent; background: rgba(255,255,255,.06); }
.bulk-count { color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.bulk-value { width: 110px !important; min-height: 36px !important; color: #fff; border-color: rgba(255,255,255,.12); background: #242834; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 0 2px; }
.pagination-info { color: var(--text-mute); font-size: 10.5px; }
.pagination-actions { display: flex; gap: 6px; }

/* ============================================================
   Componentes gerais, relatórios e detalhes
   ============================================================ */
.section-title { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; }
.section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.divider { height: 1px; margin: 16px 0; background: var(--border); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eff0f4; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-dim); }
.kv .v { color: #303440; font-weight: 700; }
.bars { height: 160px; display: flex; align-items: flex-end; gap: 7px; padding-top: 16px; }
.bars .bar { min-height: 2px; flex: 1; position: relative; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.bars .bar .cap { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); color: var(--text-dim); font-size: 9px; }
.bars .bar .lbl { position: absolute; bottom: -21px; left: 50%; transform: translateX(-50%); color: var(--text-mute); font-size: 8.5px; white-space: nowrap; }
.spark { width: 100%; height: 60px; }
.pill-group { max-width: 100%; display: inline-flex; gap: 2px; padding: 3px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #f4f5f8; }
.pill-group button { min-height: 32px; padding: 5px 12px; color: var(--text-dim); border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 700; white-space: nowrap; transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.pill-group button.active { color: #fff; background: var(--brand); box-shadow: 0 4px 10px rgba(98,87,246,.2); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.toolbar .grow { min-width: 180px; flex: 1; }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; color: #4c5565; border: 1px solid #d7e6f8; border-radius: 13px; background: var(--blue-soft); }
.notice > .icon { color: var(--blue); margin-top: 1px; }
.notice.warn { color: #76520a; border-color: #f0d99f; background: var(--amber-soft); }
.notice.warn > .icon { color: var(--amber); }
.notice.danger { color: #873640; border-color: #efc2c7; background: var(--red-soft); }
.notice.danger > .icon { color: var(--red); }
.install-path { min-width: 0; overflow-wrap: anywhere; padding: 9px 11px; color: var(--text); background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 9px; }
.detail-product-head { display: flex; align-items: flex-start; gap: 18px; }
.detail-product-head > .prod-cell { min-width: 0; flex: 1; }
.prod-cell img.detail-image { width: 82px; height: 82px; border-radius: 15px; }
.detail-title { margin-top: 3px; font-size: 18px; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.pricebar.detail-prices { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.pricebar.detail-prices .pricebox { padding: 12px; }

/* ---------- Toasts ---------- */
.toasts { width: min(380px, calc(100vw - 32px)); position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 9px; }
.toast { padding: 12px 14px; color: #fff; background: #232733; border: 1px solid rgba(255,255,255,.08); border-left: 4px solid var(--brand-2); border-radius: 11px; box-shadow: var(--shadow); font-size: 12.5px; animation: slideIn .22s ease; }
.toast.success { border-left-color: #39cf90; }.toast.error { border-left-color: #ff6a78; }.toast.warn { border-left-color: #f2bd4d; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(13,15,22,.58); backdrop-filter: blur(5px); animation: fade .16s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 500px; max-height: min(90vh, 800px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 19px; box-shadow: 0 30px 90px rgba(10,12,18,.28); animation: modalIn .2s ease; }
.modal.wide { max-width: 690px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: none; } }
.modal .m-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.modal .m-head h3 { min-width: 0; flex: 1; margin: 0; overflow: hidden; font-size: 16px; font-weight: 780; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.modal .m-body { overflow-y: auto; padding: 18px 20px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 20px 17px; border-top: 1px solid var(--border); background: #fafbfc; }

/* ---------- Estados ---------- */
.spin { width: 18px; height: 18px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot 1.15s cubic-bezier(.55,.2,.45,.8) infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading-surface { width: 100%; min-height: 300px; padding: 5px 0; animation: loadingFade .28s ease both; }
.loading-surface.compact { min-height: 220px; }
.skeleton-line, .skeleton-card { position: relative; overflow: hidden; background: #e8eaf0; }
.skeleton-line::after, .skeleton-card::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
  animation: skeletonSweep 2.2s ease-in-out infinite;
}
.skeleton-line { height: 13px; border-radius: 7px; }
.skeleton-title { width: min(320px, 42%); height: 24px; margin-top: 5px; }
.skeleton-copy { width: min(480px, 68%); margin-top: 12px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.skeleton-card { min-height: 126px; border: 1px solid #e3e5ec; border-radius: var(--radius); background: #eceef3; }
@keyframes skeletonSweep { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes loadingFade { from { opacity: 0; } to { opacity: 1; } }
.is-refreshing { position: relative; min-height: 90px; pointer-events: none; }
.is-refreshing > :not(.refresh-indicator) { opacity: .58; transition: opacity .25s ease; }
.refresh-indicator { width: 116px; height: 3px; position: absolute; top: 8px; left: 50%; z-index: 8; overflow: hidden; transform: translateX(-50%); border-radius: 10px; background: #e2e1f4; box-shadow: 0 2px 8px rgba(98,87,246,.1); }
.refresh-indicator span { width: 45%; height: 100%; display: block; border-radius: inherit; background: var(--brand); animation: refreshProgress 1.6s ease-in-out infinite alternate; }
@keyframes refreshProgress { from { transform: translateX(0); } to { transform: translateX(122%); } }
.empty { padding: 56px 20px; text-align: center; color: var(--text-dim); background: #fff; border: 1px dashed #d8dbe5; border-radius: var(--radius); }
.empty .big { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 13px; color: var(--brand); border-radius: 16px; background: var(--brand-soft); font-size: 0; }
.empty .big .icon { width: 24px; height: 24px; }

/* ============================================================
   Responsividade
   ============================================================ */
@media (min-width: 1600px) {
  .content { padding-left: 48px; padding-right: 48px; }
  .advanced-filters { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
  .prod-cell .t { max-width: 520px; }
  table.tbl th, table.tbl td { padding-left: 16px; padding-right: 16px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
}

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-filters { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .filter-main { grid-template-columns: minmax(220px, 1fr) auto minmax(165px, auto); }
  .view-toggle { display: none; }
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { font-size: 14px; }
  .sidebar { display: none; }
  .topbar { min-height: 62px; padding: 9px 14px; }
  .topbar-mobile-logo { display: block; }
  .topbar-mobile-logo .logo { width: 34px; height: 34px; border-radius: 10px; }
  .topbar-copy > span { display: none; }
  .topbar h1 { font-size: 16px; }
  .live-chip { padding: 6px 9px; }
  .live-chip span:last-child { display: none; }
  .top-avatar { width: 34px; height: 34px; }
  .content { min-height: calc(100vh - 62px); padding: 20px 14px calc(91px + var(--safe-bottom)); }
  .mobile-nav { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(9px + var(--safe-bottom)); z-index: 45; justify-content: space-around; padding: 6px; background: rgba(20,23,32,.96); border: 1px solid rgba(255,255,255,.09); border-radius: 17px; box-shadow: 0 16px 44px rgba(15,17,24,.3); backdrop-filter: blur(16px); }
  .mobile-nav a { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px; color: #737b8f; border-radius: 11px; font-size: 8.5px; font-weight: 700; }
  .mobile-nav a .ico { width: 22px; height: 22px; display: grid; place-items: center; }
  .mobile-nav a.active { color: var(--accent); background: rgba(255,255,255,.06); }
  .page-heading { align-items: flex-start; margin-bottom: 17px; }
  .page-heading h2 { font-size: 24px; }
  .page-heading p { max-width: 490px; }
  .hero-card { grid-template-columns: 1fr; padding: 22px; }
  .hero-actions { justify-content: flex-start; margin-top: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-link { padding: 15px; }
  .detail-product-head { display: block; }
  .detail-actions { justify-content: flex-start; margin-top: 16px; }
  .filter-main { grid-template-columns: minmax(0, 1fr) auto; }
  .filter-main > .select { display: none; }
  .mobile-only { display: flex !important; }
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .toasts { right: 14px; bottom: calc(84px + var(--safe-bottom)); }
  .auth-wrap { padding: 18px; background: #f2f3f8; }
  .auth-shell { width: min(470px, 100%); min-height: auto; display: block; border-radius: 22px; }
  .auth-story { display: none; }
  .auth-panel { padding: 38px 32px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 42px; font-size: 16px; font-weight: 780; }
}

@media (max-width: 600px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .page-heading { display: block; }
  .page-heading .page-actions { display: grid; grid-template-columns: 1fr; margin-top: 14px; }
  .page-heading .page-actions .btn { width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 14px; }
  .kpi-icon { width: 32px; height: 32px; }
  .kpi .value { font-size: 23px; }
  .kpi .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-card { padding: 19px; border-radius: 18px; }
  .hero-copy h2 { font-size: 22px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .engine-stats { grid-template-columns: 1fr 1fr; }
  .engine-stats span:last-child { grid-column: 1 / -1; }
  .filter-panel { padding: 10px; border-radius: 14px; }
  .filter-main { gap: 7px; }
  .filter-main .btn { width: 41px; padding: 0; }
  .filter-main .btn .filter-label { display: none; }
  .filter-main .btn .filter-count:empty { display: none; }
  .advanced-filters { grid-template-columns: 1fr; gap: 9px; }
  .advanced-actions { align-items: stretch; }
  .advanced-actions .btn { flex: 1; }
  .catalog-summary { align-items: flex-start; }
  .catalog-summary .spacer { display: none; }
  .catalog-summary { flex-wrap: wrap; }
  .prod-card { padding: 13px; }
  .pricebar.detail-prices { grid-template-columns: 1fr 1fr; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions .btn:first-child { grid-column: 1 / -1; }
  .prod-card .pricebar, .pricebar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .pricebox { padding: 8px 6px; }
  .pricebox .v { font-size: 12px; }
  .bulk-bar { width: calc(100% - 2px); bottom: calc(78px + var(--safe-bottom)); display: grid; grid-template-columns: auto 1fr auto; padding: 9px; }
  .bulk-bar .select { width: 100%; min-width: 0; }
  .bulk-bar .bulk-value { width: 100% !important; grid-column: 1 / -1; }
  .pagination { align-items: stretch; }
  .pagination-info { display: flex; align-items: center; }
  .pagination-actions { margin-left: auto; }
  .pagination .btn .page-word { display: none; }
  .section-title { align-items: flex-start; flex-wrap: wrap; }
  .section-title .spacer { display: none; }
  .section-title .pill-group { width: 100%; }
  .section-title .pill-group button { flex: 1; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-height: 92vh; border-radius: 20px 20px 0 0; animation: sheetIn .23s ease; }
  @keyframes sheetIn { from { transform: translateY(35px); opacity: .6; } to { transform: none; opacity: 1; } }
  .modal .m-head { padding: 15px 16px 12px; }
  .modal .m-body { padding: 16px; }
  .modal .m-foot { padding: 11px 16px calc(13px + var(--safe-bottom)); }
  .modal .m-foot .btn { flex: 1; }
  .auth-wrap { padding: 10px; }
  .auth-shell { border-radius: 20px; }
  .auth-panel { padding: 31px 23px; }
  .auth-mobile-brand { margin-bottom: 34px; }
  .auth-form-head h2 { font-size: 24px; }
}
