:root {
  --brand-blue: #0087b8;
  --brand-green: #26b170;
  --ink: #083c55;
  --ink-2: #005f85;
  --paper: #f7fafb;
  --panel: #e5eff4;
  --line: #d4e2e8;
  --text: #1b2a31;
  --muted: #5a6d75;
  --posted: #1f8a55;
  --posted-bg: #e2f5ea;
  --hold: #9a5f0c;
  --hold-bg: #fbf0dc;
  --blocked: #a3362f;
  --blocked-bg: #f8e3e1;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: "Segoe UI", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}
a { color: var(--ink-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 3px solid #7fb3a8; outline-offset: 2px;
}
h1 { font-size: 1.65rem; margin: 0 0 1rem; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; color: var(--ink); font-weight: 650; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: 0 0 236px; background: #fff; color: var(--text); border-right: 1px solid var(--line);
  padding: 1rem .8rem; display: flex; flex-direction: column; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: .1rem .3rem .8rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand img { width: 48px; height: 48px; flex: 0 0 48px; }
.brand strong { display: block; color: var(--brand-blue); font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.brand small { display: block; color: var(--brand-green); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: var(--text); text-decoration: none; padding: .42rem .65rem; border-radius: var(--radius); border-left: 3px solid transparent; }
.side nav a:hover { background: var(--panel); }
.side nav a.on { background: var(--panel); color: var(--ink); font-weight: 600; border-left-color: var(--brand-green); border-radius: 0 var(--radius) var(--radius) 0; }
.who { margin-top: auto; font-size: .9rem; padding: .7rem .4rem 0; border-top: 1px solid var(--line); }
.who a { color: var(--ink-2); }
.main { flex: 1; padding: 1.6rem 2rem 3rem; max-width: 1200px; }
.main.narrow, .narrow { max-width: 460px; }
.muted { color: var(--muted); font-size: .92rem; }
.note { padding: .7rem .9rem; border-radius: var(--radius); margin: 0 0 1rem; border-left: 4px solid; }
.note.ok { background: var(--posted-bg); border-color: var(--posted); }
.note.hold { background: var(--hold-bg); border-color: var(--hold); }
.note.bad { background: var(--blocked-bg); border-color: var(--blocked); }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.badge.posted { background: var(--posted-bg); color: var(--posted); }
.badge.hold { background: var(--hold-bg); color: var(--hold); }
.badge.blocked { background: var(--blocked-bg); color: var(--blocked); }
.badge.none { background: var(--panel); color: var(--muted); }
.btn {
  display: inline-block; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  padding: .5rem .95rem; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--panel); }
.btn.primary { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.small { padding: .25rem .6rem; font-size: .88rem; }
.form { display: flex; flex-direction: column; gap: .8rem; margin: 1rem 0; max-width: 560px; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.form label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .92rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: .7rem; padding: .8rem 1rem; }
input, select, textarea { font: inherit; padding: .45rem .55rem; border: 1px solid #b9c7bf; border-radius: var(--radius); background: #fff; color: var(--text); }
textarea { width: 100%; font-family: Consolas, "Courier New", monospace; font-size: .88rem; line-height: 1.4; }
.toolbar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .4rem; align-items: center; }
.toolbar label { display: flex; gap: .4rem; align-items: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: #fff; border-top: 4px solid var(--brand-blue); }
.step h2 { margin-top: 0; }
.plain { list-style: none; padding: 0; margin: 0 0 .8rem; }
.block { margin-bottom: 1.6rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.6rem; }
table { border-collapse: collapse; }
.grid { width: 100%; background: #fff; border: 1px solid var(--line); font-size: .93rem; }
.grid th, .grid td { padding: .42rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { background: var(--panel); color: var(--ink); font-weight: 650; }
.grid tr.warn td { background: var(--hold-bg); }
.narrowtable { width: auto; min-width: 280px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures { width: 100%; background: #fff; border: 1px solid var(--line); }
.figures td { padding: .38rem .7rem; border-bottom: 1px solid #e6ece8; }
.figures tr.sec th { text-align: left; background: var(--panel); color: var(--ink); padding: .45rem .7rem; font-size: .92rem; }
.figures tr.tot td { font-weight: 700; border-bottom: 2px solid var(--line); }
.figures tr.warn td { background: var(--hold-bg); }
.figures a { color: inherit; text-decoration-color: #b9c7bf; }
.statusbar { display: flex; gap: 1rem; align-items: center; padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--panel); border-left: 6px solid var(--muted); }
.statusbar.s-posted { border-color: var(--posted); }
.statusbar.s-hold { border-color: var(--hold); }
.statusbar.s-blocked { border-color: var(--blocked); }
.statusbar .meta { font-size: .9rem; color: var(--muted); }
.exlist { margin: 0; padding-left: 1.1rem; }
.exlist li { margin-bottom: .35rem; }
.exlist .sev-block b, .exlist .sev-hold b { color: var(--blocked); }
.exlist .sev-info b { color: var(--muted); }
.cls { font-size: .78rem; padding: 0 .4rem; border-radius: 4px; background: var(--panel); }
.cls-old_recovery { background: #e6eefb; color: #2b4f8a; }
.cls-same_day { background: var(--posted-bg); color: var(--posted); }
.cls-advance, .cls-refund { background: var(--hold-bg); color: var(--hold); }
.cls-hold { background: var(--blocked-bg); color: var(--blocked); }
.sub td { padding: .15rem .5rem; border: 0; font-size: .86rem; }
details summary { cursor: pointer; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form { display: flex; gap: .3rem; }
.tick { color: var(--posted); font-weight: 700; }
.cross { color: var(--blocked); font-size: .85rem; }
.howto { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem 1rem; margin-bottom: 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .who { margin-top: 0; }
  .main { padding: 1rem; }
  .steps, .cols { grid-template-columns: 1fr; }
  .grid { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.fix { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem .8rem; }
.fix summary { cursor: pointer; padding: .4rem 0; }
.fixsteps { margin: .2rem 0; padding-left: 1.2rem; }
.hint { color: var(--ink-2); font-size: .9rem; }
/* token module */
.navhead { color: var(--brand-green); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; margin: .7rem .6rem .2rem; }
.tokgrid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem 1rem; }
.checks { display: flex; gap: 1rem; flex-wrap: wrap; }
.chk { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 500 !important; }
.clientbox { padding: .5rem .7rem; border-radius: var(--radius); background: var(--panel); font-size: .92rem; }
.clientbox.ok { background: var(--posted-bg); }
.clientbox.new { background: #e6eefb; }
.badge.opd { background: #e6eefb; color: #2b4f8a; }
.badge.ret { background: #f1e8fb; color: #5b3a8a; }
.badge.newc { background: #e6eefb; color: #2b4f8a; font-size: .72rem; }
h3 { font-size: 1rem; color: var(--ink); margin: 1rem 0 .5rem; }
@media (max-width: 900px) { .tokgrid { grid-template-columns: 1fr; } }
/* login */
.login-wrap { min-height: 100vh; display: -webkit-box; display: -webkit-flex; display: flex; }
.login-art { -webkit-box-flex: 1.1; -webkit-flex: 1.1 1 0; flex: 1.1 1 0; }
.login-side { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; }
.login-art { background: var(--panel); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3rem 2rem; text-align: center; border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(0,157,209,.06); top: -180px; left: -200px; }
.login-art::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 50px solid rgba(38,177,112,.07); bottom: -150px; right: -120px; }
.login-art img { width: min(240px, 60%); height: auto; position: relative; }
.login-art h2 { font-size: 1.5rem; margin: 1.4rem 0 .4rem; color: var(--ink); position: relative; }
.login-art p { color: var(--muted); margin: 0; max-width: 340px; position: relative; }
.login-art .pills { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; position: relative; }
.login-art .pills span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: var(--ink); }
.login-side { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card .logo { width: 100%; height: auto; margin-bottom: 2rem; }
.login-card h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.login-card .sub { color: var(--muted); margin: 0 0 1.5rem; }
.login-card .form { max-width: none; }
.login-card input { padding: .65rem .75rem; }
.login-card .btn.primary { width: 100%; padding: .7rem; font-size: 1rem; }
.login-card .foot { color: var(--muted); font-size: .82rem; margin-top: 2rem; text-align: center; }
.pw { position: relative; }
.pw input { width: 100%; padding-right: 4.2rem; }
.pw button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: .3rem .4rem; }
@media (max-width: 800px) { .login-wrap { flex-direction: column; } .login-art { padding: 2rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); } .login-art img { width: 120px; } .login-art p, .login-art .pills { display: none; } }
.ver { margin-top: .6rem; font-size: .75rem; color: var(--muted); }
.topbar { display: flex; justify-content: flex-end; margin: -.6rem 0 .4rem; }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .3rem .5rem .3rem .3rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.usermenu > summary::-webkit-details-marker { display: none; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.uname { font-weight: 600; color: var(--ink); }
.caret { color: var(--muted); font-size: .8rem; }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(11,79,108,.12); padding: .4rem; z-index: 50; }
.usermenu .mhead { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.usermenu .mhead b, .usermenu .mhead small { display: block; }
.usermenu .mhead small { color: var(--muted); }
.usermenu .menu a { display: block; padding: .5rem .6rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.usermenu .menu a:hover { background: var(--panel); }
.usermenu .menu a.logout { color: var(--blocked); font-weight: 600; }
.usermenu .ver { padding: .4rem .6rem 0; border-top: 1px solid var(--line); margin-top: .3rem; }
@media (max-width: 900px) { .uname { display: none; } .topbar { margin-top: 0; } }

/* feedback module */
.fbgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 1.2rem; align-items: start; }
.fbgrid .card { margin-bottom: 1rem; }
.bigphone { font-size: 1.5rem; font-weight: 700; margin: .2rem 0; letter-spacing: .02em; }
.bigphone a { color: var(--ink); text-decoration: none; }
.form.wide { max-width: none; }
.outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .35rem; }
.out { border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .6rem; background: #fff; }
.out:has(input:checked) { border-color: var(--ink); background: var(--panel); }
.rate { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; font-weight: 500; }
.rate label { display: inline-flex !important; flex-direction: row !important; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate span { border: 1px solid #b9c7bf; border-radius: var(--radius); padding: .3rem .65rem; cursor: pointer; background: #fff; }
.rate input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.rate input:focus-visible + span { outline: 3px solid #7fb3a8; outline-offset: 2px; }
.rate .skip span { color: var(--muted); }
.q { font-weight: 600; font-size: .94rem; margin-top: .5rem; }
.qgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .8rem .7rem; background: #fff; }
.qgroup .q { margin-top: .6rem; }
.script p { font-size: 1.02rem; line-height: 1.6; }
.stars { color: #d9a21b; letter-spacing: 1px; }
.stars .off { color: #d3ddd6; }
.struck { text-decoration: line-through; color: var(--muted); }
.nowrap { white-space: nowrap; }
.grid tr.crit td { background: var(--blocked-bg); }
.sub2 { margin-bottom: .6rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; margin-bottom: .8rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: var(--radius); padding: .6rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 1.5rem; color: var(--ink); }
.kpi small { color: var(--muted); font-size: .78rem; }
.kpi.warnk { border-top-color: var(--hold); }
.kpi.badk { border-top-color: var(--blocked); background: var(--blocked-bg); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1rem; }
.chart { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; }
.chart figcaption { font-weight: 650; color: var(--ink); font-size: .92rem; margin-bottom: .3rem; }
.chart svg { width: 100%; height: auto; }
.chart .bar { fill: var(--ink-2); }
.chart .axis { stroke: var(--line); }
.chart .lbl { font-size: 10px; fill: var(--muted); }
.printpage .main { max-width: 1000px; margin: 0 auto; }
@media (max-width: 900px) { .fbgrid { grid-template-columns: 1fr; } .charts { grid-template-columns: 1fr; } }
@media print {
  .side, .topbar, .noprint { display: none !important; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .grid, .figures { font-size: 11px; }
  h2 { break-after: avoid; }
  tr { break-inside: avoid; }
}
.wa-inline { display: inline-block; margin-left: .7rem; vertical-align: middle; }
.btn.wa { border-color: #1f8a55; color: #1f8a55; }
.btn.wa:hover { background: var(--posted-bg); }
.pc-kind { display: flex; gap: .5rem; flex-wrap: wrap; }
.pc-kind label { cursor: pointer; }
.pc-kind input { position: absolute; opacity: 0; }
.pc-kind span { display: inline-block; padding: .45rem .9rem; border: 1px solid #b9c7bf; border-radius: var(--radius); background: #fff; font-weight: 600; }
.pc-kind input:checked + span { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.pc-kind input:focus-visible + span { outline: 3px solid #7fb3a8; }
.grid tr.pc-top td { background: var(--posted-bg); }
.grid tr.sec td { background: var(--panel); }
.grid tr.tot td { border-top: 2px solid var(--line); }
/* module menu */
.modnav { display: flex; flex-direction: column; gap: .25rem; }
.mod .modhead { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 600; border-left: 0 !important; }
.mod .modhead svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 20px; }
.mod .modhead:hover { background: var(--panel); }
.mod.open .modhead { background: var(--ink-2); color: #fff; }
.mod.open .modhead svg { stroke: #fff; }
.modlinks { display: flex; flex-direction: column; margin: .3rem 0 .5rem 1.15rem; padding-left: .6rem; border-left: 2px solid var(--line); }
.side nav.modnav .modlinks a { padding: .32rem .6rem; font-size: .93rem; border-left: 0; border-radius: var(--radius); }
.side nav.modnav .modlinks a.on { background: var(--panel); color: var(--ink); font-weight: 600; border-left: 0; }
.form.wide { max-width: none; }
.tablewrap { overflow-x: auto; }
.grid.lines input, .grid.lines select { padding: .3rem .35rem; font-size: .88rem; }
.decide { margin: 0; }
.kpis a.kpi { text-decoration: none; color: inherit; }
.permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.permgrid fieldset { background: #fff; }
.permgrid .chk { align-items: flex-start !important; }
.printhead { display: none; }
@media print { .printhead { display: block; margin-bottom: 1rem; } .printhead img { width: 320px; } .kpis { display: none; } }
.msgcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.msgform textarea { width: 100%; box-sizing: border-box; font-family: inherit; font-size: .95rem; }
.vars { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.vars .chip { border: 1px solid var(--line); cursor: pointer; font-family: inherit; }
.preview { white-space: pre-wrap; background: #e7f6ec; border-radius: 10px; padding: .7rem .9rem; font-family: inherit; font-size: .92rem; margin: .3rem 0 0; min-height: 3rem; }
@media (max-width: 900px) { .msgcols { grid-template-columns: 1fr; } }
/* ---------- phone ---------- */
.menubtn, .mbrand, .backdrop { display: none; }
@media (max-width: 900px) {
  html { font-size: 15px; }
  .shell { display: block; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; flex: none; transform: translateX(-105%); transition: transform .2s ease; z-index: 100; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.18); padding-top: max(1rem, env(safe-area-inset-top)); }
  .side nav, .side nav.modnav { flex-direction: column; flex-wrap: nowrap; }
  body.menu-open { overflow: hidden; }
  body.menu-open .side { transform: none; }
  body.menu-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(8, 60, 85, .35); z-index: 90; }
  .main { padding: 0 .8rem 2rem; max-width: none; }
  .topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: .6rem; justify-content: space-between; margin: 0 -.8rem .6rem; padding: .5rem .8rem; padding-top: max(.5rem, env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--line); }
  .menubtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
  .mbrand { display: inline-flex; align-items: center; gap: .4rem; margin-right: auto; font-weight: 700; color: var(--brand-blue); text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
  h1 { font-size: 1.3rem; margin-bottom: .7rem; }
  h2 { font-size: 1.05rem; }
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 36px; padding: .35rem .7rem; }
  .form, .form.wide { max-width: none; }
  .form.inline { flex-direction: column; align-items: stretch; }
  .form.inline > label, .form.inline > button { width: 100%; }
  .toolbar { gap: .5rem; }
  .toolbar form { flex-wrap: wrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 1.2rem; }
  .cols, .steps, .tokgrid, .msgcols, .permgrid { grid-template-columns: 1fr; }
  .grid, .figures { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .grid td, .grid th { white-space: normal; min-width: 4.5rem; }
  .actions { gap: .4rem; }
  .fbhead { flex-direction: column; }
  .usermenu .menu { right: 0; min-width: 240px; }
}
@media (display-mode: standalone) { body { overscroll-behavior-y: contain; } }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 1px solid var(--line); margin: 0 0 .8rem; }
.tabs a { padding: .5rem .85rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a span { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--panel); color: var(--ink); font-size: .8rem; text-align: center; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand-blue); }
.findclient input[name=q] { flex: 1 1 260px; }

/* ===== Home delivery (3.13) ===== */
.dl-find { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; align-items: flex-end; }
.dl-form textarea { width: 100%; }
.dl-addrs { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .6rem; }
.dl-addr { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .7rem; font: inherit; cursor: pointer; min-height: 44px; }
.dl-addr.on, .dl-addr:hover { border-color: var(--brand-blue); background: #eef7fb; }
.dl-items input { width: 100%; min-width: 0; }
.dl-items td:first-child { min-width: 14rem; }
.dl-items td.num input { text-align: right; }
.dl-sum { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.dl-sum > div { display: flex; justify-content: space-between; gap: 1rem; }
.dl-collect { display: flex; justify-content: space-between; gap: 1rem; background: var(--hold-bg); color: #6b4106; border-radius: var(--radius); padding: .55rem .75rem; font-weight: 700; margin: .4rem 0; }
.dl-buttons { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.dl-act { margin: .3rem 0; align-items: flex-end; }
.dl-more { margin-top: .6rem; }
.dl-more summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: .3rem 0; }
.dl-fa table { margin-bottom: .5rem; }
.dl-with { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; font-weight: 700; max-width: 34rem; }
.dl-with.has { background: var(--hold-bg); color: #6b4106; }
.dl-with b { font-size: 1.3rem; }
.dl-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin: .9rem 0; max-width: 34rem; display: flex; flex-direction: column; gap: .45rem; }
.dl-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dl-paid { color: var(--posted); font-weight: 600; }
.dl-two { display: flex; gap: .5rem; }
.dl-two .btn { flex: 1; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.dl-bigbtn { width: 100%; min-height: 52px; font-size: 1.1rem; margin-top: .4rem; }
.dl-card label input { width: 100%; min-height: 44px; }

/* ===== 3.14: area search box, area groups ===== */
.dl-combo { position: relative; margin-bottom: .7rem; }
.dl-combo label { display: block; }
.dl-combo #dlAreaQ { width: 100%; min-height: 44px; }
.dl-combo ul { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 18rem; overflow-y: auto; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(8, 60, 85, .15); }
.dl-combo li { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem .75rem; cursor: pointer; border-bottom: 1px solid var(--panel); }
.dl-combo li:last-child { border-bottom: 0; }
.dl-combo li.on, .dl-combo li:hover { background: #eef7fb; }
.dl-combo li small { color: var(--muted); white-space: nowrap; }
.dl-combo li small.badtext { color: var(--blocked); }
.dl-zone { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; background: #fff; }
.dl-zone summary { cursor: pointer; padding: .6rem .8rem; }
.dl-zone form { padding: 0 .8rem .8rem; }
.dl-zone td.num input { text-align: right; }
.dl-fill { margin: 0 0 .4rem; }

/* v3.14.3: one-click WhatsApp rating in the calling list */
.actions form.quickrate { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; margin-bottom: .3rem; }
.quickrate .btn.small { padding-left: .45rem; padding-right: .45rem; }

/* v3.14.5: share feedback with the doctors group */
textarea.preview { width: 100%; box-sizing: border-box; font-family: inherit; resize: vertical; }

/* v3.14.8: delete buttons, deleted entries, role checklist */
details.delbox { display: inline-block; vertical-align: middle; }
details.delbox > summary { list-style: none; cursor: pointer; display: inline-block; }
details.delbox > summary::-webkit-details-marker { display: none; }
details.delbox[open] > summary { opacity: .6; }
details.delbox form { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: .3rem 0; }
.btn.danger { color: var(--blocked); border-color: var(--blocked); }
.btn.danger:not(.ghost) { background: var(--blocked); color: #fff; }
.btn.ghost.danger { background: transparent; }
.permdel { color: var(--blocked); }

/* v3.15.0: accounts */
.grid tr.tot td { background: var(--panel); color: var(--ink); }
.grid.jv td { vertical-align: top; }
.grid.jv input { box-sizing: border-box; }
input.num { text-align: right; }
@media print { .grid.jv input { border: 0; } }

/* v3.15.1: connection banner, trial label */
.netbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; background: var(--hold-bg); color: var(--ink); border: 1px solid var(--line);
  border-left: 4px solid var(--blocked); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; max-width: calc(100% - 32px); }
.netbar[hidden] { display: none; }
.trialbar { background: var(--hold-bg); border: 1px solid var(--line); border-left: 4px solid var(--blocked); border-radius: var(--radius); padding: .45rem .8rem; margin-bottom: .8rem; font-size: .92rem; }
@media print { .netbar, .trialbar { display: none !important; } }
