/* Karigar Book - a mobile app.
   Violet (bar, buttons) + three colours that each mean ONE thing:
   GREEN = done / received / clear   AMBER = running / pending   RED = money owed / late
   (the variable is still called --blue; change it to change the brand colour) */
:root{
  --blue:#a21caf; --blue-d:#701a75; --blue-bg:#fae8ff;
  --green:#116932; --green-bg:#dcfce7;
  --amber:#92400e; --amber-bg:#fef3c7;
  --red:#991b1b; --red-bg:#fee2e2;
  --text:#1f1024; --muted:#4a3350; --line:#f0e3f2; --bg:#fbf6fc; --white:#fff;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{font-size:16px}
body{margin:0;background:var(--bg);color:var(--text);padding:56px 0 66px;
  font-family:"Noto Sans","Nirmala UI","Segoe UI",Roboto,Arial,sans-serif;line-height:1.4;-webkit-text-size-adjust:100%}
a{color:var(--blue);text-decoration:none}
svg{display:block}
.muted{color:var(--muted);font-size:.92rem}
.red{color:var(--red)} .green{color:var(--green)} .amber{color:var(--amber)} .blue{color:var(--blue)}
.bold{font-weight:700}
.right{text-align:right}
.nowrap{white-space:nowrap}
[hidden]{display:none!important}

/* ================= app bar (top) ================= */
.appbar{position:fixed;top:0;left:0;right:0;height:56px;background:var(--blue);color:#fff;z-index:40}
.appbar .in{max-width:720px;margin:0 auto;height:100%;display:flex;align-items:center;gap:6px;padding:0 6px 0 4px}
.appbar .ab{flex:none;width:44px;height:44px;border:0;background:none;color:#fff;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;padding:0}
.appbar .ab:active{background:rgba(255,255,255,.18)}
.appbar .ab svg{width:26px;height:26px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.appbar .ab.dots svg{fill:#fff;stroke:none}
.appbar .title{flex:1;min-width:0;font-size:1.2rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:8px}
.appbar .title.nb{padding-left:14px}
.appbar a.title{color:#fff}
.appbar .langs{display:flex;gap:6px;margin-right:8px}
.appbar .langs a{border:1px solid rgba(255,255,255,.7);border-radius:8px;padding:4px 10px;font-size:.85rem;color:#fff}
.appbar .langs a.on{background:#fff;color:var(--blue);font-weight:800;border-color:#fff}
details.menu{position:relative}
details.menu summary{list-style:none;cursor:pointer}
details.menu summary::-webkit-details-marker{display:none}
details.menu .pop{position:absolute;right:0;top:50px;background:var(--white);color:var(--text);border-radius:12px;min-width:220px;z-index:60;box-shadow:0 10px 30px rgba(0,0,0,.22);overflow:hidden}
details.menu .pop a,details.menu .pop button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:14px 16px;font-size:1rem;font-weight:600;color:var(--text);background:var(--white);border:0;border-bottom:1px solid var(--line);font-family:inherit;cursor:pointer}
details.menu .pop > :last-child{border-bottom:0}
details.menu .pop svg{width:22px;height:22px;stroke:var(--muted);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
details.menu .pop a.on{color:var(--blue);background:var(--blue-bg)}
details.menu .pop .sep{padding:10px 16px 4px;font-size:.8rem;font-weight:700;color:var(--muted);text-transform:uppercase;border-bottom:0}
details.menu .pop form{margin:0}

.page{max-width:720px;margin:0 auto;padding:12px}

/* ================= tab bar (bottom) ================= */
.tabbar{position:fixed;left:0;right:0;bottom:0;background:var(--white);border-top:1px solid var(--line);z-index:40;padding-bottom:env(safe-area-inset-bottom)}
.tabbar .in{max-width:720px;margin:0 auto;display:flex}
.tabbar a{flex:1;text-align:center;padding:7px 2px 6px;color:var(--muted);font-size:.8rem;font-weight:600}
.tabbar a svg{width:26px;height:26px;margin:0 auto 1px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.on{color:var(--blue);font-weight:800}
.tabbar a.on svg{stroke-width:2.3}

/* floating "+" button on the lists */
.fab{position:fixed;right:max(16px,calc(50% - 344px));bottom:78px;width:58px;height:58px;border-radius:50%;background:var(--blue);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px rgba(162,28,175,.45);z-index:35}
.fab svg{width:28px;height:28px;stroke:#fff;fill:none;stroke-width:2.4;stroke-linecap:round}
.fab:active{background:var(--blue-d)}

/* ================= summary tiles ================= */
.sums{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.sum{display:block;background:var(--white);border-radius:14px;padding:12px 14px;color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.06)}
.sum .l{color:var(--muted);font-size:.88rem;font-weight:600}
.sum .v{font-size:1.45rem;font-weight:800;line-height:1.2;margin-top:2px}
.sum.red .v{color:var(--red)} .sum.amber .v{color:var(--amber)} .sum.blue .v{color:var(--blue)} .sum.green .v{color:var(--green)}
.sum.red{box-shadow:inset 4px 0 0 var(--red),0 1px 2px rgba(0,0,0,.06)} .sum.amber{box-shadow:inset 4px 0 0 var(--amber),0 1px 2px rgba(0,0,0,.06)}
.sum.blue{box-shadow:inset 4px 0 0 var(--blue),0 1px 2px rgba(0,0,0,.06)} .sum.green{box-shadow:inset 4px 0 0 var(--green),0 1px 2px rgba(0,0,0,.06)}
.sums.three{grid-template-columns:repeat(3,1fr)}
.sums.three .sum .v{font-size:1.2rem}

/* ================= the jobs: icon tiles ================= */
.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:14px}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--white);border-radius:14px;padding:16px 6px 12px;color:var(--text);text-align:center;font-weight:700;font-size:.95rem;line-height:1.2;min-height:112px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.tile:active{background:var(--blue-bg)}
.tile .ic{width:50px;height:50px;border-radius:50%;background:var(--blue);display:flex;align-items:center;justify-content:center}
.tile .ic svg{width:27px;height:27px;stroke:#fff;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sec{font-size:.85rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin:16px 4px 8px}

/* ================= list rows ================= */
.group{background:var(--white);border-radius:14px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);color:var(--text)}
.row:last-child{border-bottom:0}
a.row:active{background:var(--blue-bg)}
.row .av{flex:none;width:42px;height:42px;border-radius:50%;background:var(--blue-bg);color:var(--blue);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.05rem}
.row .av svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.row .av.green{background:var(--green-bg);color:var(--green)} .row .av.amber{background:var(--amber-bg);color:var(--amber)}
.row .av.red{background:var(--red-bg);color:var(--red)} .row .av.grey{background:#f3f4f6;color:var(--muted)}
.row .no{flex:none;width:22px;text-align:center;color:#6b5270;font-size:.85rem;font-weight:700}
.row .tx{flex:1;min-width:0}
.row .t{font-weight:700;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row .s{color:var(--muted);font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row .val{flex:none;text-align:right;font-weight:800;line-height:1.25}
.row .val small{display:block;font-size:.82rem;font-weight:700}
.row .go{flex:none;color:#6b5270}
.row .go svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pill{display:inline-block;border-radius:20px;padding:2px 10px;font-size:.8rem;font-weight:700;white-space:nowrap;vertical-align:middle}
.pill.green{background:var(--green-bg);color:var(--green)} .pill.amber{background:var(--amber-bg);color:var(--amber)}
.pill.red{background:var(--red-bg);color:var(--red)} .pill.blue{background:var(--blue-bg);color:var(--blue)}
.empty{padding:36px 12px;text-align:center;color:var(--muted)}
.empty svg{width:44px;height:44px;margin:0 auto 6px;stroke:#d1d5db;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* progress bar */
.progress{height:8px;background:#e5e7eb;border-radius:8px;overflow:hidden}
.progress i{display:block;height:100%;background:var(--green);border-radius:8px}
.progress.amber i{background:var(--amber)}

/* ================= detail header ================= */
.hero{background:var(--white);border-radius:14px;padding:14px;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.hero .top{display:flex;align-items:center;gap:12px}
.hero .av{width:54px;height:54px;font-size:1.4rem;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;flex:none}
.hero .av.sq{border-radius:14px;background:var(--blue-bg);color:var(--blue)}
.hero .av.sq svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hero .nm{font-size:1.2rem;font-weight:800;line-height:1.2}
.hero .call{display:inline-flex;align-items:center;gap:6px;font-size:.9rem;font-weight:600}
.hero .call svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2}
.hero .progress{margin-top:12px}
.hero .cap{display:flex;justify-content:space-between;color:var(--muted);font-size:.85rem;margin-top:4px}

/* ================= buttons ================= */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:50px;border:0;border-radius:12px;background:var(--blue);color:#fff;font-size:1rem;font-weight:700;font-family:inherit;padding:10px 14px;text-align:center;cursor:pointer}
.btn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.btn:active{background:var(--blue-d)}
.btn.alt{background:var(--blue-bg);color:var(--blue)}
.btn.danger{background:var(--red-bg);color:var(--red)}
.btn.sm{display:inline-flex;width:auto;min-height:40px;font-size:.9rem;padding:6px 14px}
.btns{display:flex;gap:10px;margin:12px 0}
.btns .btn{flex:1;min-width:0}
.actbar{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.actbar a{display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--white);border-radius:14px;padding:12px 4px 10px;color:var(--blue);font-weight:700;font-size:.9rem;text-align:center;line-height:1.15;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.actbar a:active{background:var(--blue-bg)}
.actbar a svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.actbar.two{grid-template-columns:1fr 1fr}
.link{background:none;border:0;color:var(--blue);font:inherit;font-weight:600;padding:0;cursor:pointer}
.link.red{color:var(--red)}
form.inline{display:inline;margin:0}
.footlinks{display:flex;justify-content:center;gap:22px;margin:14px 0 8px}
.footlinks a,.footlinks button{font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:6px}
.footlinks svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ================= forms ================= */
.form{background:var(--white);border-radius:14px;padding:4px 16px 16px;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
label{display:block;font-weight:700;margin:14px 0 5px;font-size:.95rem;color:#1f1024;font-weight:700}
input,select,textarea{width:100%;min-height:50px;border:1.5px solid #d1d5db;border-radius:12px;padding:9px 13px;font-size:1rem;font-family:inherit;background:var(--white);color:var(--text)}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 3px rgba(162,28,175,.18)}
input::placeholder{color:#86708a}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.row2 > div{min-width:0}
.err{color:var(--red);font-weight:700;margin-top:4px;font-size:.88rem}
.hint{background:var(--amber-bg);color:#78350f;border-radius:12px;padding:12px 14px;margin-bottom:12px;font-weight:600}
.flash{background:var(--green-bg);color:#14532d;border-radius:12px;padding:12px 14px;margin-bottom:12px;font-weight:700}
.flash.bad{background:var(--red-bg);color:var(--red)}
.total{background:var(--green-bg);border-radius:12px;padding:12px;margin-top:14px;text-align:center;font-weight:700}
.total b{font-size:1.4rem;color:var(--green)}
.choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.choice label{margin:0;cursor:pointer}
.choice input{position:absolute;opacity:0;pointer-events:none}
.choice span{display:flex;align-items:center;justify-content:center;min-height:50px;border:1.5px solid #d1d5db;border-radius:12px;font-weight:700;background:var(--white);text-align:center;padding:6px}
.choice input:checked + span{border-color:var(--blue);background:var(--blue-bg);color:var(--blue)}
details.more{margin-top:14px;border:1.5px dashed #d1d5db;border-radius:12px}
details.more > summary{list-style:none;cursor:pointer;padding:13px 14px;font-weight:700;color:var(--blue);display:flex;align-items:center;gap:8px}
details.more > summary::-webkit-details-marker{display:none}
details.more[open]{border-style:solid}
details.more .inner{padding:0 14px 14px}
.formcol{max-width:560px;margin:0 auto}

/* ================= search, filters ================= */
.searchbar{position:relative;margin-bottom:10px}
.searchbar input[type=search]{padding-left:44px;border-radius:24px;border:0;background:var(--white);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.searchbar > svg{position:absolute;left:14px;top:14px;width:22px;height:22px;stroke:#6b5270;fill:none;stroke-width:2;stroke-linecap:round}
.searchbar button{position:absolute;right:0;top:0;height:50px;width:50px;opacity:0;cursor:pointer}
.chips{display:flex;gap:8px;overflow-x:auto;margin:0 -12px 10px;padding:2px 12px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border-radius:20px;padding:9px 16px;background:var(--white);color:var(--text);font-weight:600;white-space:nowrap;font-size:.95rem;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.chip.on{background:var(--blue);color:#fff}
.filterbar{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.filterbar .chips{flex:1;margin:0;padding:2px 0}
details.filters{margin-bottom:12px}
details.filters > summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;background:var(--white);border-radius:20px;padding:8px 16px;font-weight:700;font-size:.95rem;color:var(--blue);box-shadow:0 1px 2px rgba(0,0,0,.08)}
details.filters > summary::-webkit-details-marker{display:none}
details.filters > summary svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linejoin:round}
details.filters > summary .dot{width:8px;height:8px;border-radius:50%;background:var(--red)}
details.filters .panel{background:var(--white);border-radius:14px;padding:4px 14px 14px;margin-top:8px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
details.filters .panel label{margin:12px 0 4px;font-size:.88rem;color:var(--muted)}
details.filters .panel input,details.filters .panel select{min-height:46px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 8px;color:var(--muted);font-size:.95rem}
.toolbar .ic{display:flex;gap:6px}
.toolbar .ic a{width:38px;height:38px;border-radius:50%;background:var(--white);display:flex;align-items:center;justify-content:center;color:var(--blue);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.toolbar .ic svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ================= pager ================= */
.pager{display:flex;align-items:center;justify-content:center;gap:18px;margin:6px 0 14px}
.pager a,.pager span.dis{width:44px;height:44px;border-radius:50%;background:var(--white);display:flex;align-items:center;justify-content:center;color:var(--blue);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.pager span.dis{color:#d1d5db;box-shadow:none;background:transparent}
.pager svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pager .pg{color:var(--muted);font-weight:700}

/* ================= WIP cards ================= */
.card{background:var(--white);border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.card .head{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);color:var(--text)}
.card .head .av{flex:none;width:42px;height:42px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.card .head .nm{font-weight:800;line-height:1.2}
.card .head .big{margin-left:auto;text-align:right;font-weight:800;font-size:1.4rem;line-height:1.1;color:var(--amber)}
.card .head .big small{display:block;font-size:.7rem;color:var(--muted);font-weight:600}
.card .lotline{padding:11px 14px;border-bottom:1px solid var(--line)}
.card .lotline:last-child{border-bottom:0}
.card .lotline .r1{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.card .lotline .lt{font-weight:700}
.card .lotline .pc{font-weight:800}
.card .lotline .r2{display:flex;justify-content:space-between;align-items:center;margin-top:6px;gap:10px;color:var(--muted);font-size:.8rem}
.card .lotline .progress{margin-top:6px}
.card .lotline.sub{background:#f9fafb}

/* ================= saved page, login ================= */
.saved{max-width:420px;margin:20px auto;text-align:center}
.saved .tick{width:78px;height:78px;border-radius:50%;background:var(--green);display:flex;align-items:center;justify-content:center;margin:6px auto 12px}
.saved .tick svg{width:42px;height:42px;stroke:#fff;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.saved .said{background:var(--white);border-radius:14px;padding:16px;font-weight:700;margin-bottom:18px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.saved .btn{margin-bottom:10px}
.login{max-width:420px;margin:30px auto 0;text-align:center}
.login .logo{width:76px;height:76px;border-radius:20px;background:var(--blue);margin:0 auto 10px;display:flex;align-items:center;justify-content:center}
.login .logo svg{width:42px;height:42px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.login h1{font-size:1.5rem;margin:0 0 16px}
.login .form{text-align:left}

/* ================= Select2 ================= */
.select2-container{font-family:inherit}
.select2-container--default .select2-selection--single{height:50px;border:1.5px solid #d1d5db;border-radius:12px;background:var(--white);display:flex;align-items:center}
.select2-container--default .select2-selection--single .select2-selection__rendered{font-size:1rem;padding-left:13px;padding-right:34px;color:var(--text);width:100%}
.select2-container--default .select2-selection--single .select2-selection__arrow{height:48px;right:6px}
.select2-container--default.select2-container--focus .select2-selection--single,.select2-container--open .select2-selection--single{border-color:var(--blue)}
.select2-dropdown{border:1.5px solid var(--blue);border-radius:12px;font-size:1rem;overflow:hidden}
.select2-search--dropdown .select2-search__field{min-height:44px;font-size:1rem;border:1.5px solid #d1d5db;border-radius:8px}
.select2-results__option{padding:12px}
.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--blue)}
.select2-container--open{z-index:1000}
details.filters .select2-container--default .select2-selection--single{height:46px}
details.filters .select2-container--default .select2-selection--single .select2-selection__arrow{height:44px}

@media (min-width:900px){
  body{background:#e5e7eb}
  .page{background:var(--bg);min-height:calc(100vh - 56px - 66px)}
  .appbar .in,.tabbar .in{max-width:720px}
}
@media print{
  .appbar,.tabbar,.fab,.noprint,.pager,.chips,.searchbar,.filterbar,details.filters,.actbar,.toolbar .ic{display:none!important}
  body{padding:0;background:#fff}
  .group,.card,.sum{box-shadow:none;border:1px solid #bbb}
}

/* chevrons point right; small icons inside cards */
.row .go svg{transform:scaleX(-1)}
.card .head .av svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.card .lotline .pc svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;display:inline-block}
.card .head{align-items:center}
.card .head > span:nth-child(2){flex:1;min-width:0}
.card .head .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card .lotline a.lt{color:var(--text)}
.row .val small .muted{font-size:.74rem}
@media (min-width:900px){ .page{box-shadow:0 0 0 1px #d1d5db} }/* history rows: let the text wrap so nothing (like Delete) is cut off */
.group.wrap .row{align-items:flex-start}
.group.wrap .row .t,.group.wrap .row .s{white-space:normal;overflow:visible}
.group.wrap .row .val{padding-top:2px}

/* ---- icons inside "More details" ---- */
details.more > summary svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;flex:none}

/* ================= Excel-style tables (reports) ================= */
.scroll{background:var(--white);border-radius:10px;overflow-x:auto;margin-bottom:12px;-webkit-overflow-scrolling:touch;box-shadow:0 1px 2px rgba(0,0,0,.08)}
table.tbl{width:100%;border-collapse:collapse;font-size:.95rem}
.tbl th,.tbl td{padding:10px 9px;border:1px solid #ecd9ef;text-align:left;vertical-align:middle}
.tbl th{background:var(--blue);color:#fff;font-size:.82rem;font-weight:700;white-space:nowrap;border-color:#86198f}
.tbl td.n,.tbl th.n{text-align:right;font-variant-numeric:tabular-nums}
.tbl td.sr,.tbl th.sr{width:34px;text-align:center;padding-left:2px;padding-right:2px;color:var(--muted)}
.tbl th.sr{color:#fff}
.tbl tbody tr:nth-child(even) td{background:#fdf4ff}
.tbl tr.grp td{background:#f5d0fe!important;font-weight:700}
.tbl tr.sub td:nth-child(2){padding-left:18px}
.tbl tr.sub td{font-size:.92rem}
.tbl tfoot td{background:#f0abfc;font-weight:800}
.tbl small{display:block;color:var(--muted);font-size:.8rem;font-weight:500;line-height:1.25}
.tbl a{color:var(--text);font-weight:700}
.tbl .pos{color:var(--green);font-weight:700}
.tbl .neg{color:var(--red);font-weight:700}
.tbl .amb{color:var(--amber);font-weight:700}
.tbl .nw{white-space:nowrap}
@media (max-width:600px){ .tbl th,.tbl td{padding:9px 7px} .tbl{font-size:.92rem} .tbl small{white-space:nowrap} }

@media (max-width:600px){ .tbl.wr small{white-space:normal} }
@media (max-width:600px){ .tbl.wr th,.tbl.wr td{padding:9px 5px} }
.tbl.full{min-width:640px}
.actbar.four{grid-template-columns:repeat(2,1fr)}
.sums.three .sum .v{font-size:1.1rem;overflow-wrap:anywhere}

/* ================= v16: brand bar, page heading, buttons, print ================= */
.appbar{background:linear-gradient(135deg,#a21caf,#701a75)}
.appbar .title{font-size:1.25rem;letter-spacing:.2px;display:flex;align-items:center;gap:10px}
.appbar .title .logo{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;flex:none}
.appbar .title .logo svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pagetitle{font-size:1.45rem;font-weight:800;margin:4px 2px 12px;color:var(--text);line-height:1.2}
.printhead{display:none}
.toolbar .ic{gap:8px}
.toolbar .ic a,.toolbar .ic button{height:40px;width:auto;padding:0 14px;border-radius:20px;background:var(--white);display:flex;align-items:center;gap:6px;color:var(--blue);font-weight:700;font-size:.9rem;border:0;font-family:inherit;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1)}
.toolbar .ic a.xl{background:#15803d;color:#fff}
.toolbar .ic button.pdf,.toolbar .ic a.pdf{background:#b91c1c;color:#fff}
.toolbar .ic svg{width:18px;height:18px}
.sums.four{grid-template-columns:repeat(2,1fr)}
@media print{
  @page{margin:10mm}
  .appbar,.tabbar,.fab,.noprint,.pager,.chips,.searchbar,.filterbar,details.filters,.actbar,.toolbar .ic,.pagetitle{display:none!important}
  .printhead{display:block;font-size:1.1rem;margin-bottom:10px;padding-bottom:6px;border-bottom:2px solid #a21caf}
  body{padding:0!important;background:#fff}
  .page{max-width:none;padding:0;box-shadow:none}
  .scroll{overflow:visible;box-shadow:none}
  table.tbl{min-width:0!important;font-size:.75rem}
  .tbl th{background:#a21caf!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .tbl th,.tbl td{padding:4px 5px!important}
  .tbl tr.grp td,.tbl tfoot td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .sums .sum{box-shadow:none;border:1px solid #bbb}
}.swal2-popup{font-family:inherit;border-radius:18px}
.swal2-title{font-size:1.2rem!important;line-height:1.35;color:var(--text)!important;font-weight:700!important}
.swal2-html-container{font-size:1rem!important;color:var(--text)!important}
.swal2-styled{border-radius:12px!important;font-weight:700!important;min-height:44px}

.hint.due{background:var(--red-bg);color:var(--red)}
.hint.adv{background:var(--amber-bg);color:var(--amber)}
.hint.clear{background:var(--green-bg);color:var(--green)}
.hint{font-size:1.05rem}

/* ================= v20: plum footer, search button, calmer tiles and tables ================= */
.page{padding-bottom:90px}
.tabbar{background:linear-gradient(180deg,#8a1a96,#701a75);border-top:0;box-shadow:0 -4px 16px rgba(112,26,117,.35)}
.tabbar a{color:rgba(255,255,255,.72);font-weight:600}
.tabbar a svg{stroke:currentColor}
.tabbar a.on{color:#fff;font-weight:800}
.tabbar a.on svg{stroke-width:2.3}
.tabbar a.on::before{content:"";display:block;width:46px;height:3px;border-radius:3px;background:#f0abfc;margin:-7px auto 4px}
.fab{bottom:84px;background:#f59e0b;box-shadow:0 6px 16px rgba(180,83,9,.45)}
.fab svg{stroke:#3b1a00}
.fab:active{background:#d97706}

.searchbar{display:flex;gap:8px;align-items:stretch;margin-bottom:10px;position:static}
.searchbar .box{position:relative;flex:1;min-width:0}
.searchbar .box > svg{position:absolute;left:14px;top:14px;width:22px;height:22px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round}
.searchbar .box input[type=search]{padding-left:44px;border-radius:14px;border:1.5px solid #e4cfe8;background:var(--white);box-shadow:none;height:50px}
.searchbar button.go{position:static;opacity:1;width:auto;height:50px;padding:0 18px;border:0;border-radius:14px;background:var(--blue);color:#fff;font-weight:700;font-size:1rem;font-family:inherit;cursor:pointer}
.searchbar button.go:active{background:var(--blue-d)}

.sums.three{gap:8px}
.sums.three .sum{padding:10px 10px 11px}
.sums.three .sum .l{font-size:.8rem;line-height:1.2;min-height:2.4em;display:flex;align-items:flex-start}
.sums.three .sum .v{font-size:1.15rem;margin-top:4px}
.sums .sum{border-radius:14px}
.btns .btn.alt{background:#fae8ff;color:var(--blue-d)}

.tbl.full{min-width:480px}
.scroll{border-radius:14px;box-shadow:0 1px 3px rgba(112,26,117,.12)}
.tbl th{letter-spacing:.2px}
.tbl tbody tr:hover td{background:#fdf0ff}
.tbl tbody tr[data-href]{cursor:pointer}
details.filters > summary{border:1.5px solid #e4cfe8}
.chip{border:1.5px solid #ecd9ef;box-shadow:none}
.chip.on{border-color:var(--blue)}
.toolbar{margin-bottom:10px}
.pagetitle{color:var(--blue-d)}