:root {
  color-scheme: light;
  --bg: #f6f4f0;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e3e1dc;
  --grid: #ebe9e4;
  --text: #1c1b19;
  --text-2: #52514e;
  --muted: #8a8882;
  --accent: #c2452d;
  --accent-soft: #fbe9e4;
  --p1: #2a78d6;
  --p2: #eb6834;
  --both: #4a3aa7;
  --none: #a8a6a0;
  --good: #1a8a4a;
  --warn: #b07300;
  --bad: #d03b3b;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --surface-2: #242422;
    --border: #33332f;
    --grid: #2a2a27;
    --text: #f3f2ee;
    --text-2: #c3c2b7;
    --muted: #8f8e86;
    --accent: #e0664c;
    --accent-soft: #3a221c;
    --p1: #3987e5;
    --p2: #d95926;
    --both: #9085e9;
    --none: #6b6a65;
    --good: #3cb371;
    --warn: #e0a30f;
    --bad: #e66767;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 500; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.danger.confirm { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.small { padding: 3px 10px; font-size: 12px; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 20% 20%, #fbe1d6 0, transparent 40%), radial-gradient(circle at 80% 80%, #dbe8fb 0, transparent 40%), var(--bg); }
@media (prefers-color-scheme: dark) { .login { background: var(--bg); } }
.login-card { background: var(--surface); padding: 32px; border-radius: 18px; box-shadow: var(--shadow); width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login-card h1 { margin: 0; font-size: 22px; }
.login-card p { margin: 0; }
.login-emoji { font-size: 28px; letter-spacing: 6px; }

/* ---------- topo ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; }
.brand-title { font-weight: 700; font-size: 17px; }
.countdown { font-size: 12px; color: var(--accent); font-weight: 600; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tab { border: none; background: none; padding: 6px 14px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync { font-size: 12px; color: var(--good); }
.sync.off { color: var(--bad); }
.me-btn { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; }
.avatar { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 10px; }

.filters { display: flex; gap: 8px; padding: 12px 20px; flex-wrap: wrap; align-items: center; }
.filters #f-search { flex: 1; min-width: 160px; max-width: 320px; }
.filters #new-task { margin-left: auto; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

main { padding: 0 20px 40px; }

/* ---------- cards e visão geral ---------- */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card h3 .count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.kpi .label { color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 30px; font-weight: 700; line-height: 1.2; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.alert .value { color: var(--bad); }
.overview-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.overview-cols .span2 { grid-column: span 2; }
.overview-cols .span2 .mini-list { max-height: 420px; overflow: auto; }
@media (max-width: 1100px) { .overview-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .overview-cols { grid-template-columns: minmax(0, 1fr); } .overview-cols .span2 { grid-column: auto; } }
.help { background: var(--accent-soft); border: none; box-shadow: none; }
.help ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.help li { margin: 3px 0; }

.mini-list { display: flex; flex-direction: column; gap: 2px; }
.mini-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mini-item:hover { background: var(--surface-2); }
.mini-item .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mini-item .date.late { color: var(--bad); font-weight: 600; }
.assign-quick { display: flex; gap: 4px; }
.assign-quick button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.assign-quick button:hover { border-color: var(--accent); }

.meter-row { display: grid; grid-template-columns: minmax(0,1fr) 90px 40px; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; }
.meter-row:hover .meter-name { color: var(--accent); }
.meter-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.meter { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; gap: 2px; }
.meter span { display: block; height: 100%; }
.meter-pct { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 12px; }

.person-card .stats { display: flex; gap: 14px; margin-bottom: 10px; color: var(--text-2); font-size: 13px; }
.person-card .stats b { color: var(--text); font-size: 16px; }

.activity { font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.activity .when { color: var(--muted); font-size: 11px; }

/* ---------- status ---------- */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.status.todo { background: var(--surface-2); color: var(--text-2); }
.status.doing { background: #e3eefc; color: #1c5cab; }
.status.blocked { background: #fbe3e3; color: #a32929; }
.status.done { background: #e1f3e7; color: #1a6b3c; }
@media (prefers-color-scheme: dark) {
  .status.doing { background: #1c2f4a; color: #9ec5f4; }
  .status.blocked { background: #3e1f1f; color: #f0a0a0; }
  .status.done { background: #1b3526; color: #8ad4a4; }
}
select.status { padding: 3px 8px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag.crit { background: #fbe3e3; color: #a32929; }
.tag.new { background: #efe9fb; color: #4a3aa7; }
.tag.late { background: var(--bad); color: #fff; }
.tag.wait { background: #fdf0d5; color: #8a5a00; }
@media (prefers-color-scheme: dark) {
  .tag.crit { background: #3e1f1f; color: #f0a0a0; }
  .tag.new { background: #2a2547; color: #c0b8f5; }
  .tag.wait { background: #3a2e12; color: #f0c86a; }
}

/* ---------- lista ---------- */
.group-block { margin-bottom: 18px; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; user-select: none; }
.group-head h2 { font-size: 15px; margin: 0; }
.group-head .meter { width: 120px; }
.group-head .count { color: var(--muted); font-size: 13px; }
.group-head .chev { color: var(--muted); transition: transform .15s; }
.group-block.collapsed .chev { transform: rotate(-90deg); }
.group-block.collapsed .rows { display: none; }
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 130px minmax(0,1fr) 150px 250px 40px; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--border); }
.row:first-child { border-top: none; }
.row:hover { background: var(--surface-2); }
.row.done .row-title { color: var(--muted); text-decoration: line-through; }
.row-title { cursor: pointer; font-weight: 500; }
.row-title:hover { color: var(--accent); }
.row-sub { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.row-dates { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.row-dates.late { color: var(--bad); font-weight: 600; }
.row-comments { color: var(--muted); font-size: 12px; cursor: pointer; text-align: right; }
.assign-seg { flex-wrap: nowrap; }
.assign-seg button { padding: 3px 8px; font-size: 12px; white-space: nowrap; }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row-comments { text-align: left; }
  .topbar { padding: 10px 12px; }
  main, .filters { padding-left: 12px; padding-right: 12px; }
  .filters #new-task { margin-left: 0; }
}

/* ---------- gantt ---------- */
.gantt-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.gantt-toolbar label { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); font-size: 13px; cursor: pointer; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); align-items: center; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend .sw { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.gantt-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 210px); position: relative; box-shadow: var(--shadow); }
.gantt { position: relative; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--surface); border-bottom: 1px solid var(--border); }
.g-corner { position: sticky; left: 0; z-index: 7; background: var(--surface); width: var(--label-w); flex: none; border-right: 1px solid var(--border); padding: 8px 12px; font-size: 12px; color: var(--muted); display: flex; align-items: flex-end; }
.g-scale { position: relative; height: 52px; flex: none; }
.g-month { position: absolute; top: 0; height: 26px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 600; padding: 5px 6px; white-space: nowrap; overflow: hidden; color: var(--text-2); }
.g-tick { position: absolute; top: 26px; height: 26px; border-left: 1px solid var(--grid); font-size: 10px; color: var(--muted); padding: 7px 3px; white-space: nowrap; }
.g-row { display: flex; height: 34px; }
.g-row.group { height: 32px; background: var(--surface-2); cursor: pointer; }
.g-label { position: sticky; left: 0; z-index: 4; width: var(--label-w); flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: 0 10px 0 12px; display: flex; align-items: center; gap: 7px; font-size: 13px; overflow: hidden; cursor: pointer; }
.g-row.group .g-label { background: var(--surface-2); font-weight: 700; }
.g-label .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.g-row:not(.group):hover .g-label { color: var(--accent); }
.g-row.done .g-label .txt { color: var(--muted); text-decoration: line-through; }
.g-track { position: relative; flex: none; border-bottom: 1px solid var(--grid); }
.g-row.group .g-track { border-bottom: 1px solid var(--border); }
.g-bar { position: absolute; top: 8px; height: 18px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; padding: 0 6px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: visible; z-index: 2; }
.g-bar:hover { filter: brightness(1.08); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
.g-bar.done { opacity: .45; }
.g-bar.blocked { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px); }
.g-bar.late { outline: 2px solid var(--bad); outline-offset: 1px; }
.g-bar.milestone { width: 14px !important; height: 14px; top: 10px; padding: 0; border-radius: 2px; transform: rotate(45deg); }
.g-lbl { position: absolute; top: 9px; font-size: 11px; color: var(--text-2); white-space: nowrap; pointer-events: none; z-index: 2; }
.g-row.done .g-lbl { color: var(--muted); }
.g-sum { position: absolute; top: 13px; height: 6px; border-radius: 3px; opacity: .55; }
.g-deadline { position: absolute; top: 10px; width: 10px; height: 10px; background: var(--bad); transform: rotate(45deg); z-index: 3; border: 2px solid var(--surface); }
.g-vline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--accent); z-index: 1; pointer-events: none; }
.g-vline.ms { border-left: 1px dashed var(--muted); }
.g-vflag { position: absolute; top: 2px; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--accent); color: #fff; white-space: nowrap; z-index: 8; transform: translateX(-50%); pointer-events: none; }
.g-vflag.ms { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); top: 28px; }
.g-weekend { position: absolute; top: 0; bottom: 0; background: var(--surface-2); opacity: .5; pointer-events: none; }
svg.g-arrows { position: absolute; top: 0; pointer-events: none; z-index: 1; overflow: visible; }
svg.g-arrows path { fill: none; stroke: var(--muted); stroke-width: 1.2; opacity: .45; }
svg.g-arrows path.conflict { stroke: var(--bad); opacity: .9; stroke-dasharray: 4 3; }
svg.g-arrows.hover path:not(.hl):not(.conflict) { display: none; }
svg.g-arrows path.hl { stroke: var(--accent); opacity: 1; stroke-width: 2; }
svg.g-arrows marker path { fill: var(--muted); stroke: none; }
.gantt.dim .g-bar:not(.hl) { opacity: .25; }

.tooltip { position: fixed; z-index: 100; background: var(--text); color: var(--surface); padding: 8px 11px; border-radius: 8px; font-size: 12px; max-width: 320px; pointer-events: none; box-shadow: var(--shadow); line-height: 1.5; }
.tooltip b { font-size: 13px; }

/* ---------- prazos ---------- */
.dl-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.dl-table th, .dl-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dl-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.dl-table tr.clickable { cursor: pointer; }
.dl-table tr.clickable:hover td { background: var(--surface-2); }
.days { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.days.soon { color: var(--warn); }
.days.late { color: var(--bad); }
.days.ok { color: var(--text-2); }
.days.done { color: var(--good); }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); z-index: 50; box-shadow: -8px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.drawer-head textarea { flex: 1; font-size: 17px; font-weight: 700; border: 1px solid transparent; resize: none; padding: 4px 6px; background: transparent; }
.drawer-head textarea:hover { border-color: var(--border); }
.drawer-body { flex: 1; overflow: auto; padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field-label { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field > input, .field > select { min-width: 0; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px; max-width: 100%; }
.chip .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.chip .t:hover { color: var(--accent); }
.chip button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; padding: 0 4px; }
.chip.ro { padding-right: 10px; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 8px; }
.comment .bubble { background: var(--surface-2); border-radius: 10px; padding: 7px 10px; flex: 1; white-space: pre-wrap; word-break: break-word; }
.comment .meta { font-size: 11px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 8px; }
.comment .meta button { border: none; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 11px; margin-left: auto; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea { flex: 1; min-height: 40px; resize: vertical; }
.drawer-foot { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }

/* ---------- modais ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; padding: 24px; width: min(440px, 100%); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.modal h2 { margin: 0; font-size: 18px; }
.modal p { margin: 0; }
.whoami-options { display: flex; gap: 12px; }
.whoami-options button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px; }
.whoami-options button:hover { border-color: var(--accent); background: var(--accent-soft); }
.whoami-options .avatar { width: 44px; height: 44px; font-size: 18px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 9px 16px; border-radius: 10px; z-index: 100; font-size: 13px; box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- celular ---------- */
@media (hover: none) { .tooltip { display: none !important; } }
@media (max-width: 700px) {
  body { font-size: 15px; }
  /* evita o zoom automático do iOS ao focar campos */
  input, select, textarea { font-size: 16px; }

  /* topo: marca + ações na 1ª linha, abas ocupando a largura na 2ª */
  .topbar { position: static; gap: 10px; padding: 10px 12px 8px; }
  .brand { flex: 1; min-width: 0; }
  .top-actions { order: 2; margin-left: 0; }
  .me-btn span:last-child { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1; padding: 8px 4px; font-size: 14px; }

  /* filtros */
  .filters { padding: 10px 12px; gap: 8px; }
  .filters .seg { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters .seg::-webkit-scrollbar { display: none; }
  .filters .seg button { flex: 1 0 auto; justify-content: center; padding: 7px 8px; font-size: 14px; }
  .filters select { flex: 1 1 40%; min-width: 0; }
  .filters #f-search { flex: 1 1 50%; min-width: 0; max-width: none; }
  .filters #new-task { margin-left: 0; white-space: nowrap; }

  main { padding: 0 12px 32px; }

  /* visão geral */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid { gap: 12px; }
  .card { padding: 14px; }
  .kpi .label { font-size: 11px; }
  .kpi .value { font-size: 26px; }
  .kpi .sub { font-size: 12px; }
  .help h3 { flex-wrap: wrap; }
  .mini-item { padding: 8px 6px; align-items: flex-start; }
  .mini-item .dot { margin-top: 6px; }
  .mini-item .title { white-space: normal; overflow: visible; }
  .mini-item .date { font-size: 13px; padding-top: 1px; }
  .mini-item.distribute { flex-wrap: wrap; row-gap: 6px; }
  .mini-item.distribute .assign-quick { flex-basis: 100%; padding-left: 17px; gap: 6px; }
  .assign-quick button { padding: 5px 12px; font-size: 13px; }
  .overview-cols .span2 .mini-list { max-height: 360px; }
  .person-card .stats { flex-wrap: wrap; gap: 4px 14px; }
  .activity { font-size: 14px; }
  .activity .when { font-size: 12px; }
  .meter-row { grid-template-columns: minmax(0,1fr) 70px 36px; padding: 7px 0; }

  /* lista: título, depois status + datas, depois responsável + comentários */
  .group-head .meter { width: 70px; margin-left: auto; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "status dates" "assign comm"; gap: 8px 10px; padding: 12px; }
  .row > :nth-child(1) { grid-area: status; }
  .row > :nth-child(2) { grid-area: title; }
  .row > :nth-child(3) { grid-area: dates; align-self: center; text-align: right; }
  .row > :nth-child(4) { grid-area: assign; min-width: 0; }
  .row > :nth-child(5) { grid-area: comm; align-self: center; text-align: right; font-size: 14px; }
  .row-title { font-size: 15px; }
  .row-dates { font-size: 13px; }
  .tag { font-size: 12px; }
  .status { font-size: 13px; padding: 3px 10px; }
  select.status { font-size: 14px; padding: 5px 10px; }
  .assign-seg button { padding: 5px 9px; font-size: 13px; }

  /* gantt */
  .gantt-toolbar { gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 10px; padding: 0 12px; }
  .gantt-toolbar::-webkit-scrollbar { display: none; }
  .gantt-toolbar > * { flex: none; }
  .gantt-toolbar .seg { flex-wrap: nowrap; }
  .gantt-toolbar .seg button { white-space: nowrap; }
  .gantt-toolbar > .muted, .legend span:nth-child(n+5) { display: none; }
  .gantt-toolbar .seg button { padding: 6px 10px; }
  .gantt-wrap { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); }
  .g-label { font-size: 13px; padding: 0 8px; }

  /* prazos: cada linha da tabela vira um cartão */
  .dl-table, .dl-table tbody { display: block; background: none; }
  .dl-table thead { display: none; }
  .dl-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date days" "task task" "who status"; gap: 6px 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
  .dl-table td { padding: 0; border: none; }
  .dl-table tr.clickable:hover td { background: none; }
  .dl-table td:nth-child(1) { grid-area: date; }
  .dl-table td:nth-child(2) { grid-area: days; text-align: right; }
  .dl-table td:nth-child(3) { grid-area: task; font-weight: 500; }
  .dl-table td:nth-child(4) { grid-area: who; display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
  .dl-table td:nth-child(5) { grid-area: status; text-align: right; }
  .dl-table td.empty { grid-column: 1 / -1; }
  .chip { font-size: 13px; }

  /* painel da tarefa */
  .drawer { width: 100%; }
  .drawer-head { padding: 12px 12px 8px 14px; }
  .drawer-head textarea { field-sizing: content; min-height: 2.9em; max-height: 6em; }
  .drawer-body { padding: 14px 14px 30px; }
  .drawer-body .seg button { padding: 7px 10px; font-size: 14px; }
  .comment .meta { font-size: 12px; }
  .comment .meta button { font-size: 12px; }
  .icon-btn { font-size: 20px; padding: 6px 8px; }

  /* modais */
  .modal-backdrop { padding: 12px; }
  .modal { padding: 20px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
}
