/* SMART CHANTIER MANAGER
   Igitekerezo: icyapa cya chantier (panneau de chantier) — umuhondo w'akaburimbo ku isima.
   Inyuguti: Atkinson Hyperlegible (isomeka neza ku zuba no kuri telefone ntoya). */
/* Imibare (0-9) ikoresha inyuguti za sisitemu: zeru ya Atkinson ifite akarongo (Ø) itera urujijo ku mafaranga */
@font-face { font-family: 'Atkinson'; font-weight: 400; font-display: swap; src: url('fonts/atkinson-400.woff2') format('woff2'); unicode-range: U+0000-002F, U+003A-FFFF; }
@font-face { font-family: 'Atkinson'; font-weight: 700; font-display: swap; src: url('fonts/atkinson-700.woff2') format('woff2'); unicode-range: U+0000-002F, U+003A-FFFF; }

:root {
  --concrete: #E7EBEA;
  --panel: #FFFFFF;
  --ink: #14232B;
  --muted: #55656D;
  --line: #C9D2D2;
  --tape: #F5B800;
  --tape-ink: #14232B;
  --steel: #1D5877;
  --good: #1F6E45;
  --bad: #B3261E;
  --warn: #8F5600;
  --field: #F6F8F8;
  --r-s: 6px;
  --r-m: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --concrete: #0F191E; --panel: #17242C; --ink: #E5ECEE; --muted: #9AAAB1; --line: #2B3C46;
    --steel: #86BCD9; --good: #5CC08B; --bad: #FF8A80; --warn: #F2B54C; --field: #122028;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--concrete); color: var(--ink);
  font: 16px/1.5 'Atkinson', Roboto, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2rem 0 .8rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
a { color: var(--steel); }
p { margin: .4rem 0 .8rem; max-width: 70ch; }
.muted, small { color: var(--muted); }
.fine { font-size: .85rem; color: var(--muted); margin-top: 2rem; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }

/* ---------- Buto ---------- */
button, .btn { font: inherit; font-weight: 700; border-radius: var(--r-s); padding: .65rem 1.1rem; cursor: pointer;
  border: 2px solid transparent; min-height: 44px; }
button.primary { background: var(--tape); color: var(--tape-ink); border-color: var(--tape); }
button.primary:hover { filter: brightness(.96); }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.danger, button.ghost.danger { color: var(--bad); border-color: currentColor; }
button.big { width: 100%; padding: .9rem; font-size: 1.05rem; }
button.small { min-height: 34px; padding: .25rem .7rem; font-size: .9rem; }
button.link { background: none; border: 0; color: var(--steel); text-decoration: underline; font-weight: 400; padding: .5rem 0; }
button:disabled { opacity: .55; cursor: progress; }
button.busy { position: relative; color: transparent !important; }
button.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--tape-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form ---------- */
.stack { display: grid; gap: .9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .25rem; }
.field .hint, .hint { display: block; font-size: .85rem; margin-top: .25rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1.5px solid var(--line);
  border-radius: var(--r-s); padding: .6rem .7rem; min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--steel) 25%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: .75; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .8rem 1rem 1rem; margin: 0; display: grid; gap: .8rem; background: var(--panel); }
legend { font-weight: 700; padding: 0 .4rem; }
.note { background: color-mix(in srgb, var(--tape) 16%, transparent); border-left: 4px solid var(--tape); padding: .6rem .8rem; border-radius: 0 var(--r-s) var(--r-s) 0; margin: 0; font-size: .93rem; }
.row { display: flex; gap: .7rem; justify-content: space-between; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; padding: .3rem 0; cursor: pointer; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: .15rem; flex: none; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .checks { grid-template-columns: 1fr; } }

/* ---------- Gutangira ---------- */
.splash { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: .5rem; padding: 1rem; }
.board-mark { width: 56px; height: 56px; background: var(--tape); color: var(--tape-ink); font-weight: 700; display: grid; place-items: center;
  border-radius: var(--r-s); border: 3px solid var(--tape-ink); margin: 0 auto; letter-spacing: .5px; }
.start { max-width: 640px; margin: 0 auto; padding: 0 0 3rem; }
.start-board { display: flex; gap: .9rem; align-items: center; background: var(--tape); color: var(--tape-ink);
  padding: 1rem; border-bottom: 4px solid var(--tape-ink); }
.start-board .board-mark { margin: 0; background: var(--tape-ink); color: var(--tape); border-color: var(--tape-ink); width: 48px; height: 48px; }
.start-title { font-weight: 700; font-size: 1.15rem; letter-spacing: .3px; }
.start-sub { font-size: .9rem; }
.start-body { padding: 1.2rem 1rem; }
.lead { font-size: 1.05rem; color: var(--muted); }
.choice { display: grid; gap: .8rem; }
.choice-btn { text-align: left; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r-m); padding: 1rem; display: grid; gap: .3rem; color: var(--ink); }
.choice-btn:hover { border-color: var(--tape); }
.choice-btn strong { font-size: 1.1rem; }
.choice-btn span { font-weight: 400; color: var(--muted); }
.people { display: grid; gap: .6rem; }
.person { display: flex; justify-content: space-between; align-items: center; background: var(--panel); border: 2px solid var(--line); color: var(--ink); padding: 1rem; border-radius: var(--r-m); }
.person span { font-weight: 400; color: var(--muted); }

/* PIN */
.pin-dots { display: flex; gap: .8rem; justify-content: center; margin: 1.2rem 0 .4rem; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ink); }
.pin-dots span.on { background: var(--ink); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin-msg { text-align: center; color: var(--bad); min-height: 1.5em; margin: 0 auto; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; max-width: 320px; margin: .5rem auto 1rem; }
.key { font-size: 1.5rem; min-height: 64px; background: var(--panel); border: 2px solid var(--line); color: var(--ink); border-radius: var(--r-m); }
.key:active { background: var(--field); }
.key.ok { background: var(--tape); border-color: var(--tape); font-size: 1.05rem; }
.key.del { font-size: 1.3rem; }

/* ---------- Igikonoshwa ---------- */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr auto; }
.board { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--tape); color: var(--tape-ink);
  padding: .65rem 1rem; border-bottom: 4px solid var(--tape-ink); position: sticky; top: 0; z-index: 5; }
.board-main { min-width: 0; }
.board-name { font-weight: 700; font-size: 1.12rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-meta { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code { letter-spacing: .4px; }
.who { background: var(--tape-ink); color: var(--tape); border-radius: var(--r-s); padding: .3rem .7rem; display: grid; text-align: right; min-height: 0; line-height: 1.25; max-width: 45vw; }
.who-name { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { font-size: .74rem; font-weight: 400; color: #fff; opacity: .85; }
#view { padding: 1rem; max-width: 980px; width: 100%; margin: 0 auto; outline: none; padding-bottom: 6rem; }
#view.loading { opacity: .6; }

.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--panel); border-top: 1.5px solid var(--line); z-index: 6;
  padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1 1 0; display: grid; justify-items: center; gap: 2px; padding: .45rem .1rem .5rem; color: var(--muted); text-decoration: none; font-size: .7rem; min-width: 0; }
.nav a .long { display: none; }
.nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav a.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--tape); }
.nav .desk-only { display: none; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 900px) {
  .shell { grid-template-columns: 220px 1fr; grid-template-rows: auto auto 1fr; }
  .board { grid-column: 1 / -1; padding: .8rem 1.4rem; }
  .board-name { font-size: 1.35rem; }
  #banner { grid-column: 1 / -1; }
  .nav { position: sticky; top: 74px; align-self: start; flex-direction: column; border: 0; border-right: 1.5px solid var(--line);
    background: transparent; height: calc(100vh - 74px); padding: 1rem .6rem; gap: .2rem; }
  .nav a, .nav .desk-only { display: flex; gap: .7rem; align-items: center; font-size: .98rem; padding: .6rem .8rem; border-radius: var(--r-s); flex: none; }
  .nav a.on { background: var(--panel); box-shadow: inset 4px 0 0 var(--tape); }
  .nav a .short { display: none; } .nav a .long { display: inline; }
  #view { padding: 1.4rem 2rem 3rem; }
}

/* ---------- Ibice ---------- */
.panel { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.panel h2 a { color: inherit; text-decoration: none; }
.panel h2 a::after { content: ' ›'; color: var(--muted); }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.titlebar h1 { margin-bottom: .4rem; }
.back { display: inline-block; text-decoration: none; margin-bottom: .3rem; color: var(--muted); }
.empty { color: var(--muted); padding: 1rem 0; }
.banner { padding: .6rem 1rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.banner.bad { background: var(--bad); color: #fff; }
.banner a { color: #fff; font-weight: 700; }

.hello h1 { margin-bottom: 0; }
.hello p { color: var(--muted); margin-top: .1rem; }
.alerts { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.alerts li { border-left: 5px solid var(--steel); background: var(--panel); border-radius: 0 var(--r-s) var(--r-s) 0; }
.alerts li.warn { border-color: var(--warn); } .alerts li.bad { border-color: var(--bad); }
.alerts a { display: block; padding: .6rem .8rem; color: var(--ink); text-decoration: none; }
.today { background: var(--tape-ink); color: #fff; border-radius: var(--r-m); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.today-big { font-size: 1.2rem; color: var(--tape); }
.today-big .n { font-size: 3.2rem; font-weight: 700; line-height: 1; }
.today-label { font-weight: 700; }
.today-foot { font-size: .88rem; opacity: .8; margin-top: .3rem; }
.ledger { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.ledger dt, .ledger dd { padding: .45rem 0; border-bottom: 1px dashed var(--line); margin: 0; }
.ledger dd { text-align: right; font-weight: 700; }
.ledger dd.bad { color: var(--bad); } .ledger dd.warn { color: var(--warn); } .ledger dd.strong { font-size: 1.1rem; }
.meter { position: relative; height: 30px; background: var(--field); border: 1.5px solid var(--line); border-radius: var(--r-s); overflow: hidden; margin-bottom: .7rem; }
.meter-bar { height: 100%; background: var(--steel); opacity: .35; }
.meter.near .meter-bar { background: var(--warn); } .meter.over .meter-bar { background: var(--bad); opacity: .5; }
.meter-text { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 .7rem; font-size: .9rem; font-weight: 700; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; }
.todo b { background: var(--tape); color: var(--tape-ink); border-radius: 99px; min-width: 28px; text-align: center; padding: 0 .5rem; }
.syncline { color: var(--muted); font-size: .88rem; }
@media (min-width: 900px) { .home { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; } .home > .hello, .home > .alerts, .home > .syncline { grid-column: 1 / -1; } }

.menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.menu a { display: grid; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.menu a:hover { border-color: var(--tape); }
.menu span { color: var(--muted); font-size: .9rem; }
.codebox { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.codebox strong { font-size: 1.25rem; letter-spacing: .5px; flex: 1; }
.bigcode { font-size: 2rem; font-weight: 700; letter-spacing: 3px; text-align: center; background: var(--tape); color: var(--tape-ink); padding: .8rem; border-radius: var(--r-s); }
.tag { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--tape-ink); color: var(--tape); }

.licence.ok { border-left: 6px solid var(--good); } .licence.bad { border-left: 6px solid var(--bad); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.plan { display: grid; gap: .2rem; text-decoration: none; color: var(--ink); border: 2px solid var(--line); border-radius: var(--r-m); padding: .9rem; }
.plan:hover { border-color: var(--tape); }
.plan .price { font-size: 1.5rem; font-weight: 700; }
.plan span:last-child { color: var(--steel); text-decoration: underline; }

/* Imbonerahamwe: ihinduka urutonde kuri telefone */
.tablewrap { overflow-x: auto; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; background: var(--field); }
td.num, th.num { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--field); }
tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .tablewrap { background: transparent; border: 0; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); margin-bottom: .6rem; padding: .3rem .2rem; }
  td { border: 0; padding: .25rem .7rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; }
  td[data-label=""]::before { content: none; }
  td.num { text-align: right; }
}
.badge { display: inline-block; padding: .05rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 700; border: 1.5px solid var(--line); white-space: nowrap; }
.badge.good { color: var(--good); border-color: currentColor; } .badge.bad { color: var(--bad); border-color: currentColor; }
.badge.warn { color: var(--warn); border-color: currentColor; } .badge.info { color: var(--steel); border-color: currentColor; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* Dialog */
dialog.modal { border: 0; border-radius: var(--r-m); padding: 1.2rem; width: min(520px, calc(100vw - 24px)); background: var(--panel); color: var(--ink);
  max-height: calc(100vh - 24px); overflow: auto; }
dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(10, 20, 25, .55); }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }

#toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 160px); background: var(--tape-ink); color: #fff; padding: .75rem 1.1rem;
  border-radius: var(--r-m); max-width: calc(100vw - 24px); z-index: 50; transition: transform .25s ease; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#toast.show { transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); } #toast.warn { background: #8F5600; }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }

@media print {
  .nav, .board .who, #banner, button { display: none !important; }
  body { background: #fff; }
}

/* ---------- Icyiciro cya 3: abakozi n'imibyizi ---------- */
.tabs { display: flex; gap: .3rem; margin: 0 0 1rem; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 4px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--tape); }
.filters { display: flex; gap: .6rem; margin-bottom: .8rem; }
.filters input { flex: 2; } .filters select { flex: 1; max-width: 180px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .6rem .8rem; display: grid; }
.stat b { font-size: 1.35rem; } .stat span { color: var(--muted); font-size: .85rem; }
.daynav { display: flex; gap: .4rem; align-items: center; }
.daynav input { width: auto; }
.att { display: grid; gap: .5rem; }
.att-row { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .7rem .8rem; display: grid; gap: .5rem; }
.att-row.frozen { opacity: .7; }
.att-who { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--field); color: var(--ink); font-weight: 700; padding: .5rem .2rem; min-height: 46px; font-size: .92rem; }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button[aria-checked="true"].seg-present { background: var(--good); color: #fff; }
.seg button[aria-checked="true"].seg-partial { background: var(--tape); color: var(--tape-ink); }
.seg button[aria-checked="true"].seg-absent { background: var(--bad); color: #fff; }
.seg button[aria-checked="true"].seg-leave { background: var(--steel); color: #fff; }
.att-extra { display: flex; gap: 1rem; flex-wrap: wrap; }
.att-extra label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--muted); }
.att-extra input { width: 80px; min-height: 38px; padding: .3rem .5rem; }
.att-totals { font-weight: 700; margin: .8rem 0; }
.sticky-save { position: sticky; bottom: 70px; padding: .5rem 0; background: linear-gradient(transparent, var(--concrete) 30%); }
@media (min-width: 900px) { .sticky-save { bottom: 0; } .att-row { grid-template-columns: 1.2fr 1.5fr; align-items: center; } .att-extra { grid-column: 2; } }
@media (max-width: 640px) { td:empty { display: none; } }

/* ---------- Icyiciro cya 4: stock ---------- */
.stat.low b { color: var(--bad); }
.field.end { display: flex; align-items: flex-end; }
.filters .field { flex: 1; }
.req-line { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr; gap: .4rem; }
@media (max-width: 560px) { .req-line { grid-template-columns: 1fr 1fr; } .req-line select { grid-column: 1 / -1; } }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-s); border: 1.5px solid var(--line); cursor: zoom-in; background: var(--field); }
.photo { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--r-s); margin-top: .6rem; }
.photo-field { display: flex; gap: .8rem; align-items: center; }

/* ---------- Icyiciro cya 5: imari ---------- */
.bva { display: grid; gap: .7rem; }
.bva-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: .8rem; align-items: center; }
@media (max-width: 560px) { .bva-row { grid-template-columns: 1fr; gap: .3rem; } }
.bva-label { display: grid; } .bva-label small { font-size: .82rem; }
.bva-bars { display: grid; gap: 3px; }
.bva-budget, .bva-spent { height: 12px; border-radius: 3px; min-width: 2px; }
.bva-budget { background: color-mix(in srgb, var(--steel) 30%, transparent); }
.bva-spent { background: var(--steel); } .bva-spent.over { background: var(--bad); }
.legend { font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; margin-top: .8rem; }
.key-b, .key-s { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.key-b { background: color-mix(in srgb, var(--steel) 30%, transparent); } .key-s { background: var(--steel); margin-left: .8rem; }
.budget-row { display: grid; grid-template-columns: 1fr 180px; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.budget-row input { text-align: right; }
.budget-row.total { border-bottom: 0; }
.budget-row.total strong:last-child { text-align: right; padding-right: .7rem; }

/* ---------- Icyiciro cya 6: imirimo n'amafoto ---------- */
.pbar { position: relative; height: 26px; background: var(--field); border: 1.5px solid var(--line); border-radius: var(--r-s); overflow: hidden; margin: .4rem 0; }
.pbar > div { height: 100%; background: var(--tape); }
.pbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 .6rem; font-weight: 700; font-size: .9rem; }
.tasklist { display: grid; gap: .6rem; }
.task { display: grid; gap: .15rem; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.task:hover { border-color: var(--tape); }
.task-head { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.slider { display: flex; gap: 1rem; align-items: center; }
.slider input[type=range] { flex: 1; min-height: 0; padding: 0; accent-color: var(--tape-ink); height: 34px; }
.pct-out { font-size: 1.5rem; min-width: 64px; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.gallery figure { margin: 0; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.gthumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; background: var(--field); }
.gallery figcaption { padding: .4rem .55rem; display: grid; font-size: .85rem; }
.gallery figcaption small { font-size: .75rem; }
ul.plain { padding-left: 1.1rem; margin: .5rem 0; }

/* ---------- Icyiciro cya 7: raporo na backup ---------- */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { min-height: 36px; padding: .3rem .8rem; border-radius: 99px; background: var(--field); border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; font-size: .9rem; }
.chip:active { background: var(--tape); }
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.report-btn { text-align: left; display: grid; gap: .2rem; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: .9rem 1rem; color: var(--ink); }
.report-btn:hover { border-color: var(--tape); }
.report-btn span { color: var(--steel); font-weight: 400; text-decoration: underline; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; border-radius: var(--r-s); padding: .65rem 1.1rem; min-height: 44px; border: 2px solid transparent; }
a.btn.primary { background: var(--tape); color: var(--tape-ink); }
a.btn.ghost { color: var(--ink); border-color: var(--line); }

/* ---------- Icyiciro cya 8: guhuza ---------- */
a.syncline { display: block; text-decoration: none; }
hr { border: 0; border-top: 1px dashed var(--line); margin: .4rem 0; }

/* ---------- Amabwiriza ---------- */
.helpdoc details.help { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-m); margin-bottom: .5rem; }
.helpdoc summary { padding: .8rem 1rem; font-weight: 700; cursor: pointer; }
.helpdoc details > div { padding: 0 1rem .8rem; }
.helpdoc li { margin-bottom: .35rem; }
