/* ==========================================================================
   Postifica · App UI (camada logada) — identidade N27
   Gradiente magenta→violeta→azul · ciano · Space Grotesk + Inter.
   Fundação compartilhada: tokens + componentes. Sem estilo inline nos templates.
   Ref.: docs/brand/design-system.md · docs/brand/tokens.css
   ========================================================================== */

:root {
  /* Marca */
  --mag: #F72585;
  --violet: #7209B7;
  --blue: #4361EE;
  --blue-600: #2F4BD8;
  --cyan: #4CC9F0;
  --grad: linear-gradient(120deg, #F72585 0%, #7209B7 48%, #4361EE 100%);
  --grad-soft: linear-gradient(120deg, #FDE7F1, #E7ECFE);

  /* Neutros */
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --ink: #16213E;
  --muted: #5B6478;
  --subtle: #9298A8;
  --border: #E9EBF2;
  --border-soft: #F1F2F6;

  /* Estado */
  --success: #059669; --success-bg: #ECFDF5; --success-bd: #A7F3D0;
  --warning: #B45309; --warning-bg: #FFFBEB; --warning-bd: #FCD9A8;
  --error:   #DC2626; --error-bg:   #FEF2F2; --error-bd:   #FECACA;
  --info:    #2F4BD8; --info-bg:    #EEF1FE; --info-bd:    #DFE5FD;

  /* Tipografia */
  --font-d: 'Space Grotesk', Inter, system-ui, sans-serif;
  --font:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Raio / sombra / transição */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --sh-xs: 0 1px 2px rgba(22,33,62,.05);
  --sh-sm: 0 4px 14px rgba(22,33,62,.06);
  --sh-md: 0 10px 30px rgba(22,33,62,.09);
  --sh-lg: 0 20px 52px rgba(22,33,62,.13);
  --ease: cubic-bezier(.2,.7,.2,1);
  --sidebar-w: 248px;
}

/* --- Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-d); letter-spacing: -.02em; line-height: 1.15; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }
.mono { font-family: var(--font-mono); }
.g {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ==========================================================================
   App shell — sidebar + topbar + content
   ========================================================================== */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  z-index: 60;
  transition: transform .25s var(--ease);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  font: 700 21px var(--font-d); letter-spacing: -.03em; color: var(--ink);
  padding: 6px 10px 18px;
}
.sidebar .brand:hover { color: var(--ink); }
.sidebar .brand .dot { color: var(--cyan); }
.tile {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 16px rgba(114,9,183,.32);
}

.nav-group { display: grid; gap: 3px; }
.nav-label {
  font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--subtle); padding: 16px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r);
  color: var(--muted); font-weight: 500; font-size: 14.5px;
  position: relative; transition: background .15s, color .15s;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.9; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active {
  background: var(--grad-soft); color: var(--blue-600); font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}

.side-foot { margin-top: auto; padding-top: 14px; }
.plan-card {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px; background: var(--surface-2);
}
.plan-card .row { display: flex; align-items: center; justify-content: space-between; }
.plan-card .lbl { font-size: 12px; color: var(--muted); }
.plan-card .name { font: 700 15px var(--font-d); }
.quota { margin-top: 10px; }
.quota .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 62px; display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  background: rgba(247,248,251,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font: 600 18px var(--font-d); margin-right: auto; }
.topbar .burger {
  display: none; background: none; border: 0; cursor: pointer; color: var(--ink);
}

.content-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }

/* User menu */
.usermenu { position: relative; }
.usermenu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
  padding: 5px 8px 5px 5px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface);
}
.usermenu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font: 600 12px var(--font);
  background: var(--grad);
}
.usermenu .who { font-size: 13.5px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu .pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: 6px; z-index: 50;
}
.usermenu .pop .email { padding: 8px 10px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; word-break: break-all; }
.usermenu .pop a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink); font-size: 14px; }
.usermenu .pop a:hover { background: var(--surface-2); }

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r); padding: 10px 18px;
  font: 600 14.5px var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.btn svg { width: 17px; height: 17px; }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(114,9,183,.26); }
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(247,37,133,.30); color: #fff; }
.btn-out { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.btn-out:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-ai { background: #FCEbF4; color: var(--mag); border: 1.5px solid #F8C8DF; }
.btn-ai:hover { background: #FBDDEC; color: var(--mag); }
.btn-danger { background: var(--error-bg); color: var(--error); border: 1.5px solid var(--error-bd); }
.btn-danger:hover { background: #FEE2E2; color: var(--error); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ==========================================================================
   Cards / superfícies
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2 { font-size: 18px; }
.card-head .sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.card-pad-0 { padding: 0; overflow: hidden; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.section-gap { margin-top: 18px; }

/* ==========================================================================
   KPIs
   ========================================================================== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px;
}
.kpi .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; background: var(--grad-soft); color: var(--violet); }
.kpi .ic svg { width: 18px; height: 18px; }
.kpi .val { font: 700 26px var(--font-d); line-height: 1; }
.kpi .lbl { font-size: 13px; color: var(--muted); margin-top: 5px; }
.kpi .hint { font-size: 11.5px; color: var(--subtle); margin-top: 3px; }

/* ==========================================================================
   Badges / status (tags)
   ========================================================================== */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 11.5px var(--font); padding: 3px 9px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-scheduled { background: var(--info-bg); color: var(--blue); }
.tag-published { background: var(--success-bg); color: var(--success); }
.tag-draft     { background: var(--warning-bg); color: var(--warning); }
.tag-failed    { background: var(--error-bg); color: var(--error); }
.tag-awaiting  { background: #F5F3FF; color: #6D28D9; }
.tag-reminded  { background: #EFF6FF; color: #1D4ED8; }
.tag-ai        { background: #FCEbF4; color: var(--mag); }
.tag-canceled  { background: var(--surface-2); color: var(--subtle); }
.tag-neutral   { background: var(--surface-2); color: var(--muted); }
.tag-plain::before { display: none; }

/* ==========================================================================
   Formulários
   ========================================================================== */
.form-group { margin-bottom: 16px; }
label, .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.label .opt { color: var(--subtle); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=datetime-local], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font: 15px var(--font); color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(67,97,238,.16);
}
textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
input[type=file] { padding: 9px 12px; background: var(--surface-2); cursor: pointer; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field-error { color: var(--error); font-size: 13px; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkrow { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.checkrow input[type=checkbox] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; }
.checkrow label { margin: 0; }
.checkrow .help { margin-top: 2px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* ==========================================================================
   Mensagens / toasts
   ========================================================================== */
.toasts { position: fixed; top: 74px; right: 22px; z-index: 80; display: grid; gap: 10px; width: min(360px, calc(100vw - 44px)); }
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--sh-md); font-size: 14px; animation: toast-in .35s var(--ease);
}
.toast .ic { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast .x { margin-left: auto; cursor: pointer; color: var(--subtle); background: none; border: 0; font-size: 18px; line-height: 1; padding: 0 2px; }
.toast.success { border-left: 4px solid var(--success); } .toast.success .ic { color: var(--success); }
.toast.error, .toast.warning { border-left: 4px solid var(--error); } .toast.error .ic, .toast.warning .ic { color: var(--error); }
.toast.info { border-left: 4px solid var(--blue); } .toast.info .ic { color: var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* Banner inline (erros de form etc.) */
.alert { display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--r); font-size: 14px; margin-bottom: 14px; }
.alert.error { background: var(--error-bg); color: var(--error); border: 1px solid var(--error-bd); }
.alert.info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-bd); }
.alert.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-bd); }

/* ==========================================================================
   Calendário semanal (componente core)
   ========================================================================== */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-toolbar .range { font: 600 16px var(--font-d); }
.cal-nav { display: inline-flex; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.icon-btn svg { width: 18px; height: 18px; }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.cal-day {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  min-height: 156px; padding: 10px; display: flex; flex-direction: column; gap: 7px;
}
.cal-day.today { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(67,97,238,.12); }
.cal-day.past { background: var(--surface-2); }
.cal-day .dh { display: flex; align-items: baseline; justify-content: space-between; }
.cal-day .dow { font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); }
.cal-day .dnum { font: 700 16px var(--font-d); }
.cal-day.today .dnum { color: var(--blue); }
.cal-chip {
  display: block; border-radius: var(--r-sm); padding: 7px 8px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--blue);
  font-size: 12px; color: var(--ink); transition: background .15s, transform .12s;
}
.cal-chip:hover { background: #fff; transform: translateY(-1px); box-shadow: var(--sh-sm); color: var(--ink); }
.cal-chip .t { font-weight: 700; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cal-chip .c { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.cal-chip.s-scheduled { border-left-color: var(--blue); }
.cal-chip.s-published { border-left-color: var(--success); }
.cal-chip.s-draft     { border-left-color: var(--warning); }
.cal-chip.s-failed    { border-left-color: var(--error); }
.cal-chip.s-awaiting  { border-left-color: #6D28D9; }
.cal-chip.s-reminded  { border-left-color: #1D4ED8; }
.cal-day .add {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; color: var(--subtle); border: 1px dashed var(--border); border-radius: var(--r-sm);
  padding: 5px; opacity: 0; transition: opacity .15s;
}
.cal-day:hover .add { opacity: 1; }
.cal-day .add:hover { color: var(--blue); border-color: var(--blue); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ==========================================================================
   Listas / tabelas
   ========================================================================== */
.list { display: grid; gap: 2px; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border-radius: var(--r); transition: background .15s;
}
.list-row:hover { background: var(--surface-2); }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--grad-soft); }
.thumb.ph { display: grid; place-items: center; color: var(--violet); }
.list-row .meta { min-width: 0; flex: 1; }
.list-row .meta .h { font-weight: 600; font-size: 14px; }
.list-row .meta .s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .when { font-size: 13px; color: var(--muted); white-space: nowrap; font-family: var(--font-mono); }
.list-row .actions { display: flex; gap: 7px; align-items: center; }
.divide > * + * { border-top: 1px solid var(--border-soft); }

.handle { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ==========================================================================
   Empty states
   ========================================================================== */
.empty { text-align: center; padding: 44px 20px; }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--grad-soft); color: var(--violet); display: grid; place-items: center; margin: 0 auto 16px; }
.empty .ic svg { width: 28px; height: 28px; }
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 360px; margin: 0 auto 18px; }

/* ==========================================================================
   Post composer (criar/editar) — 2 colunas + preview
   ========================================================================== */
.composer { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.preview-col { position: sticky; top: 86px; }
.ig-preview {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-sm);
}
.ig-preview .ig-top { display: flex; align-items: center; gap: 9px; padding: 11px 13px; }
.ig-preview .ig-av { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); }
.ig-preview .ig-top b { font-size: 13.5px; }
.ig-preview .ig-top .more { margin-left: auto; color: var(--subtle); }
.ig-preview .ig-media { aspect-ratio: 1; background: var(--grad-soft); display: grid; place-items: center; color: var(--violet); overflow: hidden; }
.ig-preview .ig-media img { width: 100%; height: 100%; object-fit: cover; }
.ig-preview .ig-actions { display: flex; gap: 14px; padding: 11px 13px 6px; color: var(--ink); }
.ig-preview .ig-actions svg { width: 22px; height: 22px; }
.ig-preview .ig-cap { padding: 4px 13px 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.ig-preview .ig-cap .u { font-weight: 600; }
.ig-preview .ig-cap .h { color: var(--blue); }
.preview-note { text-align: center; font-size: 12px; color: var(--subtle); margin-top: 10px; }
.counter { font-size: 12px; color: var(--muted); }
.counter.over { color: var(--error); font-weight: 600; }
.inline-ai { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ==========================================================================
   Auth (login / signup)
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: var(--grad); }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand { display: flex; align-items: center; gap: 11px; font: 700 22px var(--font-d); color: #fff; }
.auth-side .brand .tile { background: rgba(255,255,255,.18); box-shadow: none; }
.auth-side .pitch { margin-top: auto; }
.auth-side .pitch h2 { font-size: 30px; color: #fff; max-width: 420px; }
.auth-side .pitch p { opacity: .92; margin-top: 14px; max-width: 400px; font-size: 16px; }
.auth-side .feats { margin-top: 26px; display: grid; gap: 11px; }
.auth-side .feats span { display: flex; align-items: center; gap: 10px; font-size: 14.5px; opacity: .96; }
.auth-side .feats svg { width: 18px; height: 18px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box .logo-sm { display: none; align-items: center; gap: 9px; font: 700 20px var(--font-d); margin-bottom: 24px; }
.auth-box h1 { font-size: 26px; }
.auth-box .lead { color: var(--muted); margin: 6px 0 24px; font-size: 14.5px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--subtle); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }

/* ==========================================================================
   Util
   ========================================================================== */
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.hide-mobile { }
.spinner { display: inline-block; width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsivo
   ========================================================================== */
.scrim { display: none; }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) {
  .composer { grid-template-columns: 1fr; }
  .preview-col { position: static; max-width: 380px; }
}
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-box .logo-sm { display: flex; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(22,33,62,.4); z-index: 55; }
  .content-wrap { margin-left: 0; }
  .topbar .burger { display: grid; place-items: center; }
  .calendar { grid-template-columns: 1fr; }
  .cal-day { min-height: auto; }
}
@media (max-width: 560px) {
  .content { padding: 18px 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-head h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Dot de aviso no nav ─────────────────────────────────────────── */
.dot-warn{display:inline-block;width:7px;height:7px;border-radius:50%;background:#f59e0b;margin-left:auto;flex-shrink:0}
.tag-warning{background:#FEF3C7;color:#92400E;border:1px solid #FDE68A}

/* ── Dropzone (upload de mídia) ──────────────────────────────────── */
.dropzone{position:relative;border:2px dashed var(--border);border-radius:var(--r);
  background:var(--surface-2);padding:24px 18px;text-align:center;cursor:pointer;
  transition:border-color .15s var(--ease),background .15s var(--ease)}
.dropzone:hover{border-color:var(--blue)}
.dropzone.dragover{border-color:var(--blue);background:var(--info-bg)}
.dropzone .dz-inner{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--muted);pointer-events:none}
.dropzone .dz-text{font-size:14px}
.dropzone .dz-text strong{color:var(--ink)}
.dropzone .dz-hint{font-size:12px;color:var(--subtle)}
.dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.dropzone .dz-file{margin-top:10px;font-size:13px;color:var(--blue);font-weight:500;pointer-events:none}
