/* ============================================================================
   Magic Webinar — design system
   Azul profundo em gradiente, detalhes em laranja e neon, diagramação Apple.
   ========================================================================== */

:root {
  --bg: #04081a;
  --bg-2: #071026;
  --bg-3: #0a1733;
  --ink: #f4f7ff;
  --ink-soft: #c8d3ea;
  --muted: #8b9ab8;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --blue: #2f7bff;
  --blue-2: #0a4fd6;
  --blue-3: #6aa8ff;
  --orange: #ff7a18;
  --orange-2: #ff9a4d;
  --neon: #34e5ff;
  --neon-2: #7c5cff;
  --green: #2ee6a8;
  --red: #ff5566;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --shadow-soft: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sidebar: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(47, 123, 255, 0.28), transparent 62%),
    radial-gradient(700px 500px at 108% 8%, rgba(124, 92, 255, 0.2), transparent 60%),
    radial-gradient(600px 500px at 50% 115%, rgba(52, 229, 255, 0.12), transparent 65%),
    linear-gradient(165deg, #04081a 0%, #061027 46%, #030a1d 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.032em; line-height: 1.12; }
p { margin: 0; }
a { color: var(--neon); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(255, 122, 24, 0.35); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.13); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

/* ------------------------------------------------------------------ login */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}
.auth-brand {
  padding: 64px clamp(32px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.auth-brand::before {
  content: "";
  position: absolute;
  width: 640px; height: 640px;
  left: -180px; bottom: -280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.24), transparent 62%);
  filter: blur(20px);
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -180px; top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 229, 255, 0.16), transparent 62%);
  filter: blur(10px);
}
.auth-copy { position: relative; z-index: 1; max-width: 560px; margin: clamp(20px, 6vh, 64px) 0; }
.auth-copy h1 {
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
}
.auth-copy p { color: var(--ink-soft); font-size: 17px; max-width: 460px; line-height: 1.6; }
.auth-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; max-width: 470px; }
.auth-feature {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  font-size: 13.5px; color: var(--ink-soft); backdrop-filter: blur(14px);
}
.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 32px; background: rgba(2, 6, 18, 0.35);
}
.auth-card {
  width: 100%; max-width: 420px;
  padding: 38px 34px 34px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028));
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: var(--shadow);
}
.auth-card h2 { font-size: 27px; letter-spacing: -0.035em; margin: 18px 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }

/* ------------------------------------------------------------------ marca */
.brand { display: flex; align-items: center; gap: 11px; font-weight: 670; letter-spacing: -0.03em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--blue), #0a3fb2 62%, #082a76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px -8px rgba(47, 123, 255, 0.9);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: -1px; border-radius: 12px;
  border: 1px solid rgba(52, 229, 255, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }

/* ------------------------------------------------------------------ shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 16, 38, 0.92), rgba(3, 8, 22, 0.96));
  backdrop-filter: blur(22px);
  transition: transform 0.32s var(--ease);
}
.sidebar .brand { padding: 4px 8px 22px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #63718d; padding: 16px 12px 7px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.nav a svg { width: 18px; height: 18px; opacity: 0.75; flex: 0 0 auto; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav a.active {
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.22), rgba(47, 123, 255, 0.05));
  border-color: rgba(47, 123, 255, 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav a.active svg { opacity: 1; color: var(--neon); }
.nav a .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.user-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 650; font-size: 14px;
  background: linear-gradient(145deg, #2f7bff, #7c5cff);
  color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.user-chip .u { min-width: 0; }
.user-chip .u b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .u span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .out { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.user-chip .out:hover { color: var(--red); background: rgba(255, 85, 102, 0.1); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 15px clamp(20px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 9, 24, 0.72);
  backdrop-filter: blur(22px) saturate(140%);
  min-height: 68px;
}
.topbar .page-title { font-size: 17px; font-weight: 620; letter-spacing: -0.02em; }
.topbar .page-title span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: var(--glass); border: 1px solid var(--line); border-radius: 11px; width: 40px; height: 40px; cursor: pointer; place-items: center; }
.content { padding: clamp(20px, 3.4vw, 40px); max-width: 1320px; width: 100%; margin: 0 auto; }
.content.narrow { max-width: 980px; }

/* ------------------------------------------------------------------ tipografia */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.04em; }
.page-head p { color: var(--muted); font-size: 14.5px; margin-top: 7px; max-width: 560px; }
.eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--neon); font-weight: 620; margin-bottom: 10px; }
.grad-text { background: linear-gradient(92deg, #6aa8ff 0%, #34e5ff 46%, #ff9a4d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink); font-weight: 570; font-size: 14px; cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.16s, border-color 0.16s, box-shadow 0.16s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); }
.btn:active { transform: scale(0.985); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(180deg, #3d86ff, #1d5fe0 55%, #1249b8);
  border-color: rgba(120, 175, 255, 0.55);
  box-shadow: 0 10px 26px -12px rgba(47, 123, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(180deg, #4a8fff, #2367ea 55%, #1450c4); box-shadow: 0 14px 30px -12px rgba(47, 123, 255, 1); }
.btn-orange {
  background: linear-gradient(180deg, #ff9349, #ff6a00 60%, #e75c00);
  border-color: rgba(255, 190, 140, 0.5);
  box-shadow: 0 12px 28px -12px rgba(255, 106, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #fff;
}
.btn-orange:hover { background: linear-gradient(180deg, #ffa05c, #ff7515 60%, #f06500); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn-danger { background: rgba(255, 85, 102, 0.12); border-color: rgba(255, 85, 102, 0.3); color: #ff8b96; }
.btn-danger:hover { background: rgba(255, 85, 102, 0.2); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-icon { width: 34px; padding: 0; }

/* ------------------------------------------------------------------ cards */
.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.022));
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow-soft);
}
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 16px; letter-spacing: -0.02em; }
.card-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 22px 24px; }
.card-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  position: relative; overflow: hidden;
  padding: 18px 20px 17px; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  backdrop-filter: blur(16px);
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(47, 123, 255, 0.3), transparent 66%);
}
.kpi.orange::after { background: radial-gradient(circle, rgba(255, 122, 24, 0.28), transparent 66%); }
.kpi.neon::after { background: radial-gradient(circle, rgba(52, 229, 255, 0.24), transparent 66%); }
.kpi .k-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 520; }
.kpi .k-value { font-size: clamp(25px, 2.4vw, 32px); font-weight: 640; letter-spacing: -0.045em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi .k-sub b { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------------ grid */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 620; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 570; color: var(--ink-soft); letter-spacing: -0.005em; }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 11px 14px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(2, 7, 20, 0.55);
  color: var(--ink); font-size: 14.5px; outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: #5d6b86; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(47, 123, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(47, 123, 255, 0.16);
  background: rgba(2, 7, 20, 0.75);
}
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b9ab8' stroke-width='2.4'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px; }
.select option { background: #0a1733; color: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.025); }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: #2f7bff; }
.check b { display: block; font-size: 13.5px; font-weight: 560; }
.check span { display: block; font-size: 11.5px; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .s-txt b { display: block; font-size: 14px; font-weight: 570; }
.switch-row .s-txt span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 27px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: 0.2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 21px; height: 21px; border-radius: 50%; left: 3px; top: 3px; background: #fff; transition: 0.2s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.switch input:checked + i { background: linear-gradient(90deg, #2f7bff, #34e5ff); }
.switch input:checked + i::after { transform: translateX(19px); }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.8px; }
table.t th {
  text-align: left; font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 13px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: rgba(255, 255, 255, 0.025);
}
table.t td { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background 0.14s; }
table.t tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
table.t .name { font-weight: 570; white-space: nowrap; }
table.t .email { color: var(--muted); font-size: 12.5px; }
table.t .actions { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------------ chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 570; letter-spacing: 0.01em;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink-soft);
  white-space: nowrap;
}
.chip.green { background: rgba(46, 230, 168, 0.12); border-color: rgba(46, 230, 168, 0.3); color: #6ff0c4; }
.chip.orange { background: rgba(255, 122, 24, 0.13); border-color: rgba(255, 122, 24, 0.34); color: #ffb077; }
.chip.blue { background: rgba(47, 123, 255, 0.14); border-color: rgba(47, 123, 255, 0.36); color: #9cc4ff; }
.chip.red { background: rgba(255, 85, 102, 0.12); border-color: rgba(255, 85, 102, 0.3); color: #ff9aa4; }
.chip.neon { background: rgba(52, 229, 255, 0.12); border-color: rgba(52, 229, 255, 0.32); color: #8df1ff; }
.chip.gray { color: var(--muted); }
.chip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; display: grid; place-items: center; opacity: 0.7; }
.chip button:hover { opacity: 1; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 550;
  padding: 12px 15px 14px; cursor: pointer; position: relative; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: #fff; }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--neon));
  border-radius: 2px; box-shadow: 0 0 12px rgba(52, 229, 255, 0.6);
}
.seg { display: inline-flex; padding: 3px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); gap: 2px; }
.seg button { border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 550; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button.active { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

/* ------------------------------------------------------------------ empty/skeleton */
.empty { text-align: center; padding: 52px 24px; }
.empty .ico {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px;
  display: grid; place-items: center; background: rgba(47, 123, 255, 0.12); border: 1px solid rgba(47, 123, 255, 0.24);
  color: var(--blue-3);
}
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 380px; margin: 0 auto 18px; }
.skel { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ------------------------------------------------------------------ modal */
.modal-back {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(2, 5, 14, 0.7); backdrop-filter: blur(8px);
  padding: 24px; overflow-y: auto;
}
.modal-back.open { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: 100%; max-width: 620px; margin: auto;
  border-radius: 24px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #0b1732, #060e22);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
  animation: pop 0.22s var(--ease);
}
.modal.wide { max-width: 860px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-head .x { margin-left: auto; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.modal-body { padding: 22px 24px; max-height: min(70vh, 720px); overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ------------------------------------------------------------------ toast */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: 13px; font-size: 13.5px;
  border: 1px solid var(--line-strong); background: rgba(10, 22, 48, 0.96);
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
  animation: toastin 0.24s var(--ease);
}
.toast.ok { border-color: rgba(46, 230, 168, 0.35); }
.toast.err { border-color: rgba(255, 85, 102, 0.4); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--blue); flex: 0 0 auto; }
.toast.ok .dot { background: var(--green); }
.toast.err .dot { background: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ quotas */
.quota { display: grid; gap: 13px; }
.quota-item { display: grid; gap: 6px; }
.quota-item .q-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.quota-item .q-top b { font-weight: 570; }
.quota-item .q-top span { color: var(--muted); }
.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--neon)); transition: width 0.5s var(--ease); }
.bar.warn > i { background: linear-gradient(90deg, var(--orange), #ffb020); }
.bar.full > i { background: linear-gradient(90deg, #ff4d5e, var(--orange)); }

/* ------------------------------------------------------------------ listas */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-main b { display: block; font-size: 13.8px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-main span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ------------------------------------------------------------------ chart */
.chart-box { padding: 8px 4px 0; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

/* ------------------------------------------------------------------ webinar cards */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.wcard { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.wcard .cover {
  height: 132px; position: relative;
  background: linear-gradient(135deg, #12337a, #071430 55%, #142a5e);
  display: flex; align-items: flex-end; padding: 16px 18px;
}
.wcard .cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 160px at 85% -20%, rgba(52, 229, 255, 0.35), transparent 70%),
    radial-gradient(300px 160px at 0% 120%, rgba(255, 122, 24, 0.24), transparent 70%);
}
.wcard .cover .chip { position: relative; z-index: 1; }
.wcard .cover .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255,85,102,.18); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,85,102,0); } }
.wcard .wc-body { padding: 15px 18px 16px; flex: 1; }
.wcard .wc-body h3 { font-size: 16px; letter-spacing: -0.025em; margin-bottom: 4px; }
.wcard .wc-body .slug { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.wcard .wc-metrics { display: flex; gap: 16px; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.wcard .wc-metrics b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.wcard .wc-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: rgba(0,0,0,.14); }

/* ------------------------------------------------------------------ editor */
.editor-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.editor-side { position: sticky; top: 92px; display: grid; gap: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.section-title:first-child { margin-top: 0; }
.section-title h3 { font-size: 14px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-soft); font-weight: 620; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }
.list-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.mini-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

/* ------------------------------------------------------------------ contatos/filtros */
.filters { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) auto; gap: 10px; margin-bottom: 16px; }
.filters .input, .filters .select { height: 42px; min-height: 42px; font-size: 13.5px; }
.filter-more { display: none; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.filter-more.open { display: grid; }
.pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 14px 4px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ misc */
.stat-inline { display: flex; gap: 22px; flex-wrap: wrap; }
.stat-inline > div b { display: block; font-size: 19px; font-weight: 620; letter-spacing: -0.03em; }
.stat-inline > div span { font-size: 11.5px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(2,7,20,.55); }
.tag-input input { flex: 1; min-width: 100px; border: 0; background: none; outline: none; font-size: 13.5px; padding: 4px; }
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--mono); font-size: 12.5px; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--orange); color: #1a0d00; font-size: 10.5px; font-weight: 700;
}
.note-box { padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(52, 229, 255, 0.22); background: rgba(52, 229, 255, 0.06); font-size: 12.5px; color: #a9e8f5; line-height: 1.5; }
.note-box.warn { border-color: rgba(255, 122, 24, 0.3); background: rgba(255, 122, 24, 0.07); color: #ffc79a; }
.note-box b { color: #fff; }

/* ------------------------------------------------------------------ chat admin */
.chat-admin { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.chat-feed { height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.22); }
.msg { display: flex; gap: 9px; font-size: 13px; }
.msg .av { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: linear-gradient(145deg, #2f7bff, #7c5cff); }
.msg.staff .av { background: linear-gradient(145deg, #ff7a18, #ffb020); color: #1a0d00; }
.msg .b { background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 11px; padding: 7px 11px; max-width: 440px; }
.msg.staff .b { background: rgba(255, 122, 24, 0.1); border-color: rgba(255, 122, 24, 0.25); }
.msg .b b { font-size: 11.5px; color: var(--neon); display: block; margin-bottom: 1px; }
.msg.staff .b b { color: var(--orange-2); }

/* ------------------------------------------------------------------ tickets */
.ticket-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .14s; }
.ticket-row:hover { background: rgba(255,255,255,.03); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row .tr-main { flex: 1; min-width: 0; }
.ticket-row .tr-main b { display: block; font-size: 14px; font-weight: 560; }
.ticket-row .tr-main span { font-size: 12px; color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 14px; padding: 20px 0; }
.tmsg { max-width: 78%; padding: 12px 15px; border-radius: 15px; font-size: 13.5px; line-height: 1.55; background: rgba(255,255,255,.055); border: 1px solid var(--line); }
.tmsg.mine { align-self: flex-end; background: linear-gradient(160deg, rgba(47,123,255,.28), rgba(47,123,255,.12)); border-color: rgba(47,123,255,.35); }
.tmsg .meta { font-size: 10.5px; color: var(--muted); margin-top: 6px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-more { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --sidebar: 280px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; padding: 20px; }
  .content { padding: 18px 16px 90px; }
  .topbar { padding: 12px 16px; }
  .kpis { gap: 10px; }
  .kpi { padding: 15px 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .list-row { grid-template-columns: 1fr; }
  .chat-admin { grid-template-columns: 1fr; }
  .modal-body { max-height: 74vh; }
  .wgrid { grid-template-columns: 1fr; }
  #toasts { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .k-value { font-size: 23px; }
  .page-head h1 { font-size: 25px; }
  .auth-card { padding: 28px 22px; }
  .hide-sm { display: none !important; }
  .table-wrap { border: 0; background: none; }
  table.t th { display: none; }
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: rgba(255,255,255,.03); padding: 6px 4px; }
  table.t td { border: 0; padding: 6px 12px; }
  table.t td::before { content: attr(data-l); display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  table.t td.actions { text-align: left; }
}

/* admin: 5 KPI columns */
.kpis.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .kpis.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .kpis.five { grid-template-columns: repeat(2, 1fr); } }

/* --- icon sizing safety net --- */
.kpi .k-label svg, .k-label > svg { width: 15px; height: 15px; opacity: .8; }
.list-item > .avatar svg, .avatar svg { width: 16px; height: 16px; }
.card-head > div svg, .mini-title svg { width: 16px; height: 16px; }
.empty .ico svg { width: 26px; height: 26px; }
.grid > .card, .grid > div > .card { align-self: start; }
.list-item .row svg { width: 14px; height: 14px; }
table.t svg { width: 14px; height: 14px; }
.chip svg { width: 13px; height: 13px; }
.stat-inline svg { width: 15px; height: 15px; }

/* tabs & misc icon sizing */
.tab svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.tab { display: inline-flex; align-items: center; gap: 6px; }
.nav a svg { width: 18px; height: 18px; }
.seg svg, .pagination svg, .section-title svg { width: 15px; height: 15px; }
.quota-item svg, .q-top svg { width: 14px; height: 14px; }
.tmsg svg, .ticket-row svg { width: 16px; height: 16px; }

/* mobile: barra superior compacta */
@media (max-width: 720px) {
  .topbar .page-title { font-size: 15px; min-width: 0; }
  .topbar .page-title span { display: none; }
  .topbar { gap: 8px; min-height: 58px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn { height: 36px; padding: 0 11px; font-size: 12.5px; border-radius: 10px; }
  .topbar-actions .btn svg { width: 15px; height: 15px; }
  .content { padding: 14px 12px 80px; }
  .page-head { margin-bottom: 16px; }
  .card-pad, .card-body { padding: 16px; }
  .card-head { padding: 15px 16px; }
  .kpi .k-value { font-size: 22px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters .search { grid-column: 1 / -1; }
  .wcard .wc-foot .btn { height: 32px; padding: 0 10px; }
}
