/* Auto-generated theme.css from WebApp.html */

:root, body.theme-light {
  --paper: #f1ebe0;
  --paper-2: #e7dfd0;
  --sheet: #faf6ee;
  --ink: #1b1712;
  --ink-soft: #5e574c;
  --rule: #d4cbb8;
  --seal: #c2301c;
  --seal-deep: #8e1e12;
  --brass: #855817;
  --ok: #315544;
  --warn: #85530b;
  --night: #221c16;
  --night-text: #f4eadc;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Fraunces", "Times New Roman", serif;
}
body.theme-dark {
  --paper: #10141c;
  --paper-2: #171e2a;
  --sheet: #1c2433;
  --ink: #eef2f7;
  --ink-soft: #93a0b5;
  --rule: #2c394d;
  --seal: #ef6b55;
  --seal-deep: #c44733;
  --brass: #e0b15a;
  --ok: #7dcea0;
  --warn: #e8b86d;
  --night: #070a12;
  --night-text: #f8fafc;
}
body.theme-warm {
  --paper: #1a1410;
  --paper-2: #261c16;
  --sheet: #2b211b;
  --ink: #fff6e8;
  --ink-soft: #d6bc9f;
  --rule: #4a372b;
  --seal: #f59e0b;
  --seal-deep: #d97706;
  --brass: #fbbf24;
  --ok: #86efac;
  --warn: #fcd34d;
  --night: #0c0907;
  --night-text: #fef3c7;
}
body.theme-cold {
  --paper: #071018;
  --paper-2: #0d1c2c;
  --sheet: #12263b;
  --ink: #ecfeff;
  --ink-soft: #7dd3fc;
  --rule: #1d4a6e;
  --seal: #22d3ee;
  --seal-deep: #0891b2;
  --brass: #67e8f9;
  --ok: #5eead4;
  --warn: #fde68a;
  --night: #03080e;
  --night-text: #e0f2fe;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; min-height: 100%; overflow-x: hidden; }
body.sohang {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
body.sohang::before {
  content: ""; pointer-events: none; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.04'/></svg>");
  opacity: .5;
}
.sohang-app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
}
header.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--sheet) 92%, transparent);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.chop {
  width: 36px; height: 36px; border: 1.5px solid var(--seal); color: var(--seal);
  display: grid; place-items: center; font-family: var(--display); font-weight: 720; font-size: 1.05rem;
  transform: rotate(-8deg); background: var(--sheet);
}
.brand b { display: block; font-family: var(--display); font-size: 1.15rem; letter-spacing: -.03em; line-height: 1; }
.brand small { color: var(--ink-soft); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.latency-readout {
  font-size: .72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  flex: 0 0 auto;
}
.context { display: flex; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; align-items: center; }
.pill, .search, .ghost, .seal-btn, .icon-btn, header.top select {
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
  font: 550 .8rem var(--font); border-radius: 999px; height: 38px;
}
header.top select { padding: 0 12px; max-width: 220px; }
.search { flex: 1; min-width: 140px; padding: 0 14px; outline: none; }
.search:focus, header.top select:focus { border-color: var(--ink); }
.who { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--night-text); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.brand { cursor: pointer; border: 0; background: transparent; color: inherit; text-align: left; padding: 0; }
.who span { font-size: .78rem; line-height: 1.15; }
.who span i { font-style: normal; color: var(--ink-soft); font-size: .68rem; }
.ghost { padding: 0 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seal-btn {
  background: var(--seal); color: #fff8f3; border-color: var(--seal-deep);
  padding: 0 14px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0; border-radius: 8px; }

.ledger-strip {
  margin: 12px 18px 0; padding: 14px 18px;
  background: var(--night); color: var(--night-text);
  display: grid; grid-template-columns: 1.35fr repeat(5, minmax(0, 1fr));
  gap: 8px 14px; position: relative; overflow: hidden;
}
.ledger-strip::after {
  content: "收"; position: absolute; right: 22px; top: 10px;
  width: 64px; height: 64px; border: 3px solid rgba(194,48,28,.3);
  border-radius: 50%; text-align: center; line-height: 58px;
  font-family: var(--display); font-size: 1.8rem; color: rgba(194,48,28,.38);
  transform: rotate(-12deg);
}
.due-k, .stat-k { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: #cbbba3; }
.due-v { font-family: var(--display); font-size: 2rem; font-weight: 720; color: #f3c7b8; letter-spacing: -.04em; line-height: 1.05; }
.stat-v { font-family: var(--display); font-size: 1.12rem; margin-top: 2px; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 999px; }
.tabs button {
  border: 0; background: transparent; height: 34px; padding: 0 14px;
  border-radius: 999px; font: 650 .78rem var(--font); color: var(--ink-soft); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--sheet); color: var(--ink); }
.tabs .dot {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--seal); color: #fff; font-size: .62rem; margin-left: 4px;
}
.toolbar .push { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

main.sohang-main { padding: 0 18px 24px; min-width: 0; }
.list-head, .ledger-row {
  display: grid;
  grid-template-columns: 28px 76px minmax(160px,1.5fr) .7fr .4fr .7fr .55fr .9fr 92px 64px;
  gap: 8px; align-items: center;
}
.list-head {
  padding: 8px; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1px solid var(--rule);
}
.ledger-row {
  background: var(--sheet); border: 1px solid transparent; border-bottom-color: var(--rule);
  padding: 10px 8px;
}
.ledger-row.checked { background: #f8efe4; }
#ordersTableBody tr[data-id]:has(input[type="checkbox"]:checked) {
  background-color: rgb(255 251 235 / 50%);
}
.thumb-wrap {
  width: 68px; height: 68px; background: #efe8db; border: 1px solid var(--rule);
  display: grid; place-items: center; overflow: hidden; cursor: pointer;
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: contain; }
.name { font-weight: 650; font-size: .92rem; }
.meta { color: var(--ink-soft); font-size: .72rem; margin-top: 2px; }
.cny { font-family: var(--display); color: var(--brass); font-weight: 640; }
.vnd { font-family: var(--display); font-weight: 640; }
.status-pill {
  justify-self: start; font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 8px; border: 1px solid currentColor; white-space: nowrap;
}
.status-pill.in { color: var(--ok); }
.status-pill.wait { color: var(--warn); }
.status-pill.bad { color: var(--seal); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.ledger-note { grid-column: 3 / -1; font-size: .75rem; color: var(--ink-soft); }

#weightMergeBar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 12px; padding: 10px 12px;
  background: #f7e3c6; border: 1px solid #e0b56a;
}
#weightMergeBar:not(.hidden) { display: flex; }
#weightMergeBar input, #weightMergeBar select {
  height: 36px; border: 1px solid #c9a15a; background: #fffaf1; border-radius: 8px;
  padding: 0 10px; font: 550 .8rem var(--font);
}

.req-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.req-card {
  background: var(--sheet); border: 1px solid var(--rule); padding: 14px;
  display: grid; gap: 8px; min-width: 0;
}
.req-card .req-photo {
  width: 100%; height: 180px; background: #efe8db; border: 1px solid var(--rule);
  display: grid; place-items: center; overflow: hidden;
}
.req-card .req-photo img { width: 100%; height: 100%; object-fit: contain; }
.req-card .name, .req-card .meta { overflow-wrap: anywhere; word-break: break-word; }
.req-link {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.req-link-btn, .req-copy-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font: 700 .72rem var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.req-link-url {
  flex: 1 1 100%;
  min-width: 0;
  font-size: .72rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.req-note {
  background: color-mix(in srgb, var(--warn) 16%, var(--sheet));
  border: 1px solid var(--rule);
  padding: 8px 10px;
  font-size: .8rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  max-height: none;
}
.req-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.req-actions .seal-btn {
  width: 100%;
  max-width: 100%;
  height: 42px;
  justify-content: center;
  border-radius: 10px;
  white-space: nowrap;
}
.req-cancel {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--seal) 45%, var(--rule));
  background: color-mix(in srgb, var(--seal) 10%, var(--sheet));
  color: var(--seal);
  font: 700 .68rem var(--font);
  cursor: pointer;
}

.invoice-panel { background: var(--sheet); border: 1px solid var(--rule); padding: 22px; }
.invoice-panel h3 { font-family: var(--display); font-size: 1.7rem; margin: 0 0 4px; }
.pay-list { margin-top: 8px; }
.pay-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .84rem;
  align-items: start;
}
.pay-row b { font-family: var(--display); font-weight: 640; }
.pay-row .meta { margin: 0; overflow-wrap: anywhere; }
.invoice-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.pending-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 16px; }

.phone-nav { display: none; }
#toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--night); color: var(--night-text); padding: 10px 16px; border-radius: 999px;
  font-size: .82rem; z-index: 80; opacity: 0; pointer-events: none; transition: .2s ease;
  max-width: min(90vw, 420px);
}
.seal-btn:disabled { opacity: .72; cursor: wait; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.legacy-hidden { display: none !important; }
nav.mobile-bottom-nav, #mobileQuickAddAction, .desktop-device-switcher { display: none !important; }

.app-modal-card, #loginModal > div, #exportModal > div, #rateModal > div, #paymentModal > div, #adminUsersModal > div {
  background: var(--sheet) !important;
  border-color: var(--rule) !important;
  font-family: var(--font);
}
#orderModal .order-modal-header { background: var(--night) !important; }
#orderSubmitButton, #loginForm button[type="submit"] {
  background: var(--seal) !important; border-color: var(--seal-deep) !important; color: #fff8f3 !important;
}
.order-photo-actions { grid-template-columns: 1fr 1fr; }
.order-photo-button small { display: block; font-weight: 500; opacity: .85; }

.device-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 999px;
  flex: 0 0 auto;
}
.device-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  cursor: pointer;
  font: 700 .64rem var(--font);
  letter-spacing: .04em;
  display: grid;
  place-items: center;
}
.device-switch button[aria-checked="true"],
.device-switch button.is-on {
  background: var(--night);
  color: var(--night-text);
}
.device-switch #btnDevAuto,
.device-switch [data-device-mode="auto"] { min-width: 44px; }
.drawer-device-switch {
  width: 100%;
  height: 44px;
  background: #1a1612;
  border-color: #3a3128;
}
.drawer-device-switch button { color: #cbbba3; min-width: 0; flex: 1; height: 36px; }
.drawer-device-switch button[aria-checked="true"],
.drawer-device-switch button.is-on { background: #faf6ee; color: #221c16; }

html.layout-phone header.top {
  padding: 8px 10px;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
html.layout-phone .brand {
  flex: 0 0 auto;
}
html.layout-phone .who {
  margin-left: auto;
  flex: 0 0 auto;
}
html.layout-phone .latency-readout {
  flex: 1 0 100%;
  order: 2;
  font-size: .66rem;
  margin: -2px 0 2px;
}
html.layout-phone .context {
  flex: 1 0 100%;
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
html.layout-phone #customerSelectWrapper {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}
html.layout-phone #customerSelect {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html.layout-phone #batchSelect {
  flex: 1 1 0%;
  min-width: 0;
  max-width: calc(100% - 42px);
}
html.layout-phone .icon-btn {
  flex: 0 0 36px;
  height: 38px;
}
html.layout-phone .device-switch {
  height: 32px;
}
html.layout-phone .device-switch button {
  height: 26px;
  min-width: 28px;
  padding: 0 6px;
  font-size: .6rem;
}
html.layout-phone .device-switch #btnDevAuto,
html.layout-phone .device-switch [data-device-mode="auto"] {
  min-width: 36px;
}
html.layout-phone .brand small,
html.layout-phone .who .ghost,
html.layout-phone #themeDropdownWrapper,
html.layout-phone #userProfileWidget,
html.layout-phone .search,
html.layout-phone .toolbar .ghost,
html.layout-phone .toolbar .seal-btn,
html.layout-phone .tabs,
html.layout-phone #statusFilter,
html.layout-phone #orderSortSelect,
html.layout-phone .only-requests { display: none !important; }

html.layout-phone .phone-nav .fab { background: var(--seal) !important; color: #fff8f3 !important; }
html.layout-phone .ledger-strip {
  margin: 10px 10px 0;
  padding: 12px;
  grid-template-columns: 1fr 1fr;
  width: calc(100% - 20px);
  max-width: calc(100% - 20px);
  box-sizing: border-box;
}
html.layout-phone .due-v { font-size: 1.5rem; }
html.layout-phone .ledger-strip::after { width: 48px; height: 48px; font-size: 1.35rem; line-height: 42px; right: 10px; top: 10px; }
html.layout-phone .toolbar { padding: 10px; }
html.layout-phone main.sohang-main {
  padding: 0 10px 96px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
html.layout-phone #sectionOrders,
html.layout-phone #sectionRequests,
html.layout-phone #sectionDashboard {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
html.layout-phone .list-head { display: none; }
html.layout-phone .ledger-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: 22px 64px minmax(0, 1fr) auto;
  grid-template-areas:
    "ck img name status"
    "ck img money money"
    ".  .  meta  actions";
  gap: 6px 8px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--rule);
}
html.layout-phone .ledger-row .col-ck { grid-area: ck; }
html.layout-phone .ledger-row .thumb-wrap { grid-area: img; width: 64px; height: 64px; }
html.layout-phone .ledger-row .name-block { grid-area: name; min-width: 0; }
html.layout-phone .ledger-row .name { font-size: 0.85rem; line-height: 1.25; word-break: break-word; }
html.layout-phone .ledger-row .col-unit,
html.layout-phone .ledger-row .col-qty,
html.layout-phone .ledger-row .col-kg { display: none; }
html.layout-phone .ledger-row .col-cny { grid-area: meta; }
html.layout-phone .ledger-row .col-vnd { grid-area: money; justify-self: end; font-size: 0.95rem; }
html.layout-phone .ledger-row .status-pill { grid-area: status; justify-self: end; font-size: 0.62rem; padding: 2px 6px; }
html.layout-phone .ledger-row .row-actions { grid-area: actions; }
html.layout-phone .ledger-row .row-actions button span { display: none; }
html.layout-phone .ledger-note { grid-column: 1 / -1; }
html.layout-phone .req-grid { grid-template-columns: minmax(0, 1fr); }
html.layout-phone .req-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
html.layout-phone .req-card .req-photo { height: 80px; }
html.layout-phone .pending-grid,
html.layout-phone .invoice-grid { grid-template-columns: 1fr; }
html.layout-phone .invoice-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px;
}
html.layout-phone .pay-row { grid-template-columns: 1fr auto; }
html.layout-phone .pay-row .meta { grid-column: 1 / -1; }
html.layout-phone .phone-nav {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--rule); background: var(--sheet); z-index: 30;
}
html.layout-phone .phone-nav button {
  border: 0; background: none; font: 650 .68rem var(--font);
  color: var(--ink-soft); cursor: pointer;
}
html.layout-phone .phone-nav button.on { color: var(--seal); }
html.layout-phone .fab {
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%; background: var(--seal); color: #fff8f3;
  border: 4px solid var(--sheet); font-size: 1.6rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 18px rgba(194,48,28,.35);
}
html.layout-phone #weightMergeBar:not(.hidden) {
  position: sticky; bottom: 70px; z-index: 25;
}
html.layout-phone #orderModal { padding: 0 !important; align-items: stretch !important; }
html.layout-phone #orderModal .app-modal-card {
  max-width: none !important; height: 100dvh; border-radius: 0 !important;
  display: flex; flex-direction: column;
}
html.layout-phone #orderModal .order-modal-form { overflow: auto; flex: 1; }
html.layout-phone #orderModal .order-modal-actions {
  position: sticky; bottom: 0; background: var(--sheet);
  display: grid !important; grid-template-columns: 1fr 1.3fr; gap: 8px; padding: 12px;
}
html.layout-forced-mobile {
  background: #16110d;
}
html.layout-forced-mobile body.sohang { background: #16110d; }
html.layout-forced-mobile .sohang-app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  box-shadow: 0 0 0 1px #3a3128, 0 30px 80px rgba(0,0,0,.45);
}

#themeDropdownMenu {
  background: #221c16 !important; color: #f4eadc !important; border-color: #3a3128 !important;
}
#mobileDrawer .fixed, #mobileDrawer > div:last-child { background: #221c16 !important; }

.hidden { display: none !important; }
html.is-locked, body.is-locked { overflow: hidden; height: 100%; }
body.is-locked .sohang-app {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}
.login-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  background: var(--paper);
}
html.is-locked .login-gate,
body.is-locked .login-gate,
.login-gate.is-open { display: flex; }
.login-gate-card {
  width: min(420px, 100%);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 28px 22px 22px;
  box-shadow: 0 24px 60px rgba(27, 23, 18, .16);
}
.login-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 22px;
}
.login-gate-brand .chop {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  transform: rotate(-8deg);
}
.login-gate-brand b {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.login-gate-brand small {
  color: var(--ink-soft);
  font-size: .78rem;
}
.login-gate label {
  display: block;
  font-weight: 700;
  font-size: .78rem;
  margin-bottom: 6px;
}
.login-gate input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font: 600 1rem var(--font);
  outline: none;
  box-sizing: border-box;
}
.login-gate input:focus { border-color: var(--ink); }
.login-gate .pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.login-gate .pin-row label {
  margin-bottom: 0;
}
.login-gate .pin-toggle {
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: 650 .75rem var(--font);
  cursor: pointer;
  padding: 4px 8px;
  min-height: 28px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  touch-action: manipulation;
  box-sizing: border-box;
  line-height: 1;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.login-gate .pin-toggle:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}
.login-gate .pin-toggle:focus-visible {
  outline: 2px solid var(--seal, #b91c1c);
  outline-offset: 2px;
}
.login-gate .login-submit {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: 1px solid var(--seal-deep);
  border-radius: 14px;
  background: var(--seal);
  color: #fff8f3;
  font: 800 .95rem var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  position: relative;
  user-select: none;
}
.login-gate .login-submit:active:not(:disabled) {
  transform: scale(0.99);
}
.login-gate .login-submit:disabled {
  opacity: .88;
  cursor: wait;
}
.login-gate .login-submit.is-loading {
  background: color-mix(in srgb, var(--seal) 85%, #000);
  cursor: wait;
}
.login-gate .login-submit.is-success {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #ffffff !important;
}
.login-gate .google-login-btn {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 14px;
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  font: 600 .9rem var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.login-gate .google-login-btn:hover {
  background: var(--surface-hover, #f8fafc);
  border-color: var(--line-strong, #94a3b8);
}
.login-gate .google-login-btn:focus-visible {
  outline: 2px solid var(--seal, #b91c1c);
  outline-offset: 2px;
}
.login-gate .google-login-btn:active {
  transform: scale(0.99);
}
.login-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  animation: login-spin 0.8s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
.login-spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  animation: login-spin 0.8s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes login-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}
.login-shake {
  animation: login-shake 0.45s ease-in-out !important;
}
.login-gate input.input-error {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}
.login-error, .login-status {
  display: none;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.4;
}
.login-error.is-on {
  display: block;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #f87171;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}
.login-status.is-on {
  display: block;
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, var(--sheet));
  border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--rule));
}
.login-note {
  margin: 16px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: .72rem;
  line-height: 1.45;
}
.provisional-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 18%, var(--sheet));
  color: var(--warn);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: middle;
}
.pay-status {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pay-status.pending { color: var(--warn); }
.pay-status.approved { color: var(--ok); }
.pay-status.rejected { color: var(--seal); }
.closed-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  font-size: .62rem;
  font-weight: 800;
  color: var(--ink-soft);
}


