/* Ahadi — ahadi.cardstz.co.tz */
:root{
  --bg:#F5F1F3; --surface:#FFFFFF; --sunk:#EFE8EC;
  --ink:#241219; --muted:#76606B; --line:#E2D6DC;
  --plum:#5A1F3D; --plum-soft:#F1E4EB; --on-plum:#FFFFFF; --gold:#8F6416;
  --ok:#186B4C; --ok-bg:#E2F0EA; --warn:#8A5809; --warn-bg:#F8EEDC;
  --late:#9B2525; --late-bg:#F8E4E4;
  --sans:'IBM Plex Sans','IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',sans-serif;
  --serif:'IBM Plex Serif',Georgia,serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
  --r:10px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#171014; --surface:#211720; --sunk:#1B1218;
  --ink:#F2E9ED; --muted:#A78E9B; --line:#392932;
  --plum:#E3B2CB; --plum-soft:#31202A; --on-plum:#20131A; --gold:#DCAE5C;
  --ok:#5FC69C; --ok-bg:#16302A; --warn:#E0A94A; --warn-bg:#32260F;
  --late:#EC8484; --late-bg:#361B1B;
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --bg:#171014; --surface:#211720; --sunk:#1B1218;
  --ink:#F2E9ED; --muted:#A78E9B; --line:#392932;
  --plum:#E3B2CB; --plum-soft:#31202A; --on-plum:#20131A; --gold:#DCAE5C;
  --ok:#5FC69C; --ok-bg:#16302A; --warn:#E0A94A; --warn-bg:#32260F;
  --late:#EC8484; --late-bg:#361B1B;
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.5;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
img{max-width:100%}
[hidden]{display:none!important}
h1,h2,h3{margin:0;font-family:var(--serif);font-weight:600;text-wrap:balance}
.num{font-family:var(--mono);font-variant-numeric:tabular-nums}
.wrap{max-width:980px;margin:0 auto;padding-inline:16px}

/* ---------- auth ---------- */
.auth{min-height:80vh;display:grid;place-items:center;padding-block:32px}
.authcard{background:var(--surface);border:1px solid var(--line);border-radius:14px;
  padding:26px 22px;width:100%;max-width:400px}
.authmark{display:flex;align-items:center;gap:11px;margin-bottom:20px}
.authlang{margin-inline-start:auto}
.authmark i{width:38px;height:38px;border-radius:9px;background:var(--plum-soft);color:var(--plum);
  display:grid;place-items:center;font-family:var(--serif);font-weight:600;font-size:19px;font-style:normal}
.authmark b{display:block;font-family:var(--serif);font-size:21px;line-height:1.1}
.authmark span{display:block;font-size:11.5px;color:var(--muted);letter-spacing:.07em;text-transform:uppercase}
.authcard h1{font-size:19px;margin-bottom:4px}
.authcard>p{margin:0 0 18px;color:var(--muted);font-size:14px}
.switch{margin-top:16px;font-size:14px;color:var(--muted);text-align:center}
.switch button{background:none;border:0;color:var(--plum);font:inherit;font-weight:600;cursor:pointer;padding:0}
.switch button:hover{text-decoration:underline}

/* ---------- header ---------- */
header.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:40;
  background:var(--surface);border-bottom:1px solid var(--line)}
.topbar{display:flex;align-items:center;gap:12px;padding-block:11px;min-height:58px}
.mark{width:30px;height:30px;border-radius:7px;background:var(--plum-soft);color:var(--plum);
  display:grid;place-items:center;font-family:var(--serif);font-weight:600;font-size:15px;flex:none}
.brandtext{min-width:0}
.brandtext b{display:block;font-family:var(--serif);font-size:16px;font-weight:600;line-height:1.2}
.brandtext span{display:block;font-size:11px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.who{margin-inline-start:auto;display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--muted);min-width:0}
.who em{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}
.dot{width:7px;height:7px;border-radius:50%;background:var(--muted);flex:none}
.dot.live{background:var(--ok)} .dot.off{background:var(--warn)}
.evbar{display:flex;align-items:center;gap:10px;padding-bottom:11px;flex-wrap:wrap}
#evSel{flex:1;min-width:180px;font-weight:500}
.tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{border:0;background:none;border-radius:0;border-bottom:2px solid transparent;
  color:var(--muted);padding:9px 11px;white-space:nowrap;font-size:14px}
.tabs button:hover{color:var(--ink)}
.tabs button[aria-selected="true"]{color:var(--plum);border-bottom-color:var(--plum)}

/* ---------- controls ---------- */
select,input,textarea{font:inherit;color:inherit;background:var(--surface);
  border:1px solid var(--line);border-radius:8px;padding:9px 10px;max-width:100%;width:100%}
select:focus-visible,input:focus-visible,textarea:focus-visible,button:focus-visible{
  outline:2px solid var(--plum);outline-offset:1px}
button{font:inherit;font-weight:500;border-radius:8px;border:1px solid var(--line);
  background:var(--surface);color:var(--ink);padding:9px 14px;cursor:pointer;width:auto}
button:hover{border-color:var(--plum)}
button.primary{background:var(--plum);border-color:var(--plum);color:var(--on-plum)}
button.primary:hover{opacity:.9}
button.block{width:100%}
button:disabled{opacity:.5;cursor:not-allowed}
button.tiny{padding:6px 10px;font-size:13px}
label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.field{margin-bottom:12px}
.grid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

main{padding-block:20px 60px}
section[hidden]{display:none}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px}
.stack{display:flex;flex-direction:column;gap:14px}
.sechead{margin-bottom:12px}
h2.sec{font-size:18px}
.sechead p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.hint{font-size:13px;color:var(--muted)}
.err{background:var(--late-bg);color:var(--late);border-radius:8px;padding:9px 12px;font-size:13.5px;margin-bottom:12px}
.okmsg{background:var(--ok-bg);color:var(--ok);border-radius:8px;padding:9px 12px;font-size:13.5px;margin-bottom:12px}

.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
@media(max-width:700px){.tiles{grid-template-columns:repeat(2,1fr)}}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:13px 14px;min-width:0}
.tile .k{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.tile .v{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:22px;font-weight:600;
  margin-top:3px;line-height:1.15;word-break:break-word}
.tile.ok .v{color:var(--ok)} .tile.late .v{color:var(--late)}
.tile .s{font-size:11.5px;color:var(--muted);margin-top:2px;line-height:1.25;word-break:break-word}
.meter{height:12px;background:var(--sunk);border-radius:99px;overflow:hidden;border:1px solid var(--line)}
.meter i{display:block;height:100%;background:var(--plum);border-radius:99px}
.meterrow{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);
  margin-top:7px;gap:10px;flex-wrap:wrap}

.tblwrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
table{border-collapse:collapse;width:100%;font-size:14px}
th,td{text-align:start;padding:9px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);
  font-weight:600;background:var(--sunk)}
tr:last-child td{border-bottom:0}
td.r,th.r{text-align:end}
td.name{white-space:normal;min-width:130px}
.chip{display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;border-radius:99px}
.chip.imekamilika{background:var(--ok-bg);color:var(--ok)}
.chip.sehemu{background:var(--warn-bg);color:var(--warn)}
.chip.inasubiri{background:var(--sunk);color:var(--muted)}
.chip.imechelewa{background:var(--late-bg);color:var(--late)}

.msgbox{font-family:var(--mono);font-size:12.5px;white-space:pre-wrap;background:var(--sunk);
  border:1px solid var(--line);border-radius:8px;padding:11px;line-height:1.55}
.empty{text-align:center;padding:36px 18px}
.empty h2{font-size:22px;margin-bottom:8px}
.empty p{color:var(--muted);margin:0 auto 18px;max-width:46ch}
.toast{position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(18px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);
  padding:10px 16px;border-radius:99px;font-size:14px;z-index:99;box-shadow:0 6px 24px rgba(0,0,0,.25)}
.modal{position:fixed;inset:0;z-index:80;background:rgba(20,10,16,.55);display:grid;
  place-items:center;padding:16px;overflow:auto}
.modal .card{max-width:430px;width:100%}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* language picker */
.langsel{width:auto;padding:5px 8px;font-size:12.5px;border-radius:7px;max-width:130px}
.authlang .langsel{font-size:13px}

/* right-to-left */
[dir="rtl"] .tabs button{letter-spacing:0}
[dir="rtl"] .meterrow,[dir="rtl"] .row{direction:rtl}
[dir="rtl"] .msgbox{direction:rtl;text-align:start}
[dir="rtl"] .num{direction:ltr;unicode-bidi:embed;display:inline-block}
[dir="rtl"] body{font-family:'IBM Plex Sans Arabic','IBM Plex Sans',system-ui,sans-serif}
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3,[dir="rtl"] .brandtext b,[dir="rtl"] .authmark b{
  font-family:'IBM Plex Sans Arabic','IBM Plex Serif',Georgia,serif}

/* repeating payment-account rows */
.acctrow{display:grid;grid-template-columns:1.1fr 1fr 1fr auto;gap:6px;margin-bottom:6px;align-items:center}
.acctrow input,.acctrow select{padding:7px 8px;font-size:14px}
.acctrow .a-del{padding:6px 10px;line-height:1;color:var(--muted)}
.acctrow .a-del:hover{color:var(--late);border-color:var(--late)}
@media(max-width:520px){.acctrow{grid-template-columns:1fr 1fr;}
  .acctrow .a-prov{grid-column:1/3}.acctrow .a-del{justify-self:end}}

/* search */
.searchbox{width:100%;padding:9px 12px;border-radius:999px;background:var(--sunk);
  border:1px solid var(--line);font-size:14px;margin-bottom:10px}
.searchbox::-webkit-search-cancel-button{cursor:pointer}

/* ======================================================================
   Ceremonial pass — login, empty state, tiles, meter, report, print.
   Added after the base rules so these win without touching what works.
   ====================================================================== */

:root{ --ivory:#FDFBF7; --plum-deep:#3E1229; --gold-soft:#C79A3C; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --ivory:#241A20; --plum-deep:#120A10; --gold-soft:#DCAE5C;
}}
:root[data-theme="dark"]{ --ivory:#241A20; --plum-deep:#120A10; --gold-soft:#DCAE5C; }

/* the drawn mark */
.rose{width:100%;height:100%;display:block;color:currentColor}

/* ---------- login ---------- */
.auth{
  position:relative;min-height:100vh;min-height:100dvh;
  display:grid;place-items:center;padding:28px 16px;
  background:
    radial-gradient(120% 90% at 50% -10%, #6B2749 0%, transparent 60%),
    linear-gradient(170deg, var(--plum-deep) 0%, #2A0C1C 100%);
}
.authfield{
  position:absolute;inset:0;overflow:hidden;pointer-events:none;
  display:grid;place-items:center;color:var(--gold-soft);opacity:.07;
}
.authfield .rose{width:min(130vw,780px);height:auto}
.authcard{
  position:relative;z-index:1;
  background:var(--ivory);border:0;border-radius:18px;
  padding:30px 24px 26px;max-width:410px;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 18px 50px rgba(20,6,14,.45);
}
.authcard::before{
  content:"";position:absolute;inset:0 0 auto;height:3px;border-radius:18px 18px 0 0;
  background:linear-gradient(90deg,transparent,var(--gold),var(--gold-soft),var(--gold),transparent);
}
.authmark{margin-bottom:14px}
.authmark i{
  width:44px;height:44px;padding:7px;border-radius:50%;
  background:var(--plum);color:var(--gold-soft);border:1px solid var(--gold-soft);
  display:grid;place-items:center
}
.authmark b{font-size:24px;letter-spacing:.01em}
.authmark span{color:var(--muted);font-size:11px}
.goldrule{
  height:1px;margin:0 0 20px;
  background:linear-gradient(90deg,var(--gold-soft),transparent);
  opacity:.65
}
.authcard h1{font-size:21px;margin-bottom:5px}
.authcard>p{font-size:14.5px;margin-bottom:20px}
.authcard label{font-size:11.5px;letter-spacing:.04em;text-transform:uppercase}
.authcard input{padding:12px 13px;border-radius:9px;font-size:16px;background:var(--surface)}
.authcard .field{margin-bottom:14px}
.authcard button.primary.block{
  padding:14px;font-size:16px;font-weight:600;letter-spacing:.03em;border-radius:10px;
  margin-top:4px;box-shadow:0 2px 0 rgba(0,0,0,.12)
}
.authcard button.primary.block:hover{opacity:1;background:#6B2749}
.authlang .langsel{background:transparent;border-color:var(--line)}

/* ---------- empty state ---------- */
.empty{position:relative;overflow:hidden}
.empty::before{
  content:"";position:absolute;inset:auto -40px -70px auto;width:230px;height:230px;
  background:currentColor;color:var(--plum);opacity:.05;
  -webkit-mask:radial-gradient(circle,#000 99%,transparent) center/100% 100% no-repeat;
          mask:radial-gradient(circle,#000 99%,transparent) center/100% 100% no-repeat;
  /* Decoration, and nothing more. Without this it lay over the bottom-right
     of the card and swallowed the only button a new committee has to press. */
  pointer-events:none;
}
/* And the real content sits above it, not under it. */
.empty > *{position:relative;z-index:1}
.empty h2{font-size:24px}
.empty .primary{padding:13px 22px;font-size:15.5px}

/* ---------- header hairline ---------- */
header.top{box-shadow:0 1px 0 rgba(143,100,22,.18)}

/* ---------- tiles ---------- */
.tile{position:relative;overflow:hidden}
.tile::before{
  content:"";position:absolute;inset:0 0 auto;height:2px;
  background:var(--line)
}
.tile.ok::before{background:var(--ok)}
.tile.late::before{background:var(--late)}
.tile .k{font-size:10.5px}
.tile .v{font-size:23px;letter-spacing:-.01em}

/* ---------- progress meter ---------- */
.meter{height:14px;background:var(--sunk);box-shadow:inset 0 1px 2px rgba(0,0,0,.12)}
.meter i{background:linear-gradient(90deg,var(--plum),var(--gold-soft))}

/* ---------- section headings ---------- */
h2.sec{font-size:19px;letter-spacing:-.005em}
.sechead{position:relative;padding-bottom:10px;margin-bottom:14px}
.sechead::after{
  content:"";position:absolute;inset:auto auto 0 0;width:44px;height:2px;
  background:var(--gold-soft);opacity:.75
}

/* ======================================================================
   Print / Save as PDF
   ====================================================================== */
#printRoot{display:none}
@media print{
  body.printing>*{display:none!important}
  body.printing #printRoot{display:block!important}
  body.printing{background:#fff;color:#000}
  @page{margin:16mm 14mm}
}
.pr-sheet{font-family:var(--sans);color:#000;background:#fff;font-size:11pt}
.pr-head{display:flex;align-items:center;gap:10px;border-bottom:1.5pt solid #8F6416;padding-bottom:8px}
.pr-mark{width:30px;height:30px;flex:none;border-radius:7px;background:#F3E8EE;color:#5A1F3D;display:grid;place-items:center;font-family:var(--serif);font-weight:600;font-size:15px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.pr-head b{display:block;font-family:var(--serif);font-size:15pt;line-height:1.1}
.pr-head span{display:block;font-size:8pt;letter-spacing:.08em;text-transform:uppercase;color:#5A1F3D}
.pr-when{margin-inline-start:auto;font-size:9pt;color:#444}
.pr-sheet h1{font-family:var(--serif);font-size:19pt;margin:16px 0 2px}
.pr-sub{margin:0 0 14px;font-size:10pt;color:#444}
.pr-target{font-size:10pt;margin:10px 0 0}
.pr-note{font-size:9pt;color:#444;margin:14px 0 0;padding:8px 10px;background:#F7F2F4;border-inline-start:2.5pt solid #5A1F3D;text-align:justify;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.pr-sum{border-collapse:collapse;width:100%;margin-bottom:16px}
.pr-sum th,.pr-sum td{border:0.5pt solid #bbb;padding:6px 9px;text-align:left;font-size:10pt}
.pr-sum th{background:#F3EDEF;font-weight:600;width:18%}
.pr-rows{border-collapse:collapse;width:100%;margin-top:14px}
.pr-rows th,.pr-rows td{border:0.5pt solid #bbb;padding:5px 8px;font-size:9.5pt;text-align:left}
.pr-rows thead th{background:#5A1F3D;color:#fff;font-size:8.5pt;letter-spacing:.04em;text-transform:uppercase}
.pr-rows td.r,.pr-rows th.r{text-align:right;font-variant-numeric:tabular-nums}
.pr-rows tbody tr:nth-child(even){background:#FAF7F8}
.pr-rows thead{display:table-header-group}
.pr-rows tr{break-inside:avoid}
.pr-foot{margin-top:18px;padding-top:7px;border-top:0.5pt solid #bbb;font-size:8.5pt;color:#555;text-align:center}

/* login refinements */
.authfield{place-items:start center}
.authfield .rose{width:min(165vw,900px);margin-top:-26%;opacity:1}
.authfield{opacity:.1}
.authmark i{background:#5A1F3D;color:#DCAE5C;border:1px solid rgba(220,174,92,.8)}
.authlang .langsel{font-size:12.5px;padding:6px 8px;max-width:112px}
.pr-sum{table-layout:fixed}
.pr-sum th{width:17%}
.pr-sum td{width:33%}
.pr-rows{table-layout:auto}
.pr-sum th{width:23%;font-size:8.5pt;letter-spacing:.03em;text-transform:uppercase;vertical-align:middle}
.pr-sum td{width:27%;font-size:10.5pt}

/* ======================================================================
   Legibility pass — larger type, stronger contrast. Tuned for a phone
   held at arm's length in daylight, and for older eyes.
   ====================================================================== */
:root{ --muted:#5C4551; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){ --muted:#C2A9B6; }}
:root[data-theme="dark"]{ --muted:#C2A9B6; }

body{font-size:16.5px;line-height:1.55}

/* labels and small print — the worst offenders before */
label{font-size:13px;margin-bottom:6px}
.hint{font-size:14.5px}
.sechead p{font-size:14.5px}
.brandtext span{font-size:12px}
.authmark span{font-size:12px}
.who{font-size:13.5px}

/* numbers and headings */
.tile .k{font-size:12px;letter-spacing:.05em}
.tile .v{font-size:26px}
.tile{padding:15px 16px}
h2.sec{font-size:20px}
.empty h2{font-size:25px}
.empty p{font-size:16px}

/* tables */
table{font-size:15.5px}
th{font-size:12px;letter-spacing:.04em}
th,td{padding:11px 13px}
.chip{font-size:12.5px;padding:3px 10px}

/* controls — bigger targets, no zoom-on-focus */
select,input,textarea{font-size:16px;padding:12px 12px}
button{font-size:16px;padding:12px 17px}
button.tiny{font-size:14px;padding:8px 12px}
.searchbox{font-size:16px;padding:12px 15px}
.langsel{font-size:14px;padding:8px 10px;max-width:150px}
.authlang .langsel{font-size:13.5px;padding:7px 9px;max-width:120px}
.acctrow input,.acctrow select{font-size:15.5px;padding:9px 10px}

/* messages */
.msgbox{font-size:14px;line-height:1.6}
.err,.okmsg{font-size:14.5px;padding:11px 13px}
.meterrow{font-size:14.5px}
.switch{font-size:15px}
.authmark span{font-size:11.5px;letter-spacing:.035em;white-space:nowrap}
.authmark{gap:12px}
.authlang .langsel{max-width:108px}

/* phone header: drop what the tagline and status word repeat elsewhere,
   so the name, event and Sign out all sit on one line */
@media (max-width:560px){
  .brandtext span{display:none}
  #netTxt{display:none}
  .who{gap:8px}
  .who em{max-width:92px}
  .topbar{gap:9px}
  button.tiny{padding:8px 11px;font-size:13.5px}
  .langsel{max-width:118px;font-size:13.5px}
}

/* ---------- help panel ---------- */
.helpbar{display:flex;justify-content:center;padding:26px 0 4px}
.helpbar button{color:var(--muted);border-color:transparent;background:transparent}
.helpbar button:hover{color:var(--plum);border-color:var(--line)}
.helph{font-family:var(--serif);font-size:16px;margin:16px 0 6px}
.helplist{margin:0;padding-inline-start:20px;font-size:15.5px;line-height:1.55}
.helplist li{margin-bottom:8px}
.helpbtns{margin-top:10px;gap:8px}
.hbtn{flex:1;min-width:92px;text-align:center;text-decoration:none;
  border:1px solid var(--line);border-radius:9px;padding:12px 10px;
  color:var(--plum);font-weight:600;font-size:15px;background:var(--surface)}
.hbtn:hover{border-color:var(--plum)}
.helpby{margin-top:14px;text-align:center;font-size:13.5px}

/* help button — a headset, so it is found by someone who is stuck */
.helpbar{padding:28px 0 10px}
.helpbtn{display:inline-flex;align-items:center;gap:9px;
  border:1px solid var(--line)!important;background:var(--surface)!important;
  color:var(--plum)!important;border-radius:999px;padding:11px 20px!important;
  font-size:15px!important;font-weight:600}
.helpbtn:hover{border-color:var(--plum)!important;background:var(--plum-soft)!important}
.hicon{width:19px;height:19px;flex:none}
.helph .hicon{width:17px;height:17px}

/* ---------- bringing in a list, sharing it out ---------- */
.filepick { cursor: pointer; }
.hint.bad { color: #9B2C3E; }

.imptiles { margin: 14px 0 10px; }
.imppre { max-height: 236px; overflow: auto; }
.imppre table { font-size: 15px; }
.impbad { margin: 10px 0 2px; }
.impbad summary { cursor: pointer; font-size: 14.5px; color: var(--muted); padding: 5px 0; }
.impbad .helplist { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); }
.impnote { margin: 12px 0 0; padding: 10px 12px; background: #FBF4E8;
           border: 1px solid #ECD9B4; border-radius: 10px; color: #6B4B14; }

.sharerow { margin-top: 14px; align-items: center; }
.linkbox { margin: 12px 0 4px; padding: 11px 13px; background: #F7F1F4;
           border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.linkbox code { font-family: "IBM Plex Mono", ui-monospace, monospace;
                font-size: 14px; white-space: nowrap; color: var(--plum); }

/* The chat button sits above everything and stays out of the way of a thumb
   reaching for the tab bar. */
.chatfab {
  position: fixed; right: 16px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px; border-radius: 999px;
  background: var(--plum); color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 6px 18px rgba(90, 31, 61, .28);
  border: 1px solid rgba(255, 255, 255, .14);
}
.chatfab:hover { background: #6B2749; }
.chatfab .hicon { width: 21px; height: 21px; flex: 0 0 21px; }
.chatfab span { white-space: nowrap; }
@media (max-width: 560px) {
  .chatfab { padding: 12px; right: 13px; bottom: 14px; }
  .chatfab span { display: none; }
  .chatfab .hicon { width: 23px; height: 23px; flex: 0 0 23px; }
}
@media print { .chatfab, .helpbar { display: none !important; } }

/* ---------- correcting what the camera read ---------- */
.impwarn { margin: 12px 0 10px; padding: 10px 12px; background: #FDF2F4;
           border: 1px solid #F0CDD5; border-radius: 10px; color: #8C2437; }
.impedit { max-height: 320px; overflow: auto; }
.impedit table { font-size: 15px; }
.impedit th, .impedit td { padding: 5px 4px; }
.impedit input {
  width: 100%; min-width: 72px; padding: 7px 8px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
}
.impedit input:focus { outline: 2px solid var(--plum); outline-offset: -1px; border-color: var(--plum); }
.impedit input.r { text-align: right; font-variant-numeric: tabular-nums; }
.impedit .d-name { min-width: 120px; }
.impedit tr.rowbad input { border-color: #E0A3AF; background: #FDF4F6; }
.impedit .rowdel {
  padding: 5px 9px; line-height: 1; font-size: 17px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.impedit .rowdel:hover { color: #8C2437; border-color: #E0A3AF; }
.filepick .hicon { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }

/* The terms line under the sign-in card: present, quiet, not in the way. */
.authterms { margin: 14px 0 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--muted); }
.authterms a { color: var(--plum); text-decoration: underline; text-underline-offset: 2px; }

/* A figure must never break away from itself. The tile shrinks the type to
   fit rather than wrapping a number onto a second line, which on a phone
   turned "12,450,000" into something nobody could read at a glance. */
.tile .v {
  font-size: clamp(16px, 4.6vw, 23px);
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  letter-spacing: -.015em;
}
@media (min-width: 701px) { .tile .v { font-size: 23px; } }

/* A payment account is three or four facts, not a cramped single line. The
   bank field only exists when a bank is chosen, so the row grows then. */
.acctrow {
  grid-template-columns: 1.1fr 1fr auto;
  padding: 9px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; gap: 7px;
}
.acctrow .a-bank, .acctrow .a-name { grid-column: 1 / -1; }
.acctrow .a-bank[hidden] { display: none; }

/* ---- njia ya kutuma ujumbe, na mara ngapi ---- */
.chan {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 8px; cursor: pointer;
  font-size: 15px; color: var(--ink);
}
.chan:last-child { margin-bottom: 0; }

/* Every control in this app is a full width box with its own border, which is
   right for a text field and wrong for a radio: it grew to the whole row and
   pushed its own label outside the card. Put back to its natural size. */
.chan input[type="radio"] {
  width: auto; min-width: 0; flex: none;
  margin: 3px 0 0; padding: 0;
  border: 0; border-radius: 0; background: none;
  accent-color: var(--plum);
}

/* And the text takes what is left, and is allowed to wrap inside it. */
.chan span { flex: 1 1 auto; min-width: 0; }
.chan b { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.chan small {
  display: block; margin-top: 3px;
  font-size: 13.5px; color: var(--muted); line-height: 1.45;
}
.chan.on { border-color: var(--plum); background: var(--plum-soft); }

/* The line that explains a choice sits between a small field label and the
   choices themselves, so it reads at their size, not at the body's. */
.pickhint { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin: 0 0 8px; }

/* ---- kufuli la tukio ---- */
.lockbox { border-left: 4px solid var(--warn); }
.lockbox .sec { color: var(--warn); }
.hint.warn { color: var(--warn); font-weight: 500; }

/* ---- dawati la Cards Tz ---- */
.admrow {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.admrow:last-child { border-bottom: 0; }
.admname { flex: 1 1 150px; min-width: 0; }
.admname b { display: block; }
.admname small { color: var(--muted); }
.admacts { display: flex; gap: 6px; align-items: center; }
.admacts .a-cr, .admacts .a-pr { width: 84px; padding: 6px 8px; }
.admacts .a-pr { width: 70px; }

/* ---- kuingia kwa Google ---- */
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 14px; font-weight: 500;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.gbtn svg { flex: none; }
.gbtn:hover { background: var(--sunk); }

/* A line with the word "au" sitting in it, so the two roads in read as
   alternatives rather than steps. */
.orline {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 12px; color: var(--muted); font-size: 13px;
}
.orline::before, .orline::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--line);
}

/* a skipped row is a person; it gets a cell to be mended in, not a shrug */
.impfix { margin: 10px 0 2px; }
.impfix table { font-size: 15px; }
.impfix td { padding: 4px 6px; }
.impfix input { padding: 6px 8px; font-size: 14.5px; min-width: 92px; }
.impfix input.bad { border-color: #9B2C3E; background: color-mix(in srgb, #9B2C3E 7%, var(--surface)); }
.impstamp { opacity: .5; font-size: 12.5px; margin-top: 8px; }

/* the register row is a thing you can put right, so it says so */
tr.pickrow { cursor: pointer; }
tr.pickrow:hover td { background: var(--sunk); }

/* the one button that takes something away says so before it is pressed */
button.danger{color:var(--late);border-color:var(--late)}
button.danger:hover{background:var(--late);color:#fff;border-color:var(--late)}
