/* Tarefas Midrah: tokens da marca (os mesmos do GLPI e do Kanban), Inter, claro e escuro. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  /* Marca */
  --navy: #1d3557;
  --navy-900: #142540;
  --navy-700: #25416a;
  --royal: #0041a8;
  --royal-600: #00368c;
  --sky: #c4eaf6;
  --teal: #57c4b9;
  --teal-light: #82d9d0;

  /* Papéis */
  --ground: #f3f6fa;
  --surface: #ffffff;
  --column: #e8edf3;
  --line: #dde4ec;
  --line-strong: #c9d3df;
  --ink: #0b1a2e;
  --ink-2: #2c3e55;
  --muted: #5a6b80;
  --accent: var(--royal);
  --accent-hover: var(--royal-600);
  --accent-soft: #e3ecfa;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --ok: #1d6f68;
  --ok-soft: #e3f6f4;
  --focus: 0 0 0 3px rgba(0, 65, 168, 0.28);
  --shadow-card: 0 1px 2px rgba(11, 26, 46, 0.08), 0 1px 1px rgba(11, 26, 46, 0.04);
  --shadow-lift: 0 4px 10px rgba(11, 26, 46, 0.12), 0 14px 32px rgba(11, 26, 46, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 10px;
  --tab-active: var(--navy);
  --topbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0e1a2c;
    --surface: #17263c;
    --column: #122136;
    --line: #243652;
    --line-strong: #31476a;
    --ink: #e8eef6;
    --ink-2: #c9d5e4;
    --muted: #93a4ba;
    --accent: #5b8ef0;
    --accent-hover: #7aa4f4;
    --accent-soft: #1b2f52;
    --danger: #f0776a;
    --danger-soft: #3a1f22;
    --warn: #f1b45a;
    --warn-soft: #3a2c14;
    --ok: #6fd3c8;
    --ok-soft: #123432;
    --focus: 0 0 0 3px rgba(91, 142, 240, 0.4);
    --tab-active: #2f5596;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 6px 14px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- Base e superfícies do navegador ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.45 "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--sky); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
#app { min-height: 100%; display: flex; flex-direction: column; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.dots { stroke-width: 3.2; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px;
  font-weight: 550; white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { background: var(--column); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn:disabled { opacity: 0.55; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.icon-btn:hover { background: rgba(29, 53, 87, 0.08); color: var(--ink); }
.icon-btn.on-dark { color: rgba(255, 255, 255, 0.82); }
.icon-btn.on-dark:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.icon-btn.subtle { width: 30px; height: 30px; }
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } .icon-btn.subtle { width: 40px; height: 40px; } }

.link-btn { border: 0; background: none; padding: 4px 6px; color: var(--accent); font-weight: 550; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

.input {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
  caret-color: var(--accent);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.input::placeholder { color: var(--muted); opacity: 0.85; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
@media (pointer: coarse) { .input { min-height: 44px; font-size: 16px; } }

.field { display: grid; gap: 6px; }
.field-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field-label .icon { width: 15px; height: 15px; }
.form-error { color: var(--danger); font-size: 14px; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.chip .icon { width: 16px; height: 16px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (pointer: coarse) { .chip { min-height: 40px; } }
/* Chip com <select> nativo dentro (filtro de responsável). */
.chip-select { position: relative; padding-right: 8px; cursor: pointer; }
.chip-select select {
  appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0 18px 0 0; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 6px center, right 2px center; background-size: 4px 4px; background-repeat: no-repeat;
}
.chip-select select:focus { outline: none; }
.chip-select:focus-within { box-shadow: var(--focus); }
.chip-select.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-select option { color: var(--ink); background: var(--surface); }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--topbar-h); padding: 0 16px; padding-top: env(safe-area-inset-top, 0px);
  background: var(--navy); color: #fff;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.topbar-title { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.topnav-link {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 8px;
  color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 14.5px; font-weight: 550;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.topnav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.topnav-link[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.topnav-link .icon { width: 17px; height: 17px; }
@media (pointer: coarse) { .topnav-link { min-height: 44px; } }
@media (max-width: 520px) { .topbar .brand-name { display: none; } .topnav { margin-left: 4px; } .topnav-link { padding: 0 10px; } }
.avatar-btn { border: 0; padding: 2px; border-radius: 999px; background: transparent; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }

/* Menu suspenso */
.popover { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; padding: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lift); animation: pop 140ms var(--ease);
}
.menu-head { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; color: var(--ink); text-decoration: none; font-size: 14px; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--column); box-shadow: none; }
.menu-item .icon { color: var(--muted); }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
@media (pointer: coarse) { .menu-item { min-height: 46px; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Avatares e selos ---------- */
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 999px;
  background: var(--avatar, var(--navy-700)); color: #fff; font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.none { background: var(--column); color: var(--muted); }
.avatar.none .icon { width: 14px; height: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px;
  background: var(--column); color: var(--muted); font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums;
}
.badge .icon { width: 13px; height: 13px; }
.badge.prio-alta { background: var(--danger-soft); color: var(--danger); }
.badge.prio-baixa { background: transparent; color: var(--muted); padding-left: 0; }
.badge.due-late { background: var(--danger-soft); color: var(--danger); }
.badge.due-soon { background: var(--warn-soft); color: var(--warn); }
.badge.done { background: var(--ok-soft); color: var(--ok); }

/* ---------- Páginas simples (quadros, usuários) ---------- */
.page { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px calc(40px + var(--safe-b)); display: grid; gap: 20px; align-content: start; }
.page.wide { max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-note { color: var(--muted); font-size: 14px; }
a.btn { text-decoration: none; }

.notice { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); flex-wrap: wrap; }
.notice-text { flex: 1; display: grid; gap: 2px; min-width: 220px; }
.notice-text span { color: var(--ink-2); font-size: 14px; }

/* ---------- Equipe ---------- */
.team-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select-compact { width: auto; min-width: 200px; min-height: 36px; padding-top: 0; padding-bottom: 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 400px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.person-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.person-info { display: grid; min-width: 0; }
.person-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-info span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.person-info span.has-late { color: var(--danger); font-weight: 550; }
.task-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.task-list li + li { border-top: 1px solid var(--line); }
.task-row { display: grid; gap: 4px; padding: 11px 16px; color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .task-row:hover { background: var(--ground); }
  .task-row:hover .task-title { color: var(--accent); }
}
.task-row:active { background: var(--ground); }
@media (max-width: 520px) {
  .team-toolbar { flex-wrap: nowrap; }
  .team-toolbar .select-compact { flex: 1; min-width: 0; }
  .team-toolbar .chip span { display: none; }
  .team-toolbar .chip { padding: 0 12px; }
}
.task-row:focus-visible { box-shadow: inset var(--focus); outline: none; }
.task-title { font-size: 14.5px; font-weight: 550; line-height: 1.38; overflow-wrap: anywhere; transition: color 140ms var(--ease); }
.task-where { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.inline-create { display: flex; gap: 8px; }
.inline-create .btn span { display: inline; }
@media (max-width: 520px) { .inline-create .btn span { display: none; } .inline-create .btn { padding: 0 12px; } }

.board-list, .user-list, .checklist { list-style: none; margin: 0; padding: 0; }
.board-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board-row { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.board-row + .board-row { border-top: 1px solid var(--line); }
.board-link { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; color: var(--ink); text-decoration: none; min-width: 0; }
.board-link:hover { background: var(--ground); }
.board-link:hover .board-name { color: var(--accent); }
.board-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.board-name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 140ms var(--ease); }
.board-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.archived summary { cursor: pointer; color: var(--muted); font-weight: 550; padding: 6px 0 12px; }

.empty { padding: 36px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty-title { font-weight: 650; font-size: 17px; margin-bottom: 6px; }
.empty-text { color: var(--muted); max-width: 46ch; margin: 0 auto; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 16px; }
.panel-title { font-size: 16px; font-weight: 650; }
.user-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.user-form .check { grid-column: 1 / 3; align-self: center; }
@media (max-width: 640px) { .user-form { grid-template-columns: 1fr; } .user-form .check { grid-column: auto; } }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.user-row.inactive { opacity: 0.6; }
.user-info { flex: 1; display: grid; min-width: 0; }
.user-info span { color: var(--muted); font-size: 13px; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Entrar ---------- */
.login { flex: 1; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.login-panel { width: 100%; max-width: 380px; padding: 32px 28px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lift); }
.login-mark { width: 52px; height: 52px; display: block; margin-bottom: 18px; }
.login-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.login-sub { color: var(--muted); margin: 2px 0 24px; }
.login-form { display: grid; gap: 14px; }
.login-form .btn { margin-top: 4px; min-height: 44px; }
.login-help { margin-top: 20px; color: var(--muted); font-size: 13px; }

/* ---------- Quadro ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.search { position: relative; flex: 0 1 300px; min-width: 180px; }
.search .icon { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 36px; min-height: 36px; }
@media (pointer: coarse) { .search .input { min-height: 40px; } }

.columns {
  flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 14px;
  padding: 4px 16px calc(20px + var(--safe-b)); overflow-x: auto; overscroll-behavior-x: contain;
}
.column {
  flex: 0 0 300px; display: flex; flex-direction: column; max-height: calc(100dvh - var(--topbar-h) - 84px);
  background: var(--column); border-radius: 14px;
}
.column-head { display: flex; align-items: center; gap: 8px; padding: 10px 6px 6px 14px; }
.column-title { flex: 1; font-size: 14.5px; font-weight: 650; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.column-count { color: var(--muted); font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }

.card-list { list-style: none; margin: 0; padding: 4px 8px; min-height: 48px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.list-empty { padding: 14px 10px; color: var(--muted); font-size: 13.5px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.card {
  display: grid; gap: 8px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); border: 1px solid transparent; cursor: pointer; user-select: none;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.card:hover { border-color: var(--line-strong); }
.card:focus-visible { box-shadow: var(--focus); }
.card-title { font-size: 14.5px; font-weight: 500; line-height: 1.38; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.card-meta:not(:has(.badge, .avatar)) { display: none; }
.spacer { flex: 1; }

/* Arrastar: o card "descola" e o lugar de destino aparece. */
.card-ghost { opacity: 1; background: transparent; box-shadow: none; border: 2px dashed var(--accent); }
.card-ghost > * { visibility: hidden; }
.card-drag { box-shadow: var(--shadow-lift); rotate: 2deg; cursor: grabbing; }
.card-chosen { border-color: var(--accent); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
body.is-dragging .columns.snap { scroll-snap-type: none; }

.add-card { display: flex; gap: 4px; padding: 6px 8px 10px; }
.add-card .input { background: transparent; border-color: transparent; min-height: 38px; }
.add-card .input:hover { background: var(--surface); }
.add-card .input:focus { background: var(--surface); }
.add-card .add-btn { color: var(--accent); }

.add-column {
  flex: 0 0 220px; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px;
  border: 1px dashed var(--line-strong); border-radius: 14px; background: transparent; color: var(--muted); font-weight: 550;
}
.add-column:hover { border-color: var(--accent); color: var(--accent); }

/* Celular: uma coluna por tela, abas no topo. */
.col-tabs { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.col-tabs::-webkit-scrollbar { display: none; }
.col-tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; flex: none;
  border: 0; border-radius: 999px; background: var(--column); color: var(--ink-2); font-size: 14px; font-weight: 550;
}
.col-tab .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.col-tab[aria-current="true"] { background: var(--tab-active); color: #fff; }
.col-tab[aria-current="true"] .count { color: var(--teal-light); }

@media (max-width: 767px) {
  .topbar { padding: 0 8px 0 12px; }
  .toolbar { padding: 10px 12px; flex-wrap: nowrap; }
  .search { flex: 1; min-width: 0; }
  .toolbar .chip span { display: none; }
.toolbar .chip-select select { max-width: 112px; text-overflow: ellipsis; }
  .toolbar .chip { padding: 0 10px; }
  .toolbar .link-btn { display: none; }
  .columns.snap { gap: 0; padding: 0 0 var(--safe-b); scroll-snap-type: x mandatory; align-items: stretch; }
  .columns.snap .column {
    flex: 0 0 100%; max-height: none; scroll-snap-align: start; border-radius: 0;
    background: transparent; padding: 0 12px;
  }
  .columns.snap .column-head { padding: 2px 0 6px 2px; }
  .columns.snap .card-list { padding: 2px 0; overflow: visible; }
  .columns.snap .add-card { padding: 8px 0 24px; }
  .columns.snap .add-card .input { background: var(--surface); border-color: var(--line); }
  .card { padding: 12px 14px; }
  .card-title { font-size: 15.5px; }
}

/* ---------- Diálogos e folha da tarefa ---------- */
.dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.dialog::backdrop { background: rgba(11, 26, 46, 0.5); }
.dialog[open] { animation: rise 200ms var(--ease); }
.dialog.small form { display: grid; gap: 14px; padding: 22px; }
.dialog-title { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.dialog-text { color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.sheet { width: min(640px, calc(100vw - 32px)); overflow-y: auto; overscroll-behavior: contain; }
.sheet-grip { display: none; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; gap: 8px; padding: 16px 12px 10px 20px; background: var(--surface); }
.sheet-title-input {
  flex: 1; resize: none; overflow: hidden; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px;
  background: transparent; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3;
}
.sheet-title-input:hover { border-color: var(--line); }
.sheet-title-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.sheet-section { padding: 10px 20px; display: grid; gap: 10px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.section-title .icon { width: 15px; height: 15px; }
.section-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.move-to { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 10px 20px; }
.sheet-fields > :last-child { grid-column: 1 / -1; }
.with-avatar, .with-clear { display: flex; align-items: center; gap: 8px; }
.due-note { margin-left: 4px; font-weight: 600; }
.due-note.due-late { color: var(--danger); }
.due-note.due-soon { color: var(--warn); }
.due-note.due-ok { color: var(--muted); font-weight: 500; }
.description { resize: vertical; min-height: 96px; line-height: 1.5; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--column); width: fit-content; }
.segmented button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 550; }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.segmented button.seg-alta[aria-checked="true"] { color: var(--danger); }
@media (pointer: coarse) { .segmented button { min-height: 40px; } }

.checklist { display: grid; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.check-item .check { flex: 1; padding: 4px 0; }
.check-item.done .check span { color: var(--muted); text-decoration: line-through; }
.check-add { display: flex; gap: 8px; }
.sheet-foot { display: flex; justify-content: flex-start; padding: 12px 20px 20px; margin-top: 6px; border-top: 1px solid var(--line); }

@media (max-width: 767px) {
  .dialog.sheet {
    width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: var(--safe-b);
  }
  .dialog.sheet[open] { animation: slide-up 240ms var(--ease); }
  .sheet-grip { display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--line-strong); }
  .sheet-head { padding: 8px 8px 8px 16px; }
  .sheet-section, .sheet-fields, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-fields { grid-template-columns: 1fr; }
  .move-to { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0.6; } }

/* ---------- Avisos ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); translate: -50% 0; z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  padding: 12px 16px; border-radius: 10px; background: var(--navy-900); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-lift); animation: rise 200ms var(--ease); transition: opacity 300ms var(--ease);
}
.toast.error { background: #8f2a20; }
.toast.success { background: #14524d; }
.toast.leaving { opacity: 0; }

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