/* Team Nusatani – styles. Mobile first, large touch targets, light + dark. */
:root {
  --brand: #1F5F4A;
  --brand-d: #174A3A;
  --brand-tint: #E4EFE9;
  --accent: #5FC2B6;
  --bg: #F6F3EC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --ink: #1B241F;
  --body: #3E4B45;
  --muted: #6A7A72;
  --line: #E3DACA;
  --line-2: #EFE9DD;
  --ok: #1E7A4C;
  --ok-tint: #E2F3EA;
  --warn: #9A6A00;
  --warn-tint: #FBF1D9;
  --bad: #B23A2E;
  --bad-tint: #FBE6E3;
  --info: #2D6A93;
  --info-tint: #E7F0F7;
  --action: #C2410C;
  --action-tint: #FFEDE3;
  --new: #E0570F;
  --shadow: 0 1px 2px rgba(27, 36, 31, .06), 0 4px 14px rgba(27, 36, 31, .06);
  --radius: 12px;
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5FC2B6; --brand-d: #8FD3C4; --brand-tint: #17332B; --accent: #5FC2B6;
    --bg: #0F1A16; --surface: #16241F; --surface-2: #1B2C26; --ink: #EEF3F0; --body: #CBD6D0; --muted: #93A59C;
    --line: #2B3E37; --line-2: #22342E; --ok: #6FD3A0; --ok-tint: #143327; --warn: #E8C468; --warn-tint: #332A12;
    --bad: #F08A7E; --bad-tint: #3A1C18; --info: #8EC1E6; --info-tint: #142A3A; --action: #FFA36E; --action-tint: #3A2417; --new: #FF8B4A;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #5FC2B6; --brand-d: #8FD3C4; --brand-tint: #17332B; --bg: #0F1A16; --surface: #16241F; --surface-2: #1B2C26;
  --ink: #EEF3F0; --body: #CBD6D0; --muted: #93A59C; --line: #2B3E37; --line-2: #22342E; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.5 var(--font); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
a { color: var(--brand); }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--ok); display: flex; gap: .4rem; align-items: center; }
.warn { color: var(--warn); }
.error { color: var(--bad); }
.danger { color: var(--bad) !important; }
.print-only { display: none; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--tap);
  padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0E2C23; } }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost-danger { color: var(--bad); }
.btn-ghost-danger:hover { border-color: var(--bad); background: var(--bad-tint); }
.btn-small { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-big { min-height: 54px; font-size: 1.05rem; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.small { width: 32px; height: 32px; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: .25rem 0; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=url],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: var(--tap); padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; }
textarea { resize: vertical; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.hint { color: var(--muted); font-size: .85rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.form-actions > small { margin-right: auto; }
.quick-dates { display: flex; flex-wrap: wrap; gap: .4rem; }
.check-line { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; font-weight: 600; cursor: pointer; }
.check-line input, .person-check input { width: 22px; height: 22px; accent-color: var(--brand); }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; }
.notice { display: flex; gap: .5rem; background: var(--info-tint); color: var(--info); padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; }
.filter-input { margin-bottom: 1rem; }
.search-big { font-size: 1.1rem; }

/* ---------- layout ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.content { min-width: 0; overflow-x: clip; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem;
  padding-top: max(.4rem, env(safe-area-inset-top)); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top-brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 700; }
.top-brand span { display: none; }
.top-title { flex: 1; font-weight: 700; color: var(--ink); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search { display: none; }
main { padding: 1rem; padding-bottom: calc(84px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; outline: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; border: 0; background: none; cursor: pointer; position: relative; }
.tab.active { color: var(--brand); }
.tab.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.nav-count, .bell-count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--new); color: #fff; font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.nav-count:empty { display: none; }
.tab .nav-count { position: absolute; top: 5px; left: calc(50% + 6px); }
.bell .bell-count { position: absolute; top: 3px; right: 2px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .75rem; }
  .brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; padding: .25rem .5rem 1rem; }
  .nav-list { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
  .nav-item { display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; border-radius: 10px; color: var(--body); text-decoration: none; font-weight: 600; }
  .nav-item:hover { background: var(--line-2); }
  .nav-item.active { background: var(--brand-tint); color: var(--brand); }
  .nav-item span:nth-child(2) { flex: 1; }
  .sidebar-foot { border-top: 1px solid var(--line); padding-top: .75rem; }
  .me { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 600; padding: .4rem .5rem; border-radius: 10px; }
  .me:hover { background: var(--line-2); }
  .tabbar { display: none; }
  .top-brand { display: none; }
  .topbar { padding: .6rem 1.5rem; }
  .top-search { display: flex; align-items: center; gap: .4rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 .6rem; width: 280px; }
  .top-search input { border: 0; background: transparent; min-height: 38px; padding: 0; }
  .top-search input:focus { outline: none; }
  .top-search-btn { display: none; }
  main { padding: 1.5rem; padding-bottom: 3rem; }
}

/* ---------- language toggle ---------- */
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.lang-toggle button { border: 0; background: var(--surface); padding: 0 .7rem; min-height: 36px; min-width: 44px; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--muted); }
.lang-toggle button.on { background: var(--brand); color: #fff; }

/* ---------- page parts ---------- */
.page-head, .detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .detail-head h1 { margin: 0; }
.detail-head h1 { font-size: 1.45rem; word-break: break-word; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.page-head > *, .detail-head > * { min-width: 0; }
.page-intro { color: var(--muted); margin-top: -.5rem; max-width: 70ch; }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: .75rem; min-height: 36px; }
.back:hover { color: var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .panel { padding: 1.25rem; } }
.panel h2 { display: flex; align-items: center; gap: .5rem; }
.panel h3 { display: flex; align-items: center; gap: .45rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin: .25rem 0 .5rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.section-title { margin-top: 1.25rem; font-size: 1rem; color: var(--ink); }
.detail-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; } .detail-side { position: sticky; top: 76px; } }
.info-grid { display: grid; gap: .1rem; }
.info-row { display: grid; grid-template-columns: 1fr; gap: .1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
@media (min-width: 560px) { .info-row { grid-template-columns: 170px 1fr; align-items: center; } }
.info-label { color: var(--muted); font-size: .9rem; font-weight: 600; }
.info-value { min-width: 0; }
.people-inline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.person { display: inline-flex; align-items: center; gap: .4rem; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; user-select: none; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: .9rem; padding-bottom: 2px; scrollbar-width: none; }
.tab-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .45rem .95rem; min-height: 40px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--body); display: inline-flex; align-items: center; gap: .4rem; }
.tab-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab-count { background: var(--line-2); color: var(--ink); border-radius: 999px; font-size: .75rem; padding: 0 .45rem; font-weight: 700; }
.tab-btn.on .tab-count { background: rgba(255,255,255,.25); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .35rem .8rem; min-height: 36px; font-weight: 600; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; color: var(--body); }
.chip-btn.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line-2); color: var(--body); white-space: nowrap; }
.chip-ok { background: var(--ok-tint); color: var(--ok); }
.chip-bad { background: var(--bad-tint); color: var(--bad); }
.chip-warn { background: var(--warn-tint); color: var(--warn); }
.chip-info, .chip-progress { background: var(--info-tint); color: var(--info); }
.chip-muted { background: var(--line-2); color: var(--muted); }
.chip-action { background: var(--action-tint); color: var(--action); }
.chip-board { background: var(--brand-tint); color: var(--brand); }
.chip-prio-high, .chip-urg-high { background: var(--warn-tint); color: var(--warn); }
.chip-prio-urgent, .chip-urg-urgent { background: var(--bad-tint); color: var(--bad); }
.chip-prio-low, .chip-urg-low { background: var(--line-2); color: var(--muted); }
.badge-new { display: inline-block; background: var(--new); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: .1rem .4rem; margin-right: .45rem; vertical-align: 2px; animation: pulse 2s ease-in-out 3; }

/* ---------- lists / rows ---------- */
.list { display: flex; flex-direction: column; gap: .5rem; }
.row {
  display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; min-height: 64px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s;
}
.row:hover { border-color: var(--brand); }
.row.is-new { border-left: 5px solid var(--new); background: color-mix(in srgb, var(--new) 5%, var(--surface)); }
.row.is-done .row-title span { text-decoration: line-through; color: var(--muted); }
.row-main { flex: 1 1 170px; min-width: 0; }
.row { flex-wrap: wrap; }
.row > .chip, .row > .due, .row > .btn { margin-left: auto; }
.row-title { color: var(--ink); font-weight: 650; word-break: break-word; }
.row-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.meta-icon { display: inline-flex; align-items: center; gap: .2rem; }
.row-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-tint); color: var(--brand); flex: none; }
.row-icon.urg-urgent { background: var(--bad-tint); color: var(--bad); }
.row-icon.urg-high { background: var(--warn-tint); color: var(--warn); }
.list-compact .row { box-shadow: none; min-height: 56px; }
.check { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.check:hover:not(:disabled) { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.due { display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; font-weight: 700; white-space: nowrap; color: var(--muted); }
.due-overdue { color: var(--bad); }
.due-today { color: var(--action); }
.due-soon { color: var(--warn); }
.date-badge { width: 46px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); text-align: center; background: var(--surface); }
.db-month { display: block; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 1px 0; }
.db-day { display: block; font-size: 1.15rem; font-weight: 800; color: var(--ink); padding: 2px 0; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty .btn { margin-top: .5rem; }
.status-select { max-width: 220px; font-weight: 700; }
.status-select.status-done { color: var(--ok); }
.status-select.status-in_progress { color: var(--info); }

/* ---------- home ---------- */
.home-hello { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.home-hello h1 { margin-bottom: .2rem; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; width: 100%; }
.quick-actions .btn { white-space: normal; text-align: center; line-height: 1.2; }
@media (min-width: 760px) { .quick-actions { display: flex; width: auto; flex-wrap: wrap; } }
.attention { border-color: color-mix(in srgb, var(--action) 35%, var(--line)); }
.attention-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.attn-card { border-radius: 10px; padding: .8rem .9rem; background: var(--surface-2); border-left: 5px solid var(--line); }
.attn-card.attn-action { border-left-color: var(--action); background: var(--action-tint); }
.attn-card.attn-bad { border-left-color: var(--bad); background: var(--bad-tint); }
.attn-card.attn-warn { border-left-color: var(--warn); background: var(--warn-tint); }
.attn-card.attn-info { border-left-color: var(--info); background: var(--info-tint); }
.attn-title { display: flex; align-items: center; gap: .4rem; color: var(--ink); margin-bottom: .35rem; }
.attn-items { display: flex; flex-direction: column; gap: .2rem; }
.attn-items a { color: var(--ink); font-weight: 600; text-decoration: none; padding: .2rem 0; }
.attn-items a:hover { text-decoration: underline; }
.home-cols { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .home-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-foot { text-align: center; }

/* ---------- updates ---------- */
.feed { display: flex; flex-direction: column; gap: .75rem; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
a.card:hover { border-color: var(--brand); }
.card.is-new { border-left: 5px solid var(--new); }
.card.is-pinned { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.update-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.update-excerpt { margin: 0 0 .25rem; color: var(--body); }
.feed-compact .card { box-shadow: none; }
.pin { color: var(--brand); margin-right: .3rem; }
.seen-by { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line-2); }
.seen { position: relative; opacity: .35; }
.seen.yes { opacity: 1; }
.seen .icon { position: absolute; right: -3px; bottom: -3px; background: var(--ok); color: #fff; border-radius: 50%; padding: 1px; stroke-width: 3; }

/* ---------- rich text ---------- */
.rich { overflow-wrap: anywhere; }
.rich > :last-child { margin-bottom: 0; }
.rich h2 { font-size: 1.2rem; margin-top: 1rem; }
.rich h3 { font-size: 1.05rem; margin-top: .9rem; }
.rich ul, .rich ol, .editor-area ul, .editor-area ol { padding-left: 1.4rem; margin: 0 0 .75em; }
.rich blockquote, .editor-area blockquote { margin: 0 0 .75em; padding: .3rem 0 .3rem .9rem; border-left: 4px solid var(--accent); color: var(--muted); }
.rich mark, .editor-area mark { background: #FFE58A; color: #1B241F; padding: 0 .15em; border-radius: 3px; }
ul.checklist { list-style: none; padding-left: .2rem; }
ul.checklist > li { position: relative; padding-left: 1.8rem; margin: .2rem 0; }
ul.checklist > li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.05em; height: 1.05em; border: 2px solid var(--muted); border-radius: 4px; }
ul.checklist > li.done { color: var(--muted); text-decoration: line-through; }
ul.checklist > li.done::before { background: var(--ok); border-color: var(--ok); }
ul.checklist > li.done::after { content: "✓"; position: absolute; left: .2em; top: -.05em; color: #fff; font-weight: 800; font-size: .9em; text-decoration: none; }
.editor-area ul.checklist > li { cursor: default; }
.editor-area ul.checklist > li::before { cursor: pointer; }
.resolutions { background: var(--brand-tint); border-radius: 10px; padding: .8rem 1rem; }

/* ---------- editor ---------- */
.editor { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.editor:focus-within { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.editor-btn { min-width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink); font-weight: 700; font-size: .92rem; padding: 0 .4rem; }
.editor-btn:hover { background: var(--line-2); }
.editor-btn.on { background: var(--brand-tint); color: var(--brand); }
.editor-btn-label.italic { font-style: italic; font-family: Georgia, serif; }
.editor-btn-label.underline { text-decoration: underline; }
.editor-btn-label.strikeThrough { text-decoration: line-through; }
.editor-btn-label.mark { background: #FFE58A; color: #1B241F; padding: 0 .3em; border-radius: 3px; }
.editor-sep { width: 1px; background: var(--line); margin: 6px 3px; }
.editor-area { min-height: 110px; max-height: 60vh; overflow-y: auto; padding: .75rem .9rem; outline: none; color: var(--ink); line-height: 1.55; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.editor-area p { margin: 0 0 .6em; }
.editor-area h2 { font-size: 1.2rem; }
.editor-area h3 { font-size: 1.05rem; }
.editor-compact .editor-btn { min-width: 32px; height: 32px; }

/* ---------- comments ---------- */
.comments-list { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1rem; }
.comment { display: flex; gap: .6rem; }
.comment-main { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 10px; padding: .55rem .75rem; }
.comment-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: baseline; font-size: .88rem; }
.comment-meta strong { color: var(--ink); }
.comment-body { margin-top: .2rem; }
.comment-actions { display: flex; gap: .8rem; }
.comment-compose .form-actions small { flex: 1; }

/* ---------- attachments / documents ---------- */
.attach-list { display: flex; flex-direction: column; gap: .4rem; }
.attach { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 10px; padding: .25rem .4rem .25rem .25rem; }
.attach-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; border: 0; background: none; cursor: pointer; text-align: left; padding: .35rem; color: var(--ink); min-height: 40px; }
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-icon { width: 38px; height: 44px; border-radius: 6px; display: inline-flex; align-items: flex-end; justify-content: center; font-size: .6rem; font-weight: 800; padding-bottom: 6px; color: #fff; background: #7A8A82; flex: none; letter-spacing: .03em; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.file-pdf { background: #C8392B; }
.file-doc { background: #2B5797; }
.file-xls { background: #1E7145; }
.file-ppt { background: #D24726; }
.file-img { background: #8E44AD; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; cursor: pointer; margin-bottom: 1rem; background: var(--surface); color: var(--muted); }
.dropzone strong { color: var(--ink); }
.dropzone.over, .dropzone:hover { border-color: var(--brand); background: var(--brand-tint); }
.doc-list { display: flex; flex-direction: column; gap: .5rem; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow); }
.doc-open { flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: .75rem; border: 0; background: none; cursor: pointer; text-align: left; padding: .25rem; color: inherit; }
.doc-links { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1 1 100%; padding-left: 3.4rem; }
@media (min-width: 760px) { .doc-links { flex: 0 1 auto; padding-left: 0; } }
.link-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: .1rem .55rem; text-decoration: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-actions { display: flex; gap: .15rem; margin-left: auto; }
.file-preview { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .3rem; }
.file-preview li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; }
.viewer { min-height: 50vh; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.viewer-frame { width: 100%; height: 70vh; border: 0; background: #fff; }
.viewer-img { max-height: 70vh; object-fit: contain; }
.viewer-none { text-align: center; padding: 2rem; }
.viewer-actions { justify-content: space-between; }
.pick-list { display: flex; flex-direction: column; gap: .3rem; margin-top: .75rem; max-height: 50vh; overflow: auto; }
.pick { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .4rem .6rem; cursor: pointer; text-align: left; }
.pick:hover { border-color: var(--brand); }
.pick span:nth-child(2) { flex: 1; font-weight: 600; }

/* ---------- people pickers ---------- */
.people-pick { display: flex; flex-direction: column; gap: .3rem; }
.person-check { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-height: var(--tap); }
.person-check:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

/* ---------- decisions ---------- */
.vote-panel h2 { margin-bottom: .25rem; }
.vote-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0 .5rem; }
.vote-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 92px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 800; font-size: 1.05rem; color: var(--ink); transition: transform .05s, background .15s; }
.vote-btn:active { transform: scale(.98); }
.vote-yes { border-color: var(--ok); color: var(--ok); }
.vote-yes:hover { background: var(--ok-tint); }
.vote-no { border-color: var(--bad); color: var(--bad); }
.vote-no:hover { background: var(--bad-tint); }
.vote-other { border-color: var(--info); color: var(--info); font-size: .95rem; }
.vote-other:hover { background: var(--info-tint); }
.other-box { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.voted-box { display: flex; gap: .7rem; align-items: flex-start; background: var(--ok-tint); color: var(--ink); border-radius: 10px; padding: .9rem 1rem; }
.voted-box > .icon { color: var(--ok); margin-top: .1rem; }
.vote-statement { font-style: italic; color: var(--body); margin-top: .2rem; }
.vote-yes, strong.vote-yes { color: var(--ok); }
strong.vote-no { color: var(--bad); }
strong.vote-other { color: var(--info); }
.admin-tally { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; border: 1px dashed var(--info); background: var(--info-tint); }
.admin-tally h3 { color: var(--info); margin-bottom: .4rem; }
.tally-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .35rem; }
.tally-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.result-panel { border-width: 2px; }
.result-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .5rem; }
.result-label { font-size: 1.5rem; font-weight: 800; }
.result-approved { border-color: var(--ok); } .result-approved .result-label { color: var(--ok); }
.result-rejected { border-color: var(--bad); } .result-rejected .result-label { color: var(--bad); }
.result-no_majority { border-color: var(--warn); } .result-no_majority .result-label { color: var(--warn); }
.result-expired .result-label, .result-cancelled .result-label { color: var(--muted); }
.result-counts { display: flex; gap: 1rem; flex-wrap: wrap; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.vote-table, .poll-table { width: 100%; border-collapse: collapse; }
.vote-table th, .vote-table td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.vote-table th { font-size: .82rem; color: var(--muted); }

/* ---------- meetings ---------- */
.when-panel { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.when-big { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.when-big .date-badge { width: 62px; }
.when-big .db-day { font-size: 1.6rem; }
.when-date { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.when-time { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.when-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-join { min-height: 52px; font-size: 1.05rem; }
.link-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: .4rem; }
.link-box label { font-weight: 700; color: var(--ink); }
.table-scroll { overflow-x: auto; margin: 0 -.25rem; }
.poll-table th, .poll-table td { padding: .5rem .35rem; border-bottom: 1px solid var(--line-2); text-align: center; }
.poll-table th:first-child, .poll-table td:first-child { text-align: left; }
.poll-time { min-width: 150px; }
.poll-best { background: var(--ok-tint); }
.answer-group { display: inline-flex; gap: 3px; }
.ans { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 800; color: var(--muted); }
.ans.on.ans-yes, .ans-view.ans-yes { background: var(--ok); border-color: var(--ok); color: #fff; }
.ans.on.ans-maybe, .ans-view.ans-maybe { background: var(--warn); border-color: var(--warn); color: #fff; }
.ans.on.ans-no, .ans-view.ans-no { background: var(--bad); border-color: var(--bad); color: #fff; }
.ans-view { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.poll-count strong { font-size: 1.1rem; color: var(--ink); }
.add-slot { margin-top: 1rem; }
.add-slot label { font-weight: 600; }
.slot-inputs { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .4rem; }
.slot-row { display: flex; gap: .3rem; align-items: center; }
.menu-list { display: flex; flex-direction: column; gap: .4rem; }
.menu-item { text-align: left; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 600; min-height: var(--tap); }
.menu-item:hover { border-color: var(--brand); }

/* ---------- team ---------- */
.team-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 1rem; }
.person-card { display: flex; gap: .9rem; align-items: flex-start; }
.person-info { min-width: 0; }
.person-info strong { color: var(--ink); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.contact-links { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; }
.contact-links a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; overflow-wrap: anywhere; min-height: 32px; }
.member-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.member-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; }
.member-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ---------- settings ---------- */
.settings-grid { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.settings-install { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.profile-head { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .35rem; }
.settings-grid .panel > .btn { margin: .25rem .25rem 0 0; }

/* ---------- search ---------- */
.search-group { margin: 1rem 0 .2rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- modals / toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 26, 22, .5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.overlay.show { opacity: 1; }
.modal { background: var(--surface); width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; transform: translateY(20px); transition: transform .2s; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.overlay.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem .75rem .5rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.modal-body { padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); overflow-y: auto; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 1rem; }
  .modal { max-width: 560px; border-radius: 16px; max-height: 90vh; }
  .modal-wide { max-width: 820px; }
}
.confirm-text { font-size: 1.05rem; color: var(--ink); font-weight: 600; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.more-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 92px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; text-align: center; }
.more-item .nav-count { position: absolute; top: 6px; right: 8px; }
.more-lang { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: .5rem; }
#toasts { position: fixed; z-index: 200; left: .75rem; right: .75rem; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
@media (min-width: 900px) { #toasts { left: auto; right: 1.25rem; bottom: auto; top: 1rem; width: 380px; } }
.toast { pointer-events: auto; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; background: var(--ink); color: var(--bg); padding: .75rem 2.4rem .75rem 1rem; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); position: relative; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: none; }
.toast strong { width: 100%; }
.toast span { flex: 1; min-width: 0; }
.toast-ok { background: var(--ok); color: #fff; }
.toast-error { background: var(--bad); color: #fff; }
.toast .btn { background: rgba(255,255,255,.15); color: inherit; border-color: rgba(255,255,255,.35); }
.toast-x { position: absolute; right: .35rem; top: .35rem; border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; width: 30px; height: 30px; }
.notif-actions { justify-content: flex-start; margin: 0 0 .5rem; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: .7rem; padding: .7rem .4rem; border-bottom: 1px solid var(--line-2); color: var(--body); text-decoration: none; }
.notif:hover { background: var(--surface-2); }
.notif strong { color: var(--ink); }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; flex: none; background: transparent; }
.notif.unread .notif-dot { background: var(--new); }
.notif.unread { background: color-mix(in srgb, var(--new) 5%, transparent); }
.popup-list { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .5rem; }
.popup-item { display: flex; gap: .75rem; align-items: center; padding: .7rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); border-left: 5px solid var(--line); background: var(--surface-2); }
.popup-item > div { display: flex; flex-direction: column; min-width: 0; }
.popup-kind { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.popup-item.attn-action { border-left-color: var(--action); background: var(--action-tint); }
.popup-item.attn-bad { border-left-color: var(--bad); background: var(--bad-tint); }
.popup-item.attn-warn { border-left-color: var(--warn); background: var(--warn-tint); }
.popup-item.attn-info { border-left-color: var(--info); background: var(--info-tint); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, var(--brand-tint), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; box-shadow: var(--shadow); }
.auth-brand { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.25rem; }
.auth-brand h1 { margin: 0; font-size: 1.45rem; }
.auth-brand p { margin: 0; }
.auth-title { font-size: 1.15rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.auth-msg p { margin-top: 1rem; }
.auth-lang { display: flex; justify-content: center; margin-top: 1.25rem; }
.demo-box { margin-top: 1.25rem; padding: .9rem; border-radius: 10px; background: var(--info-tint); color: var(--info); display: flex; flex-wrap: wrap; gap: .4rem; }
.demo-box strong, .demo-box p { width: 100%; margin: 0; }
.center-screen { min-height: 70vh; display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- companies ---------- */
.company-switch-wrap { display: flex; align-items: center; gap: .4rem; color: var(--brand); min-width: 0; }
.company-switch { min-height: 38px; padding: .3rem .5rem; font-weight: 700; color: var(--ink); max-width: 100%; }
.cs-side { padding: 0 .25rem .75rem; }
.cs-side .company-switch { width: 100%; }
.cs-top { flex: 0 1 170px; }
.cs-top .icon { display: none; }
@media (min-width: 900px) { .cs-top { display: none; } }
.chip-company { background: transparent; border: 1px solid currentColor; font-weight: 700; }
.company-cards { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); margin-bottom: 1rem; }
.company-card { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 10px; }
.company-card strong { color: var(--ink); }
.member-matrix { border-collapse: collapse; min-width: 100%; }
.member-matrix th, .member-matrix td { padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.member-matrix th { font-size: .82rem; color: var(--muted); }
.role-select { min-height: 36px; padding: .2rem .4rem; width: auto; }
.role-select.on { border-color: var(--brand); background: var(--brand-tint); font-weight: 700; }
.small-chips { margin: .3rem 0 0; gap: .25rem; }

/* ---------- deadlines / calendar ---------- */
.cal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.cal-head h2 { flex: 1; text-align: center; margin: 0; text-transform: capitalize; }
.cal-next .icon { transform: rotate(180deg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: .2rem 0; text-transform: uppercase; }
.cal-day { min-height: 54px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 3px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; cursor: pointer; text-align: left; min-width: 0; color: var(--body); }
.cal-empty { border: 0; background: transparent; cursor: default; }
.cal-day:hover { border-color: var(--brand); }
.cal-num { font-size: .85rem; font-weight: 700; color: var(--ink); }
.cal-today { border: 2px solid var(--brand); }
.cal-today .cal-num { color: var(--brand); }
.cal-sel { background: var(--brand-tint); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.cal-deadline { background: var(--bad); }
.cal-task { background: var(--warn); }
.cal-meeting { background: var(--brand); }
.cal-decision { background: var(--info); }
.cal-titles { display: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .75rem; font-size: .85rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.cal-list h3 { margin-top: .5rem; }
@media (min-width: 900px) {
  .cal-day { min-height: 92px; }
  .cal-dots { display: none; }
  .cal-titles { display: flex; flex-direction: column; gap: 2px; }
  .cal-ev { display: block; font-size: .72rem; line-height: 1.25; padding: 1px 4px; border-radius: 4px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-ev.cal-task { color: #1B241F; }
}

/* ---------- agenda ---------- */
.agenda-list { list-style: none; counter-reset: ag; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .4rem; }
.agenda-item { counter-increment: ag; display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.agenda-item::before { content: counter(ag) "."; font-weight: 800; color: var(--brand); min-width: 1.4rem; padding-top: .05rem; }
.agenda-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
.agenda-main strong { color: var(--ink); }
.agenda-details { width: 100%; color: var(--body); font-size: .92rem; white-space: pre-line; }
.agenda-main .muted { width: 100%; }
.agenda-actions { display: flex; gap: 2px; }
.agenda-add { display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--line-2); padding-top: .75rem; }
.agenda-mins { max-width: 100px; flex: 0 0 100px !important; }

/* ---------- read confirmation ---------- */
.ack-panel.ack-open { border: 2px solid var(--action); background: color-mix(in srgb, var(--action) 5%, var(--surface)); }
.ack-ask { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.ack-list { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-direction: column; gap: .35rem; }
.ack-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ack-list li > span:nth-child(2) { font-weight: 600; color: var(--ink); }

/* ---------- circular resolution ---------- */
.res-progress { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 .75rem; flex-wrap: wrap; counter-reset: st; }
.res-progress li { counter-increment: st; display: flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--muted); font-size: .9rem; }
.res-progress li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line-2); color: var(--muted); font-weight: 800; font-size: .8rem; }
.res-progress li + li::after { content: none; }
.res-progress li.on { color: var(--ink); }
.res-progress li.on::before { background: var(--action); color: #fff; }
.res-progress li.done { color: var(--ok); }
.res-progress li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.sign-box { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border-radius: 10px; background: var(--action-tint); margin-bottom: .5rem; }
.res-scan { margin-top: .5rem; }
.res-doc { font-family: Georgia, "Times New Roman", serif; color: #1B241F; background: #fff; line-height: 1.6; }
.res-doc .rich { font-family: inherit; }
.res-letterhead { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid #1F5F4A; padding-bottom: .75rem; margin-bottom: 1rem; }
.res-company { font-size: 1.2rem; font-weight: 700; letter-spacing: .02em; }
.res-reg { font-size: .85rem; color: #4a5a52; }
.res-title { text-align: center; font-size: 1.1rem; letter-spacing: .06em; margin: .5rem 0 .25rem; color: #1B241F; }
.res-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9rem; margin-bottom: 1rem; }
.res-preamble { text-align: justify; }
.res-subject { font-size: 1rem; text-decoration: underline; margin: 1rem 0 .5rem; color: #1B241F; }
.res-resolved strong { display: block; margin-bottom: .3rem; }
.res-vote { font-size: .85rem; color: #4a5a52; font-style: italic; margin-top: 1rem; }
.res-sign { width: 100%; border-collapse: collapse; margin-top: 1.25rem; }
.res-sign th, .res-sign td { border: 1px solid #c9c1b0; padding: .55rem .6rem; text-align: left; vertical-align: bottom; }
.res-sign th { background: #f4efe4; font-size: .85rem; }
.res-sigcell { height: 64px; min-width: 160px; }
.res-esig { display: inline-flex; align-items: center; gap: .3rem; color: #1E7A4C; font-family: var(--font); font-size: .85rem; font-weight: 700; }
.res-foot { font-size: .75rem; color: #6A7A72; margin-top: 1rem; }

/* ---------- print (minutes, decisions, updates → PDF) ---------- */
@media print {
  @page { margin: 16mm; }
  :root { --bg: #fff; --surface: #fff; --ink: #000; --body: #111; --line: #bbb; --line-2: #ddd; --shadow: none; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .sidebar, .topbar, .tabbar, .back, .page-actions, .comments, .attachments .panel-actions, .comment-compose, .no-print,
  #toasts, .vote-buttons, .admin-tally, .btn, .link-box, .detail-side, .overlay, .res-steps, .ack-panel .btn { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .panel { border: 0; box-shadow: none; padding: 0; margin-bottom: 8mm; }
  .detail-grid { display: block; }
  .print-only { display: flex; }
  .print-head { align-items: center; gap: 4mm; border-bottom: 2px solid #1F5F4A; padding-bottom: 3mm; margin-bottom: 5mm; }
  .chip { border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  .row { box-shadow: none; break-inside: avoid; }
}
