/* NAVORYNTH administration & staff portal — one design system, light and dark, LTR and RTL. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/vazirmatn-arabic-wght-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2"); }

:root {
  --font: "Manrope", "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e4e7ee;
  --line-strong: #d3d8e2;
  --text: #121a2b;
  --text-2: #4a5468;
  --muted: #7b8497;
  --brand: #0b1b33;
  --brand-2: #13294b;
  --gold: #b88a3e;
  --gold-soft: #f6eedf;
  --accent: #2f5bd3;
  --accent-soft: #e8eefc;
  --ok: #1f8a5b; --ok-soft: #e3f4ec;
  --warn: #b7791f; --warn-soft: #fbf0dc;
  --bad: #c43d3d; --bad-soft: #fbe6e6;
  --info: #2b7bb9; --info-soft: #e2f0fa;
  --violet: #6a4fc4; --violet-soft: #eee9fb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px -12px rgba(16, 24, 40, .25);
  --side: 264px;
  color-scheme: light;
}

:root:is([data-theme="dark"], [data-theme="navy"], [data-theme="graphit"]) {
  --bg: #0a111e;
  --surface: #111a2b;
  --surface-2: #0e1625;
  --line: #1f2a3f;
  --line-strong: #2b3954;
  --text: #e9edf5;
  --text-2: #b4bdcf;
  --muted: #7f8aa1;
  --gold: #d7ad69;
  --gold-soft: #2a2416;
  --accent: #7ea2ff;
  --accent-soft: #1a2647;
  --ok: #4cc58f; --ok-soft: #12291f;
  --warn: #e3ad55; --warn-soft: #2d2412;
  --bad: #ef7a7a; --bad-soft: #321718;
  --info: #69b4ec; --info-soft: #11263a;
  --violet: #a993f5; --violet-soft: #221a3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 18px 40px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* 1.20.0 Graphit: black and graphite surfaces, silver accent ("Autorität, Präzision, Neutralität"). */
:root[data-theme="graphit"] {
  --bg: #0b0c0e;
  --surface: #141619;
  --surface-2: #101215;
  --line: #24272c;
  --line-strong: #33373e;
  --text: #f2f3f5;
  --text-2: #b9bec6;
  --muted: #868c96;
  --brand: #08090b;
  --brand-2: #16181c;
  --gold: #d3d8df;
  --gold-soft: #22252a;
  --accent: #c9d0da;
  --accent-soft: #23272d;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.ic { width: 15px; height: 15px; vertical-align: -3px; flex: none; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
html[lang="fa"] body { font-family: "Vazirmatn", "Manrope", system-ui, sans-serif; font-size: 14.5px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--brand); color: #c9d2e3; display: flex; flex-direction: column; padding: 18px 14px; border-inline-end: 1px solid rgba(255,255,255,.04); scrollbar-width: thin; scrollbar-color: #2a3c5e transparent; }
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, #d7ad69, #8f6a2c); color: #0b1b33; font-family: var(--serif); font-weight: 800; font-size: 19px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 14.5px; letter-spacing: .14em; }
.brand-text small { font-size: 10.5px; color: #8796b3; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.nav-group { margin-top: 14px; }
.nav-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #6b7a98; padding: 0 10px 6px; font-weight: 700; }
html[lang="fa"] .nav-title { letter-spacing: 0; font-size: 11.5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #c3cde0; font-weight: 550; text-decoration: none; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(215,173,105,.14); color: #fff; }
.nav a.active::before { content: ""; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav .ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-inline-start: auto; background: var(--gold); color: #0b1b33; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.nav .count.red { background: #e86060; color: #fff; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #24395f; color: #fff; font-weight: 700; font-size: 12.5px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.gold { background: var(--gold-soft); color: var(--gold); }
.side-foot .who { min-width: 0; line-height: 1.2; }
.side-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: #8796b3; font-size: 11.5px; }
.side-foot form { margin-inline-start: auto; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn .ic { width: 17px; height: 17px; }
.sidebar .icon-btn { background: transparent; border-color: rgba(255,255,255,.1); color: #9fb0cf; }
.sidebar .icon-btn:hover { color: #fff; border-color: rgba(255,255,255,.25); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .crumbs { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.topbar .crumbs a { color: var(--text-2); }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.lang-form select { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 8px; font: inherit; font-size: 13px; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin: 6px 0 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; display: block; }
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: 12px; }

/* ---------- Cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 .ic { width: 17px; height: 17px; color: var(--muted); }
.card-head .link { font-size: 13px; font-weight: 600; }
.card-body { padding: 18px 20px; }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack > * + * { margin-top: 18px; }
.mt { margin-top: 18px; } .mt-s { margin-top: 10px; } .mb { margin-bottom: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 26px 18px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(340px, 100%); display: inline-block; vertical-align: bottom; }
.pre { white-space: pre-wrap; word-break: break-word; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: end; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { position: relative; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: block; color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kpi .k-label { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi .k-label .ic { width: 15px; height: 15px; }
.kpi .k-value { font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.alert .k-value { color: var(--bad); }
.kpi.warn .k-value { color: var(--warn); }
.kpi.good .k-value { color: var(--ok); }
.kpi.gold { background: linear-gradient(150deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.kpi.gold .k-label, .kpi.gold .k-foot { color: #b9c5dc; }
.kpi.gold .k-value { color: #f1d6a3; }
.delta { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.delta.flat { color: var(--muted); background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--muted); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root:is([data-theme="dark"], [data-theme="navy"], [data-theme="graphit"]) .btn-primary { background: var(--gold); border-color: var(--gold); color: #10192b; }
.btn-primary:hover { box-shadow: 0 6px 16px -8px rgba(11, 27, 51, .7); border-color: var(--brand); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.inline { display: inline; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.b-new, .b-lead, .b-open, .b-unpaid, .b-pending { color: var(--info); background: var(--info-soft); border-color: transparent; }
.b-sent, .b-signed, .b-contacted, .b-quoted, .b-in_progress, .b-partial, .b-review, .b-high { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.b-draft { color: var(--muted); background: var(--panel-2, rgba(127,127,127,.12)); border-color: transparent; }
.b-closed, .b-delivered, .b-done, .b-paid, .b-resolved, .b-active, .b-approved { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.b-cancelled, .b-urgent, .b-overdue, .b-inactive, .b-failed { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.b-low { color: var(--muted); }
.b-normal { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.b-concept { color: var(--violet); background: var(--violet-soft); border-color: transparent; }
.b-gold { color: var(--gold); background: var(--gold-soft); border-color: transparent; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
html[lang="fa"] .table th { letter-spacing: 0; font-size: 12px; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .title { font-weight: 650; color: var(--text); }
.table a.title:hover { color: var(--accent); }
.table .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: block; }
.table .check { width: 36px; }
.table td.actions { text-align: end; white-space: nowrap; }
.table tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
html[dir="rtl"] .table tr.is-overdue td:first-child { box-shadow: inset -3px 0 0 var(--bad); }
.table.compact td { padding: 9px 14px; }
.text-bad { color: var(--bad); font-weight: 650; }
.text-warn { color: var(--warn); font-weight: 650; }
.text-ok { color: var(--ok); font-weight: 650; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field small, .hint { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; min-height: 38px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input.is-invalid { border-color: var(--bad); }
.error { color: var(--bad); font-size: 12px; font-weight: 600; }
.check-row { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 550; }
.check-row input { width: 17px; height: 17px; accent-color: var(--brand); }
:root:is([data-theme="dark"], [data-theme="navy"], [data-theme="graphit"]) .check-row input { accent-color: var(--gold); }
.form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.form-actions.start { justify-content: flex-start; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.filters .field { flex: 1 1 150px; max-width: 240px; }
.filters .field.grow { max-width: none; flex: 2 1 220px; }
.filters .input { min-height: 34px; padding: 6px 10px; font-size: 13.5px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-inline-start: 34px; }
.lang-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--text-2); font-weight: 650; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font: inherit; white-space: nowrap; text-decoration: none !important; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a.active, .tabs button.active { color: var(--text); border-bottom-color: var(--gold); }
.tabs .pill { font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 0 7px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 650; font-size: 13px; text-decoration: none !important; }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
[data-tab-panel][hidden] { display: none; }

/* ---------- Flash ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 11px; margin-bottom: 18px; font-weight: 600; border: 1px solid transparent; }
.flash .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
.flash ul { margin: 4px 0 0; padding-inline-start: 18px; font-weight: 500; }

/* ---------- Lists, timeline, empty ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .meta { color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--line-strong); margin: 0 auto 10px; display: block; }
.empty b { display: block; color: var(--text-2); margin-bottom: 3px; }
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
html[dir="rtl"] .timeline li { padding: 0 26px 16px 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 2px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.timeline .t-time { font-size: 12px; color: var(--muted); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 600; min-width: 0; word-break: break-word; }

/* ---------- Discussion ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; max-height: 560px; overflow-y: auto; padding: 18px 20px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg .bubble { background: var(--surface-2); border: 1px solid var(--line); padding: 10px 13px; border-radius: 4px 14px 14px 14px; }
html[dir="rtl"] .msg .bubble { border-radius: 14px 4px 14px 14px; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg .who b { color: var(--text); }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--accent-soft); border-color: transparent; border-radius: 14px 4px 14px 14px; }
html[dir="rtl"] .msg.mine .bubble { border-radius: 4px 14px 14px 14px; }
.composer { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 44px; }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 280px; display: flex; flex-direction: column; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 120px; transition: background .15s; border-radius: 0 0 var(--radius) var(--radius); }
.col-body.drop { background: var(--accent-soft); }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; box-shadow: var(--shadow); cursor: grab; }
.ticket:active { cursor: grabbing; }
.ticket.dragging { opacity: .45; }
.ticket .t-title { font-weight: 650; color: var(--text); display: block; margin-bottom: 8px; }
.ticket .t-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.ticket.is-overdue { border-inline-start: 3px solid var(--bad); }
.ticket form { margin-top: 10px; display: flex; gap: 6px; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.cal .dow { padding: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; background: var(--surface-2); border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 112px; padding: 6px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.cal .day.out { background: var(--surface-2); }
.cal .day.out .dnum { color: var(--line-strong); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal .dnum { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.cal .ev { display: block; font-size: 11.5px; line-height: 1.35; padding: 3px 6px; border-radius: 6px; margin-bottom: 3px; background: var(--info-soft); color: var(--info); text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.overdue { background: var(--bad-soft); color: var(--bad); }
.cal .ev.resolved { background: var(--surface-2); color: var(--muted); text-decoration: line-through !important; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-bar { fill: var(--accent); opacity: .9; }
.ch-bar:hover { opacity: 1; }
.ch-val { fill: var(--text-2); font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.ch-lbl, .ch-axis { fill: var(--muted); font-size: 10.5px; text-anchor: middle; font-family: var(--font); }
.ch-axis { text-anchor: end; }
.ch-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { stroke: var(--surface); stroke-width: 1.5; }
.ch-line.ch-s0 { stroke: var(--accent); } .ch-dot.ch-s0, i.ch-s0 { fill: var(--accent); background: var(--accent); }
.ch-line.ch-s1 { stroke: var(--gold); } .ch-dot.ch-s1, i.ch-s1 { fill: var(--gold); background: var(--gold); }
.ch-line.ch-s2 { stroke: var(--ok); } .ch-dot.ch-s2, i.ch-s2 { fill: var(--ok); background: var(--ok); }
.ch-line.ch-s3 { stroke: var(--violet); } .ch-dot.ch-s3, i.ch-s3 { fill: var(--violet); background: var(--violet); }
.ch-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.ch-key { display: inline-flex; align-items: center; gap: 6px; }
.ch-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.stackbar span { display: block; height: 100%; }
.s-open, i.s-open { background: var(--info); }
.s-progress, i.s-progress { background: var(--warn); }
.s-done, i.s-done { background: var(--ok); }
.s-bad, i.s-bad { background: var(--bad); }
.meter { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.meter > span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }

/* ---------- Portfolio admin ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pf-card { overflow: hidden; display: flex; flex-direction: column; }
.pf-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #13294b, #0b1b33); position: relative; display: grid; place-items: center; color: #8796b3; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pf-thumb .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.pf-thumb .handle { position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(0,0,0,.45); color: #fff; border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: grab; }
.pf-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pf-card.dragging { opacity: .4; }
.pf-card.drag-over { outline: 2px dashed var(--gold); outline-offset: 3px; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.g-item { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); aspect-ratio: 4 / 3; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-item.is-cover { border-color: var(--gold); }
.g-item .g-actions { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-size: 11.5px; }
.g-item .g-actions label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.g-item .g-actions button { background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; }
.g-item .g-actions button:hover { background: var(--bad); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer; display: block; }
.dropzone.over { border-color: var(--gold); background: var(--gold-soft); }
.dropzone input { display: none; }
.dropzone .ic { width: 28px; height: 28px; margin: 0 auto 6px; display: block; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.previews img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Quote editor ---------- */
.qtable td { padding: 6px 8px; }
.qtable .input { min-height: 34px; padding: 6px 9px; }
.qtable .qty { width: 90px; }
.qtable .unit { width: 140px; }
.qtable .line { width: 140px; text-align: end; font-weight: 650; font-variant-numeric: tabular-nums; }
.qtotal { display: flex; justify-content: flex-end; gap: 24px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.qtotal b { font-size: 1.25rem; }

/* ---------- Inbox ---------- */
.notif { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.notif .n-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.notif.unread .n-icon { background: var(--accent); color: #fff; }
.notif .n-icon .ic { width: 17px; height: 17px; }
.notif .grow { flex: 1; min-width: 0; }
.notif .n-text { color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.notif.attention .n-icon { background: var(--bad); color: #fff; }

/* ---------- Auth / installer ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; background: radial-gradient(1200px 600px at 20% 10%, #1c3a68 0, transparent 60%), linear-gradient(160deg, #0b1b33, #060e1c); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; border: 1px solid rgba(215,173,105,.25); inset-inline-end: -180px; bottom: -200px; box-shadow: 0 0 0 70px rgba(215,173,105,.04), 0 0 0 150px rgba(215,173,105,.03); }
.auth-art h1 { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; max-width: 440px; line-height: 1.15; }
html[lang="fa"] .auth-art h1 { font-family: "Vazirmatn", sans-serif; font-weight: 800; font-size: 2.2rem; }
.auth-art h1 em { color: #d7ad69; font-style: italic; }
.auth-art p { color: #a9b6cf; max-width: 420px; margin-top: 14px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-box .field + .field { margin-top: 14px; }
.auth-switch { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; }
.install-wrap { max-width: 920px; margin: 0 auto; padding: 40px 20px 60px; }
.steps-bar { display: flex; gap: 8px; margin: 18px 0 24px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps-bar span.on { background: var(--gold); }
.req { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.req li { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.req .ok { color: var(--ok); } .req .no { color: var(--bad); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span.cur, .pager span.gap { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; padding: 0 8px; font-weight: 650; font-size: 13px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none !important; }
.pager span.cur { background: var(--brand); color: #fff; border-color: var(--brand); }
:root:is([data-theme="dark"], [data-theme="navy"], [data-theme="graphit"]) .pager span.cur { background: var(--gold); color: #10192b; border-color: var(--gold); }
.pager span.gap { border: 0; }
.pager .info { color: var(--muted); font-size: 12.5px; }

/* ---------- Bulk bar / dialogs ---------- */
.bulkbar { position: sticky; bottom: 16px; margin-top: 14px; display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: var(--shadow-lg); z-index: 15; }
.bulkbar.show { display: flex; }
.bulkbar .input { min-height: 32px; padding: 4px 8px; width: auto; background: #fff; color: #10192b; }
.bulkbar .btn { height: 32px; }
details.drop { position: relative; }
details.drop > summary { list-style: none; cursor: pointer; }
details.drop > summary::-webkit-details-marker { display: none; }
details.drop .drop-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 30; }
details.drop:not([open]) .drop-menu { display: none; }
@media (max-width: 640px) { details.drop .drop-menu { max-width: calc(100vw - 32px); } }
details.drop .drop-menu a, details.drop .drop-menu button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; text-decoration: none !important; }
details.drop .drop-menu a:hover, details.drop .drop-menu button:hover { background: var(--surface-2); }
details.drop .drop-menu .ic { width: 16px; height: 16px; color: var(--muted); }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.widget-list li .ic { cursor: grab; color: var(--muted); width: 16px; height: 16px; }
.widget-list li.dragging { opacity: .4; }

/* ---------- Print ---------- */
.print-page { max-width: 860px; margin: 0 auto; padding: 40px; background: #fff; color: #111; }
.print-toolbar { display: flex; justify-content: space-between; gap: 10px; max-width: 860px; margin: 20px auto 0; padding: 0 40px; }
.doc-head { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 24px; border-bottom: 2px solid #0b1b33; margin-bottom: 26px; }
.doc-brand { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: .06em; color: #0b1b33; }
.doc-brand span { color: #b88a3e; }
.doc-meta { text-align: end; font-size: 13px; color: #444; }
.doc-meta h1 { font-size: 22px; color: #0b1b33; margin-bottom: 6px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.doc-table th { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #666; border-bottom: 1px solid #ccc; padding: 8px 6px; }
.doc-table td { padding: 10px 6px; border-bottom: 1px solid #eee; vertical-align: top; }
.doc-table .r { text-align: end; white-space: nowrap; }
.doc-total td { font-weight: 800; font-size: 16px; border-top: 2px solid #0b1b33; border-bottom: 0; }
.doc-terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; font-size: 13px; }
.doc-terms h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #666; margin-bottom: 4px; }
.doc-foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid #ddd; font-size: 11.5px; color: #777; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.print-body { background: #e9ebf0; }
@media print {
  @page { margin: 14mm; }
  body, .print-body { background: #fff !important; }
  .sidebar, .topbar, .no-print, .print-toolbar, .page-head .actions, .bulkbar, .filters { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .print-page { padding: 0; max-width: none; }
  a { color: inherit; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(5, 10, 20, .5); z-index: 50; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar, .content { padding-inline: 16px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .board { grid-template-columns: repeat(3, minmax(250px, 82vw)); }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .k-value { font-size: 1.35rem; }
  .req { grid-template-columns: 1fr; }
  .cal .day { min-height: 70px; }
  .cal .ev { font-size: 10px; padding: 2px 4px; }
  .table th, .table td { padding: 10px 12px; }
  .doc-terms { grid-template-columns: 1fr; }
  h1 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Customer projects ---------- */
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: flex-start; }
.att { display: inline-flex; align-items: center; gap: 7px; max-width: 260px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none !important; }
.att:hover { border-color: var(--gold); }
.att .ic { width: 15px; height: 15px; flex: none; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { color: var(--muted); flex: none; }
.att-img { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); max-width: 220px; }
.att-img img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: cover; }
.composer.composer-files { flex-direction: column; align-items: stretch; }
.composer-files label.btn { position: relative; cursor: pointer; }
.wf-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.wf-steps li { display: flex; gap: 9px; align-items: center; color: var(--muted); }
.wf-steps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; box-sizing: border-box; }
.wf-steps li.done { color: var(--text); }
.wf-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.pct-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pct-pick label { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: center; }
.pct-pick label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.pct-pick label.off { opacity: .45; cursor: not-allowed; }
.pct-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pct-pick b { font-size: 1.05rem; }
.pct-pick small { color: var(--muted); font-size: 11.5px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.member-grid.one { grid-template-columns: 1fr; }
.receipt-box { display: grid; gap: 8px; padding: 12px; border-radius: 11px; border: 1px solid var(--gold); background: var(--gold-soft); }
.receipt-box .att { max-width: 100%; }

/* ---------- Customer conversation (staff portal / administration) ---------- */
.conv { display: flex; flex-direction: column; overflow: hidden; }
.conv-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.conv-who { display: grid; min-width: 0; flex: 1; }
.conv-who b { font-size: 15px; }
.conv-who span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-count { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.conv-count .ic { width: 15px; height: 15px; }
.conv-list { display: flex; flex-direction: column; gap: 14px; padding: 18px; max-height: 620px; min-height: 220px; overflow-y: auto; background: var(--surface-2); }
.conv-day { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.conv-day::before, .conv-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.conv-empty { margin: auto; display: grid; justify-items: center; gap: 6px; color: var(--muted); text-align: center; padding: 30px 0; }
.conv-empty .ic { width: 28px; height: 28px; opacity: .6; }
.conv-empty b { color: var(--text-2); }
.cm { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.cm-body { display: grid; gap: 6px; min-width: 0; }
.cm-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); }
.cm-meta b { color: var(--text); font-size: 13px; }
.cm-role { font-size: 11px; padding: 1px 7px; border-radius: 20px; border: 1px solid var(--line); }
.cm-bubble { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--surface); border: 1px solid var(--line); }
.cm-team .cm-bubble { background: var(--gold-soft); border-color: transparent; }
.cm-mine { align-self: flex-end; }
.cm-mine .cm-body { justify-items: end; }
.cm-mine .cm-bubble { background: var(--brand); color: #fff; border-color: transparent; border-radius: 16px 4px 16px 16px; }
html:is([data-theme="dark"], [data-theme="navy"], [data-theme="graphit"]) .cm-mine .cm-bubble { background: #2a3f6b; }
html[dir="rtl"] .cm-bubble { border-radius: 16px 4px 16px 16px; }
html[dir="rtl"] .cm-mine .cm-bubble { border-radius: 4px 16px 16px 16px; }
.cm-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--gold); }
.cm-tag .ic { width: 15px; height: 15px; }
.cm-files { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-mine .cm-files { justify-content: flex-end; }
.cm-img { display: grid; width: 200px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-decoration: none !important; color: var(--text); }
.cm-img img { display: block; width: 100%; height: 130px; object-fit: cover; }
.cm-img span, .cm-fname { display: grid; min-width: 0; padding: 7px 10px; }
.cm-img b, .cm-fname b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-img small, .cm-fname small { color: var(--muted); font-size: 11.5px; }
.cm-file { display: flex; align-items: center; gap: 4px; width: 240px; max-width: 100%; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none !important; }
.cm-file:hover, .cm-img:hover { border-color: var(--gold); }
.cm-file > .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.cm-fname { flex: 1; padding: 0 4px; }
.cm-ext { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--gold-soft); color: var(--gold); }
.conv-compose { border-top: 1px solid var(--line); padding: 12px 14px 8px; background: var(--surface); }
.conv-row { display: flex; align-items: flex-end; gap: 8px; }
.conv-row textarea { flex: 1; min-height: 44px; max-height: 200px; resize: none; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 11px 14px; font: inherit; line-height: 1.45; }
.conv-row textarea:focus { outline: none; border-color: var(--gold); }
.conv-attach { position: relative; cursor: pointer; width: 44px; height: 44px; flex: none; }
.conv-send { height: 44px; flex: none; }
.conv-hint { margin: 6px 2px 0; color: var(--muted); font-size: 11.5px; }
.conv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.conv-chips span { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 10px; border-radius: 20px; background: var(--gold-soft); color: var(--text); font-size: 12px; }
.conv-chips span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .cm { max-width: 94%; } .cm-img { width: 160px; } .conv-list { padding: 14px 12px; } }

/* Progress stepper with final settlement (1.2.2) */
.pg-steps{list-style:none;margin:0;padding:0;position:relative}
.pg-steps>li{position:relative;padding:0 0 14px 0}
.pg-steps>li:last-child{padding-bottom:0}
.pg-steps>li:not(:last-child)::before{content:"";position:absolute;inset-inline-start:9px;top:22px;bottom:-2px;width:2px;background:var(--line)}
.pg-steps>li.done:not(:last-child)::before{background:var(--ok)}
.pg-btn{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;padding:2px 0;color:var(--muted);font:inherit;font-weight:500;text-align:start;cursor:pointer}
.pg-btn.static{cursor:default}
.pg-btn:disabled{cursor:default}
.pg-btn:not(:disabled):not(.static):hover{color:var(--text)}
.pg-dot{flex:0 0 20px;height:20px;border-radius:50%;border:2px solid var(--line-strong);background:var(--surface);position:relative;z-index:1}
.pg-steps li.done .pg-btn{color:var(--text)}
.pg-steps li.done .pg-dot{background:var(--ok);border-color:var(--ok)}
.pg-steps li.done .pg-dot::after{content:"";position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.pg-steps li.current .pg-btn{color:var(--text);font-weight:600}
.pg-steps li.current .pg-dot{border-color:var(--gold);box-shadow:0 0 0 4px color-mix(in srgb,var(--gold) 22%,transparent)}
.pg-body{margin:8px 0 2px;padding-inline-start:30px}
.pg-body .hint,.pg-body p{margin:0}
.settle-sum{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:0 0 10px;font-size:.88rem;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.settle-sum dt{color:var(--muted)}
.settle-sum dd{margin:0;text-align:end}
.section-title{font-size:1.05rem;font-weight:600;margin:6px 0 4px}

/* Profile photos (1.3.0) */
.avatar.has-img { background: none; padding: 0; overflow: hidden; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 30px; }
.avatar-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-edit .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.avatar-edit input[type=file] { max-width: 260px; }
.photo-nag { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 11px; margin-bottom: 18px; background: var(--gold-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.photo-nag .grow { flex: 1; }

/* Order details & contract (1.4.0) */
[data-needs][data-kind="upgrade"] [data-for="new"], [data-needs][data-kind="new"] [data-for="upgrade"], [data-needs]:not([data-kind]) [data-for] { display: none; }
details > summary.card-head { list-style: none; }
details > summary.card-head::-webkit-details-marker { display: none; }
.sigpad { border: 1px dashed var(--line-strong); border-radius: 10px; overflow: hidden; }
.sigpad canvas { display: block; width: 100%; height: 140px; background: #fbfaf7; touch-action: none; cursor: crosshair; }
.sigpad-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.sigpad-bar button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); font: inherit; }
.sigpad.error { border-color: var(--bad); }
.sigpad-msg { margin: 0; padding: 0 10px 8px; color: var(--bad); font-size: 12px; }
.ct-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.ct-clause { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ct-ph { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-ph code { font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- Repository, project page, gallery, wallet (1.6.0) ---------- */
.repo-stats { display: flex; gap: 10px; }
.repo-stats > div { padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 130px; }
.repo-stats span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.repo-stats b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.repo-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; margin-bottom: 18px; }
.repo-filters .field { flex: 1 1 160px; max-width: 230px; }
.repo-filters .field.grow { max-width: none; flex: 3 1 240px; }
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.repo-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: transform .18s, box-shadow .18s, border-color .18s; }
.repo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.repo-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(140deg, var(--brand), var(--brand-2) 60%, #2a3f66); overflow: hidden; }
.repo-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.repo-card:hover .repo-cover img { transform: scale(1.04); }
.repo-mono { position: absolute; inset: 0; display: grid; place-items: center; font: 700 2.4rem/1 var(--serif); color: #e6c78f; letter-spacing: .05em; opacity: .9; }
.repo-cover.is-empty::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(215, 173, 105, .28), transparent 55%); }
.repo-status { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; }
.repo-status .badge { background: rgba(255, 255, 255, .92); border-color: transparent; }
.repo-count { position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 1; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; color: #fff; background: rgba(10, 17, 30, .55); padding: 3px 8px; border-radius: 20px; }
.repo-count .ic { width: 13px; height: 13px; }
.repo-body { padding: 14px 16px 6px; flex: 1; }
.repo-client { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo-title { margin: 4px 0 10px; font-size: 1.05rem; line-height: 1.35; font-weight: 750; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.repo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 12px; font-weight: 650; background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 75%, var(--text)); }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.chip.light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.repo-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 12px 16px 14px; border-top: 1px dashed var(--line); margin-top: 10px; }
.repo-foot .muted { display: block; }
.repo-price { font-size: 1.15rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.repo-people { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.dossier-hero { position: relative; border-radius: 20px; overflow: hidden; color: #fff; margin-bottom: 18px; background: linear-gradient(135deg, #0b1b33, #13294b 55%, #1d3a66); box-shadow: var(--shadow-lg); }
.dossier-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--cover, none); background-size: cover; background-position: center; opacity: .28; filter: saturate(.9); }
.dossier-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 16, 30, .92) 30%, rgba(8, 16, 30, .55)); }
.dossier-hero > * { position: relative; z-index: 1; }
.dossier-hero-in { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; padding: 26px 28px 18px; }
.dossier-main { flex: 1 1 380px; min-width: 0; }
.dossier-back { display: inline-flex; gap: 6px; align-items: center; color: #c9d3e6 !important; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.dossier-back .ic { width: 15px; height: 15px; }
html[dir="rtl"] .dossier-back .ic, html[dir="rtl"] .lightbox-nav .ic { transform: scaleX(-1); }
.dossier-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: #b9c5dc; font-weight: 600; }
.dossier-meta .badge { background: rgba(255, 255, 255, .92); border-color: transparent; }
.dossier-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 8px 0 6px; line-height: 1.2; color: #fff; }
.dossier-client { display: flex; gap: 6px; align-items: center; margin: 0 0 14px; color: #dbe3f1; }
.dossier-client .ic { width: 16px; height: 16px; }
.dossier-price { flex: 0 1 260px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.dossier-price span { font-size: 12px; color: #b9c5dc; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.dossier-price b { display: block; font-size: 1.8rem; font-weight: 800; color: #f1d6a3; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.dossier-price small { color: #c9d3e6; }
.dossier-progress, .bar-track { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .16); overflow: hidden; margin-bottom: 6px; }
.dossier-progress i, .bar-track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #d7ad69, #f1d6a3); }
.bar-track { background: var(--surface-2); border: 1px solid var(--line); }
.dossier-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 28px 22px; }
.btn-light { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); }
.dossier-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dossier-facts > div { padding: 14px 18px; border-inline-end: 1px solid var(--line); }
.dossier-facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.dossier-facts b { font-size: 14.5px; }
.prose { line-height: 1.75; color: var(--text-2); }
.needs-list { margin: 6px 0 0; padding-inline-start: 18px; color: var(--text-2); }
.people { list-style: none; margin: 0; padding: 6px 0; }
.people li { display: flex; gap: 12px; align-items: center; padding: 10px 20px; }
.people li > div { min-width: 0; }
.people li > div > span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.people b { display: block; }
.people small { display: block; color: var(--muted); word-break: break-all; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > span:first-child { flex: 1; min-width: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.gallery-item { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.gallery-item a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0b1b33; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.gallery-item a:hover img { transform: scale(1.05); }
.gallery-item figcaption { padding: 8px 10px; font-size: 12.5px; }
.gallery-item figcaption > span { display: block; font-weight: 600; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-item figcaption small { color: var(--muted); }
.gallery-edit summary { cursor: pointer; color: var(--accent); font-size: 12px; margin-top: 4px; }
.gallery-edit form { margin-top: 6px; }
.input-sm { height: 30px; font-size: 12.5px; flex: 1; min-width: 0; }
.gallery-upload { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.gallery-upload .field { flex: 1 1 220px; }
.gallery-upload .hint { flex-basis: 100%; }
.lightbox { padding: 0; border: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(6, 11, 20, .94); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(6, 11, 20, .7); }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: 10px; color: #dbe3f1; font-size: 14px; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox-close { top: 18px; inset-inline-end: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { inset-inline-start: 18px; }
.lightbox-nav.next { inset-inline-end: 18px; }
html[dir="rtl"] .lightbox-nav.prev { left: auto; right: 18px; }

.wallet-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.wallet-card { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wallet-card span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.wallet-card b { display: block; font-size: 1.45rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.wallet-card small { color: var(--muted); }
.wallet-card.main { background: linear-gradient(140deg, #0b1b33, #1d3a66); color: #fff; border-color: transparent; position: relative; overflow: hidden; }
.wallet-card.main::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; inset-inline-end: -60px; top: -90px; background: radial-gradient(circle, rgba(215, 173, 105, .35), transparent 65%); }
.wallet-card.main span, .wallet-card.main small { color: #b9c5dc; }
.wallet-card.main b { font-size: 2rem; color: #f1d6a3; }
.amount-pos { color: var(--ok); font-weight: 700; }
.amount-neg { color: var(--bad); font-weight: 700; }
.tier-table td { padding: 6px 8px; }
.tier-table .input { height: 34px; }
.bank-box { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.7; }
.bank-box code { font-size: 13px; }
@media (max-width: 960px) {
  .wallet-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-card.main { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .dossier-hero-in { padding: 20px 18px 14px; }
  .dossier-actions { padding: 0 18px 18px; }
  .dossier-price { flex-basis: 100%; }
  .repo-stats { width: 100%; }
  .repo-stats > div { flex: 1; min-width: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lightbox-nav { top: auto; bottom: 18px; transform: none; }
}

/* ---------- 1.7.0: password reset, panel update, payment files ---------- */
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.auth-row a { font-weight: 600; }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.update-versions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.update-versions div { background: var(--gold-soft); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.update-versions span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.update-versions b { font-size: 1.5rem; }
.update-versions i { font-style: normal; font-size: 1.4rem; color: var(--gold); }
[dir=rtl] .update-versions i { transform: scaleX(-1); }
.payout-row input.payout-pick { width: 18px; height: 18px; margin-top: 6px; }

/* 1.8.0 Buchhalterisch */
.acc-doc { background: #fff; color: #141b2d; border-radius: 12px; overflow-x: auto; font-size: 13px; }
.card-body.acc-doc { margin: 0 16px 16px; border: 1px solid var(--line); }
.acc-doc table { min-width: 560px; }
.acc-doc td { vertical-align: top; }
/* 1.13.0: contract document (same as account.css) for the staff portal and the administration */
.cdoc { position: relative; overflow: hidden; background: #fbfaf7; color: #141b2d; border-radius: 18px; padding: 0 40px 28px; line-height: 1.6; font-size: 15px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.cdoc::before { content: attr(data-mark); position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-35deg); font-family: var(--serif, Georgia, serif); font-size: clamp(60px, 12vw, 130px); font-weight: 700; letter-spacing: .08em; color: rgba(184,135,59,.07); white-space: nowrap; pointer-events: none; }
.cdoc > * { position: relative; }
.cdoc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 0 -40px 22px; padding: 22px 40px 16px; border-top: 8px solid #141b2d; border-bottom: 2px solid #b8873b; }
.cdoc-brand { font-family: var(--serif, Georgia, serif); font-size: 26px; font-weight: 600; letter-spacing: .12em; }
.cdoc-co { text-align: end; font-size: 12px; color: #667085; line-height: 1.45; }
.cdoc-title { font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 1.5rem; margin: 0 0 4px; }
.cdoc-meta { color: #667085; font-size: 13px; margin: 0 0 18px; }
.cdoc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 18px; font-size: 14px; }
.cdoc-parties span { display: block; color: #b8873b; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cdoc h3 { font-size: 1.05rem; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 2px solid rgba(184,135,59,.5); display: inline-block; }
.cdoc h4 { font-size: .97rem; margin: 12px 0 2px; }
.cdoc p { margin: 0 0 10px; text-align: justify; }
.cdoc ul { margin: 0 0 10px; padding-inline-start: 20px; }
.cdoc-price { width: 100%; border-collapse: collapse; font-size: 14px; }
.cdoc-price th { text-align: start; background: #f0efea; font-size: 12px; padding: 7px 8px; }
.cdoc-price td { padding: 7px 8px; border-bottom: 1px solid #e4e7ec; }
.cdoc-price .n { text-align: end; white-space: nowrap; }
.cdoc-price tfoot td { font-weight: 700; border: 0; font-size: 15px; }
.cdoc-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid #e4e7ec; color: #667085; font-size: 12px; }
@media (max-width: 640px) { .cdoc { padding: 0 18px 20px; } .cdoc-head { margin: 0 -18px 18px; padding: 18px; flex-direction: column; align-items: flex-start; } .cdoc-co { text-align: start; } .cdoc-parties { grid-template-columns: 1fr; } }
.cdoc [dir="rtl"] p, .cdoc[dir="rtl"] p { text-align: right; }
.cdoc-version + .cdoc-version { margin-top: 30px; padding-top: 22px; border-top: 2px dashed rgba(184,135,59,.45); }
.cdoc-badge { margin: 0 0 12px; padding: 7px 12px; border-radius: 8px; background: #faf6ee; color: #8a6224; font-size: 12.5px; font-weight: 600; text-align: start !important; }
.cdoc-num { color: #8a6224; font-weight: 600; }
.cdoc-sign small { color: #667085; }
.cdoc [dir="rtl"] p, .cdoc[dir="rtl"] p { text-align: right; }
/* 1.14.0: automatic translations */
.auto-tr { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2, transparent); }
.auto-tr summary { cursor: pointer; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.auto-tr .hint { margin: 8px 0; }
.auto-tr-lang { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; white-space: pre-line; }

/* ---------- Dashboard: three compact sections per row ---------- */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.dash > .card { margin: 0; min-width: 0; }
.dash > .dash-wide { grid-column: 1 / -1; }
.dash .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash .kpi { padding: 13px 16px; }
.dash .kpi .k-value { font-size: 1.35rem; margin-top: 4px; }
.dash .card-head h2 { font-size: 14.5px; }
.dash .list > li { padding: 10px 16px; gap: 10px; }
.dash .list .title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash .card-body { padding: 14px 16px; }
.dash-dl { gap: 8px 14px; }
.dash-dl dd { text-align: end; }
.text-good { color: var(--ok); }
.list.pipe > li { align-items: center; }
.list.pipe .meter { width: 34%; min-width: 60px; flex: none; }
.list.pipe .num { min-width: 22px; text-align: end; }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dash, .dash .kpis { grid-template-columns: minmax(0, 1fr); } }
/* 1.14.2: icon-only buttons in dense tables */
.btn.btn-icon { padding-inline: 8px; gap: 0; }

/* 1.20.0 theme menu (administration and staff portal) */
.theme-switch { position: relative; }
.theme-switch summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.theme-switch summary::-webkit-details-marker { display: none; }
.theme-switch summary:hover, .theme-switch[open] summary { border-color: var(--line-strong); }
.ts-dot { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--brand) 0 50%, var(--gold) 50% 100%); box-shadow: 0 0 0 1.5px var(--line-strong); }
.ts-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; width: 260px; padding: 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.ts-head { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.ts-menu button { all: unset; box-sizing: border-box; display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; color: var(--text); }
.ts-menu button:hover { background: var(--surface-2); }
.ts-menu button[aria-pressed="true"] { border-color: var(--line-strong); background: var(--surface-2); }
.ts-menu button:focus-visible { outline: 2px solid var(--accent); }
.ts-text { display: grid; line-height: 1.3; } .ts-text b { font-size: 13.5px; } .ts-text small { color: var(--muted); font-size: 11.5px; }
.ts-swatch { display: flex; flex: none; } .ts-swatch i { width: 16px; height: 16px; border-radius: 50%; margin-inline-start: -5px; box-shadow: 0 0 0 2px var(--surface); } .ts-swatch i:first-child { margin-inline-start: 0; }
.ts-navy i:nth-child(1) { background: #030A16; } .ts-navy i:nth-child(2) { background: #182B45; } .ts-navy i:nth-child(3) { background: #EBC789; }
.ts-light i:nth-child(1) { background: #F6F4EF; } .ts-light i:nth-child(2) { background: #FFFFFF; } .ts-light i:nth-child(3) { background: #B8873B; }
.ts-graphit i:nth-child(1) { background: #A9B4C2; } .ts-graphit i:nth-child(2) { background: #E6EAF0; } .ts-graphit i:nth-child(3) { background: #0E1116; }

/* Graphit details */
:root[data-theme="graphit"] .brand-mark { background: linear-gradient(140deg, #eef1f5, #8d97a5); color: #0b0c0e; }
:root[data-theme="graphit"] .sidebar { border-inline-end-color: #1d2024; scrollbar-color: #2e3238 transparent; }
:root[data-theme="graphit"] .btn-primary { background: #e6eaf0; border-color: #e6eaf0; color: #0b0c0e; }
:root[data-theme="graphit"] .nav a.active { background: rgba(211,216,223,.10); }
:root[data-theme="graphit"] .avatar:not(.gold):not(.has-img) { background: #2c3036; color: #f2f3f5; }
:root[data-theme="graphit"] .cm-mine .cm-bubble { background: #2a2e34; }
:root[data-theme="graphit"] .auth-art { background: radial-gradient(1200px 600px at 20% 10%, #2a2d33 0, transparent 60%), linear-gradient(160deg, #141619, #060708); }
:root[data-theme="graphit"] .auth-art h1 em { color: #d3d8df; }
:root[data-theme="graphit"] .auth-art p { color: #a3a9b2; }
.theme-switch.ts-float { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 50; }
:root[data-theme="graphit"] .auth-art::after { border-color: rgba(211,216,223,.18); box-shadow: 0 0 0 70px rgba(211,216,223,.03), 0 0 0 150px rgba(211,216,223,.02); }

/* 1.20.4: the theme menu never leaves a narrow screen */
.ts-menu { max-width: calc(100vw - 24px); }

/* 1.23.18: products – steps, health table, card preview */
.pr-steps{display:flex;margin:6px 0 20px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.pr-steps a,.pr-steps span{flex:1;padding:12px 14px;font-size:13px;font-weight:650;color:var(--muted);border-right:1px solid var(--line);display:flex;gap:10px;align-items:center;text-decoration:none!important}
.pr-steps>*:last-child{border-right:0}
.pr-steps b{width:24px;height:24px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--line);font-size:12px}
.pr-steps .done b{background:var(--ok);color:#fff;border-color:transparent}
.pr-steps .on{color:var(--text);background:var(--gold-soft)}
.pr-steps .on b{background:var(--gold);color:#fff;border-color:transparent}
@media (max-width:860px){.pr-steps{flex-direction:column}.pr-steps a,.pr-steps span{border-right:0;border-bottom:1px solid var(--line)}}
.pr-two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:1100px){.pr-two{grid-template-columns:1fr}}
.pr-ok{color:var(--ok);font-weight:800}.pr-no{color:var(--bad);font-weight:800}.pr-wa{color:var(--warn);font-weight:800}
.pr-checks{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:8px;font-size:13.5px}
.pr-checks li{display:flex;gap:10px;align-items:flex-start}
.pr-checks li small{color:var(--muted);margin-left:auto;text-align:right;word-break:break-all}
.pr-table td,.pr-table th{font-size:13px;vertical-align:middle}
.pr-table td.c,.pr-table th.c{text-align:center}
.pr-card{border-radius:18px;overflow:hidden;background:linear-gradient(160deg,#16213b,#0c1426);color:#e9edf6;border:1px solid rgba(255,255,255,.12);box-shadow:0 20px 40px rgba(10,20,40,.25)}
.pr-card .im{height:160px;background:#0c1426 center/cover no-repeat;position:relative}
.pr-card .im span{position:absolute;left:10px;top:10px;font-size:11px;padding:3px 9px;border-radius:20px;background:rgba(10,15,30,.6)}
.pr-card .im i{position:absolute;right:10px;top:10px;font-style:normal;font-size:11px;padding:3px 9px;border-radius:20px;background:#d6b16d;color:#1b1406;font-weight:700}
.pr-card .bd{padding:14px 16px}.pr-card h4{margin:0 0 6px;font-size:16px;color:#fff}.pr-card p{margin:0 0 10px;font-size:12.5px;color:#aeb8cc}
.pr-card .pr{display:flex;justify-content:space-between;align-items:end;font-size:12px;color:#aeb8cc}.pr-card .pr strong{font-size:18px;color:#f1d6a3;display:block}
.pr-card .ac{display:flex;gap:8px;margin-top:12px}.pr-card .ac span{flex:1;text-align:center;font-size:12px;padding:8px;border-radius:10px;border:1px solid rgba(255,255,255,.18)}
.pr-card .ac span.g{background:#d6b16d;color:#1b1406;border-color:transparent;font-weight:700}
.pr-file{display:flex;gap:12px;align-items:center;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);font-size:13px;margin-bottom:10px}
.pr-file .sz{color:var(--muted);margin-left:auto}
