/* =========================================================
   Dark Channels — Dashboard
   Design system: Dark OLED + Glassmorphism (roxo/preto)
   Tipografia: Fira Sans + Fira Code
   ========================================================= */

:root {
  /* Paleta — roxo + preto */
  --bg-0: #07060d;
  --bg-1: #0c0a18;
  --bg-2: #14102a;
  --surface: rgba(20, 14, 38, 0.55);
  --surface-strong: rgba(28, 20, 52, 0.75);
  --surface-inset: rgba(8, 6, 18, 0.6);

  --line: rgba(168, 132, 255, 0.18);
  --line-strong: rgba(168, 132, 255, 0.32);

  --text: #ECE7FF;
  --text-dim: #B6A9D9;
  --text-mute: #7B6F9C;

  --purple-50: #F3EEFF;
  --purple-300: #C2A6FF;
  --purple-400: #A684FF;
  --purple-500: #8A5BFF;     /* primária */
  --purple-600: #6B3BE0;
  --purple-700: #4F25B8;

  --violet-500: #5B3BD9;
  --pink-500:  #E94CCB;
  --cyan-400:  #58E1FF;

  --ok: #4ADE80;
  --warn: #FACC15;
  --err: #F87171;

  --radius-sm: 0px;
  --radius-md: 1px;
  --radius-lg: 2px;
  --radius-xl: 3px;

  --shadow-glow: 0 10px 30px -10px rgba(138, 91, 255, 0.45),
                 0 6px 18px -8px rgba(91, 59, 217, 0.35);

  --font-sans: 'Fira Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  --sidebar-w: 248px;
  --topbar-h: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }

/* =============== Aurora background =============== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(138, 91, 255, 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(91, 59, 217, 0.20), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(233, 76, 203, 0.12), transparent 60%),
    linear-gradient(180deg, #07060d 0%, #0a0814 100%);
}
.aurora-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 480px; height: 480px; background: #6B3BE0; top: -120px; left: -120px; }
.blob-2 { width: 360px; height: 360px; background: #E94CCB; top: 40%; right: -100px; animation-delay: -6s; }
.blob-3 { width: 420px; height: 420px; background: #4F25B8; bottom: -160px; left: 30%; animation-delay: -12s; opacity: 0.4; }
@keyframes float {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(40px,-30px,0) scale(1.06); }
}

/* =============== Glass surfaces =============== */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 30px -16px rgba(0,0,0,0.55);
}
.glass-inset {
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* =============== Buttons =============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(138, 91, 255, 0.45);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(138, 91, 255, 0.12);
  border-color: var(--line-strong);
}

.btn-block { width: 100%; justify-content: center; padding: 12px 16px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: background 200ms ease, color 200ms ease;
}
.icon-btn:hover { background: rgba(138,91,255,0.12); color: var(--text); }

.link-btn {
  color: var(--purple-300);
  font-size: 14px;
  font-weight: 500;
  transition: color 150ms ease;
}
.link-btn:hover { color: var(--purple-50); }

/* =============== Eyebrow / labels =============== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--purple-300);
}
.page-title { font-size: 22px; margin-top: 2px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--purple-300);
  background: rgba(138, 91, 255, 0.12);
  border: 1px solid rgba(138, 91, 255, 0.35);
}

/* =============== Login =============== */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.login-shell {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.login-card {
  width: 100%;
  padding: 36px 32px;
  border-radius: var(--radius-xl);
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .brand-mark {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 16px;
  color: var(--purple-300);
  background: linear-gradient(135deg, rgba(138,91,255,0.20), rgba(91,59,217,0.20));
  border: 1px solid var(--line-strong);
}
.login-brand h1 {
  font-size: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--purple-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 6px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text-dim);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-wrap:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(138, 91, 255, 0.18);
}
.input-wrap input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
}
.input-wrap input::placeholder { color: var(--text-mute); }
.toggle-pass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 8px;
  transition: background 150ms ease;
}
.toggle-pass:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.checkbox input { accent-color: var(--purple-500); }

.feedback {
  min-height: 18px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.feedback.ok  { color: var(--ok); }
.feedback.err { color: var(--err); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-mute);
  font-size: 12px;
  margin: 6px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.footnote {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.login-footer {
  display: flex; gap: 8px;
  font-size: 12px; color: var(--text-mute);
  flex-wrap: wrap; justify-content: center;
}
.login-footer a:hover { color: var(--text); }

/* =============== Dashboard layout =============== */
.dashboard-body { min-height: 100vh; }
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  margin: 16px;
  margin-right: 0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 16px;
}
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--purple-300);
  background: linear-gradient(135deg, rgba(138,91,255,0.18), rgba(91,59,217,0.18));
  border: 1px solid var(--line-strong);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 15px; }
.brand-text span { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.1em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: background 200ms ease, color 200ms ease;
}
.nav-item:hover { background: rgba(138,91,255,0.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(138,91,255,0.20), rgba(91,59,217,0.18));
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--line); }
.logout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 14px;
  transition: background 200ms ease, color 200ms ease;
}
.logout:hover { background: rgba(248, 113, 113, 0.08); color: var(--err); }

/* Main */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  margin: 16px;
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  min-width: 240px;
  color: var(--text-dim);
  transition: border-color 150ms ease;
}
.search:focus-within { border-color: var(--purple-500); }
.search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  font-size: 14px; min-width: 0;
}
.search input::placeholder { color: var(--text-mute); }

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple-500), var(--violet-500));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px -6px rgba(138,91,255,0.6);
}

.only-mobile { display: none; }

.content {
  padding: 4px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Channel switch (dentro da sidebar) */
.channel-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 6px 14px;
  margin: 4px 0 8px;
  border-bottom: 1px solid var(--line);
}
.channel-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(8, 6, 18, 0.55);
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  user-select: none;
  outline: none;
}
.channel-select:hover { border-color: var(--purple-500); }
.channel-select:focus,
.channel-select.open {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(138, 91, 255, 0.18);
}
.channel-select-icon { color: var(--purple-300); flex-shrink: 0; }
.channel-select-label {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.channel-caret { color: var(--text-dim); flex-shrink: 0; transition: transform 200ms ease; }
.channel-select.open .channel-caret { transform: rotate(180deg); }

.channel-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: rgba(12, 10, 24, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6), 0 0 0 1px rgba(138,91,255,0.10);
  display: none;
  z-index: 30;
  max-height: 280px;
  overflow-y: auto;
}
.channel-select.open .channel-options { display: block; }

.channel-option {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 120ms ease, color 120ms ease;
}
.channel-option:hover { background: rgba(138, 91, 255, 0.16); }
.channel-option.active {
  background: linear-gradient(135deg, rgba(138,91,255,0.28), rgba(91,59,217,0.28));
  color: #fff;
}
.channel-option .opt-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple-400);
  box-shadow: 0 0 8px rgba(138,91,255,0.6);
  flex-shrink: 0;
}
.channel-option.is-global .opt-dot { background: var(--cyan-400); box-shadow: 0 0 8px rgba(88,225,255,0.6); }
.channel-select:hover { border-color: var(--purple-500); }
.channel-select:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(138, 91, 255, 0.18);
}
.channel-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-weight: 500;
  font-size: 14px !important;
  line-height: 1.4;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  padding: 2px 4px;
}
.channel-select select option {
  background: #14102a;
  color: #ECE7FF;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
}
.channel-select select:focus option:checked {
  background: linear-gradient(135deg, rgba(138,91,255,0.35), rgba(91,59,217,0.35));
  color: #fff;
}
.channel-caret { color: var(--text-dim); flex-shrink: 0; }
.channel-switch-hint {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 0 6px;
}

/* Hero */
.hero {
  padding: 28px 28px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  overflow: hidden;
  position: relative;
}
.hero-text { padding-bottom: 28px; display: flex; flex-direction: column; gap: 14px; }
.hero-text h2 { font-size: 28px; line-height: 1.2; }
.hero-text p { color: var(--text-dim); max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  min-height: 220px;
}
.orb {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(233,76,203,0.55), rgba(91,59,217,0.55) 60%, transparent 70%);
  filter: blur(2px);
  box-shadow: 0 0 80px rgba(138,91,255,0.35);
  animation: orbSpin 24s linear infinite;
}
@keyframes orbSpin { to { transform: rotate(360deg); } }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 13px; color: var(--text-dim); }
.kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.kpi-trend { font-size: 12px; font-family: var(--font-mono); }
.kpi-trend.up { color: var(--ok); }
.kpi-trend.down { color: var(--warn); }

.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.kpi-icon--purple { background: rgba(138,91,255,0.14); color: var(--purple-300); }
.kpi-icon--violet { background: rgba(91,59,217,0.16); color: #B7A0FF; }
.kpi-icon--pink   { background: rgba(233,76,203,0.14); color: #FFA8E6; }
.kpi-icon--cyan   { background: rgba(88,225,255,0.12); color: var(--cyan-400); }

/* Cards */
.card { padding: 22px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h3 { font-size: 16px; }
.card-head p { color: var(--text-dim); font-size: 13px; }

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.platforms { display: flex; flex-direction: column; gap: 8px; }
.platforms li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
}
.platform-meta { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.platform-meta strong { font-size: 14px; }
.platform-meta span { font-size: 12px; color: var(--text-dim); }
.platform-dot {
  width: 10px; height: 10px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.platform-dot[data-plat="youtube"]   { background: #FF4D4D; }
.platform-dot[data-plat="tiktok"]     { background: #58E1FF; }
.platform-dot[data-plat="instagram"]  { background: #E94CCB; }
.platform-dot[data-plat="facebook"]   { background: #6B7CFF; }
.platform-dot[data-plat="x"]          { background: #C2A6FF; }
.platform-dot[data-plat="threads"]    { background: #FFFFFF; }

.platform-status {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.platform-status.ok { color: var(--ok); border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.10); }
.platform-status.warn { color: var(--warn); border-color: rgba(250,204,21,0.35); background: rgba(250,204,21,0.10); }

.schedule { display: flex; flex-direction: column; gap: 8px; }
.schedule li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
}
.schedule-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 52px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(138,91,255,0.10);
  border: 1px solid var(--line-strong);
}
.schedule-date strong { font-size: 18px; line-height: 1; }
.schedule-date span { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.schedule-meta { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.schedule-meta strong { font-size: 14px; }
.schedule-meta span { font-size: 12px; color: var(--text-dim); }

.tag {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}
.tag-purple { color: var(--purple-300); background: rgba(138,91,255,0.14); border: 1px solid rgba(138,91,255,0.30); }
.tag-violet { color: #B7A0FF;          background: rgba(91,59,217,0.18); border: 1px solid rgba(91,59,217,0.30); }
.tag-pink   { color: #FFA8E6;          background: rgba(233,76,203,0.14); border: 1px solid rgba(233,76,203,0.30); }
.tag-cyan   { color: var(--cyan-400);  background: rgba(88,225,255,0.10); border: 1px solid rgba(88,225,255,0.30); }

/* Tools placeholder */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.tool {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--line-strong);
  color: var(--text-dim);
  min-height: 110px;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.tool.placeholder { cursor: default; }
.tool-icon { font-size: 22px; }
.tool strong { font-size: 14px; color: var(--text); }
.tool span { font-size: 12px; }

/* =============== Responsive =============== */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-two { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 180px; }
  .search { min-width: 160px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    margin: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 250ms ease;
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }
  .only-mobile { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .search { display: none; }
  .page-title { font-size: 18px; }
  .hero-text h2 { font-size: 22px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 22px; }
  .login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
