:root {
  --blue: #014C9B;
  --blue-deep: #01366F;
  --blue-night: #012A57;
  --blue-soft: #E6EEF8;
  --sun: #FBBA00;
  --sun-deep: #B98600;
  --sun-soft: #FFF3CC;
  --bg: #EEF2F7;
  --surface: #FFFFFF;
  --ink: #1A2433;
  --muted: #5B6778;
  --line: #DCE3EC;
  --danger: #C62828;
  --danger-soft: #FDECEC;
  --ok: #1E7F4A;
  --wa: #128C4B;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-card: 0 1px 0 rgba(1, 54, 111, .06), 0 1px 3px rgba(1, 54, 111, .08);
  --shadow-pop: 0 12px 40px rgba(1, 42, 87, .22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.45 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: #C3CEDB; background: #F7F9FC; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { background: #0D703B; border-color: #0D703B; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(1, 76, 155, .06); color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: inherit;
}
.icon-btn:hover { background: rgba(127, 140, 160, .16); }

.field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400;
}
.field textarea, textarea.input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 76, 155, .15);
}
.field-hint { font-weight: 400; font-size: 12px; color: var(--muted); }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: 216px 1fr; height: 100vh; height: 100dvh; overflow: hidden; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 14px 16px; background: var(--blue-night); color: #DCE7F5;
}
.side-logo { display: block; width: 96px; height: auto; margin: 0 8px; }
.side-nav { display: grid; gap: 2px; }
.side-nav button {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--r-md); background: transparent; color: #B6C6DB; font-weight: 500;
}
.side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav button.is-active { background: rgba(251, 186, 0, .14); color: #fff; }
.side-nav button.is-active svg { color: var(--sun); }
.side-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 0 8px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.side-user-name {
  flex: 1; min-width: 0; padding: 4px 6px; margin: -4px 0; border: 0; border-radius: var(--r-sm);
  background: none; color: inherit; text-align: left; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-user-name:hover { background: rgba(255, 255, 255, .06); }
.side-user-name small { display: block; color: #8FA6C2; font-size: 11.5px; font-weight: 400; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--sun); color: var(--blue-night); font-size: 11.5px; font-weight: 700;
  display: inline-grid; place-items: center;
}
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.row-item.request { flex-wrap: wrap; }
.request-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.roles { margin: 0; display: grid; gap: 8px; }
.roles div { display: grid; gap: 1px; }
.roles dt { font-weight: 650; font-size: 13.5px; }
.roles dd { margin: 0; color: var(--muted); font-size: 13px; }
.auth-alt { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.auth-alt a { color: var(--blue); font-weight: 600; }
.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
  border-radius: 50%; background: var(--sun); color: var(--blue-night); font-weight: 700; font-size: 12px;
}

.main { min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.main:focus { outline: none; }
.loading { margin: 48px; color: var(--muted); }

.topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 18px 24px 12px;
}
.topbar h1 { margin: 0 12px 0 0; font-size: 21px; font-weight: 750; letter-spacing: -.02em; color: var(--blue-deep); }
.search { position: relative; flex: 0 1 340px; min-width: 180px; }
.search svg { position: absolute; left: 11px; top: 10px; color: var(--muted); width: 17px; height: 17px; }
.search input { padding-left: 36px; }
.topbar .spacer { flex: 1; }

.filterbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 24px 12px; min-height: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.chip button:hover { background: var(--bg); color: var(--ink); }
.chip button svg { width: 12px; height: 12px; }
.filterbar .clear { border: 0; background: none; color: var(--blue); font-size: 12.5px; font-weight: 600; padding: 0 6px; }

.pulse {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline;
  margin: 0 24px 14px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--muted); font-size: 13px;
}
.pulse b { color: var(--ink); font-weight: 650; }
.pulse button { border: 0; background: none; padding: 0; color: inherit; font: inherit; }
.pulse button:hover b, .pulse button.is-on b { text-decoration: underline; text-underline-offset: 3px; }
.pulse .late b { color: var(--danger); }
.pulse .today b { color: var(--sun-deep); }

/* ---------- Painel solar: a tira de células da etapa ---------- */
.cells { display: inline-flex; gap: 3px; padding-left: 3px; }
.cells i {
  width: 11px; height: 9px; border-radius: 1.5px;
  background: #CBD6E3; transform: skewX(-20deg);
}
.cells i.on { background: var(--sun); }
.cells i.now { background: var(--blue); }

/* ---------- Kanban ---------- */
.board {
  flex: 1; min-height: 0; display: grid;
  grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr);
  gap: 12px; padding: 0 24px 20px; overflow-x: auto;
  scroll-snap-type: x proximity;
}
.col {
  display: flex; flex-direction: column; min-height: 0; scroll-snap-align: start;
  background: #E3E9F1; border-radius: var(--r-lg);
}
.col-head { padding: 12px 14px 10px; }
.col-title { display: flex; align-items: center; gap: 8px; }
.col-title h2 { margin: 0; font-size: 14px; font-weight: 700; color: var(--blue-deep); flex: 1; min-width: 0; }
.col-count {
  min-width: 24px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: rgba(1, 54, 111, .1); color: var(--blue-deep); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.col-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.col-body { flex: 1; min-height: 60px; overflow-y: auto; padding: 2px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.col.is-over { background: #D6E2F0; box-shadow: inset 0 0 0 2px var(--blue); }
.col-empty { margin: 4px 4px 0; padding: 14px; border: 1.5px dashed #C3CEDB; border-radius: var(--r-md); color: var(--muted); font-size: 12.5px; text-align: center; }
.col-add { margin: 0 10px 10px; border: 0; background: transparent; color: var(--muted); height: 32px; border-radius: var(--r-sm); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.col-add:hover { background: rgba(255, 255, 255, .6); color: var(--blue); }
.col-add svg { width: 15px; height: 15px; }

.card {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 11px 12px 10px; border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-card); cursor: grab;
}
.card:hover { border-color: #C3CEDB; }
.card.is-dragging { opacity: .45; }
.card-name { display: block; font-weight: 650; font-size: 14px; line-height: 1.3; padding-right: 28px; }
.card-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.card-value { display: flex; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--ink); }
.card-value strong { font-weight: 650; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px;
  font-size: 11.5px; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white);
}
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.card-foot .grow { flex: 1; }
.due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.due svg { width: 13px; height: 13px; }
.due.late { color: var(--danger); }
.due.today { color: var(--sun-deep); }
.card-wa {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: transparent; color: var(--wa);
}
.card-wa:hover { background: #E3F4EA; }
.card-wa svg { width: 17px; height: 17px; }
.unread {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.owner { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-deep); font-size: 10.5px; font-weight: 700; }

/* ---------- Lista ---------- */
.list-wrap { flex: 1; min-height: 0; overflow: auto; margin: 0 24px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.list th { position: sticky; top: 0; z-index: 1; background: #F6F8FB; text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { padding: 11px 14px; border-bottom: 1px solid #EDF1F6; vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: #F7FAFD; }
.list .name { font-weight: 600; }
.list .stage-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.empty-state { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }

/* ---------- Gaveta do cliente ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(1, 26, 54, .32); }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(640px, 100%);
  display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-pop);
  transform: translateX(104%); transition: transform .22s ease;
}
.drawer.is-open { transform: none; }
.drawer-head { padding: 18px 22px 0; }
.drawer-head-row { display: flex; align-items: flex-start; gap: 10px; }
.drawer-head h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.015em; color: var(--blue-deep); }
.drawer-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.stage-track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 18px 0 0; }
.stage-step {
  position: relative; height: 40px; border: 0; padding: 0; background: none;
}
.stage-step::before {
  content: ''; position: absolute; inset: 0 3px; border-radius: 3px;
  background: #DCE4EE; transform: skewX(-18deg); transition: background .15s;
}
.stage-step.on::before { background: var(--sun); }
.stage-step.now::before { background: var(--blue); }
.stage-step:hover::before { background: #C3D0E0; }
.stage-step.on:hover::before { background: #F0B000; }
.stage-step.now:hover::before { background: var(--blue-deep); }
.stage-step span { position: relative; font-size: 12px; font-weight: 700; color: var(--blue-deep); }
.stage-step.now span { color: #fff; }
.stage-label { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.stage-label b { color: var(--ink); }

.tabs { display: flex; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; height: 40px; padding: 0 12px; border: 0; background: none; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--blue-deep); }
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.tabs .badge { margin-left: 4px; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; }

.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin: 22px 0 10px; font-size: 14px; font-weight: 700; color: var(--blue-deep); }
.form-section:first-child { margin-top: 0; }
.opt-group { margin-bottom: 12px; }
.opt-group-name { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.opt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.opt {
  height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.opt .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.opt[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 80%, black); font-weight: 600; }

.drawer-foot { display: flex; gap: 8px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); background: #FAFBFD; }
.drawer-foot .grow { flex: 1; }

/* Histórico e conversa */
.composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FAFBFD; }
.composer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer-row .grow { flex: 1; }
.seg { display: inline-flex; padding: 3px; background: #E6ECF3; border-radius: 8px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.tl { display: grid; gap: 3px; max-width: 88%; }
.tl-meta { font-size: 11.5px; color: var(--muted); }
.tl-body { padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.tl.wa_in .tl-body { background: #F0F2F5; border-top-left-radius: 3px; }
.tl.wa_out { justify-self: end; text-align: right; }
.tl.wa_out .tl-body { background: #DCF5E4; border-top-right-radius: 3px; text-align: left; }
.tl.note .tl-body { background: var(--sun-soft); border-radius: 8px; }
.tl.stage, .tl.created { max-width: none; justify-self: center; text-align: center; }
.tl.stage .tl-body, .tl.created .tl-body { padding: 2px 0; background: none; color: var(--muted); font-size: 12.5px; }

/* ---------- Configurações ---------- */
.settings { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 40px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; max-width: 1240px; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel h2 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--blue-deep); }
.panel > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; max-width: 60ch; }
.group-block { padding: 12px 0; border-top: 1px solid #EDF1F6; }
.group-block:first-of-type { border-top: 0; padding-top: 0; }
.group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.group-head h3 { flex: 1; margin: 0; font-size: 14px; font-weight: 650; }
.opt-edit { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.opt-edit .dot { width: 9px; height: 9px; border-radius: 50%; }
.opt-edit button { border: 0; background: none; padding: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.opt-edit button:hover { background: var(--bg); color: var(--ink); }
.opt-edit button svg { width: 12px; height: 12px; }
.inline-add { display: flex; gap: 6px; margin-top: 10px; }
.inline-add .input { height: 32px; font-size: 13px; }
.swatches { display: flex; gap: 4px; align-items: center; }
.swatches button { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; padding: 0; background: var(--c); }
.swatches button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px #fff; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #EDF1F6; }
.row-item:first-of-type { border-top: 0; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-list { display: grid; gap: 6px; margin-bottom: 14px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--blue); }
.radio-card b { display: block; font-size: 13.5px; }
.radio-card span { font-size: 12.5px; color: var(--muted); }
.code-line { display: flex; gap: 6px; }
.code-line input { font-size: 12.5px; color: var(--muted); }
.stack { display: grid; gap: 12px; }

/* ---------- Modal, popover, toast ---------- */
.modal { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.modal::backdrop { background: rgba(1, 26, 54, .4); }
.modal-head { display: flex; align-items: center; padding: 16px 18px 0 20px; }
.modal-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; color: var(--blue-deep); }
.modal-body { padding: 14px 20px 6px; display: grid; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }

.popover {
  position: absolute; z-index: 30; width: 320px; max-height: 70vh; overflow-y: auto;
  padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.popover .opt-group:last-child { margin-bottom: 0; }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px));
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: var(--r-md);
  background: var(--blue-night); color: #fff; font-weight: 500; box-shadow: var(--shadow-pop);
  transition: transform .2s ease;
}
.toast.is-on { transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }

/* ---------- Login ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--blue-night); position: relative; overflow: hidden; }
.auth-card { position: relative; z-index: 1; width: min(400px, 100%); padding: 32px 30px 30px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-pop); }
.auth-logo { display: block; width: 130px; height: auto; margin: 0 0 22px; }
.auth-card h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; color: var(--blue-deep); }
.auth-intro { margin: 6px 0 20px; color: var(--muted); }
.auth-error { margin: 0 0 14px; padding: 10px 12px; background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); font-weight: 500; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.auth-form input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 15px; color: var(--ink); }
.auth-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 76, 155, .15); }
.auth-form .btn { height: 44px; margin-top: 6px; }
.auth-cells { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); display: flex; gap: 10px; }
.auth-cells i { width: 64px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, .07); transform: skewX(-20deg); }
.auth-cells i:nth-child(-n+3) { background: rgba(251, 186, 0, .55); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto;
    flex-direction: row; align-items: center; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .side-logo, .side-user-name, .side-user .avatar { display: none; }
  .nav-badge { position: absolute; top: 4px; right: 10px; margin: 0; }
  .side-nav button { position: relative; }
  .side-nav { flex: 1; grid-auto-flow: column; }
  .side-nav button { flex-direction: column; justify-content: center; gap: 2px; height: 50px; font-size: 11px; padding: 0 4px; }
  .side-user { margin: 0; padding: 0; border: 0; }
  .main { height: calc(100vh - 64px); height: calc(100dvh - 64px); }
  .topbar { padding: 14px 16px 10px; }
  .topbar h1 { font-size: 19px; }
  .search { flex: 1 1 100%; order: 5; }
  .filterbar { padding: 0 16px 10px; }
  .pulse { margin: 0 16px 12px; gap: 2px 14px; padding: 8px 12px; font-size: 12.5px; }
  .board { padding: 0 16px 16px; grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .list-wrap { margin: 0 16px 16px; }
  .list .hide-sm { display: none; }
  .settings { padding: 0 16px 32px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .drawer-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .stage-step span { font-size: 11px; }
  .popover { left: 16px !important; right: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
