/* Visual language after Apple's Human Interface Guidelines: system font, system colours,
   large titles, inset grouped lists, materials, segmented controls. Light and dark. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --bg: #f2f2f7;                       /* systemGroupedBackground */
  --cell: #ffffff;                     /* secondarySystemGroupedBackground */
  --cell-hover: #f7f7fa;
  --label: #000000;
  --label-2: rgba(60, 60, 67, .6);     /* secondaryLabel */
  --label-3: rgba(60, 60, 67, .3);
  --separator: rgba(60, 60, 67, .29);
  --fill: rgba(118, 118, 128, .12);    /* tertiarySystemFill */
  --fill-2: rgba(118, 118, 128, .2);
  --sidebar: rgba(246, 246, 248, .78);
  --selected: rgba(0, 0, 0, .07);
  --segment-on: #ffffff;

  --blue: #007aff;   --blue-text: #0040dd;
  --green: #34c759;  --green-text: #248a3d;
  --orange: #ff9500; --orange-text: #c93400;
  --red: #ff3b30;    --red-text: #d70015;
  --purple: #af52de; --purple-text: #8944ab;
  --gray: #8e8e93;   --gray-text: #6c6c70;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --cell: #1c1c1e; --cell-hover: #242426;
    --label: #ffffff; --label-2: rgba(235, 235, 245, .6); --label-3: rgba(235, 235, 245, .3);
    --separator: rgba(84, 84, 88, .65); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32);
    --sidebar: rgba(28, 28, 30, .78); --selected: rgba(255, 255, 255, .1); --segment-on: #636366;
    --blue: #0a84ff; --blue-text: #409cff; --green: #30d158; --green-text: #30d158;
    --orange: #ff9f0a; --orange-text: #ffb340; --red: #ff453a; --red-text: #ff6961;
    --purple: #bf5af2; --purple-text: #da8fff; --gray: #8e8e93; --gray-text: #aeaeb2;
  }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; font: 15px/1.42 var(--font); letter-spacing: -.01em; background: var(--bg); color: var(--label); }
/* Arabic: system Arabic faces (SF Arabic / Segoe UI), slightly larger, and never letter-spaced (it breaks joining) */
:root:lang(ar) { --font: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  --font-display: var(--font); }
:lang(ar) body, :lang(ar) .large-title, :lang(ar) .app-name, :lang(ar) .nav .group, :lang(ar) .section-header { letter-spacing: 0; }
:lang(ar) body { font-size: 15.5px; line-height: 1.55; }
:lang(ar) .section-header, :lang(ar) .nav .group { text-transform: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px;
  background: var(--sidebar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-inline-end: .5px solid var(--separator); display: flex; flex-direction: column; }
.app-name { font: 600 13px var(--font); color: var(--label-2); padding: 6px 10px 12px; letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px;
  color: var(--label); font-size: 14px; }
.nav a svg { color: var(--blue); }
.nav a:hover { text-decoration: none; background: var(--selected); }
.nav a.active { background: var(--selected); font-weight: 600; }
.nav .group { font: 600 11px var(--font); color: var(--label-2); padding: 14px 10px 4px; text-transform: uppercase; letter-spacing: .04em; }
.who { margin-top: auto; padding: 10px; border-top: .5px solid var(--separator); font-size: 13px; }
.who .name { font-weight: 600; }
.who .role { color: var(--label-2); font-size: 12px; }
.who-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.lang { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.lang svg { width: 15px; height: 15px; }
.corner { position: absolute; top: 14px; inset-inline-end: 18px; }
main { padding: 26px 34px 60px; max-width: 1180px; width: 100%; min-width: 0; }

/* ---------- titles ---------- */
.titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.large-title { font: 700 32px/1.15 var(--font-display); letter-spacing: .01em; margin: 0; }
.subtitle { color: var(--label-2); margin: 4px 0 0; font-size: 15px; }
.section-header { font: 400 13px var(--font); color: var(--label-2); text-transform: uppercase; letter-spacing: .02em;
  margin: 26px 16px 7px; }
.section-footer { font-size: 13px; color: var(--label-2); margin: 7px 16px 0; }

/* ---------- inset grouped lists ---------- */
/* overflow-x: a table wider than the screen scrolls inside its box instead of being cut off */
.group-box { background: var(--cell); border-radius: var(--radius); overflow-x: auto; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; inset-inline-start: 16px; inset-inline-end: 0; border-top: .5px solid var(--separator); }
.row .label { flex: 1; min-width: 0; }
.row .value { color: var(--label-2); text-align: end; }
.row.check { padding: 0; gap: 10px; }
.row .secondary { color: var(--label-2); font-size: 13px; }

/* ---------- table inside a grouped box ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { font: 400 12px var(--font); color: var(--label-2); text-align: start; padding: 10px 14px 8px;
  border-bottom: .5px solid var(--separator); white-space: nowrap; }
table.list td { padding: 11px 14px; border-bottom: .5px solid var(--separator); vertical-align: middle; font-size: 14px; }
table.list tr:last-child td { border-bottom: none; }
table.list tr.link { cursor: pointer; }
table.list tr.link:hover td { background: var(--cell-hover); }
.mono { font-family: var(--mono); font-size: 13px; }
table.list td.mono { overflow-wrap: anywhere; }  /* long printer addresses and job ids wrap instead of widening the table */
.muted { color: var(--label-2); }
table.list td.actions { white-space: nowrap; text-align: end; }
table.list td.actions form { margin-inline-start: 10px; }
.branch-group { margin-bottom: 28px; }
.branch-group > .section-header { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.branch-group > .section-header .counts { text-transform: none; letter-spacing: 0; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sub { font-size: 12px; color: var(--label-2); margin-top: 2px; }
.sub.warn { color: var(--orange-text); }
.sub.bad { color: var(--red-text); }
.sub.note { color: var(--purple-text); }
.empty { text-align: center; padding: 44px 20px; color: var(--label-2); }

/* ---------- status capsules ---------- */
.capsule { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.capsule::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.c-blue { color: var(--blue-text); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.c-green { color: var(--green-text); background: color-mix(in srgb, var(--green) 16%, transparent); }
.c-orange { color: var(--orange-text); background: color-mix(in srgb, var(--orange) 16%, transparent); }
.c-red { color: var(--red-text); background: color-mix(in srgb, var(--red) 14%, transparent); }
.c-purple { color: var(--purple-text); background: color-mix(in srgb, var(--purple) 14%, transparent); }
.c-gray { color: var(--gray-text); background: var(--fill); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; margin-inline-start: 6px;
  vertical-align: 1px; }

/* ---------- controls ---------- */
button, .btn { font: 500 14px var(--font); border: none; border-radius: 8px; padding: 7px 14px; cursor: pointer;
  background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue-text); display: inline-flex;
  align-items: center; gap: 6px; text-decoration: none; }
button:hover, .btn:hover { filter: brightness(.96); text-decoration: none; }
button:active, .btn:active { transform: scale(.98); }
button.filled, .btn.filled { background: var(--blue); color: #fff; }
button.destructive { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-text); }
button.plain { background: none; padding: 4px 2px; color: var(--blue); }
button.wide { width: 100%; justify-content: center; margin-top: 16px; padding: 10px; }
.btn.quiet { background: none; }
input.bare { background: none !important; padding: 4px 0 !important; box-shadow: none !important; }
form.inline { display: inline; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: 15px var(--font); color: var(--label); background: var(--fill); border: none; border-radius: 8px;
  padding: 8px 11px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 45%, transparent); }
input[type=file] { font: 13px var(--font); color: var(--label-2); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
label.field { display: block; font-size: 13px; color: var(--label-2); margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px 16px; padding: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 16px 16px; flex-wrap: wrap; }

.search { position: relative; flex: 1; min-width: 240px; max-width: 460px; }
.search svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--label-2); width: 16px; height: 16px; }
.search input { padding-inline-start: 32px; height: 36px; }

.segmented { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.segmented a { font-size: 13px; font-weight: 500; color: var(--label); padding: 5px 12px; border-radius: 7px; text-decoration: none; }
.segmented a.on { background: var(--segment-on); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters select { width: auto; height: 36px; }

/* ---------- banners ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.banner.ok { background: color-mix(in srgb, var(--green) 14%, var(--cell)); color: var(--green-text); }
.banner.bad { background: color-mix(in srgb, var(--red) 12%, var(--cell)); color: var(--red-text); }
.banner.warn { background: color-mix(in srgb, var(--orange) 14%, var(--cell)); color: var(--orange-text); }
.key-row { display: flex; gap: 8px; margin: 10px 0 8px; }
.key-row input { flex: 1; font-size: 14px; background: var(--cell); }
pre.code { font: 13px/1.6 var(--mono); background: var(--fill); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px;
  overflow-x: auto; white-space: pre; text-align: left; }
.banner.note { background: color-mix(in srgb, var(--purple) 12%, var(--cell)); color: var(--purple-text); }

/* ---------- printers ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card { background: var(--cell); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; align-items: flex-start; }
.card-head > div { min-width: 0; overflow-wrap: anywhere; }
.card-title { font: 600 17px var(--font-display); }
.card-sub { font-size: 13px; color: var(--label-2); }
.advice { font-size: 13px; color: var(--label-2); background: var(--fill); border-radius: 8px; padding: 9px 11px; }
.meter { height: 6px; background: var(--fill-2); border-radius: 3px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.meter.low > span { background: var(--orange); }
.meter.empty > span { background: var(--red); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--label-2); }
.kv dd { margin: 0; text-align: end; }
.meter-label { display: flex; justify-content: space-between; font-size: 13px; }
.history-list { font-size: 12px; color: var(--label-2); border-top: .5px solid var(--separator); padding-top: 8px; }
.history-list > div:not(.meter-label) { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.one-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Printers page: identical cards side by side (every row as tall as the tallest card); the rest is in Details. */
.printer-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.printer-grid .card { padding: 12px 14px; gap: 8px; min-width: 0; }
.printer-grid .card-title { font-size: 15px; }
.card-branch { display: flex; gap: 10px; font-size: 12px; color: var(--label-2); white-space: nowrap;
  border-bottom: .5px solid var(--separator); padding-bottom: 7px; }
.card-branch strong { color: var(--label); font-weight: 600; margin-inline-end: auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; }
.card-branch .bad { color: var(--red-text); }
.pcard-title { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.pcard-title .card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px;
  color: var(--label-2); margin-top: auto; padding-top: 4px; }
.card-foot a, .card-foot button { white-space: nowrap; font-size: 13px; flex-shrink: 0; }
.toners { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; }
.toners .meter-label { font-size: 11px; gap: 6px; }
.toners .meter-label span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toners .meter-label span:last-child { flex-shrink: 0; }

/* Supplies in their own ink (bars and dots); the percentage turns orange/red when low/empty. */
:root { --ink-yellow: #ffd60a; --ink-magenta: #e0218a; --ink-cyan: #00aeef; --ink-black: #1c1c1e; --ink-other: var(--gray); }
.meter.ink-yellow > span, .ink-dot.ink-yellow { background: var(--ink-yellow); }
.meter.ink-magenta > span, .ink-dot.ink-magenta { background: var(--ink-magenta); }
.meter.ink-cyan > span, .ink-dot.ink-cyan { background: var(--ink-cyan); }
.meter.ink-black > span, .ink-dot.ink-black { background: var(--ink-black); }
.meter.ink-other > span, .ink-dot.ink-other { background: var(--ink-other); }
@media (prefers-color-scheme: dark) { .meter.ink-black > span, .ink-dot.ink-black { background: #000000; box-shadow: inset 0 0 0 1px #8e8e93; } }
.ink-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; vertical-align: -1px; }
.level-low { color: var(--orange-text); font-weight: 600; }
.level-empty { color: var(--red-text); font-weight: 600; }
.level-meter { width: 90px; margin-top: 4px; }

/* Printer details dialog */
.dialog { border: none; border-radius: 14px; padding: 0; background: var(--cell); color: var(--label);
  width: min(560px, calc(100vw - 32px)); max-height: 85vh; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dlg-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 85vh; }
.dlg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: flex-start;
  padding-inline-end: 40px; }
.dlg-head > div { min-width: 0; overflow-wrap: anywhere; }
.dlg-close { position: absolute; top: 10px; inset-inline-end: 12px; background: var(--fill); border-radius: 50%;
  width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; color: var(--label-2); }
.dlg-links { display: flex; gap: 16px; font-size: 13px; }

/* Notifications: bell with an unread count, a list under it, and toasts for new alerts */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell { position: relative; background: none; padding: 6px; border-radius: 8px; color: var(--label-2); }
.bell:hover { background: var(--selected); }
.bell .icon { width: 20px; height: 20px; }
.bell-count { position: absolute; top: 0; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.nav-count { margin-inline-start: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange);
  color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.notif-panel { position: fixed; inset: auto; margin: 0; padding: 0; border: none; border-radius: 12px;
  background: var(--cell); color: var(--label); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  max-height: min(480px, 75vh); overflow-y: auto; }
.notif-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px 8px;
  font-size: 13px; position: sticky; top: 0; background: var(--cell); }
.notif-head strong { font-size: 15px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; color: var(--label); font-size: 13px;
  border-top: .5px solid var(--separator); }
.notif:hover { text-decoration: none; background: var(--cell-hover); }
.notif .ink-dot { margin-top: 4px; }
.notif-text { display: flex; flex-direction: column; min-width: 0; }
.notif.unread { background: color-mix(in srgb, var(--blue) 9%, var(--cell)); }
.notif.done { color: var(--label-2); }
.notif-panel .empty { padding: 28px 16px; }
.toasts { position: fixed; bottom: 16px; inset-inline-end: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50;
  max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--cell); color: var(--label); border-radius: 12px; padding: 12px 14px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); border-inline-start: 4px solid var(--orange); animation: toast-in .25s ease-out; }
.toast:hover { text-decoration: none; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
[hidden] { display: none !important; }

/* ---------- order page ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
/* below this the order details are too narrow beside the separator preview: put the preview underneath */
@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } .split > .preview { max-width: 340px; } }
.preview img { width: 100%; border-radius: 8px; display: block; box-shadow: 0 0 0 .5px var(--separator);
  -webkit-user-drag: none; user-select: none; }
.timeline .row { align-items: flex-start; }
.timeline .when { color: var(--label-2); font-size: 12px; min-width: 92px; padding-top: 1px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 360px; }
.login .large-title { text-align: center; margin-bottom: 6px; }

/* ---------- scan ---------- */
.scan-input { font-size: 20px !important; height: 50px; font-family: var(--mono) !important; }
.result { margin-top: 16px; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 500; }
.result.ACCEPTED, .result.ALREADY_COMPLETED { background: color-mix(in srgb, var(--green) 16%, var(--cell)); color: var(--green-text); }
.result.NOT_YET_PRINTED, .result.SUPERSEDED_ATTEMPT { background: color-mix(in srgb, var(--orange) 16%, var(--cell)); color: var(--orange-text); }
.result.INVALID_CODE, .result.WRONG_BRANCH, .result.WRONG_ORDER { background: color-mix(in srgb, var(--red) 14%, var(--cell)); color: var(--red-text); }

.doc-row { display: grid; grid-template-columns: minmax(0, 2fr) 80px 1.2fr 1fr 90px 36px; gap: 10px; align-items: end;
  padding: 12px 16px; border-top: .5px solid var(--separator); }
.doc-row.first { border-top: none; }
.row.wrap { flex-wrap: wrap; }
input[type=email] { font: 15px var(--font); color: var(--label); background: var(--fill); border: none; border-radius: 8px;
  padding: 8px 11px; width: 100%; outline: none; }
.inline-edit { display: flex; gap: 6px; align-items: center; min-width: 220px; }
.inline-edit input { padding: 5px 8px; font-size: 13px; }

/* ---------- previews ---------- */
.preview-doc { padding: 12px 16px; }
.preview-doc + .preview-doc { border-top: .5px solid var(--separator); }
.preview-title { font-size: 14px; margin-bottom: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.thumb { position: relative; padding: 0; background: var(--fill); border-radius: 6px; overflow: hidden;
  aspect-ratio: 1 / 1.414; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; user-select: none; -webkit-user-drag: none; }
.thumb span { position: absolute; bottom: 4px; inset-inline-end: 4px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff;
  border-radius: 4px; padding: 0 5px; }
.thumb:hover { filter: none; box-shadow: 0 0 0 2px var(--blue); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 50; display: flex; align-items: center;
  justify-content: center; gap: 12px; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1000px, 86vw); max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: 84vh; background: #fff; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.lightbox figcaption { color: #fff; font-size: 13px; margin-top: 8px; text-align: center; }
.lb-btn { background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; width: 44px; height: 44px;
  border-radius: 50%; justify-content: center; padding: 0; }
.lb-close { position: absolute; top: 16px; inset-inline-end: 16px; }
[dir=rtl] .lb-prev, [dir=rtl] .lb-next { transform: scaleX(-1); }

/* ---------- pickup (phone) ---------- */
.pickup { max-width: 520px; margin: 0 auto; }
.pickup-card { margin-bottom: 18px; }
.pickup-no { font: 700 28px var(--font-display); }
.pickup-btn { width: 100%; justify-content: center; font-size: 19px; padding: 16px; border-radius: 12px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--label-2); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: .5px solid var(--separator); }
.btn.google { width: 100%; justify-content: center; padding: 10px; background: var(--cell); color: var(--label);
  box-shadow: 0 0 0 .5px var(--separator); gap: 10px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: column; border-inline-end: none; border-bottom: .5px solid var(--separator); }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav .group { display: none; }
  main { padding: 18px 16px 40px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .doc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* the sidebar still takes 236px down to 961px, so tables run out of room before the phone layout starts */
@media (max-width: 1024px) {
  table.list .hide-sm { display: none; }
  table.list td.actions { white-space: normal; }  /* Edit and Remove stack instead of widening the table */
}
