/* BOB System - Powered by MME */
:root {
  --navy: #0E1527;
  --navy-2: #182238;
  --navy-3: #26314C;
  --gold: #FFD700;
  --gold-soft: #FFF6C2;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --ink: #141B2D;
  --muted: #667085;
  --line: #E3E7EF;
  --line-2: #CDD3DF;
  --ok: #0E8A5F;
  --ok-bg: #E6F5EE;
  --bad: #C63A2F;
  --bad-bg: #FCECEA;
  --warn: #9A6200;
  --warn-bg: #FFF4D6;
  --info: #2F5BD3;
  --info-bg: #EAF0FD;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 10px; }
code, .mono { font-family: "IBM Plex Mono", Consolas, monospace; font-size: 13px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  background: var(--navy);
  color: #C9D1E3;
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--gold); color: var(--navy);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: -0.02em;
}
.brand.has-logo { flex-direction: column; align-items: stretch; gap: 12px; }
.brand-logo {
  display: block; width: 100%; height: 96px; object-fit: contain;
  background: #fff; border-radius: 12px; padding: 8px 12px;
}
.brand b { display: block; color: #fff; font-size: 16px; font-weight: 600; }
.brand small { color: #8591AB; font-size: 12px; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; font-size: 12px; color: #6F7A94; padding: 0 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 2px 0;
  color: #C9D1E3; border-radius: 999px; font-size: 14px;
}
.nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--gold); color: var(--navy); font-weight: 600; }
.nav a .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--navy-3); font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .who small { display: block; color: #8591AB; font-weight: 400; }
.side-foot a { color: #C9D1E3; display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; margin-right: 12px; }
.powered { color: #5E6982; font-size: 11px; margin-top: 14px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 34px 40px; width: 100%; }  /* full width: uses the whole screen */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.page-foot { margin-top: auto; padding: 14px 34px; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.card + .card, .card + .grid, .grid + .card, .grid + .grid { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { color: var(--muted); margin: 3px 0 0; font-size: 13px; }
.grid { display: grid; gap: 18px; }
.g1 { grid-template-columns: minmax(0, 1fr); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* figures */
.figure { padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.figure .label { color: var(--muted); font-size: 13px; }
.figure .value { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.figure .value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.figure.alert { border-color: #F2B8B2; background: var(--bad-bg); }
.figure.alert .value { color: var(--bad); }

/* ---------------------------------------------------------------- flashes / notes */
.flash { padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: #0A5C40; border-color: #BFE3D2; }
.flash.error { background: var(--bad-bg); color: #8E251C; border-color: #F2C1BB; }
.flash.warn { background: var(--warn-bg); color: #7A4E00; border-color: #F0DC9C; }
.flash.info { background: var(--info-bg); color: #213F96; border-color: #C9D6F7; }
.note { background: var(--bg); border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 13px; font-weight: 500; color: #344054; margin-bottom: 5px; }
label .req { color: var(--bad); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 9px 11px; min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
textarea.code { font-family: "IBM Plex Mono", Consolas, monospace; font-size: 13px; min-height: 160px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px var(--info-bg); }
input[readonly] { background: var(--bg); color: #475467; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: var(--ink); margin: 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px;
  font-weight: 600; border-radius: var(--r-sm); padding: 9px 16px; min-height: 40px; cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn.gold { background: var(--gold); border-color: #E6C200; color: var(--navy); }
.btn.gold:hover { background: #FFE033; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: #fff; color: var(--bad); border-color: #F2C1BB; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #FAFBFD; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
table.kv td:first-child { color: var(--muted); width: 38%; word-break: break-word; }
table.kv td { word-break: break-word; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--bg); color: #475467; border: 1px solid var(--line); }
.badge.SUCCESS, .badge.active, .badge.yes { background: var(--ok-bg); color: var(--ok); border-color: #BFE3D2; }
.badge.FAILED, .badge.FETCH_FAILED, .badge.locked, .badge.no { background: var(--bad-bg); color: var(--bad); border-color: #F2C1BB; }
.badge.UNKNOWN, .badge.SENDING, .badge.frozen { background: var(--warn-bg); color: var(--warn); border-color: #F0DC9C; }
.badge.REFUNDED { background: var(--info-bg); color: var(--info); border-color: #C9D6F7; }
.badge.IN { background: #EEF7F3; color: var(--ok); border-color: #D4EBE0; }
.badge.OUT { background: #FFF2EE; color: #B24A1F; border-color: #F6D5C8; }
.badge.super_admin { background: var(--navy); color: var(--gold); border-color: var(--navy); }

/* ---------------------------------------------------------------- auth (sign-in, OTP) */
.auth-body { background: var(--navy); min-height: 100vh; overflow-x: hidden; }
.auth-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70vmax 60vmax at 78% 50%, #1A2542 0%, transparent 62%),
    linear-gradient(180deg, #0E1527 0%, #0B1122 100%);
}
.auth {
  position: relative; z-index: 1; min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 6vw, 110px); padding: 32px clamp(24px, 6vw, 96px) 40px;
  overflow: hidden;
}
.auth-top { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; color: #fff; }
.auth-top b { font-size: 16px; font-weight: 600; }
.auth-top span { color: #8C97B1; font-size: 14px; }

.auth-story { align-self: center; max-width: 560px; color: #fff; padding-bottom: 40px; }
.auth-story h2 {
  margin: 0 0 40px; font-size: clamp(34px, 3.6vw, 54px); line-height: 1.08;
  font-weight: 600; letter-spacing: -0.025em; max-width: 15ch;
}
.auth-services { margin: 0; max-width: 440px; border-top: 1px solid rgba(255, 215, 0, .35); }
.auth-services div {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--navy-3);
}
.auth-services dt { color: var(--gold); font-weight: 500; }
.auth-services dd { margin: 0; color: #C9D1E3; }
.auth-note { margin: 28px 0 0; color: #8C97B1; font-size: 14px; max-width: 46ch; }

.auth-card-wrap { align-self: center; position: relative; }
.auth-card-wrap::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 0; pointer-events: none;
  width: min(1180px, 150vmin); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: url("guilloche.svg") center / contain no-repeat;
}
.auth-card {
  position: relative; z-index: 1; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 32px 90px rgba(0, 0, 0, .5);
  animation: auth-in .45s ease-out both;
}
.auth-card-logo {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 34px 40px 26px; border-bottom: 1px solid var(--line);
}
.auth-card-logo img {
  display: block; width: 100%; max-width: 450px; max-height: 144px; object-fit: contain;
  mix-blend-mode: multiply; filter: brightness(1.02); /* a logo with a white or off-white background melts into the card */
}
.auth-card-logo b { font-size: 20px; font-weight: 600; }
.auth-card-body { padding: 28px 40px 8px; }
.auth-card-body h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.015em; }
.auth-card-body p.lead { color: var(--muted); margin: 0 0 24px; }
.auth-card-body .stack > div + div { margin-top: 14px; }
.auth-card-body .btn.gold { min-height: 48px; font-size: 15px; margin-top: 6px; }
.auth-flash { margin-bottom: 18px; }
.auth-card-foot { padding: 18px 40px 24px; text-align: center; color: #98A2B3; font-size: 12.5px; }
@keyframes auth-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.otp-input { font-size: 30px !important; letter-spacing: .4em; text-align: center; font-weight: 600; min-height: 60px !important; }

/* ---------------------------------------------------------------- services */
.svc-group + .svc-group { margin-top: 26px; }
.svc-group h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; scroll-margin-top: 14px; }
.svc-group h2 .count { font-size: 12px; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.sync-form { display: flex; align-items: center; gap: 14px; }
.picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.picker label { font-size: 13px; color: var(--muted); font-weight: 500; }
.picker select { max-width: 460px; height: 44px; font-size: 15px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* control button with a drop-down panel (BOB connection) */
.ctrl { position: relative; }
.ctrl > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ctrl > summary::-webkit-details-marker { display: none; }
.ctrl > summary .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #16a34a); flex: none; }
.ctrl > summary .dot.off { background: #DC2626; }
.ctrl > summary .caret { width: 16px; height: 16px; transition: transform .15s; }
.ctrl[open] > summary .caret { transform: rotate(180deg); }
.ctrl-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(400px, calc(100vw - 40px));
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 44px rgba(14, 21, 39, .16);
  padding: 16px 18px 14px;
}
.ctrl-head { font-weight: 600; margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.ctrl-head span { font-weight: 400; }
.ctrl-foot { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* service search with a drop-down of results */
.find { position: relative; margin: 0 0 20px; }
.find-i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.find input { width: 100%; height: 48px; padding-left: 42px; font-size: 15px; }
.find-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 44px rgba(14, 21, 39, .16);
  overflow: hidden; max-height: 420px; overflow-y: auto;
}
.find-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.find-row:last-child { border-bottom: 0; }
.find-row:hover, .find-row.on { background: #F5F7FB; text-decoration: none; }
.find-name { font-weight: 500; }
.find-group { color: var(--muted); font-size: 13px; }
.find-id { margin-left: auto; color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; }
.find-none { padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* the customer card as a panel over the page: closing it leaves the transaction untouched */
.panel { position: fixed; inset: 0; z-index: 60; background: rgba(14, 21, 39, .55); display: flex;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.panel-box { background: #fff; border-radius: var(--r-lg); width: min(1000px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.panel-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head b { flex: 1; font-size: 16px; }
.panel-body { padding: 18px 20px; }
.panel-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.tile.receiver { text-align: left; cursor: pointer; font: inherit; }
.tile.receiver.picked { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 215, 0, .25); }
.tile.receiver.new { border-style: dashed; }
.group-block { margin-bottom: 18px; }
.group-block .tiles { margin-top: 4px; }
#group-chips { margin-bottom: 16px; }
/* the approvals page: the two names first, big enough to read across the counter */
.mismatch { border: 2px solid #E11D48; border-radius: var(--r-md); background: #FFF1F3; padding: 16px 18px;
  margin-bottom: 16px; }
.mismatch-title { color: #9F1239; font-weight: 800; font-size: 15px; letter-spacing: .1em; margin-bottom: 12px; }
.mismatch-table { width: 100%; border-collapse: collapse; }
.mismatch-table th { text-align: left; font-size: 12px; font-weight: 600; color: #9F1239; padding: 0 12px 8px 0;
  text-transform: uppercase; letter-spacing: .05em; }
.mismatch-table td { padding: 8px 12px 8px 0; font-size: 24px; font-weight: 700; color: #111827;
  border-top: 1px solid rgba(225, 29, 72, .25); word-break: break-word; }
.mismatch-table td:first-child { font-size: 13px; font-weight: 600; color: #6B7280; width: 130px;
  white-space: nowrap; }
.mismatch-table tr.bad td { color: #E11D48; }
.mismatch-note { margin-top: 10px; font-size: 12.5px; color: #9F1239; }
@media (max-width: 720px) { .mismatch-table td { font-size: 19px; } }
.wait-box { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid #F0D98B;
  background: #FFF9E6; color: #6B4E00; }
.wait-box.done { border-color: #BFE3D2; background: var(--ok-bg); color: #0A5C40; }
.wait-box.bad { border-color: #F3C7C7; background: #FDECEC; color: #9B1C1C; }
.wait-head { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.wait-box p { margin: 8px 0 0; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(107, 78, 0, .25); border-top-color: #6B4E00;
  border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.name-warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #9B1C1C;
  border: 1px solid #F3C7C7; }
.name-ok { margin-top: 10px; font-size: 13px; }
.row-out td { opacity: .55; }
.row-out td .badge { opacity: 1; }
.acting-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 34px;
  background: #E7F0FF; border-bottom: 1px solid #A9C6F5; color: #12386F; font-size: 13.5px; }
.acting-bar form { margin-left: auto; }
tr.user-row { cursor: pointer; }
tr.user-row.open > td { background: #F5F7FB; }
tr.user-actions > td { background: #F5F7FB; }
.practice-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 34px;
  background: #FFF4CC; border-bottom: 1px solid #E8CE72; color: #6B4E00; font-size: 13.5px; }
.practice-bar b { letter-spacing: .08em; }
.practice-bar form { margin-left: auto; }
.side-practice { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0;
  color: #8C97B1; font-size: 14px; padding: 9px 12px; border-radius: 10px; cursor: pointer; text-align: left; }
.side-practice:hover { background: var(--navy-3); color: #fff; }
.side-practice.on { background: #FFD700; color: #0E1527; font-weight: 600; }
.badge.practice { background: #FFF4CC; color: #6B4E00; border-color: #E8CE72; }
/* the customer card as a panel over the page: closing it leaves the transaction untouched */
.panel { position: fixed; inset: 0; z-index: 60; background: rgba(14, 21, 39, .55); display: flex;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.panel-box { background: #fff; border-radius: var(--r-lg); width: min(1000px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.panel-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head b { flex: 1; font-size: 16px; }
.panel-body { padding: 18px 20px; }
.panel-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.tile.receiver { text-align: left; cursor: pointer; font: inherit; }
.tile.receiver.picked { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 215, 0, .25); }
.tile.receiver.new { border-style: dashed; }
.group-block { margin-bottom: 18px; }
.group-block .tiles { margin-top: 4px; }
#group-chips { margin-bottom: 16px; }
/* the approvals page: the two names first, big enough to read across the counter */
.mismatch { border: 2px solid #E11D48; border-radius: var(--r-md); background: #FFF1F3; padding: 16px 18px;
  margin-bottom: 16px; }
.mismatch-title { color: #9F1239; font-weight: 800; font-size: 15px; letter-spacing: .1em; margin-bottom: 12px; }
.mismatch-table { width: 100%; border-collapse: collapse; }
.mismatch-table th { text-align: left; font-size: 12px; font-weight: 600; color: #9F1239; padding: 0 12px 8px 0;
  text-transform: uppercase; letter-spacing: .05em; }
.mismatch-table td { padding: 8px 12px 8px 0; font-size: 24px; font-weight: 700; color: #111827;
  border-top: 1px solid rgba(225, 29, 72, .25); word-break: break-word; }
.mismatch-table td:first-child { font-size: 13px; font-weight: 600; color: #6B7280; width: 130px;
  white-space: nowrap; }
.mismatch-table tr.bad td { color: #E11D48; }
.mismatch-note { margin-top: 10px; font-size: 12.5px; color: #9F1239; }
@media (max-width: 720px) { .mismatch-table td { font-size: 19px; } }
.wait-box { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid #F0D98B;
  background: #FFF9E6; color: #6B4E00; }
.wait-box.done { border-color: #BFE3D2; background: var(--ok-bg); color: #0A5C40; }
.wait-box.bad { border-color: #F3C7C7; background: #FDECEC; color: #9B1C1C; }
.wait-head { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.wait-box p { margin: 8px 0 0; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(107, 78, 0, .25); border-top-color: #6B4E00;
  border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.name-warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #9B1C1C;
  border: 1px solid #F3C7C7; }
.name-ok { margin-top: 10px; font-size: 13px; }
.row-out td { opacity: .55; }
.row-out td .badge { opacity: 1; }
.acting-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #FFF4D6; border-bottom: 1px solid #F0D98B; color: #6B4E00; padding: 10px 18px; font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.perm-group + .perm-group { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.perm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.id-photos { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.id-photos summary { cursor: pointer; font-weight: 500; font-size: 14px; }
.id-photos .client-photos { margin-top: 12px; }
.otp-qr { display: flex; justify-content: center; margin: 4px 0 18px; }
.otp-qr svg { width: 190px; height: 190px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.otp-manual { margin-bottom: 16px; }
.otp-manual summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.otp-manual .secret { margin-top: 8px; }
.pw-once { font-size: 16px; letter-spacing: .06em; margin-right: 10px; }
/* step 1: the customer's phone and the transaction number - light, roomy, easy to read at a counter */
.start-panel {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FC 100%);
  border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(14, 21, 39, .06);
  display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: flex-start;
}
.start-field { flex: 1 1 240px; min-width: 0; }
.start-panel label {
  display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 8px;
}
.start-panel input {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--navy); font-size: 26px; font-weight: 600; padding: 12px 16px; min-height: 60px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .1em;
  transition: border-color .15s, box-shadow .15s;
}
.start-panel input::placeholder { color: #C3CBD8; }
.start-panel input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 215, 0, .18);
}
.start-panel input.ready { border-color: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .16); }
.start-note {
  display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-top: 9px;
  min-height: 18px;
}
.start-note i { flex: 1; height: 5px; background: #E8ECF3; border-radius: 999px; overflow: hidden; max-width: 220px; }
.start-note b { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width .15s; }
.start-panel input.ready + .start-note b { background: #4ADE80; }
.start-btn { align-self: center; min-height: 60px; min-width: 150px; font-size: 16px; margin-top: 26px; }
.start-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 980px) {
  .start-panel { gap: 16px; padding: 18px; border-left-width: 4px; }
  .start-field { flex: 1 1 100%; }
  .start-panel input { font-size: 22px; }
  .start-btn { width: 100%; margin-top: 4px; }
}

.tn-big { font-size: 22px; letter-spacing: .12em; margin-right: 10px; }
.tn-result { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; font-size: 14px; }
.tn-result.good { border-color: #BFE3D2; background: var(--ok-bg); color: #0A5C40; }
.tn-result.bad { border-color: #F3C7C7; background: #FDECEC; color: #9B1C1C; }
.tn-result b { font-size: 15px; }
.tn-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 20px; margin-top: 12px; }
.tn-fields div { display: flex; gap: 10px; font-size: 13.5px; border-bottom: 1px solid rgba(10, 92, 64, .12); padding: 5px 0; }
.tn-fields span { color: inherit; opacity: .72; min-width: 120px; }

.client-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-top: 14px; background: #F9FBFF; }
.client-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.client-head b { font-size: 16px; }
.client-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.client-fields div { display: flex; gap: 8px; font-size: 13.5px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.client-fields span { color: var(--muted); min-width: 108px; }
.client-fields b { font-weight: 500; word-break: break-word; }
.client-photos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.client-photos figure { margin: 0; width: 150px; }
.client-photos img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.client-photos figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }

[hidden] { display: none !important; }  /* the hidden attribute must win over display:flex on tiles and chips */
.svc-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.svc-bar input { max-width: 340px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); }
.chip b { color: var(--muted); font-weight: 600; font-size: 11px; }
.chip:hover { border-color: var(--navy); text-decoration: none; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--navy); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
@media (min-width: 1700px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); min-height: 112px; }
.tile:hover { border-color: var(--navy); text-decoration: none; }
.tile b { font-size: 15px; font-weight: 600; }
.tile.big { min-height: 132px; }
.tile-names { line-height: 1.45; }
.find-svc { color: var(--muted); font-size: 13px; }
.tile .meta { margin-top: auto; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.tile .svid { margin-left: auto; }

/* the amount strip: the one bold moment */
.amount-strip { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }
.amount-strip label { color: #9AA5BE; }
.amount-strip input.amount {
  background: transparent; border: 0; border-bottom: 2px solid var(--navy-3); border-radius: 0; color: #fff;
  font-size: 44px; font-weight: 600; letter-spacing: -0.02em; padding: 4px 0; min-height: 64px;
}
.amount-strip input.amount:focus { box-shadow: none; border-bottom-color: var(--gold); }
.seg { display: inline-flex; background: var(--navy-2); border-radius: 999px; padding: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: 8px 18px; border-radius: 999px; color: #C9D1E3; cursor: pointer; font-weight: 600; font-size: 14px; }
.seg input:checked + label { background: var(--gold); color: var(--navy); }
.seg input:focus-visible + label { outline: 2px solid var(--gold); }
.cur-fixed { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px;
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 999px; padding: 8px 18px;
  color: #fff; font-weight: 600; font-size: 15px; }
.cur-fixed small { color: #9AA5BE; font-weight: 400; font-size: 11px; }
.limit-line { color: #9AA5BE; font-size: 13px; margin-top: 10px; }
.limit-line b { color: #fff; font-weight: 500; }

.steps { display: flex; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.steps span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.steps span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.steps span.done { color: var(--ok); border-color: #BFE3D2; background: var(--ok-bg); }

/* ---------------------------------------------------------------- misc */
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.progress > i.hot { background: var(--bad); }
details.raw { margin-top: 12px; }
details.raw summary { cursor: pointer; color: var(--info); font-size: 13px; }
pre.json { background: var(--navy); color: #D6DEEE; border-radius: var(--r-md); padding: 14px; overflow: auto; font-size: 12.5px; max-height: 420px; margin: 10px 0 0; white-space: pre-wrap; word-break: break-word; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.perm-box { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.perm-box summary {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 14px; background: #F7F9FC;
}
.perm-box summary::-webkit-details-marker { display: none; }
.perm-box summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px;
}
.perm-box[open] summary::before { transform: rotate(45deg); }
.perm-name { flex: 1; }
.perm-count {
  font-size: 11.5px; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px;
}
.perm-count.some { color: #0A5C40; background: var(--ok-bg); border-color: #BFE3D2; }
.perm-box .checks { display: grid; gap: 2px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.perm-box .check { padding: 5px 0; font-size: 13.5px; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin: 0; }
.perm-grid legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.perm-grid .check { margin: 7px 0; }
.limits td input { min-width: 110px; }
.qr-box { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }
.qr-box svg { width: 240px; height: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }
.secret { font-family: "IBM Plex Mono", Consolas, monospace; font-size: 18px; letter-spacing: .08em; background: var(--bg); padding: 10px 14px; border-radius: var(--r-sm); display: inline-block; word-break: break-all; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--navy); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.vrow { display: grid; grid-template-columns: 140px 110px 1fr 1.4fr 40px; gap: 10px; align-items: start; margin-bottom: 10px; }
.vrow textarea { min-height: 40px; }
.banner { background: var(--warn-bg); border: 1px solid #F0DC9C; color: #7A4E00; border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.red { background: var(--bad-bg); border-color: #F2C1BB; color: #8E251C; }

@media (max-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 1fr) 400px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
  .topbar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .content { padding: 20px 16px 32px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .auth { grid-template-columns: 1fr; padding: 22px 16px 32px; row-gap: 22px; }
  .auth-story { display: none; }
  .auth-card-wrap { width: 100%; max-width: 460px; justify-self: center; align-self: start; }
  .auth-card-wrap::before { width: 170vmin; }
  .auth-card-logo { padding: 26px 24px 20px; }
  .auth-card-body { padding: 24px 24px 6px; }
  .auth-card-foot { padding: 16px 24px 20px; }
  .amount-strip { grid-template-columns: 1fr; }
  .qr-box { grid-template-columns: 1fr; }
  .vrow { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------------------------------------------------------------- printed receipt (A4, two copies to cut) */
.receipt-page { background: #EDF1F7; padding: 24px 16px 60px; }
.rc-sheet { width: 210mm; max-width: 100%; margin: 0 auto; background: #fff; color: #000; padding: 8mm 10mm;
  box-shadow: 0 10px 30px rgba(14, 21, 39, .12); font-family: "Times New Roman", Georgia, serif; font-size: 12px; }
.rc { padding: 3mm 0 4mm; }
.rc-practice { border: 1px solid #000; padding: 2mm; text-align: center; font-weight: 700; letter-spacing: .08em;
  margin-bottom: 3mm; font-size: 12px; }
.rc-top { display: flex; align-items: center; gap: 12px; }
.rc-logo { height: 16mm; width: auto; max-width: 57mm; object-fit: contain; }
.rc-logo-text { font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.rc-title { flex: 1; text-align: center; font-size: 15px; font-weight: 700; }
.rc-name-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; margin-top: 3mm;
  border-bottom: 1px solid #000; padding-bottom: 2mm; }
.rc-name-row .rc-cell { display: grid; grid-template-columns: 38% 1fr; gap: 6px; align-items: start; padding: 0 4mm; }
.rc-name-row .rc-cell + .rc-cell { border-left: 1px solid #000; }
.rc-name-row span { font-weight: 700; font-size: 13px; }
.rc-name-row b { font-weight: 700; font-size: 13px; text-transform: uppercase; }
.rc-body { display: grid; grid-template-columns: 1.15fr 1fr; }
.rc-left { padding: 2mm 4mm 0; }
.rc-right { padding: 2mm 4mm 0; border-left: 1px solid #000; }
.rc-kv { width: 100%; border-collapse: collapse; }
.rc-kv td { padding: 1.2mm 0; vertical-align: top; }
.rc-kv td:first-child { width: 42%; }
.rc-kv td.strong, .rc-kv .strong { font-weight: 700; }
.rc-sub { font-weight: 700; margin: 3mm 0 1mm; border-bottom: 1px solid #000; padding-bottom: 1mm; }
.rc-box tr td { border-bottom: 1px solid #C9C9C9; }
.rc-box tr:first-child td { font-weight: 700; }
.rc-receiver { margin-top: 3mm; }
.rc-receiver td { border-bottom: 1px solid #E4E4E4; }
.rc-totals td:first-child { width: 46%; }
/* the total is what everyone looks at: give it room */
.rc-total td { border-top: 1.5px solid #000; font-weight: 700; padding-top: 2.5mm; }
.rc-total td { padding-bottom: 1mm; }
.rc-total td:first-child { font-size: 17px; }
.rc-total td:last-child { font-size: 25px; line-height: 1.15; white-space: nowrap; }
.rc-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; margin-top: 5mm; padding: 0 4mm; }
.rc-signs div { display: grid; grid-template-columns: auto 1fr; gap: 4mm; align-items: end; }
.rc-signs i { border-bottom: 1px solid #000; height: 4.5mm; display: block; }
.rc-reprint { margin-top: 3mm; text-align: center; font-size: 11px; }
.rc-footer { margin-top: 1mm; text-align: center; font-size: 11px; }
.rc-powered { margin-top: 1mm; text-align: center; font-size: 9px; color: #666; }
.rc-cut { position: relative; text-align: center; margin: 3mm 0; border-top: 1px dashed #666; }
.rc-cut span { position: relative; top: -8px; background: #fff; padding: 0 8px; font-size: 9px; color: #777;
  letter-spacing: .12em; text-transform: uppercase; }
.receipt-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

@media print {
  /* both copies have to fit on ONE A4 page: everything is tightened here, not on screen */
  body.receipt-page { background: #fff; padding: 0; }
  .rc-sheet { width: auto; box-shadow: none; padding: 0; font-size: 10.5px; }
  .no-print { display: none !important; }
  .rc { break-inside: avoid; padding: 1mm 0 2mm; }
  .rc-logo { height: 12mm; max-width: 44mm; }
  .rc-title { font-size: 13px; }
  .rc-name-row { margin-top: 2mm; padding-bottom: 1.2mm; }
  .rc-name-row span, .rc-name-row b { font-size: 11.5px; }
  .rc-kv td { padding: 0.7mm 0; }
  .rc-sub { margin: 1.8mm 0 0.6mm; padding-bottom: 0.6mm; }
  .rc-receiver { margin-top: 1.8mm; }
  .rc-total td { padding-top: 1.5mm; padding-bottom: 0.5mm; }
  .rc-total td:first-child { font-size: 14px; }
  .rc-total td:last-child { font-size: 21px; }
  .rc-signs { margin-top: 3mm; gap: 1.5mm 8mm; }
  .rc-signs i { height: 3.5mm; }
  .rc-reprint { margin-top: 1.5mm; font-size: 10px; }
  .rc-footer { font-size: 10px; }
  .rc-powered { font-size: 8px; }
  .rc-cut { margin: 1.5mm 0; }
  .rc-cut span { font-size: 8px; }
  .rc-practice { padding: 1mm; margin-bottom: 1.5mm; font-size: 11px; }
}


