/* HARDCO Petty Cash — v9 design (02/10/2026): HARDCO colours and logo kept; charcoal top bar with hover menus, new type, one component set.
   Type: Alexandria for headings, menus, buttons and big figures; IBM Plex Sans Arabic for text and tables (tabular figures). Both self-hosted. */
@font-face { font-family: "Plex Arabic"; font-weight: 400; src: url(/fonts/plex-arabic-400.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; src: url(/fonts/plex-arabic-500.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; src: url(/fonts/plex-arabic-600.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; src: url(/fonts/plex-arabic-700.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; src: url(/fonts/plex-latin-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; src: url(/fonts/plex-latin-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; src: url(/fonts/plex-latin-600.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; src: url(/fonts/plex-latin-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alexandria"; font-weight: 400; src: url(/fonts/alex-arabic-400.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-weight: 500; src: url(/fonts/alex-arabic-500.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-weight: 600; src: url(/fonts/alex-arabic-600.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-weight: 700; src: url(/fonts/alex-arabic-700.woff2) format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-weight: 400; src: url(/fonts/alex-latin-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alexandria"; font-weight: 500; src: url(/fonts/alex-latin-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alexandria"; font-weight: 600; src: url(/fonts/alex-latin-600.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alexandria"; font-weight: 700; src: url(/fonts/alex-latin-700.woff2) format("woff2"); font-display: swap; }

:root {
  /* brand (unchanged) */
  --brand: #93081f; --brand-dark: #6e0616; --brand-deep: #6e0616; --brand-2: #a60c25; --brand-50: #fbeff1; --brand-100: #f6dbe0; --accent: #93081f;
  /* charcoal */
  --char: #17181c; --char-2: #22232a; --char-3: #2f3038; --char-text: #c9cbd3; --char-muted: #8d909b;
  --side: var(--char); --side-2: var(--char-2); --side-3: var(--char-3); --side-text: var(--char-text); --side-muted: var(--char-muted);
  /* neutrals */
  --bg: #f3f4f6; --card: #ffffff; --text: #1c1d22; --muted: #697080; --faint: #9aa0ab; --line: #e4e6ea; --line-2: #eef0f3; --soft: #f7f8fa; --field: #d5d8de;
  /* status */
  --good: #1f7a3a; --good-bg: #e5f4ea; --bad: #93081f; --bad-bg: #fbe6ea; --warn: #9a5b00; --warn-bg: #fff2d9; --info: #2f4bb3; --info-bg: #ebf0ff;
  --acc: #5b3aa6; --acc-bg: #f1ecfb; --neutral: #4d525c; --neutral-bg: #eceef1;
  --r-s: 8px; --r: 12px; --r-l: 18px; --radius: 18px; --radius-s: 10px;
  --sh-1: 0 1px 2px rgba(23, 24, 28, .05); --sh-2: 0 14px 34px -12px rgba(23, 24, 28, .30), 0 2px 6px rgba(23, 24, 28, .06); --shadow: var(--sh-1);
  --font: "Plex Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  --head: "Alexandria", var(--font); --font-brand: var(--head);
  --topbar-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; }
h1 { font: 700 26px/1.25 var(--head); margin: 0; letter-spacing: -.2px; color: var(--text); }
h2 { font: 600 17px/1.35 var(--head); margin: 0 0 .5rem; color: var(--text); }
h3 { font: 600 14.5px/1.35 var(--head); margin: 0; color: var(--text); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: .6rem 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .pad { padding: 1rem; } .pad-t { padding-top: .6rem; } .spacer { flex: 1; }
.bad-text { color: var(--bad); } .good-text { color: var(--good); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
[dir=rtl] .ico.dir { transform: scaleX(-1); }
:focus-visible { outline: 3px solid rgba(147, 8, 31, .28); outline-offset: 1px; }
::selection { background: var(--brand-100); }

/* ---------- env ribbon ---------- */
.envbar { background: var(--warn-bg); color: #6b4000; text-align: center; padding: 3px .6rem; font-weight: 600; font-size: 11.5px; }

/* ---------- top bar ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topnav { height: var(--topbar-h); background: var(--char); color: var(--char-text); display: flex; align-items: center; gap: 4px; padding: 0 22px; position: sticky; top: 0; z-index: 40; }
.tn-brand { display: flex; align-items: center; gap: 11px; margin-inline-end: 18px; color: #fff; flex-shrink: 0; }
.tn-brand .lg { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.tn-brand .lg img { width: 34px; height: 34px; object-fit: contain; display: block; }
.tn-brand b { font: 700 15px/1.2 var(--head); color: #fff; display: block; letter-spacing: .3px; } .tn-brand small { font-size: 11px; color: var(--char-muted); white-space: nowrap; }
.tn-nav { display: flex; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.dd { position: relative; height: 100%; display: flex; align-items: center; }
.nv { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 10px; font: 500 13.5px var(--head); color: var(--char-text); position: relative; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.nv:hover, .dd.open > .nv { background: var(--char-2); color: #fff; }
.nv.on { color: #fff; } .nv.on::after { content: ''; position: absolute; bottom: -12px; left: 12px; right: 12px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.nv .cv { opacity: .6; transition: transform .15s; } .dd.open > .nv .cv { transform: rotate(180deg); }
.ct { min-width: 19px; height: 19px; border-radius: 999px; background: var(--brand); color: #fff; font: 600 11px var(--font); display: inline-grid; place-items: center; padding: 0 5px; line-height: 1; }
.topnav .sp { flex: 1; }
.tb-btn { height: 38px; min-width: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; color: var(--char-text); font: 500 13px var(--head); position: relative; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.tb-btn:hover, .dd.open > .tb-btn { background: var(--char-2); color: #fff; }
.tb-btn.new { background: var(--brand); color: #fff; padding: 0 14px; margin-inline-end: 6px; } .tb-btn.new:hover, .dd.open > .tb-btn.new { background: var(--brand-2); }
.tb-btn .dot { position: absolute; top: 2px; inset-inline-end: 1px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--brand); border: 2px solid var(--char); color: #fff; font: 700 9.5px var(--font); display: grid; place-items: center; padding: 0 3px; line-height: 1; }
.tb-btn .kbd { border-color: #3a3b44; color: var(--char-muted); }
.tb-btn.lang { font-family: var(--font); font-weight: 600; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 14px var(--head); flex-shrink: 0; }
.av.lg { width: 46px; height: 46px; font-size: 18px; }
.me { display: flex; align-items: center; gap: 9px; padding: 3px 10px 3px 6px; border-radius: 12px; background: none; border: 0; cursor: pointer; color: var(--char-text); text-align: start; }
.me:hover, .dd.open > .me { background: var(--char-2); }
.me b { font: 600 13px/1.3 var(--head); color: #fff; display: block; white-space: nowrap; } .me small { font-size: 11px; color: var(--char-muted); white-space: nowrap; display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* dropdown menus */
.menu { position: absolute; top: calc(100% - 4px); inset-inline-start: 0; background: #fff; color: var(--text); border-radius: 14px; box-shadow: var(--sh-2); border: 1px solid var(--line); padding: 6px; min-width: 300px; z-index: 60; animation: menuIn .12s ease-out; text-align: start; }
.menu.end { inset-inline-start: auto; inset-inline-end: 0; }
.menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mi { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--text); cursor: pointer; background: none; border: 0; width: 100%; text-align: start; font: inherit; }
.mi .mic { width: 34px; height: 34px; border-radius: 9px; background: var(--soft); display: grid; place-items: center; color: var(--char-3); }
.mi b { font: 600 13.5px/1.35 var(--head); display: block; color: var(--text); } .mi small { color: var(--muted); font-size: 12px; line-height: 1.5; display: block; }
.mi:hover, .mi.hov, .mi:focus-visible { background: var(--brand-50); outline: 0; } .mi:hover .mic, .mi.hov .mic { background: #fff; color: var(--brand); }
.mi.on b { color: var(--brand); }
.mi .ct.g { background: var(--line-2); color: var(--muted); }
.mi.sm { grid-template-columns: 22px 1fr auto; padding: 9px 10px; } .mi.sm b { font: 500 13.5px var(--font); }
.mi.sm .ico { color: var(--char-3); } .mi.danger b, .mi.danger .ico { color: var(--bad); }
.msep { height: 1px; background: var(--line-2); margin: 5px 8px; }
.mh { padding: 8px 10px 4px; font: 600 11.5px var(--head); color: var(--faint); }
.m-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.m-who b { font: 600 15px var(--head); display: block; } .m-who small { color: var(--muted); font-size: 12px; direction: ltr; display: block; text-align: end; }
.kbd { font: 500 11px var(--font); color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; line-height: 17px; display: inline-block; min-width: 18px; text-align: center; }

/* notifications menu */
.menu.notif-menu { width: 420px; padding: 0; overflow: hidden; }
.nm-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.nm-head b { font: 600 15px var(--head); }
.nm-list { max-height: min(60vh, 460px); overflow: auto; padding: 0 8px 6px; }
.nm-it { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 11px 10px; border-radius: 12px; cursor: pointer; }
.nm-it:hover { background: var(--soft); } .nm-it.new { background: var(--brand-50); } .nm-it.new:hover { background: var(--brand-100); }
.nm-it .mic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.nm-it .mic.good { background: var(--good-bg); color: var(--good); } .nm-it .mic.warn { background: var(--warn-bg); color: var(--warn); } .nm-it .mic.bad { background: var(--bad-bg); color: var(--bad); }
.nm-it b { font: 600 13.5px/1.5 var(--head); display: block; } .nm-it small { color: var(--faint); font-size: 11.5px; }
.nm-foot { display: block; text-align: center; padding: 12px; border-top: 1px solid var(--line-2); font: 600 13.5px var(--head); color: var(--text); }
.nm-foot:hover { background: var(--soft); }
.nm-empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- page ---------- */
.main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 22px 28px 40px; flex: 1; }
.page { display: flex; flex-direction: column; gap: 16px; }
.pg-h { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 2px; }
.pg-h > .tt { min-width: 0; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--brand); } .crumb .ico { width: 13px; height: 13px; }
.pg-h .meta { color: var(--muted); font-size: 13px; margin-top: 5px; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.pg-h .meta b { color: var(--text); font-weight: 600; }
.pg-h .meta .dotsep::before { content: '·'; color: var(--faint); }
.pg-h .acts { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-h h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page > .row:first-child h1 { font-size: 26px; }
.narrow { max-width: 520px; margin: 2rem auto; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: .6rem; align-items: center; } .row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid2.wide-left { grid-template-columns: 1.25fr .95fr; align-items: start; }
.sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }
/* panels (Card) */
.card, .pnl { background: var(--card); border-radius: var(--r-l); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.card-h, .pnl-h { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h3, .pnl-h h3 { font: 600 16px var(--head); }
.card-h .spacer + * { margin-inline-start: 0; }
.card-b, .pnl-b { padding: 16px 20px; }
.card-b > .tablewrap:only-child { margin: -16px -20px; }
.card-b.flush { padding: 0; } .card-b.flush > .tablewrap:only-child { margin: 0; }
.card-b.flush > .tablewrap .table th:first-child, .card-b.flush > .tablewrap .table td:first-child { padding-inline-start: 20px; }
.card-b.flush > .tablewrap .table th:last-child, .card-b.flush > .tablewrap .table td:last-child { padding-inline-end: 20px; }
.card-b > .tablewrap:only-child .table th:first-child, .card-b > .tablewrap:only-child .table td:first-child { padding-inline-start: 20px; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .kv > span:first-child { color: var(--muted); } .kv b { font-weight: 600; text-align: end; }
.kv:last-child { border-bottom: 0; }
.kvgrid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.4rem; }
.money { font-variant-numeric: tabular-nums; unicode-bidi: isolate; } .money.neg { color: var(--bad); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--field); background: #fff; color: var(--text); font: 600 13.5px var(--head); cursor: pointer; white-space: nowrap; box-shadow: var(--sh-1); transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none; }
.btn:hover { background: var(--soft); border-color: #c2c6ce; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(147, 8, 31, .3); } .btn.primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
.btn.dark { background: var(--char); border-color: var(--char); color: #fff; } .btn.dark:hover:not(:disabled) { background: var(--char-3); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--char-3); } .btn.ghost:hover:not(:disabled) { background: rgba(23, 24, 28, .05); }
.btn.danger { background: #fff; border-color: #efc3cb; color: var(--bad); } .btn.danger:hover:not(:disabled) { background: var(--bad-bg); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.ico-only { width: 38px; padding: 0; } .btn.small.ico-only { width: 31px; }
.btn .ico { width: 16px; height: 16px; } .btn.small .ico { width: 14px; height: 14px; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; display: inline-block; animation: spin .7s linear infinite; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; } .form.narrow { max-width: 480px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; } .field .label { font: 500 12.5px var(--font); color: #4a4f5a; } .req { color: var(--bad); margin-inline-start: .2rem; }
.hint { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--field); border-radius: 10px; font: 400 14px var(--font); background: #fff; color: var(--text); transition: border-color .12s, box-shadow .12s; }
select.input { appearance: none; -webkit-appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23697080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; }
html[dir=ltr] select.input { background-position: right 12px center; }
textarea.input { min-height: 84px; line-height: 1.6; resize: vertical; }
.input:hover { border-color: #c2c6ce; }
.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(147, 8, 31, .14); }
.input::placeholder { color: var(--faint); }
.input:disabled { background: var(--soft); color: var(--muted); }
.input.conf-low { border-color: #e9a3b0; background: #fff9fa; } .input.conf-mid { border-color: #f2c66d; background: #fffbef; } .input.conf-ok { border-color: #9ed3ae; }
.chip.conf-low { background: var(--bad-bg); } .chip.conf-mid { background: var(--warn-bg); }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
.inp-ico { position: relative; display: flex; align-items: center; }
.inp-ico > .ico { position: absolute; inset-inline-start: 12px; color: var(--faint); width: 16px; height: 16px; pointer-events: none; }
.inp-ico > .input { padding-inline-start: 36px; }
.inp-ico > .kbd { position: absolute; inset-inline-end: 10px; }
.inp-ico > .x { position: absolute; inset-inline-end: 8px; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px; display: flex; }

/* ---------- status pills / tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px; font: 500 12px/1.45 var(--font); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.badge.nodot::before { display: none; }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.info { background: var(--info-bg); color: var(--info); } .badge.muted { background: var(--neutral-bg); color: var(--neutral); } .badge.acc { background: var(--acc-bg); color: var(--acc); }
.tag { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px var(--font); padding: 2px 8px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); color: #4a4f5a; white-space: nowrap; }
.tag.w { background: var(--warn-bg); border-color: #f2d59d; color: var(--warn); }
.flags { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.chip { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; margin: 2px; font-size: 12.5px; }

/* the stage rail — 5 segments: done (charcoal), current (brand), returned (amber) */
.rail { display: flex; gap: 3px; align-items: center; }
.rail i { display: block; height: 6px; flex: 1; border-radius: 3px; background: #e2e4e8; min-width: 14px; }
.rail i.d { background: var(--char-3); } .rail i.c { background: var(--brand); } .rail i.r { background: #e2a33b; }
.railx { display: flex; flex-direction: column; gap: 6px; min-width: 150px; max-width: 320px; } .railx small { font: 400 12px var(--font); color: var(--muted); } .railx small b { color: var(--text); font-weight: 600; }
.railx .closed { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral); font-size: 12px; align-self: stretch; }
.railx .closed::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- boxes ---------- */
.errorbox { background: var(--bad-bg); color: var(--bad); border: 1px solid #f1bfc8; border-radius: 12px; padding: 10px 14px; line-height: 1.6; }
.warnbox { background: var(--warn-bg); color: var(--warn); border: 1px solid #f2d59d; border-radius: 12px; padding: 10px 14px; margin: 0; line-height: 1.6; }
.infobox { background: var(--soft); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; line-height: 1.6; }
.goodbox { background: var(--good-bg); color: var(--good); border: 1px solid #bfe3cd; border-radius: 12px; padding: 10px 14px; margin: 0; line-height: 1.7; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); line-height: 1.7; }
.empty .e-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 12px; }
.empty b { display: block; font: 600 15px var(--head); color: var(--text); margin-bottom: 4px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: start; color: var(--muted); font: 500 12px var(--font); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: #fbf5f6; }
.table tr.sel td { background: var(--brand-50); }
.table td.n, .table th.n { text-align: end; } .table td.n { font-variant-numeric: tabular-nums; font-weight: 600; }
.table .ref { font: 600 13.5px var(--head); white-space: nowrap; } .table .ref small { display: block; font: 400 12px var(--font); color: var(--muted); margin-top: 2px; }
.chkcol { width: 40px; }
.nowrap { white-space: nowrap; }

/* tabs (segmented) */
.tabs, .seg { display: inline-flex; background: #e9ebef; border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button, .seg button { background: none; border: 0; padding: 7px 14px; border-radius: 9px; font: 500 13px var(--head); color: #4a4f5a; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabs button:hover, .seg button:hover { color: var(--text); }
.tabs button.active, .seg button.active { background: #fff; color: var(--text); box-shadow: var(--sh-1); font-weight: 600; }
.seg .n { font: 600 11px var(--font); color: var(--muted); background: rgba(23, 24, 28, .06); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.seg button.active .n.hot { background: var(--brand); color: #fff; }
.filters .input { max-width: 260px; }
/* toolbar of a list: tabs · filter chips · search */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { margin-inline-start: auto; width: 300px; max-width: 100%; }
.fchip { position: relative; }
.fchip > button { height: 36px; border: 1px dashed #c9ccd3; background: #fff; border-radius: 10px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font: 500 13px var(--font); color: #4a4f5a; cursor: pointer; white-space: nowrap; }
.fchip > button:hover { border-color: #9aa0ab; color: var(--text); }
.fchip.set > button { border-style: solid; border-color: #efc3cb; background: var(--brand-50); color: var(--brand); }
.fchip .x { display: inline-flex; margin-inline-start: 2px; opacity: .8; } .fchip .x:hover { opacity: 1; }
.fchip .menu { min-width: 260px; width: max-content; max-width: 380px; max-height: 340px; overflow: auto; top: calc(100% + 6px); }
.fchip .menu .f-dates { display: grid; gap: 10px; padding: 8px; }
/* bulk bar */
.bulkbar { display: flex; align-items: center; gap: 12px; margin: 10px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--char); color: #fff; font-size: 13px; flex-wrap: wrap; }
.bulkbar b { font: 600 14px var(--head); }
.bulkbar .spacer { flex: 1; }
.bulkbar .btn.ghost { color: #fff; } .bulkbar .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.bulkbar .btn.danger { background: rgba(147, 8, 31, .18); border-color: rgba(239, 120, 140, .45); color: #ff9cad; box-shadow: none; }
/* pagination */
.pager { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager .info { color: var(--muted); font-size: 12.5px; margin-inline-end: auto; }
.pager button { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: none; font: 600 13px var(--font); color: #4a4f5a; cursor: pointer; display: inline-grid; place-items: center; padding: 0 8px; }
.pager button:hover:not(:disabled) { background: var(--soft); }
.pager button.on { border-color: var(--field); background: #fff; color: var(--text); box-shadow: var(--sh-1); }
.pager button.arrow { border-color: var(--line); }
.pager button:disabled { opacity: .4; cursor: default; }
/* row ⋯ menu */
.kebab { position: relative; display: inline-flex; }
.kebab > button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.kebab > button:hover, .kebab.open > button { background: var(--line-2); color: var(--text); }
.kebab .menu { min-width: 220px; top: calc(100% + 4px); inset-inline-start: auto; inset-inline-end: 0; }

/* history / timeline */
.history:not(.tline) { list-style: none; margin: 0; padding: 0; } .history:not(.tline) li { padding: 9px 0; border-bottom: 1px solid var(--line-2); line-height: 1.6; } .history:not(.tline) li:last-child { border-bottom: 0; } .note { background: var(--soft); padding: 6px 10px; border-radius: 8px; margin-top: 4px; }
.tline { list-style: none; margin: 0; padding: 0; position: relative; }
.tline li { position: relative; padding: 0 0 18px; padding-inline-start: 44px; min-height: 40px; }
.tline li::before { content: ''; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 2px; width: 2px; background: var(--line); border-radius: 2px; }
.tline li:last-child::before { display: none; }
.tline .tl-dot { position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); }
.tline .tl-dot.now { background: var(--brand); color: #fff; } .tline .tl-dot.bad { background: var(--bad-bg); color: var(--bad); } .tline .tl-dot.todo { background: var(--line-2); color: var(--faint); } .tline .tl-dot.warn { background: var(--warn-bg); color: var(--warn); }
.tline b { font: 600 14px/1.4 var(--head); display: block; } .tline small { color: var(--muted); font-size: 12.5px; display: block; } .tline .note { font-size: 12.5px; }
.notif { list-style: none; margin: 0; padding: 0; } .notif li { display: flex; justify-content: space-between; gap: 1rem; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; } .notif li:hover { background: var(--soft); } .notif li.unread { font-weight: 600; background: var(--brand-50); }
.notif li:last-child { border-bottom: 0; }
.filelist { display: flex; flex-direction: column; gap: .4rem; } .fileitem { display: flex; gap: .6rem; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; } .fileitem.active { border-color: var(--brand); background: var(--brand-50); }
.ocr-list { display: flex; flex-direction: column; gap: .8rem; } .ocr-item { border: 1px solid var(--line); border-radius: 12px; padding: .7rem; } .ocr-item.off { opacity: .5; }
.small-fields .field { max-width: 120px; }
.pre { white-space: pre-wrap; font-size: .75rem; background: var(--soft); padding: .4rem; border-radius: 6px; max-width: 520px; }

/* viewer */
.viewer { display: flex; flex-direction: column; gap: 8px; }
.viewer-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.viewer-canvas { overflow: auto; max-height: 75vh; background: #e9eaee; border-radius: 12px; padding: 10px; text-align: center; }
.viewer-canvas canvas { max-width: 100%; height: auto; box-shadow: 0 8px 24px rgba(20, 20, 30, .14); background: #fff; border-radius: 4px; }

/* ---------- dialogs ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(23, 24, 28, .55); display: grid; place-items: center; z-index: 80; padding: 16px; backdrop-filter: blur(2px); animation: fadeIn .12s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 540px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); animation: popIn .16s ease-out; overflow: hidden; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 880px; }
.modal-h { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 6px; }
.modal-h .m-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.modal-h .m-ic.good { background: var(--good-bg); color: var(--good); } .modal-h .m-ic.bad { background: var(--bad-bg); color: var(--bad); }
.modal-h .m-ic .ico { width: 22px; height: 22px; }
.modal-h h3 { font: 700 19px/1.35 var(--head); }
.modal-h .m-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.6; }
.modal-h .x { margin-inline-start: auto; background: none; border: 0; cursor: pointer; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.modal-h .x:hover { background: var(--line-2); color: var(--text); }
.modal-b { padding: 14px 24px 22px; overflow: auto; }
.modal-b .form > .row.end:last-child, .modal-f { margin: 8px -24px -22px; padding: 16px 24px; background: var(--soft); border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-direction: row-reverse; }
.modal-b .form > .row.end:last-child .btn:not(.primary):not(.danger) { background: none; border-color: transparent; box-shadow: none; }
.modal-b .form > .row.end:last-child .btn:not(.primary):not(.danger):hover { background: rgba(23, 24, 28, .05); }
body.modal-open { overflow: hidden; }
/* summary table in a financial confirmation */
.sumtbl { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sumtbl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.sumtbl > div:last-child { border-bottom: 0; background: var(--soft); }
.sumtbl > div > span { color: var(--muted); } .sumtbl > div > b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sumtbl > div:last-child > span { color: var(--text); font-weight: 600; }
/* reasons (reject dialog) */
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.reasons button { border: 1px solid var(--field); background: #fff; border-radius: 999px; padding: 6px 13px; font: 500 13px var(--font); cursor: pointer; color: #3b3f48; }
.reasons button:hover { border-color: #c2c6ce; background: var(--soft); }
.reasons button.on { background: var(--bad-bg); border-color: #efc3cb; color: var(--bad); }
/* drop zone */
.drop { border: 2px dashed #d0d3da; border-radius: 16px; padding: 28px 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; background: #fff; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); }
.drop .d-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 10px; }
.drop.over .d-ic { background: #fff; }
.drop b { display: block; font: 600 15px var(--head); color: var(--text); margin-bottom: 3px; }
.drop .d-files { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; text-align: start; }
.drop .d-files div { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--soft); color: var(--text); font-size: 13px; }

/* ---------- toasts & tooltips ---------- */
.toasts { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(50%); display: flex; flex-direction: column; gap: 8px; z-index: 120; align-items: center; pointer-events: none; }
html[dir=ltr] .toasts { transform: translateX(-50%); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--char); color: #fff; padding: 11px 16px 11px 14px; border-radius: 12px; box-shadow: var(--sh-2); max-width: min(460px, 92vw); font-size: 13.5px; line-height: 1.55; pointer-events: auto; animation: toastIn .18s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast .t-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--char-3); }
.toast .t-ic .ico { width: 14px; height: 14px; }
.toast.good .t-ic { background: var(--good); } .toast.bad .t-ic { background: var(--bad); } .toast.warn .t-ic { background: #c27c0e; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); inset-inline-start: 50%; transform: translateX(50%); background: var(--char); color: #fff; font: 400 12px/1.5 var(--font); padding: 5px 9px; border-radius: 7px; white-space: nowrap; z-index: 90; pointer-events: none; }
html[dir=ltr] [data-tip]:hover::after { transform: translateX(-50%); }

/* ---------- skeleton loading ---------- */
.skel { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.skel i { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, #eceef1 0, #f6f7f9 40%, #eceef1 80%); background-size: 600px 100%; animation: shimmer 1.2s linear infinite; }
.skel i.h { height: 26px; width: 34%; } .skel i.w6 { width: 60%; } .skel i.w8 { width: 82%; } .skel i.w4 { width: 40%; } .skel i.blk { height: 120px; border-radius: 16px; }
.skel-page { display: flex; flex-direction: column; gap: 16px; }
.skel-page .card { padding: 20px; }
@keyframes shimmer { from { background-position: -600px 0; } to { background-position: 600px 0; } }

/* ---------- search palette ---------- */
.palette-bg { position: fixed; inset: 0; background: rgba(23, 24, 28, .5); z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; backdrop-filter: blur(2px); animation: fadeIn .1s ease-out; }
.palette { width: 640px; max-width: 100%; background: #fff; border-radius: 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, .32); overflow: hidden; animation: popIn .14s ease-out; display: flex; flex-direction: column; max-height: 76vh; }
.pl-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.pl-in .ico { color: var(--muted); width: 20px; height: 20px; }
.pl-in input { flex: 1; border: 0; outline: 0; font: 400 16px var(--font); background: none; color: var(--text); }
.pl-res { overflow: auto; padding: 6px; }
.pl-res .mh { padding-top: 10px; }
.pl-res .mi { grid-template-columns: 34px 1fr auto; }
.pl-res .mi .amt { font: 600 13px var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.pl-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 12px; background: var(--soft); flex-wrap: wrap; }
.pl-foot span { display: inline-flex; gap: 5px; align-items: center; }
.pl-empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- side panel (request details next to the list) ---------- */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.sidep { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto; box-shadow: var(--sh-2); }
.sidep .sp-h { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 1; }
.sidep .sp-h > div:first-child { flex: 1; min-width: 0; } .sidep .sp-h small { color: var(--muted); font-size: 12px; display: block; } .sidep .sp-h h2 { font: 700 20px var(--head); margin: 2px 0 6px; direction: ltr; text-align: start; white-space: nowrap; }
html[dir=rtl] .sidep .sp-h h2 { text-align: right; }
.sidep .sp-h .x { margin-inline-start: auto; background: none; border: 0; cursor: pointer; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.sidep .sp-h .x:hover { background: var(--line-2); }
.sidep .sp-amt { padding: 18px 20px; background: var(--soft); border-bottom: 1px solid var(--line-2); }
.sidep .sp-amt small { color: var(--muted); font-size: 12px; } .sidep .sp-amt .big { font: 700 34px/1.2 var(--head); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; justify-content: flex-start; }
.sidep .sp-amt .big small { font-size: 14px; font-weight: 600; }
.sidep .sp-sec { padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.sidep .sp-sec:last-child { border-bottom: 0; }
.sidep .sp-f { display: flex; gap: 10px; padding: 14px 20px; background: var(--soft); border-top: 1px solid var(--line-2); flex-wrap: wrap; position: sticky; bottom: 0; }

/* ---------- dock (sticky action bar at the bottom of a page) ---------- */
.dock { position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-2); flex-wrap: wrap; }
.dock .d-sum small { display: block; color: var(--muted); font-size: 11.5px; } .dock .d-sum b { font: 700 18px var(--head); font-variant-numeric: tabular-nums; }
.dock .d-note { color: var(--muted); font-size: 12.5px; }
.dock .d-acts { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- phone shell ---------- */
.m-top { display: none; }
.bottomnav { display: none; }
.sheet-bg { position: fixed; inset: 0; background: rgba(23, 24, 28, .5); z-index: 95; animation: fadeIn .12s; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 14px calc(16px + env(safe-area-inset-bottom)); z-index: 96; animation: sheetIn .18s ease-out; max-height: 84vh; overflow: auto; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #d7d9de; margin: 2px auto 12px; }
.sheet .mi.sm { padding: 12px 10px; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; padding: 22px; background: var(--char); }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 46px clamp(32px, 4vw, 56px) 40px; display: flex; flex-direction: column; border-radius: 28px; background: linear-gradient(180deg, #1d1e23 0%, #141518 100%); border: 1px solid #2a2b31; }
.auth-art .a-glow { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(147, 8, 31, .34) 0%, rgba(147, 8, 31, 0) 65%); inset-inline-end: -160px; top: -120px; pointer-events: none; }
.auth-art .a-fifty { position: absolute; top: 150px; right: -30px; font: 700 400px/.8 var(--head); letter-spacing: -30px; color: transparent; -webkit-text-stroke: 1.5px rgba(200, 40, 65, .55); direction: ltr; user-select: none; pointer-events: none; }
html[dir=rtl] .auth-art .a-fifty { right: auto; left: -30px; }
.auth-art .a-top { position: relative; display: flex; align-items: center; gap: 16px; }
.auth-art .lg { width: 104px; height: 104px; border-radius: 22px; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.auth-art .lg img { width: 92px; height: 92px; object-fit: contain; }
.auth-art .a-chip { font: 500 12px var(--font); color: var(--char-text); border: 1px solid #34353d; border-radius: 999px; padding: 6px 14px; }
.auth-art .a-copy { margin-top: auto; position: relative; max-width: 560px; }
.auth-art .a-eyebrow { font: 600 12.5px var(--head); letter-spacing: 2.6px; color: #b9bcc6; text-transform: uppercase; }
html[lang=ar] .auth-art .a-eyebrow { letter-spacing: 0; font-size: 14px; }
.auth-art .a-head { font: 700 clamp(40px, 4.4vw, 64px)/1.05 var(--head); letter-spacing: -1.6px; margin: 16px 0 18px; color: #fff; }
html[lang=ar] .auth-art .a-head { line-height: 1.25; letter-spacing: 0; }
.auth-art .a-head em { font-style: normal; color: #d7425b; }
.auth-art .a-sub { font-size: 17px; line-height: 1.7; color: #a9acb6; max-width: 440px; margin: 0; }
.auth-art .a-steps { display: flex; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.auth-art .a-steps span { font: 500 13px var(--head); color: #d7d9df; background: rgba(255, 255, 255, .05); border: 1px solid #2f3038; padding: 8px 14px; border-radius: 10px; display: inline-flex; gap: 8px; align-items: center; }
.auth-art .a-steps span i { font-style: normal; color: #d7425b; font-weight: 700; }
.auth-form { position: relative; background: #fff; border-radius: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px clamp(24px, 5vw, 72px) 70px; }
.auth-form > .inner { width: 100%; max-width: 380px; }
.auth-form .lf { gap: 18px; }
.auth-form h1 { font: 700 30px/1.2 var(--head); letter-spacing: -.4px; }
.auth-form .sub { color: var(--muted); font-size: 14.5px; margin: -10px 0 0; }
.auth-form .field .label { font-size: 13px; color: #3d424c; }
.auth-form .label.row-l { display: flex; justify-content: space-between; align-items: center; }
.auth-form .label.row-l .linkbtn { font: 600 13px var(--font); }
.auth-form .input { min-height: 48px; font-size: 15px; border-radius: 12px; }
.auth-form .btn.go { height: 50px; font-size: 15.5px; border-radius: 12px; width: 100%; box-shadow: 0 8px 20px -8px rgba(147, 8, 31, .55); }
.auth-form .btn.go .ico { order: 2; }
.auth-form .links { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.auth-form .links .linkbtn { font-weight: 600; } .auth-form .links .muted-link { color: var(--muted); background: none; border: 0; cursor: pointer; font: inherit; }
.auth-form .links .sec { display: inline-flex; gap: 6px; align-items: center; }
.auth-form .envnote { position: absolute; bottom: 22px; left: 0; right: 0; margin: auto; width: max-content; font: 600 11.5px var(--font); color: #8a5a00; background: #fff4dc; border: 1px solid #f1d9a6; border-radius: 999px; padding: 4px 12px; }
.auth-form .m-brand { display: none; }
.pw-wrap { position: relative; } .pw-wrap .input { padding-right: 46px; }
.pw-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.pw-wrap .eye:hover { color: var(--text); background: var(--soft); }
/* old login (kept for reset / setup pages) */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--bg); }
.login { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 28px 26px; }
.brand.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; text-align: center; color: var(--text); font: 700 18px var(--head); }
.brand.big img { height: 86px; width: auto; }
.brand-sub { display: block; font-size: .72rem; letter-spacing: .18em; color: var(--brand); text-transform: uppercase; font-weight: 600; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash > .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tasks .tk { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); color: var(--text); }
.tasks .tk:hover { background: #fcf8f9; }
.tasks .tk.hot { background: #fdf6f7; }
.tasks .tk .tk-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: var(--char-3); }
.tasks .tk .tk-ic.bad { background: var(--bad-bg); color: var(--brand); } .tasks .tk .tk-ic.warn { background: var(--warn-bg); color: var(--warn); } .tasks .tk .tk-ic.good { background: var(--good-bg); color: var(--good); } .tasks .tk .tk-ic.info { background: var(--info-bg); color: var(--info); }
.tasks .tk b { font: 600 15px/1.4 var(--head); display: block; } .tasks .tk small { color: var(--muted); font-size: 12.5px; display: block; margin-top: 2px; }
.tasks .tk .tk-n { text-align: center; min-width: 76px; } .tasks .tk .tk-n b { font: 700 24px/1.1 var(--head); } .tasks .tk .tk-n small { font-variant-numeric: tabular-nums; }
.tasks .tk .btn { min-width: 76px; }
.tasks .tk-zero { display: flex; gap: 20px; flex-wrap: wrap; padding: 13px 20px; color: var(--muted); font-size: 13px; }
.tasks .tk-zero b { color: var(--text); }
.tasks .alldone { padding: 30px 20px; text-align: center; color: var(--muted); }
.balcard { background: var(--char); color: #fff; border-radius: var(--r-l); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.balcard .b-top { display: flex; align-items: center; gap: 12px; }
.balcard .b-top .av { background: #fff; color: var(--brand); width: 40px; height: 40px; }
.balcard .b-top b { font: 600 16px var(--head); display: block; } .balcard .b-top small { color: var(--char-muted); font-size: 12.5px; }
.balcard .b-top .per { margin-inline-start: auto; color: var(--char-text); font-size: 13px; }
.balcard .big { font: 700 46px/1.1 var(--head); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; justify-content: flex-start; letter-spacing: -.5px; }
.balcard .big small { font-size: 16px; color: var(--char-muted); font-weight: 600; }
.balcard .eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: end; padding-top: 16px; border-top: 1px solid var(--char-3); }
.balcard .eq > div small { color: var(--char-muted); font-size: 12px; display: block; } .balcard .eq > div b { font: 600 17px var(--head); font-variant-numeric: tabular-nums; }
.balcard .eq > i { color: var(--char-muted); font-style: normal; font-size: 18px; padding-bottom: 2px; }
.balcard .eq .in b { color: #7ad69a; } .balcard .eq .out b { color: #f5a3b1; }
.balcard .b-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.balcard .b-acts .btn { background: var(--char-2); border-color: var(--char-3); color: #fff; box-shadow: none; }
.balcard .b-acts .btn:hover { background: var(--char-3); }
.balcard .b-more { display: flex; gap: 18px; flex-wrap: wrap; color: var(--char-muted); font-size: 12.5px; }
.balcard .b-more b { color: #fff; font-weight: 600; }
.feed .fd { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.feed .fd:last-child { border-bottom: 0; }
.feed .fd .fd-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--char-3); }
.feed .fd .fd-ic.good { background: var(--good-bg); color: var(--good); } .feed .fd .fd-ic.bad { background: var(--warn-bg); color: var(--warn); } .feed .fd .fd-ic.info { background: var(--info-bg); color: var(--info); }
.feed .fd .fd-ic .ico { width: 16px; height: 16px; }
.feed .fd b { font-weight: 600; } .feed .fd a { color: var(--text); } .feed .fd a:hover { color: var(--brand); } .feed .fd .t { font-size: 13.5px; line-height: 1.6; } .feed .fd small { color: var(--faint); font-size: 11.5px; display: block; margin-top: 2px; }
.feed .fd .t .muted { font-size: 12.5px; }
.pipe .table td:first-child { padding-inline-start: 20px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick a { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--text); box-shadow: var(--sh-1); }
.quick a:hover { border-color: #d5d8de; }
.quick .q-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.quick b { font: 600 15px var(--head); }
.confirmcard { background: #fffaf0; border: 1px solid #f2d59d; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* summary strip (batch page) */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.strip .s { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--sh-1); }
.strip .s > span { font-size: 11.5px; color: var(--muted); } .strip .s b { font: 700 20px var(--head); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; } .strip .s b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.strip .s.good b { color: var(--good); } .strip .s.bad b { color: var(--bad); }
.actionbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--soft); border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-l) var(--r-l); margin: 1rem -20px -16px; flex-wrap: wrap; }
.actionbar .ab-sum span { display: block; font-size: 11.5px; color: var(--muted); } .actionbar .ab-sum b { font: 700 18px var(--head); font-variant-numeric: tabular-nums; } .actionbar .ab-sum b small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* the 5-step path of a batch, with names under each step */
.path { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); }
.path .p-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 18px 20px 14px; }
.path .p-st { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.path .p-st i { display: block; height: 6px; border-radius: 3px; background: #e2e4e8; margin-bottom: 8px; }
.path .p-st b { font: 600 14px var(--head); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .path .p-st small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.path .p-st.d i { background: var(--char-3); } .path .p-st.d b { color: var(--text); } .path .p-st.d small { color: var(--muted); }
.path .p-st.c i { background: var(--brand); } .path .p-st.c b { color: var(--brand); } .path .p-st.c small { color: var(--muted); }
.path .p-st.r i { background: #e2a33b; } .path .p-st.r b { color: var(--warn); } .path .p-st.r small { color: var(--muted); }
.path .p-files { border-top: 1px solid var(--line-2); padding: 12px 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .tn-brand > div:not(.lg) { display: none; }
  .me > div:not(.av) { display: none; }
  .nv { padding: 0 10px; }
}
@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr; } .strip { grid-template-columns: 1fr 1fr; }
  .with-side { grid-template-columns: 1fr; } .sidep { position: fixed; inset: auto 0 0 0; max-height: 86vh; border-radius: 22px 22px 0 0; z-index: 85; }
  .tb-btn.new .lbl, .tb-btn .kbd { display: none; }
  .nv .cv { display: none; }
}
@media (max-width: 900px) {
  .grid2, .grid3, .grid2.wide-left, .kvgrid { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
  .topnav { display: none; }
  .m-top { display: flex; align-items: center; gap: 10px; background: var(--char); color: #fff; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 40; min-height: 64px; }
  .m-top .lg { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex-shrink: 0; } .m-top .lg img { width: 32px; height: 32px; object-fit: contain; }
  .m-top .tt { min-width: 0; flex: 1; } .m-top .tt b { font: 600 16px/1.3 var(--head); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .m-top .tt small { color: var(--char-muted); font-size: 12px; display: block; }
  .m-top .tb-btn { color: #fff; }
  .main { padding: 14px 14px 96px; }
  .pg-h h1 { font-size: 22px; } .pg-h .acts { margin-inline-start: 0; width: 100%; } .pg-h .acts .btn { flex: 1; }
  .dash { display: flex; flex-direction: column; } .dash > .col { display: contents; } .dash .balcard { order: -2; } .dash .confirmcard { order: -3; }
  .balcard .big { font-size: 34px; } .balcard .eq { grid-template-columns: 1fr 1fr 1fr; } .balcard .eq > i { display: none; }
  .tasks .tk { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px; gap: 12px; } .tasks .tk .tk-ic { width: 40px; height: 40px; } .tasks .tk .btn { display: none; }
  .strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .toolbar .search { width: 100%; }
  .path .p-steps { gap: 4px; padding: 14px; } .path .p-st b { font-size: 11.5px; } .path .p-st small { display: none; }
  .dock { bottom: 74px; }
  .rv-grid { grid-template-columns: 1fr; } .rv-thumbs { flex-direction: row; overflow-x: auto; max-height: none; border-inline-end: 0; border-bottom: 1px solid var(--line-2); } .rv-thumb { flex: 0 0 96px; } .rv-thumb .pagecanvas { width: 80px !important; min-height: 100px !important; }
  .hp-row { grid-template-columns: 70px 1fr; } .hp-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .steps { padding: 10px 12px; } .step .lbl small { display: none; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; bottom: 0; inset-inline: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); z-index: 50; }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--muted); font: 500 11px var(--head); background: none; border: 0; cursor: pointer; position: relative; }
  .bottomnav .active { color: var(--brand); font-weight: 600; }
  .bottomnav .ico { width: 22px; height: 22px; }
  .bottomnav .ct { position: absolute; top: 0; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; }
  /* tables → cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 8px 12px; background: #fff; }
  .table td { border: 0; display: flex; justify-content: space-between; gap: .6rem; padding: 5px 0; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; flex: 0 0 38%; }
  .table td.chkcol::before, .table td.kcol::before { content: ''; }
  .card-b > .tablewrap:only-child { margin: 0; }
  .filters .input { max-width: none; }
  .modal-bg { align-items: end; padding: 0; } .modal { max-height: 94vh; border-radius: 22px 22px 0 0; max-width: none; }
  .actionbar { margin: 1rem -20px -16px; }
  .menu.notif-menu { position: fixed; top: 70px; inset-inline: 10px; width: auto; }
  .auth { grid-template-columns: 1fr; padding: 0; gap: 0; background: #fff; } .auth-art { display: none; }
  .auth-form { border-radius: 0; justify-content: flex-start; padding: 0 22px 70px; }
  .auth-form .m-brand { display: flex; align-items: center; gap: 12px; margin: 0 -22px 34px; padding: 18px 22px; padding-top: calc(18px + env(safe-area-inset-top)); background: var(--char); color: #fff; }
  .auth-form .m-brand img { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 3px; }
  .auth-form .m-brand b { font: 700 15px var(--head); display: block; letter-spacing: 1px; } .auth-form .m-brand small { color: var(--char-muted); font-size: 12px; }
}
@media print { .topnav, .m-top, .bottomnav, .envbar, .filters, .btn, .toasts, .dock { display: none !important; } .main { max-width: none; padding: 0; } .card { box-shadow: none; } }

/* workflow stepper */
.steps { display: flex; align-items: center; gap: 0; padding: 14px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.step { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.step:last-child { flex: 0 1 auto; }
.step .lbl { min-width: 0; }
.step .n { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--line-2); color: var(--muted); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step .ln { flex: 1 0 16px; height: 2px; background: var(--line); margin: 0 12px; }
.step .lbl { display: flex; flex-direction: column; } .step .lbl small { font-size: 11px; color: var(--muted); font-weight: 400; }
.step.done { color: var(--text); } .step.done .n { background: var(--good); color: #fff; } .step.done .ln { background: var(--good); }
.step.current { color: var(--brand); } .step.current .n { background: var(--brand); color: #fff; } .step.current .ln { background: var(--line); }

/* ---------- page-by-page review (23/09/2026) ---------- */
.pagecanvas { display: flex; align-items: flex-start; justify-content: center; background: #fff; border-radius: 6px; overflow: hidden; }
.pagecanvas canvas, .pagecanvas img { display: block; max-width: 100%; height: auto !important; }
.good-text { color: var(--good); } 
.review .card-b { padding: 0; }
.rv-grid { display: grid; grid-template-columns: 160px 1fr; min-height: 560px; }
.rv-thumbs { border-inline-end: 1px solid var(--line-2); padding: 12px; display: flex; flex-direction: column; gap: 10px; max-height: 78vh; overflow-y: auto; background: var(--soft); }
.rv-thumb { position: relative; padding: 6px; border-radius: 10px; border: 2px solid transparent; background: #fff; cursor: pointer; box-shadow: var(--shadow); }
.rv-thumb.ok { border-color: #bfe3cb; } .rv-thumb.rej { border-color: #e9a3b0; background: #fdf3f5; }
.rv-thumb.sel { outline: 3px solid var(--brand); outline-offset: 1px; }
.rv-chk { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; background: #fff; border-radius: 6px; padding: 2px 3px; box-shadow: var(--shadow); }
.rv-cap { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; }
.rv-cap .badge { padding: 2px 6px; }
.rv-main { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-page { background: #e9eaee; border-radius: var(--radius-s); padding: 14px; display: flex; justify-content: center; max-height: 70vh; overflow: auto; }
.rv-page .pagecanvas { box-shadow: 0 8px 24px rgba(20, 20, 30, .14); }
.rv-decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-decide .btn { height: 48px; font-size: 1rem; }
.btn.good-on { background: var(--good); border-color: var(--good); color: #fff; }
.btn.bad-on { background: var(--bad); border-color: var(--bad); color: #fff; }
.rv-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: var(--warn-bg); border-top: 1px solid #f3d9a0; }
.rv-bulk .input { flex: 1; min-width: 200px; }
.review .actionbar { margin: 0; border-radius: 0 0 var(--radius) var(--radius); }
.history.compact li { padding: .35rem 0; font-size: .88rem; }
.hp-list { display: flex; flex-direction: column; gap: 10px; }
.hp-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.hp-row.rejected { border-color: #e9a3b0; background: #fdf7f8; } .hp-row.removed { opacity: .55; }
.hp-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hp-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ps-item { padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.ps-item.moved, .ps-item.removed { opacity: .6; }
.ps-cap { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.ps-cap .badge { padding: 1px 6px; font-size: .7rem; }


.actionbar .ab-sum b span { display: inline; font-size: inherit; color: inherit; } .actionbar .ab-sum b span.good-text { color: var(--good); } .actionbar .ab-sum b span.bad-text { color: var(--bad); } .actionbar .ab-sum b span.muted { color: var(--muted); }
/* v7.2 — forgot / change password */
.goodbox { background: var(--good-bg, #e8f6ee); color: var(--good, #1e7a46); border: 1px solid #bfe3cd; border-radius: var(--radius-s); padding: .65rem .9rem; margin: 0; line-height: 1.7; }
.login .linkbtn.forgot { font-size: 13.5px; font-weight: 600; margin-top: -4px; }
.sidebar .sb-user { gap: 8px; }
/* v7.3 — PM answers the final approver */
.pa-row { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 10px; }
.pa-row.reply { border-color: #b8d9c3; background: #f6fbf8; } .pa-row.to-holder { border-color: #e9a3b0; background: #fdf7f8; }
.pa-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pa-choice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 720px) { .pa-row { grid-template-columns: 1fr; } }
/* v7.3 — notifications panel: seeing the titles clears the counter */
.notif-bell { position: relative; }
.np-list { list-style: none; margin: 0; padding: 0; }
.np-list li { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; line-height: 1.5; }
.np-list li:hover { background: var(--soft); } .np-list li.new { background: #fdf3f5; font-weight: 600; } .np-list li.new:hover { background: #fbe9ed; }
.np-empty { padding: 20px; text-align: center; }
/* v7.4 — extraction through the Claude app */
.mocr-steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 14px; }
.mocr-steps li { line-height: 1.7; } .mocr-steps li > b { margin-inline-end: 6px; }
.mocr-steps textarea { margin-top: 6px; width: 100%; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.mocr { max-width: 640px; }
/* v7.5 — ready to post: one card per batch */
.post-card .pc-title { font-size: 15px; } .post-card .pc-total b { font-size: 18px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 12px; }
.pc-meta span { display: flex; flex-direction: column; } .pc-meta small { color: var(--muted); font-size: 11.5px; } .pc-meta b { font-size: 13.5px; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pc-table th { text-align: start; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pc-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); } .pc-table td:nth-child(n+2), .pc-table th:nth-child(n+2) { text-align: end; white-space: nowrap; }
.pc-table tfoot td { font-weight: 700; background: var(--bg); border-bottom: 0; } .pc-table tfoot tr.cr td { font-weight: 600; background: #fff; color: var(--muted); }
/* 29/09/2026 — one control per page: approved by default, reject / undo */
.rv-decide.one { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); }
.rv-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } .rv-state.good { color: var(--good); } .rv-state.bad { color: var(--bad); }

/* v7.8 automatic file total */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand, #1f6feb); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-text { display: inline-flex; align-items: center; gap: 6px; }
.warn-text { color: var(--warn); }
.pad-b { padding-bottom: 10px; }
.at-pending { display: flex; gap: 12px; align-items: center; padding: 6px 0 10px; }
.at-pending .spinner { width: 22px; height: 22px; }
.at-pending div { display: flex; flex-direction: column; gap: 2px; } .at-pending small { color: var(--muted); }
.at-total { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; padding: 4px 0 12px; }
.at-total > div { display: flex; flex-direction: column; gap: 2px; }
.at-total > div > span { font-size: 11.5px; color: var(--muted); }
.at-total b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.at-total b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.at-total .good-text { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.at-table td.num, .at-table th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-table tfoot td { border-top: 2px solid var(--line); padding-top: 8px; }
.src-tag { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral); }
.src-tag.auto { background: var(--good-bg); color: var(--good); } .src-tag.holder { background: var(--warn-bg); color: var(--warn); }

/* v7.9 ledger classification in the automatic total */
.at-ledger { min-width: 190px; } .at-ledger select.input { min-width: 180px; max-width: 260px; padding: 4px 8px; font-size: 13px; }
.at-ledger select.changed { border-color: var(--warn); background: var(--warn-bg); }
.at-ledger .src-tag { margin-inline-start: 6px; white-space: nowrap; }
.at-ledgers { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.at-ledgers .row { gap: 8px; font-size: 13.5px; } .at-ledgers b.money { font-variant-numeric: tabular-nums; }
.chip.holder-choice { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.input.holder-pick { border-color: var(--warn); background: var(--warn-bg); }
.src-tag.warn-tag { background: var(--warn-bg); color: var(--warn); }
.at-ledger { white-space: normal; } .at-ledger .src-tag { display: inline-block; margin-top: 4px; }

/* v7.10 holder corrections */
.at-table td.edited { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); }
.at-edit { width: 1%; white-space: nowrap; } .at-edit .btn { display: inline-flex; align-items: center; gap: 4px; }
.edited-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--warn-bg); border: 1px solid var(--warn); vertical-align: middle; }
.ocr-orig { display: block; font-size: 11.5px; color: var(--warn); margin-top: 2px; }
.input.holder-edit { border-color: var(--warn); background: var(--warn-bg); }

/* v8.0 viewer */
.zv { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.zv-bar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.zv-bar .btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.zv-pg, .zv-pct { font-size: 12.5px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.zv-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.zv-box { position: relative; overflow: auto; background: #e4e6eb; border-radius: var(--radius-s); height: calc(100vh - var(--topbar-h) - 150px); min-height: 360px; cursor: grab; touch-action: pan-x pan-y; }
.zv-box.dragging { cursor: grabbing; user-select: none; } .zv-box.lensing { cursor: crosshair; }
.zv-inner { min-width: 100%; min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 14px; box-sizing: border-box; width: max-content; }
.zv-page { display: block; background: #fff; box-shadow: 0 8px 24px rgba(20, 20, 30, .16); border-radius: 3px; max-width: none; }
.zv-lens { position: absolute; width: 190px; height: 190px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); pointer-events: none; background: #fff; z-index: 3; }
.zv-hint { font-size: 11.5px; color: var(--muted); }
.zv.dark .zv-bar .btn:not(.on) { background: #22242a; color: #ddd; border-color: #33363e; } .zv.dark .zv-pg, .zv.dark .zv-pct { color: #eee; } .zv.dark .zv-sep { background: #33363e; }
.zv-box.dark { background: #0d0e11; } .zv.dark .zv-hint { color: #8b909b; }
.viewer-sticky { position: sticky; top: calc(var(--topbar-h) + 12px); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.focus { position: fixed; inset: 0; z-index: 200; background: #15161a; color: #eee; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; padding: 12px; }
.focus-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.focus-main .zv { flex: 1; min-height: 0; } .focus-main .zv-box { height: 100% !important; min-height: 0; flex: 1; }
.focus-top { display: flex; align-items: center; gap: 8px; } .focus-top .btn { background: #22242a; color: #ddd; border-color: #33363e; }
.focus-thumbs { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px; flex: none; }
.focus-th { position: relative; border: 1px solid #333; border-radius: 6px; padding: 0; background: #fff; cursor: pointer; flex: none; overflow: hidden; }
.focus-th.on { outline: 3px solid #e0364f; } .focus-th span { position: absolute; bottom: 2px; inset-inline-start: 4px; font-size: 10px; color: #333; background: rgba(255,255,255,.8); border-radius: 3px; padding: 0 3px; }
.focus-th .pagecanvas { min-height: 0 !important; height: 72px; }
.focus-side { background: #1d1f24; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.focus-side .muted { color: #9aa0ab; } .focus-keys { margin-top: auto; font-size: 11.5px; color: #8b909b; line-height: 1.8; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .viewer-sticky { position: static; } }
@media (max-width: 760px) { .focus { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 6px; } .focus-side { max-height: 42vh; } .focus-thumbs { display: none; } .zv-hint { display: none; } }
/* v8.0 — invoices: table, summary, lines, review list */
.lang-t { display: inline-flex; border: 1px solid #c7d0f0; border-radius: 6px; overflow: hidden; vertical-align: middle; flex: none; margin-inline-start: 4px; }
.lang-t button { border: 0; background: #fff; color: var(--info); font: inherit; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 19px; cursor: pointer; }
.lang-t button.on { background: var(--info); color: #fff; }
.inv-table td { vertical-align: top; font-size: .86rem; }
.inv-table tr.sel td { background: #fdf2f4; } .inv-table tr.off td { opacity: .45; }
.inv-table td.ed { background: var(--warn-bg); box-shadow: inset -3px 0 0 var(--warn); } [dir=ltr] .inv-table td.ed { box-shadow: inset 3px 0 0 var(--warn); }
.inv-table td.acc-ed { background: var(--info-bg); box-shadow: inset -3px 0 0 var(--info); }
.inv-table .ltr-cell, .ltr-cell { direction: ltr; unicode-bidi: isolate; text-align: start; }
.inv-lead { white-space: nowrap; width: 1%; } .inv-lead input { vertical-align: middle; margin-inline-end: 4px; width: 16px; height: 16px; }
.inv-desc { min-width: 160px; max-width: 280px; line-height: 1.5; }
.inv-led { min-width: 150px; } .inv-led .input.small { max-width: 210px; padding: 3px 6px; font-size: 12px; height: auto; }
.inv-led .input.changed { border-color: var(--warn); background: var(--warn-bg); } .inv-led .input.acc-pick { border-color: var(--info); background: var(--info-bg); }
.inv-led .src-tag { display: inline-block; margin-top: 4px; }
.src-tag.acc { background: var(--info-bg); color: var(--info); }
.pill { display: inline-block; font-size: 10.5px; border-radius: 999px; padding: 0 7px; margin-top: 3px; }
.pill.p-b { background: var(--bad-bg); color: var(--bad); }
.chev { border: 0; width: 24px; height: 24px; border-radius: 6px; background: var(--soft); color: var(--muted); cursor: pointer; font-size: 12px; }
.inv-exp > td { background: #fbfbfc; }
.inv-detail { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 6px; }
.inv-sum { background: var(--info-bg); color: #1f2f73; border-radius: 9px; padding: 9px 11px; line-height: 1.7; font-size: .88rem; display: flex; gap: 8px; align-items: flex-start; }
.inv-sum > div { flex: 1; }
.inv-items { border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow-x: auto; }
.inv-items .table th { background: var(--soft); } .inv-items .table td { font-size: .82rem; padding: .4rem .55rem; }
.table .num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; }
.inv-tot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 16px; font-size: .84rem; align-items: center; }
.inv-tot .good-text, .inv-tot .warn-text { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.inv-detail.dark .inv-sum { background: #262a36; color: #dfe4f5; } .inv-detail.dark .inv-items { background: #22242a; border-color: #33363e; }
.inv-detail.dark .inv-items .table th { background: #2a2c33; color: #aeb3bd; } .inv-detail.dark .inv-items .table td { color: #e6e6e6; border-color: #33363e; }
.inv-detail.dark .lang-t { border-color: #4a557f; } .inv-detail.dark .lang-t button:not(.on) { background: #22242a; color: #aab6e8; }
.items-edit .input { padding: 4px 6px; font-size: 12.5px; min-width: 60px; } .items-edit td:first-child .input { min-width: 180px; }
/* review list (PM / final approver) */
.rv-card .card-b { padding: 0; }
.rv-card .infobox { margin: 12px 16px 0; }
.rv-list { display: flex; flex-direction: column; margin-top: 10px; }
.rv-line { display: grid; grid-template-columns: 38px minmax(0, 1fr) 120px 220px; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); align-items: start; }
.rv-line.rej { background: #fff7f8; } .rv-line.old { opacity: .78; }
.rv-num { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.rv-num.ok { background: var(--good-bg); color: var(--good); } .rv-num.x { background: var(--bad-bg); color: var(--bad); }
.rv-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rv-t { font-weight: 700; font-size: .98rem; }
.rv-sum { line-height: 1.7; font-size: .88rem; color: #2b2d35; margin-top: 3px; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.rv-chips .chip { margin: 0; font-size: 11.5px; border-radius: 999px; padding: 1px 9px; }
.chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; } .chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; } .chip.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.rv-note { border-radius: 8px; padding: 6px 10px; font-size: .84rem; line-height: 1.6; margin-top: 5px; }
.rv-note.warn { background: var(--warn-bg); color: #6b4000; } .rv-note.info { background: var(--info-bg); color: #1f2f73; } .rv-note.bad { background: var(--bad-bg); color: var(--bad); }
.rv-note .chip { margin: 0 4px; }
.rv-amt { font-weight: 700; font-size: 1.02rem; text-align: end; font-variant-numeric: tabular-nums; padding-top: 4px; }
.rv-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; padding-top: 2px; }
.rv-group { padding: 10px 16px; background: var(--soft); border-top: 1px solid var(--line-2); font-weight: 700; font-size: .86rem; color: var(--muted); text-align: start; }
.rv-group.btnlike { border: 0; border-top: 1px solid var(--line-2); cursor: pointer; font: inherit; font-weight: 700; font-size: .86rem; color: var(--muted); width: 100%; }
.rv-card .actionbar { margin: 0; }
.rej-box { border: 1px solid #efc1ca; border-radius: 10px; padding: 9px 11px; background: #fff; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.rej-box .req { color: var(--bad); }
.rej-q { display: flex; flex-wrap: wrap; gap: 5px; }
.rej-q .q { border: 1px dashed #d5a0aa; color: var(--bad); background: #fff; border-radius: 999px; padding: 1px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.rej-q .q.on { background: var(--bad); color: #fff; border-style: solid; }
.rej-box.dark { background: #2a1d21; border-color: #6b2a37; } .rej-box.dark .input { background: #1b1c20; color: #eee; border-color: #444; }
.btn.block { width: 100%; justify-content: center; height: 42px; font-size: .95rem; }
.focus-side .btn.danger { background: transparent; color: #ff8a9b; border-color: #6b2a37; } .focus-side .btn.bad-on { background: var(--bad); color: #fff; }
.focus-side .btn:not(.danger):not(.bad-on):not(.primary) { background: #22242a; color: #ddd; border-color: #33363e; }
.focus-side .rv-t { color: #fff; font-size: 1.05rem; }
.kv-dark { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .88rem; } .kv-dark span { color: #9aa0ab; } .kv-dark b { color: #fff; text-align: start; } .kv-dark b.big { font-size: 1.15rem; }
/* holder after a rejection */
.hr-card .card-b { display: flex; flex-direction: column; gap: 10px; }
.hr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px; border: 1px solid #e9a3b0; background: #fdf7f8; border-radius: var(--radius-s); align-items: start; }
.hr-row.done { border-color: var(--line); background: #fff; opacity: .85; }
.hr-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hr-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 190px; }
.hr-act .btn { justify-content: center; }
@media (max-width: 1100px) { .rv-line { grid-template-columns: 34px minmax(0, 1fr) 110px; } .rv-act { grid-column: 2 / -1; justify-content: flex-start; } }
@media (max-width: 760px) {
  .rv-line { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 12px; } .rv-amt { grid-column: 2; text-align: start; padding-top: 0; } .rv-act { grid-column: 1 / -1; }
  .hr-row { grid-template-columns: 1fr; } .hr-act { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .inv-table td.inv-lead::before, .inv-table td.inv-exp-c::before { content: none; }
  .inv-table tr.inv-exp { padding: 0; border: 0; background: transparent; }
  .inv-desc { max-width: none; }
}
.inv-led .input.small { max-width: none; min-width: 176px; width: 100%; }
.inv-table td[data-label] { overflow-wrap: anywhere; }
.inv-table td:nth-child(5) { white-space: nowrap; }
.inv-table td.num { white-space: nowrap; }
.grid2.wide-left.batch-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid2.wide-left.batch-split { grid-template-columns: 1fr; } .batch-split .sticky { position: static; } }
@media (max-width: 760px) { .batch-split .zv-box { height: 60vh; min-height: 280px; } }
@media (max-width: 760px) {
  .inv-table td { align-items: center; }
  .inv-table td.inv-led { flex-wrap: wrap; } .inv-led .input.small { min-width: 0; width: auto; max-width: 62vw; height: 34px; align-self: center; }
  .inv-table td.inv-led > div { flex-basis: 100%; text-align: end; }
  .inv-detail.dark .inv-items .table tr { background: #22242a; border-color: #33363e; }
  .inv-items .table td::before { flex-basis: 32%; }
}
/* v8.1 — the holder starts the extraction himself */
.extract-box { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px dashed #d6d9df; border-radius: var(--radius-s); background: var(--soft); margin-bottom: 10px; flex-wrap: wrap; }
.extract-box > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; } .extract-box small { color: var(--muted); line-height: 1.6; }
.extract-box.go { border: 1px solid #efc1ca; background: #fff7f8; } .extract-box .btn { height: 42px; padding: 0 18px; font-size: .95rem; }
/* v8.1 — files: neutral look; the file shown in the viewer in blue; red only for a failed reading */
.fileitem { background: #fff; flex-wrap: wrap; } .fileitem .fi-name { color: var(--text); font-weight: 600; }
.fileitem .fi-name:hover { color: var(--info); }
.fileitem.active { border-color: #9fb3ec; background: #f6f8ff; box-shadow: inset 3px 0 0 var(--info); } [dir=rtl] .fileitem.active { box-shadow: inset -3px 0 0 var(--info); }
.fi-tag { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.fi-tag.view { background: var(--info-bg); color: var(--info); } .fi-tag.idle { background: var(--neutral-bg); color: var(--neutral); }
.fi-tag.busy { background: var(--info-bg); color: var(--info); } .fi-tag.info { background: var(--info-bg); color: var(--info); }
.fi-tag.good { background: var(--good-bg); color: var(--good); } .fi-tag.bad { background: var(--bad-bg); color: var(--bad); }
.extract-box.go { border: 1px solid #c7d3f5; background: #f6f8ff; } /* an action to take, not an error */
.btn.icon-only { padding: 0 8px; min-width: 28px; justify-content: center; } .inv-lead .btn + .btn { margin-inline-start: 4px; }
.pill.p-w { background: var(--warn-bg); color: var(--warn); }
.del-line { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--soft); flex-wrap: wrap; } .del-line .spacer-start { margin-inline-start: auto; }
.inv-table td.ltr-cell { overflow-wrap: normal; word-break: normal; min-width: 92px; }
.inv-table td.inv-lead .btn { height: 26px; }
.inv-lead-in { display: flex; flex-direction: column; align-items: center; gap: 4px; } .inv-lead .btn + .btn { margin-inline-start: 0; }
.inv-led .input.small { min-width: 140px; max-width: 190px; } .inv-desc { min-width: 110px; }
.inv-table td.ltr-cell { min-width: 80px; }
.inv-led .input.small { direction: ltr; text-align: left; min-width: 160px; }
.inv-led .input.small { min-width: 150px; } .inv-desc { min-width: 100px; } .inv-table td.ltr-cell { min-width: 72px; } .inv-table td, .inv-table th { padding-inline: .45rem; }
/* v8.2 — delete drafts / cancelled batches */
.del-all { font-size: .88rem; color: var(--muted); } .row-chk { width: 17px; height: 17px; cursor: pointer; }
.table td.nowrap { white-space: nowrap; }
/* page numbers stay on one line, readable (e.g. 22–26) */
.inv-table td.inv-pg { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; min-width: 48px; font-variant-numeric: tabular-nums; font-weight: 600; }
.inv-table td.inv-pg span { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: .8rem; }
.acc-tools { align-items: flex-start; } .more-opts { position: relative; } .more-opts > summary { list-style: none; cursor: pointer; } .more-opts > summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; z-index: 20; inset-inline-start: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.more-menu .btn { justify-content: flex-start; }
/* v8.2 — reading checks on the main line */
.flag-pill { border: 1px solid #f0d199; background: var(--warn-bg); color: var(--warn); border-radius: 999px; font: inherit; font-size: 11px; font-weight: 600; padding: 1px 8px; margin-top: 4px; cursor: pointer; white-space: nowrap; }
.flag-pill:hover { background: #ffe6b3; }
.flag-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--warn-bg); color: #6b4000; border-radius: var(--radius-s); font-size: .88rem; font-weight: 600; flex-wrap: wrap; }
.flag-bar .btn.on { background: var(--warn); color: #fff; border-color: var(--warn); }
/* ---------------------------------------------------------------- v8.3 printing */
#print-pages { display: none; }
.print-dlg .chk { display: flex; align-items: center; gap: 6px; padding: 6px 0; flex-wrap: wrap; }
@page { size: A4; margin: 10mm; }
@media print {
  body.printing-pages > *:not(#print-pages) { display: none !important; }
  body.printing-pages { background: #fff !important; }
  body.printing-pages #print-pages { display: block; }
  .pp { height: 276mm; display: flex; flex-direction: column; break-after: page; page-break-after: always; }
  .pp:last-child { break-after: auto; page-break-after: auto; }
  .pp-h { font: 8.5pt "Plex Arabic", sans-serif; color: #333; border-bottom: 1px solid #999; padding-bottom: 2mm; margin-bottom: 2mm; display: flex; justify-content: space-between; gap: 8mm; } .pp-h span { unicode-bidi: plaintext; }
  .pp-b { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .pp-b img { max-width: 100%; max-height: 100%; object-fit: contain; }
  .pp-w { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); font: 700 22pt "Plex Arabic", sans-serif; color: rgba(147, 8, 31, .16); white-space: nowrap; border: 3px solid rgba(147, 8, 31, .16); padding: 3mm 7mm; border-radius: 4mm; }
}
/* printable documents (/print/…) */
.pdoc-wrap { background: #8a8d93; min-height: 100vh; padding: 24px 12px 40px; }
.ptool { position: relative; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; background: #2a2b31; color: #eee; margin: -24px -12px 20px; flex-wrap: wrap; }
.ptool .btn { background: #fff; } .ptool .btn.primary { background: var(--brand); color: #fff; } .ptool small { color: #bbb; }
.pdoc { width: 210mm; min-height: 297mm; margin: 0 auto 20px; background: #fff; color: #111; padding: 12mm 13mm 16mm; box-shadow: 0 6px 26px rgba(0,0,0,.25); direction: rtl; font-size: 10.5pt; line-height: 1.55; position: relative; display: flex; flex-direction: column; }
.pdoc .hd { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid #93081f; padding-bottom: 10px; }
.pdoc .hd img { width: 54px; height: 54px; object-fit: contain; } .pdoc .co b { display: block; font-size: 13.5pt; letter-spacing: .3px; } .pdoc .co span { color: #555; font-size: 9.5pt; }
.pdoc .doc { margin-inline-start: auto; text-align: left; } .pdoc .doc .t { font-size: 15pt; font-weight: 700; color: #93081f; text-align: right; } .pdoc .doc .n { font-size: 17pt; font-weight: 700; direction: ltr; text-align: right; } .pdoc .doc .s { font-size: 9.5pt; color: #555; text-align: right; }
.pdoc .grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #bbb; border-radius: 6px; margin: 12px 0; overflow: hidden; }
.pdoc .grid > div { padding: 6px 9px; border-inline-start: 1px solid #ddd; border-bottom: 1px solid #ddd; } .pdoc .grid span { display: block; color: #666; font-size: 8.5pt; } .pdoc .grid b { font-size: 10.5pt; } .pdoc .big { font-size: 15pt !important; }
.pdoc table { width: 100%; border-collapse: collapse; margin-top: 5px; } .pdoc thead { display: table-header-group; }
.pdoc th { background: #f1f1f3; font-size: 8.5pt; color: #333; text-align: start; padding: 4px 6px; border: 1px solid #ccc; font-weight: 600; }
.pdoc td { padding: 3.5px 6px; border: 1px solid #ddd; vertical-align: top; font-size: 9.5pt; } .pdoc tr { break-inside: avoid; }
.pdoc td.n, .pdoc th.n { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; } .pdoc .ltr { direction: ltr; unicode-bidi: isolate; text-align: right; }
.pdoc tfoot td { font-weight: 700; background: #fafafa; font-size: 10.5pt; } .pdoc tr.grp td { background: #fafafa; font-weight: 600; }
.pdoc h3 { font-size: 10.5pt; margin: 14px 0 4px; color: #93081f; }
.pdoc .flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .pdoc .flow > div { border: 1px solid #ccc; border-radius: 6px; padding: 6px 8px; } .pdoc .flow span { display: block; color: #666; font-size: 8.5pt; } .pdoc .flow i { font-style: normal; color: #1f7a3a; font-size: 8.5pt; display: block; } .pdoc .flow .no i { color: #999; }
.pdoc .note { background: #f7f7f9; border: 1px dashed #aaa; border-radius: 6px; padding: 7px 9px; margin-top: 10px; font-size: 9pt; }
.pdoc .words { border: 1px solid #bbb; border-radius: 6px; padding: 6px 9px; margin-top: 8px; } .pdoc .words span { color: #666; font-size: 8.5pt; display: block; }
.pdoc .sig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; break-inside: avoid; } .pdoc .sig > div { border-top: 1px solid #333; padding-top: 5px; text-align: center; font-size: 9.5pt; } .pdoc .sig span { display: block; color: #666; font-size: 8.5pt; }
.pdoc .stamp { display: inline-block; border: 2px solid #1f7a3a; color: #1f7a3a; border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: 8.5pt; transform: rotate(-4deg); margin-top: 5px; }
.pdoc .foot { margin-top: auto; border-top: 1px solid #ccc; padding-top: 5px; font-size: 8pt; color: #666; display: flex; justify-content: space-between; }
.pdoc .qr svg { width: 58px; height: 58px; display: block; } .pdoc .qrbox { display: flex; gap: 8px; align-items: center; }
.pdoc .cut { border-top: 2px dashed #999; margin: 14px -13mm; position: relative; } .pdoc .cut span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 8px; color: #888; font-size: 8.5pt; }
.pdoc .copy { font-size: 8.5pt; border: 1px solid #999; border-radius: 4px; padding: 1px 7px; color: #666; display: inline-block; }
.pdoc .in { color: #1f7a3a; } .pdoc .out { color: #93081f; } .pdoc .chk { width: 18px; }
@media print {
  body:not(.printing-pages) .pdoc-wrap { background: #fff; padding: 0; } .ptool { display: none !important; }
  .pdoc { width: auto; min-height: 277mm; margin: 0; box-shadow: none; padding: 0; break-after: page; }
  .pdoc:last-child { break-after: auto; }
}
/* v8.3b — language of printed documents */
.ptool .plang { display: inline-flex; border-radius: 10px; overflow: hidden; } .ptool .plang .btn { border-radius: 0; } .ptool .plang .btn.on { background: #4d5160; color: #fff; }
.pdoc .en-line { display: block; color: #555; font-size: .86em; direction: ltr; unicode-bidi: isolate; }
.pdoc .doc .t, .pdoc .doc .n, .pdoc .doc .s { text-align: end; }
.pdoc[dir=ltr] { direction: ltr; } .pdoc[dir=ltr] td.n, .pdoc[dir=ltr] th.n { text-align: right; } .pdoc[dir=ltr] .ltr { text-align: left; }
.lang-bi .pdoc th, .lang-bi .pdoc .grid span { font-size: 8pt; }
.pdoc .sig span.stamp { display: inline-block; width: auto; }
/* ---------------------------------------------------------------- v8.4 reports: live update + printed report */
.rep-filters { display: grid; grid-template-columns: minmax(260px, 2.2fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; }
.rep-filters .chk { align-self: center; padding-top: 1.2rem; }
.rep-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rep-live { color: var(--good); font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; } .rep-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.rep-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.rep-head h2 { font-size: 1.05rem; margin: 0; }
.rep-result.stale .tablewrap { opacity: .55; transition: opacity .15s; }
.rep-table td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-table tfoot td { font-weight: 700; background: var(--soft); border-top: 2px solid var(--line); padding: .6rem; }
@media (max-width: 760px) { .rep-filters { grid-template-columns: 1fr 1fr; } .rep-filters .field:first-child { grid-column: 1 / -1; } .rep-table tfoot { display: block; } .rep-table tfoot tr { display: block; } .rep-table tfoot td:empty { display: none; } }
@media print { .reports .rep-actions { display: none; } }
/* printed report (/print/report) — A4, landscape when the table is wide; page numbers in the page margin */
.pdoc.rep .hd .doc .t { font-size: 14pt; } .pdoc.rep .hd .doc .n { font-size: 9.5pt; font-weight: 400; color: #555; }
.pdoc.rep .rsum { display: grid; border: 1px solid #bbb; border-radius: 6px; margin: 12px 0 10px; overflow: hidden; }
.pdoc.rep .rsum > div { padding: 6px 10px; border-inline-start: 1px solid #ddd; } .pdoc.rep .rsum > div:first-child { border-inline-start: 0; }
.pdoc.rep .rsum span { display: block; color: #666; font-size: 8.5pt; } .pdoc.rep .rsum b { font-size: 10.5pt; } .pdoc.rep .rsum b.big { font-size: 14pt; }
.pdoc.rep td.n .bar { display: inline-block; height: 7px; background: #c27b86; border-radius: 2px; margin-inline-start: 8px; vertical-align: middle; }
.pdoc.rep.many td, .pdoc.rep.many th { font-size: 8pt; padding: 3px 4px; }
.pdoc.rep .empty { padding: 30px; text-align: center; color: #777; border: 1px dashed #bbb; border-radius: 6px; }
.pdoc.rep.land { width: 297mm; min-height: 210mm; }
/* the page size and page numbers come from a <style> the report page adds (named @page rules split the table in Chrome) */
@media print { .pdoc.rep { min-height: 270mm; } .pdoc.rep.land { width: auto; min-height: 182mm; } }
.pdoc.rep .hd .doc .n { direction: inherit; }
.pdoc.rep .rtab th { white-space: normal; vertical-align: bottom; } .pdoc.rep .rtab th .en-line { font-weight: 400; font-size: .92em; }
.pdoc.rep .rtab tfoot .en-line { font-weight: 400; }
.rep-table td.code, .pdoc.rep td.code { white-space: nowrap; }
@media print { body:not(.printing-pages) .pdoc-wrap { min-height: 0; } }
.pdoc.rep tbody.tot td { font-weight: 700; background: #fafafa; font-size: 10pt; border-top: 2px solid #999; } .pdoc.rep tbody.tot .en-line { font-weight: 400; }
/* ---------------------------------------------------------------- v8.5 batch page: no side viewer, roomy table, invoice opened in the list */
.batch-main > div { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.batch-main .card { margin-bottom: 0; }
.file-viewer .zv-box { min-height: 420px; }
/* summary box + distribution by ledger */
.inv-top { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; margin-bottom: 14px; align-items: start; }
.inv-top.one { grid-template-columns: minmax(0, 1fr); }
.inv-kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi-l { color: var(--muted); font-size: .8rem; }
.kpi-big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-align: start; } [dir=rtl] .kpi-big { text-align: right; }
.kpi-big small { font-size: .8rem; color: var(--muted); font-weight: 600; margin-inline-start: 5px; }
.kpi-row { display: flex; gap: 22px; } .kpi-row span { display: block; color: var(--muted); font-size: .78rem; } .kpi-row b { font-size: 1.25rem; }
.inv-warnbox { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; background: var(--warn-bg); color: #6b4000; border-radius: var(--radius-s); padding: 10px 12px; font-size: .85rem; }
.inv-warnbox b { font-size: .9rem; } .inv-warnbox .btn { margin-top: 3px; } .inv-warnbox .btn.on { background: var(--warn); color: #fff; border-color: var(--warn); }
.led-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.led-h { margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .led-h b { font-size: .95rem; }
.led-r, .led-t { display: grid; grid-template-columns: minmax(150px, 280px) minmax(60px, 1fr) 34px 96px 48px; gap: 10px; align-items: center; padding: 5px 8px; font-size: .86rem; }
.led-r { width: 100%; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.led-r:hover { background: #fbf3f5; } .led-r.on { background: #fdf2f4; box-shadow: inset -3px 0 0 var(--brand); } [dir=ltr] .led-r.on { box-shadow: inset 3px 0 0 var(--brand); }
.led-r .nm { font-weight: 600; text-align: right; overflow-wrap: anywhere; } [dir=ltr] .led-r .nm { text-align: left; }
.led-r .bar { height: 9px; background: #eef0f3; border-radius: 5px; overflow: hidden; display: block; } .led-r .bar i { display: block; height: 100%; background: #c27b86; border-radius: 5px; }
.led-r .c, .led-t .c { color: var(--muted); font-size: .8rem; text-align: center; }
.led-r .a, .led-t .a { text-align: left; font-variant-numeric: tabular-nums; } [dir=ltr] .led-r .a, [dir=ltr] .led-t .a { text-align: right; }
.led-r .p { color: var(--muted); font-size: .78rem; text-align: left; }
.led-t { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; font-weight: 700; } .led-t .ok { color: var(--good); font-weight: 600; font-size: .8rem; }
.led-u { color: var(--muted); font-size: .8rem; margin-top: 6px; padding: 0 8px; }
.led-filter { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; background: #fdf2f4; border-radius: var(--radius-s); font-size: .88rem; flex-wrap: wrap; }
/* the table: more room between columns, the description takes what is left */
.inv-table th { padding: .6rem .7rem; }
.inv-table td { padding: .75rem .7rem; font-size: .88rem; line-height: 1.55; }
.inv-table .inv-sup { min-width: 170px; max-width: 260px; }
.inv-table .inv-no { min-width: 90px; max-width: 170px; }
.inv-table td.inv-date { white-space: nowrap; }
.inv-desc { min-width: 220px; max-width: none; }
.inv-led { min-width: 230px; } .inv-led .input.small { width: 100%; min-width: 220px; max-width: 300px; }
.inv-amt { min-width: 120px; }
.inv-viewc { width: 1%; white-space: nowrap; }
.btn.inv-view { font-weight: 600; } .btn.inv-view.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.inv-table tr.open > td { background: #fdf6f7; border-bottom: 0; }
.inv-table tr.inv-exp > td { background: #fdf6f7; padding: 0 .7rem 1rem; }
/* one invoice opened: image + data */
.ivw { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; align-items: start; }
.ivw-img { min-width: 0; display: flex; flex-direction: column; gap: 6px; position: sticky; top: calc(var(--topbar-h) + 8px); }
.ivw-img .zv-hint { display: none; }
.ivw-cap { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.ivw-data { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ivw-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ivw-f > div { background: var(--soft); border-radius: 8px; padding: 7px 10px; min-width: 0; } .ivw-f span { display: block; font-size: .74rem; color: var(--muted); } .ivw-f b { font-size: .9rem; overflow-wrap: anywhere; display: block; }
.ivw-orph { display: flex; flex-direction: column; gap: 4px; background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.ivw-warn { background: var(--warn-bg); border: 1px solid #f0d199; border-radius: 10px; padding: 8px 11px; font-size: .85rem; color: #6b4000; line-height: 1.6; } .ivw-warn b { display: block; }
.ivw-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; } .ivw-act .rej-box { flex-basis: 100%; }
.ivw-nav { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 10px; flex-wrap: wrap; }
.rv-view { padding: 0 0 14px; } .rv-line.open { background: #fdf6f7; border-color: #e9c3cb; }
@media (max-width: 1000px) {
  .inv-top { grid-template-columns: 1fr; }
  .ivw { grid-template-columns: 1fr; } .ivw-img { position: static; }
}
@media (max-width: 760px) {
  .led-r, .led-t { grid-template-columns: minmax(0, 1fr) 30px 86px; } .led-r .bar, .led-r .p, .led-t .ok, .led-t > span:last-child { display: none; }
  .ivw-f { grid-template-columns: 1fr 1fr; }
  .inv-table td.inv-exp-c { display: block; padding: 0 0 10px; } .inv-table tr.inv-exp > td { padding: 0; }
  .inv-table td.inv-viewc::before { content: none; } .inv-table td.inv-viewc { width: auto; justify-content: flex-start; }
  .inv-table .inv-sup, .inv-table .inv-no { max-width: none; min-width: 0; } .inv-desc, .inv-led, .inv-amt { min-width: 0; }
  .ivw { padding: 8px; } .ivw-img .zv-box { height: 56vh !important; min-height: 280px; }
}
.autototal .infobox, .autototal .warnbox, .acc-confirm .warnbox { margin-bottom: 12px; }
/* ---------------------------------------------------------------- v9: printed A4 documents keep their own type (IBM Plex Sans Arabic) */
.pdoc, .pdoc h1, .pdoc h2, .pdoc h3, .pdoc h4, .pdoc b, .pdoc th, .pdoc td { font-family: var(--font); letter-spacing: 0; }
.tasks .alldone .ico { color: var(--good); width: 26px; height: 26px; }
.tasks .alldone b { font: 600 15px var(--head); color: var(--text); }
.tabs-wrap { display: flex; }
.pdoc h3 { font-weight: 700; line-height: 1.5; }
@media (max-width: 1520px) { html[dir=ltr] .tn-brand > div:not(.lg), html[dir=ltr] .me > div:not(.av) { display: none; } }
.topnav .sp { min-width: 8px; }
/* v9: ready-made rejection reasons as pills (same look as the reject dialog) */
.rej-box { border-radius: 14px; padding: 12px 14px; gap: 8px; }
.rej-q { display: flex; flex-wrap: wrap; gap: 6px; }
.rej-q .q { border: 1px solid var(--field); background: #fff; border-radius: 999px; padding: 5px 12px; font: 500 12.5px var(--font); cursor: pointer; color: #3b3f48; }
.rej-q .q:hover { background: var(--soft); border-color: #c2c6ce; }
.rej-q .q.on { background: var(--bad-bg); border-color: #efc3cb; color: var(--bad); }
.rej-box.dark .rej-q .q { background: #1b1c20; color: #ddd; border-color: #444; } .rej-box.dark .rej-q .q.on { background: #5a1a26; color: #fff; }
.ivw-warn .raw { display: block; margin-top: 4px; font-size: 12px; opacity: .85; }

/* v9.2 — the holder's review of the warnings (green = reviewed by the holder, not "correct"; red is never used here) */
.hc-ok { display: inline-block; border: 1px solid #bfe3cd; background: var(--good-bg); color: var(--good); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 1px 8px; margin-top: 4px; white-space: nowrap; }
.hc-ok.acc { display: block; white-space: normal; border-radius: 10px; text-align: start; line-height: 1.5; }
.hc-note { font-weight: 400; color: var(--text); margin-top: 2px; }
.hc-miss { font-size: 11px; font-weight: 600; color: var(--warn); margin-top: 4px; }
.hc-btn { margin-top: 4px; border-color: #bfe3cd; color: var(--good); background: #fff; white-space: nowrap; }
.hc-btn:hover { background: var(--good-bg); }
.hc-undo { border: 0; background: none; color: var(--good); cursor: pointer; font-size: 13px; padding: 0 4px; }
.hc-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; }
.hc-pending { border: 0; background: var(--warn-bg); color: var(--warn); font: inherit; font-weight: 700; border-radius: 8px; padding: 4px 10px; cursor: pointer; text-align: start; }
.infobox.hc-sum-ok { background: var(--good-bg); color: var(--good); border-color: #bfe3cd; }
.infobox.hc-sum-miss { background: var(--warn-bg); color: var(--warn); border-color: #f0d199; }
.led-filter.hc-filter { background: var(--warn-bg); color: var(--warn); border-color: #f0d199; }
.hc-ok.acc, .hc-miss { text-align: start; }
.hc-miss { white-space: normal; }
