/* Shared theme and component defaults. Responsive changes follow below. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select { height:44px; min-width:0; }
.field > span { line-height:20px; }

:root { color:var(--ink); background:var(--paper); --ink:#17263c; --paper:#f4f7fb; --card:#fff; --surface:#fff; --line:#e3eaf3; --muted:#64758b; --accent:#2563eb; --accent-soft:#edf4ff; --green:#19734d; --olive:#19734d; --olive-soft:#e9f7f0; --red:#c83d4d; --danger:#c83d4d; --amber:#9b650e; --warning:#a96812; --sage:#e7f5ee; --sand:#eef3fb; --shadow:0 4px 18px rgba(0,0,0,.035); font-family:"Segoe UI",Tahoma,Arial,sans-serif; font-size:14px; font-synthesis:none; }
* { box-sizing: border-box; }
body { margin: 0px; min-height: 100vh; text-align: start; background: rgb(255, 255, 255); color: rgb(32, 39, 51); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; width: 100%; padding: 12px 13px; color: var(--ink); background: rgb(255, 255, 255); outline: none; border: 1px solid var(--line); border-radius: 8px; }
/* Compact controls must leave room for the full Arabic glyphs. Keep textarea padding separate. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select { padding-block: 4px; line-height: 1.5; }
p { color: var(--muted); line-height: 1.55; margin-top: 0px; }
h1 { margin:0 0 8px; font-size:28px; line-height:1.25; font-weight:700; letter-spacing:-.025em; }
h2 { margin:0 0 8px; font-size:17px; line-height:1.4; font-weight:650; }
h3 { margin-top: 0px; font-family: inherit; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr); }
.auth-art { padding: 42px; color: rgb(255, 255, 255); background: linear-gradient(145deg, rgba(13, 25, 18, 0.24), rgba(13, 25, 18, 0.88)), radial-gradient(circle at 20% 10%, rgb(102, 124, 96), rgb(32, 41, 31) 62%); display: flex; flex-direction: column; justify-content: space-between; }
.auth-art div { max-width: 520px; }
.auth-art span { font-size: 0.72rem; letter-spacing: 0.16em; font-weight: 800; }
.auth-art blockquote { margin: 18px 0px 0px; font-weight: 500; font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: 1; font-family: Georgia, serif; }
.wordmark { color: inherit; text-decoration: none; line-height: normal; letter-spacing: -0.04em; font-family: inherit; font-size: 1.65rem; font-weight: 800; }
.auth-panel { display: grid; place-items: center; padding: 36px; }
.auth-card { width: min(100%, 520px); padding: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.eyebrow { margin-bottom: 10px; font-size: 0.7rem; font-weight: 800; color: var(--accent); letter-spacing: 0.04em; text-transform: none; }
.stack { display: grid; gap: 15px; }
.field { display: grid; align-content: start; gap: 7px; font-size: 0.84rem; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: rgba(31, 94, 255, 0.1) 0px 0px 0px 2px; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:9px 15px; color:#fff; background:var(--accent); border:1px solid transparent; border-radius:7px; font-weight:600; font-size:13px; cursor:pointer; box-shadow:none; }
.button:hover { filter:brightness(.97); }
.button:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.button--secondary, .button--quiet { color: var(--ink); background: rgb(255, 255, 255); border: 1px solid var(--line); box-shadow: none; }
.button--danger { background: var(--red); }
.button--small { min-height: 34px; padding: 7px 12px; font-size: 0.82rem; }
.form-message { min-height: 1.2em; color: var(--red); font-size: 0.85rem; }
.preview-entry { margin-top: 16px; padding: 16px; border: 1px dashed rgb(170, 166, 156); border-radius: 14px; background: rgb(245, 241, 232); }
.preview-entry p { margin: 5px 0px 14px; color: rgb(98, 95, 88); font-size: 0.86rem; line-height: 1.45; }
.button--preview { width: 100%; color: rgb(255, 255, 255); }
.preview-banner { padding:7px 20px; background:#edf4ff; color:#365174; font-size:12px; text-align:center; border-bottom:1px solid #dbe7f8; }
.shell { display:grid; grid-template-columns:240px minmax(0,1fr); min-height:100vh; }
.sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:26px 16px 18px; background:#10213b; color:#edf3fc; border-inline-end:1px solid #10213b; overflow-y:auto; scrollbar-width:thin; }
.identity { display:grid; gap:4px; padding:18px 12px 14px; margin:0; border-bottom:1px solid #2d405b; }
.identity span { font-size:12px; color:#a7bbd7; }
.identity strong { font-size:12px; font-weight:500; color:#cad8ec; }
.nav { display:grid; align-content:start; gap:3px; padding-bottom:18px; }
.nav button { display:flex; align-items:center; gap:12px; min-height:42px; padding:10px 12px; border:1px solid transparent; border-radius:7px; background:transparent; color:#d2deee; text-align:start; font-size:13px; }
.nav button span { font-size:13px; font-weight:500; color:inherit; }
.nav button:hover, .nav button.is-active { background:#1a3b67; color:#fff; }
.nav button.is-active span { color:#fff; }
.logout { margin-top:auto; display:flex; align-items:center; gap:10px; min-height:42px; padding:10px 12px; text-align:start; background:transparent; color:#cad6e7; border:1px solid #30425d; border-radius:8px; }
.frame { min-width: 0px; }
.main { min-height:calc(100vh - 66px); padding:28px clamp(20px,2.2vw,34px) 60px; background:var(--paper); }
.mobile-header { display:flex; background:#fff; color:var(--ink); border-bottom:1px solid var(--line); }
.page > * { min-width: 0; }
.page { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; max-width:1480px; margin:auto; gap:22px; }
.page-head { display:flex; justify-content:space-between; align-items:center; gap:22px; min-height:70px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p:last-child { max-width: 720px; margin-bottom: 0px; }
.panel { min-width:0; padding:22px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-head h2 { margin: 0px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); min-height: 126px; padding: 18px; border-radius: 15px; box-shadow: rgba(0, 0, 0, 0.035) 0px 8px 24px; text-align: start; }
.metric span { display: block; color: var(--muted); font-size: 0.82rem; }
.metric strong { display: block; line-height: normal; font-family: inherit; margin: 11px 0px 8px; font-size: 2rem; font-weight: 820; }
.metric small { display: block; font-weight: 700; color: var(--accent); }
.table-wrap { overflow: auto; border: 1px solid rgb(238, 241, 245); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: rgb(255, 255, 255); }
th { position:sticky; top:0; z-index:1; padding:12px 14px; border-bottom:1px solid var(--line); background:#f6f9fc; color:#526580; font-size:12px; font-weight:600; text-align:start; white-space:nowrap; }
td { padding:15px 14px; border-bottom:1px solid #edf1f6; font-size:13px; text-align:start; white-space:nowrap; }
.badge { display:inline-flex; align-items:center; width:max-content; padding:5px 9px; color:#52647a; background:#edf1f6; border-radius:6px; font-size:11px; font-weight:600; line-height:1.3; }
.badge--approved, .badge--paid, .badge--completed, .badge--refunded, .badge--allowed { color: rgb(18, 97, 63); background: rgb(226, 245, 234); }
.badge--pending, .badge--pending_review, .badge--active, .badge--preparing, .badge--processing { color: rgb(138, 90, 19); background: rgb(255, 242, 216); }
.badge--rejected, .badge--failed, .badge--canceled, .badge--suspended { color: var(--red); background: rgb(242, 222, 218); }
.review-list { display: grid; gap: 10px; }
.review-card { padding: 17px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 12px; background: rgb(255, 255, 255); }
.refund-card { overflow-wrap: anywhere; padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.review-card h3, .refund-card h3, .review-card p { margin: 0px 0px 5px; }
.review-card small, .refund-card small { color: var(--muted); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.count { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 999px; font-weight: 800; background: rgb(237, 243, 255); color: rgb(49, 80, 125); }
.empty { padding: 36px; text-align: center; border: 1px dashed rgb(207, 203, 191); border-radius: 12px; }
.empty p { margin: 7px auto 0px; max-width: 480px; }
.queue-warning { display: grid; grid-template-columns: minmax(0px, 1fr) auto; align-items: center; gap: 14px 22px; padding: 18px 20px; color: rgb(109, 52, 44); background: rgb(247, 231, 225); border: 1px solid rgb(241, 201, 188); border-radius: 13px; }
.queue-warning p { margin: 5px 0px 0px; color: rgb(117, 76, 69); }
.queue-warning ul { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0px; padding: 0px; list-style: none; }
.queue-warning li { display: grid; gap: 2px; padding: 9px 11px; background: rgba(255, 255, 255, 0.65); border-radius: 8px; font-size: 0.78rem; }
.queue-warning li small { color: var(--muted); }
.queue-warning .button { grid-area: 1 / 2 / span 2; }
.snapshot span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.78rem; }
.detail-panel { position: sticky; top: 18px; }
.detail-head, .refund-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.detail-head > div:last-child { display: grid; gap: 9px; justify-items: end; }
.detail-total { font-size: 1.4rem; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0px 18px; }
.facts > div { padding: 12px; background: rgb(246, 248, 251); border-radius: 10px; }
.facts span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.72rem; }
.facts strong { display: block; }
.snapshot-list { display: grid; gap: 8px; margin: 12px 0px 18px; }
.snapshot { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgb(229, 226, 218); padding: 11px 0px; }
.snapshot > div:last-child { display: grid; justify-items: end; gap: 5px; }
.snapshot-list.compact { margin-bottom: 14px; }
.check-card { display: grid; grid-template-columns: auto 1fr 90px; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.check-card > input:first-child, .check-row input { width: auto; }
.check-card small { display: block; color: var(--muted); margin-top: 4px; }
.segmented { display: flex; gap: 4px; padding: 4px; width: max-content; max-width: 100%; overflow: auto; background: rgb(232, 229, 220); border-radius: 10px; }
.segmented button { padding: 8px 11px; white-space: nowrap; background: transparent; border: 0px; border-radius: 7px; font-size: 0.75rem; font-weight: 750; }
.segmented button.is-active { background: rgb(255, 255, 255); box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 15px; }
.form-grid > textarea, .form-grid > .button { grid-column: 1 / -1; }
.workflow-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.result-box { display: grid; gap: 5px; margin-top: 16px; padding: 14px; overflow: auto; white-space: pre-wrap; background: rgb(239, 237, 229); border-radius: 10px; font-family: inherit; }
.timeline { display: grid; gap: 0px; margin-top: 14px; }
.timeline > div, .timeline > article { position: relative; border-inline-start: 2px solid rgb(215, 223, 236); padding: 0px 0px 18px; padding-inline-start: 23px; }
.timeline > div::before, .timeline > article::before { content: ""; position: absolute; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); inset-inline-start: -6px; }
.timeline span, .timeline small { display: block; color: var(--muted); margin-top: 3px; }
.audit-timeline pre { max-height: 300px; overflow: auto; padding: 12px; background: rgb(239, 237, 229); border-radius: 8px; }
.link-button { background: transparent; border: 0px; font-weight: 750; color: var(--accent); }
.loading { min-height: 55vh; display: grid; place-items: center; text-align: center; }
.load-error { min-height: 55vh; display: grid; place-items: center; text-align: center; align-content: center; max-width: 600px; margin: auto; }
.toast { position: fixed; bottom: 20px; z-index: 20; max-width: 420px; padding: 14px 18px; color: rgb(255, 255, 255); border-radius: 10px; box-shadow: var(--shadow); right: auto; left: 20px; background: var(--green); }
.toast--error { background: var(--red); }
.execution-locked { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 9px; font-size: 0.82rem; }
.financial-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 16px; align-items: start; }
.financial-control { min-width: 0px; padding: 18px; background: rgb(247, 245, 239); border: 1px solid var(--line); border-radius: 12px; }
.financial-control h3 { margin-bottom: 14px; }
.source-references { display: grid; gap: 8px; margin: 14px 0px 22px; }
.source-reference { display: grid; grid-template-columns: minmax(110px, 0.4fr) minmax(0px, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; background: rgb(247, 249, 252); }
.source-reference span { color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.source-reference code { overflow-wrap: anywhere; font-size: 0.78rem; }
.page-head--compact { min-height: 72px; }
.metrics--core { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
.badge--delivered { color: rgb(18, 97, 63); background: rgb(226, 245, 234); }
.badge--assigned, .badge--out_for_delivery { color: rgb(138, 90, 19); background: rgb(255, 242, 216); }
.order-money-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0px 10px; }
.money-fact { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: rgb(250, 251, 254); }
.money-fact span { color: var(--muted); font-size: 0.72rem; }
.money-fact strong { font-size: 1rem; }
.money-fact--total { color: rgb(23, 73, 199); border-color: rgb(188, 208, 255); background: rgb(240, 245, 255); }
.technical-details { margin-top: 10px; border-top: 1px solid rgb(238, 241, 245); padding-top: 10px; }
.technical-details summary { cursor: pointer; color: var(--muted); font-size: 0.82rem; font-weight: 750; }
.details-body { margin-top: 18px; }
.sort-select { min-height: 42px; min-width: 180px; padding: 8px 12px; background: rgb(255, 255, 255); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.admin-order-number { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.detail-order-number { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; margin: 0px 0px 5px; font-size: 1.5rem; }
.detail-order-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.admin-order-parts { display: grid; gap: 10px; margin: 16px 0px; }
.admin-part-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgb(255, 255, 255); }
.admin-part-card--canceled { border-color: rgb(239, 199, 204); background: rgb(255, 248, 248); }
.admin-part-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-part-head > div { display: grid; gap: 3px; }
.admin-part-head small { direction: ltr; unicode-bidi: isolate; color: var(--muted); font-size: 0.72rem; }
.cancellation-reason { display: grid; gap: 4px; margin-top: 12px; padding: 11px 12px; border-radius: 9px; color: rgb(142, 38, 50); background: rgb(253, 236, 239); }
.cancellation-reason span { color: rgb(111, 61, 67); font-size: 0.82rem; }
.snapshot-list--part { margin-bottom: 0px; }
.technical-note { margin-top: 10px; color: var(--muted); font-size: 0.78rem; }
.source-reference--compact > div { display: grid; gap: 2px; min-width: 0px; }
.source-reference--compact strong { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.source-reference--compact code { color: var(--muted); font-size: 0.68rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.photo-thumb { height: 140px; background: rgb(238, 233, 226); border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.photo-thumb img, .product-thumb img, .storefront-cover-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-card { display: grid; gap: 8px; }
.photo-card button { padding: 8px; font: inherit; cursor: pointer; border: 1px solid rgb(221, 221, 221); border-radius: 8px; background: white; }
.storefront-cover-photo { height: 180px; overflow: hidden; border-radius: 12px; }
.photo-card .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.payout-workspace { display: grid; gap: 18px; min-width: 0px; }
.payout-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 0 100%; }
.payout-tabs button { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgb(255, 255, 255); cursor: pointer; font: inherit; }
.payout-tabs button[aria-pressed="true"] { color: rgb(23, 73, 199); background: rgb(237, 243, 255); border-color: rgb(188, 208, 255); }
.payout-table { margin-top: 12px; }
.payout-table td small { display: block; color: var(--muted); margin-top: 5px; font-size: 0.74rem; }
.payout-table tr.is-selected { background: rgb(240, 245, 255); }
.payout-table td:last-child { text-align: end; }
.payout-table td:first-child { white-space: normal; min-width: 170px; }
.payout-total { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.settlement-create summary { font-weight: 750; cursor: pointer; }
.settlement-create[open] summary { margin-bottom: 18px; }
.document-row { padding: 16px; margin: 12px 0px; border: 1px solid var(--line); border-radius: 10px; background: rgb(250, 251, 254); }
.manual-payment-form { display: grid; gap: 12px; margin-top: 20px; padding: 18px; border: 1px solid rgb(196, 213, 247); border-radius: 12px; background: rgb(247, 250, 255); }
.payment-confirm { display: flex; align-items: start; gap: 10px; font-size: 0.86rem; }
.payment-confirm input { width: auto; min-height: auto; margin-top: 3px; }
.muted { color: var(--muted); }
.payout-detail:has(.empty) { box-shadow: none; }
.sidebar .wordmark, .sidebar .identity strong { color:#fff; }
.sidebar .identity span { color:#a7bbd7; }
.payout-workspace .panel-head { flex-wrap: wrap; }
.payout-workspace .panel-head > input { max-width: 380px; }
.request-card { padding: 18px 0px; border-bottom: 1px solid rgb(232, 235, 239); }
.request-card > .badge { margin-inline-start: 12px; }
.request-card .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.updates-list { display: grid; gap: 14px; }
.update-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: start; padding: 22px; border: 1px solid rgb(231, 237, 243); border-radius: 16px; background: rgb(255, 255, 255); color: rgb(32, 41, 54); font: inherit; cursor: pointer; box-shadow: rgba(0, 0, 0, 0.024) 0px 4px 18px; }
.update-card > div { flex: 1 1 0%; min-width: 0px; }
.update-card strong { font-size: 1rem; }
.update-card p { margin: 7px 0px 0px; color: rgb(104, 117, 137); line-height: 1.7; font-size: 0.86rem; }
.update-card:hover { background: rgb(246, 249, 254); border-color: rgb(198, 215, 239); }
.update-mark { display: grid; place-items: center; background: rgb(238, 244, 255); border-radius: 50%; width: 38px; height: 38px; flex: 0 0 auto; color: rgb(32, 80, 184); font-size: 25px; }
[hidden] { display: none !important; }
.simple-workspace { max-width: 1040px; }
.task-panel { overflow: hidden; padding: 0px !important; }
.task-panel > summary { display: flex; flex-direction: column; gap: 7px; padding: 21px 55px 21px 24px; cursor: pointer; list-style: none; position: relative; }
.task-panel > summary::after { content: "+"; position: absolute; right: 24px; top: 24px; color: rgb(101, 117, 140); font-size: 20px; }
.task-panel[open] > summary::after { content: "−"; }
.task-panel > summary strong { font-size: 1rem; font-weight: 650; }
.task-panel > summary span { font-size: 0.85rem; line-height: 1.6; color: rgb(101, 117, 140); }
.purpose-note { font-size: 0.85rem; line-height: 1.6; color: rgb(101, 117, 140); margin: 0px 0px 4px; }
.task-panel[open] > summary { border-bottom: 1px solid rgb(237, 240, 244); background: rgb(250, 252, 255); }
.task-body { padding: 22px 24px; }
.simple-workspace .form-grid { gap: 18px; }
.simple-workspace .result-box { margin-top: 16px; background: rgb(244, 247, 250); }
.simple-workspace .field > span { font-weight: 600; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.discovery-editor { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgb(237, 240, 244); }
.discovery-workspace .review-card { align-items: start; }
.audit-timeline article { padding: 16px 0px; }
.audit-timeline details { margin-top: 12px; }
.review-workspace { display: grid; grid-template-columns: minmax(0px, 1fr); gap: 18px; align-items: start; min-width: 0px; }
.review-workspace.has-detail { grid-template-columns: minmax(0px, 1fr) minmax(340px, 390px); }
.review-list-panel { min-width: 0px; display: grid; gap: 16px; }
.review-list-panel > .field { max-width: 400px; }
.review-detail { position: sticky; top: 18px; min-width: 0px; max-height: calc(-36px + 100vh); overflow: auto; scroll-margin-top: 16px; }
.review-detail .panel-head { align-items: start; }
.review-detail .panel-head h2 { font-size: 1rem; line-height: 1.5; }
.review-detail-body { overflow-wrap: anywhere; }
.review-detail .facts, .review-detail .order-money-breakdown { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
.review-detail .detail-head { flex-direction: column; }
.review-detail .detail-head > div:last-child { display: flex; align-items: center; gap: 12px; }
.review-detail .order-money-breakdown .money-fact--total { grid-column: 1 / -1; }
.review-detail .snapshot { flex-wrap: wrap; }
.table-filters { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, 1fr)); gap: 12px; }
.table-note { font-size: 0.78rem; margin: 0px; color: rgb(104, 117, 137); }
.operational-table td { font-size:13px; padding:15px 12px; }
.operational-table th { font-size:12px; font-weight:600; padding:12px; }
.operational-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 90px; }
.operational-table td:nth-child(3) { overflow-wrap: anywhere; min-width: 0px; white-space: nowrap; }
.operational-table small { display: block; color: rgb(113, 128, 150); font-size: 0.72rem; margin-top: 5px; }
.operational-table .is-selected { background: rgb(241, 246, 255); }
.review-workspace .payout-table { margin-top: 0px; font-size: 0.83rem; }
.review-workspace .payout-table td:nth-child(2), .review-workspace .payout-table td:nth-child(5) { white-space: normal; min-width: 100px; }
.review-detail .payout-total { white-space: nowrap; }
.review-detail .document-row .row-actions { justify-content: start; margin-top: 14px; }
.review-detail .source-reference { grid-template-columns: 1fr; }
.review-detail .manual-payment-form { padding: 14px; }
.operational-table .badge { white-space: normal; max-width: 105px; }


/* Finance and catalog library: one task at a time, with logical RTL spacing. */
.finance-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.finance-tabs button { padding:10px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--muted); }
.finance-tabs button[aria-pressed=true] { background:#eef4ff; border-color:#bfd2ff; color:#1e51bd; font-weight:650; }
.payout-progress { list-style:none; padding:0; margin:18px 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.payout-progress li { display:grid; justify-items:start; gap:7px; padding:10px 4px; border-block-start:2px solid var(--line); color:var(--muted); font-size:.7rem; }
.payout-progress li span { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#f2f4f7; }
.payout-progress .is-complete { border-color:#8ccbb0; color:#19734d; }
.payout-progress .is-current { border-color:#1f5eff; color:#1e51bd; }
.payout-progress .is-current span { background:#eef4ff; }
.library-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.library-toolbar input, .library-toolbar select { flex:1; min-width:180px; width:auto; }
.library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:16px; }
.library-card { display:flex; flex-direction:column; gap:10px; padding:12px; border:1px solid var(--line); border-radius:14px; background:white; min-width:0; }
.library-card .photo-thumb, .library-pick .photo-thumb { width:100%; height:auto; aspect-ratio:1; }
.library-card small { color:var(--muted); font-size:.75rem; }
.library-usages { display:flex; flex-wrap:wrap; gap:6px; }
.library-usage { border:0; border-radius:6px; background:#eef4ff; color:#2451a8; font-size:.75rem; padding:6px 8px; text-align:start; overflow-wrap:anywhere; }
.library-empty { grid-column:1/-1; padding:32px 12px; text-align:center; }
.library-pick { padding:8px; border:1px solid var(--line); border-radius:12px; background:white; text-align:start; }
.library-pick span { display:block; margin-top:8px; }
.library-dialog { width:min(840px,calc(100% - 32px)); max-height:88vh; padding:24px; color:var(--ink); border:1px solid var(--line); border-radius:20px; overflow:auto; }
.library-dialog .library-grid { grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); }
.library-dialog::backdrop { background:rgba(19,29,43,.35); }
.library-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.library-dialog-head h2 { margin:0; }
.library-card .row-actions { display:flex; flex-wrap:wrap; gap:6px; }
.library-card .button { padding:6px 8px; font-size:.75rem; }

.finance-task-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;}

/* Workspace chrome and operation queues. No simulated analytics. */
.workspace-icon { width:19px; height:19px; flex-shrink:0; }
.workspace-topbar { min-height:66px; padding:12px 28px; display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff; border-bottom:1px solid var(--line); }
.workspace-context, .workspace-tools { display:flex; align-items:center; gap:12px; min-width:0; }
.workspace-context strong { font-size:14px; font-weight:600; }
.toolbar-icon { display:inline-grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); border-radius:7px; background:#fff; color:#52647e; }
.toolbar-icon:hover { background:#edf4ff; color:var(--accent); }
.nav-group { margin:20px 12px 5px; font-size:11px; color:#95aac8; font-weight:500; }
.navigation-toggle { display:none; }
.work-queue { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.queue-tile { display:flex; align-items:center; gap:14px; padding:20px; border:1px solid var(--line); border-radius:9px; background:#fff; text-align:start; }
.queue-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:9px; background:#edf4ff; color:var(--accent); flex-shrink:0; }
.queue-copy { display:grid; gap:7px; flex:1; }
.queue-copy > span { color:var(--muted); font-size:13px; }
.queue-copy strong { font-size:25px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.queue-open { color:#8090a8; font-size:22px; }
.queue-tile:hover { border-color:#a5bfe9; background:#fcfdff; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid #81aafa; outline-offset:3px; }
@media(max-width:1100px) { .work-queue {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:560px) { .workspace-topbar {padding:12px 14px;gap:8px;} .workspace-tools {gap:6px;} .workspace-topbar .language-control > span {display:none;} .workspace-context strong {font-size:12px;} .work-queue {grid-template-columns:1fr 1fr;gap:8px;} .queue-tile {padding:13px;gap:8px;flex-wrap:wrap;} .queue-icon {width:30px;height:30px;} .queue-copy > span {font-size:12px;} .queue-open {display:none;} }
table tbody tr:hover {background:#f8faff;}
table tbody tr:last-child td {border-bottom:0;}
.table-wrap {scrollbar-width:thin;}
@media(prefers-reduced-motion:reduce) {*,::before,::after {scroll-behavior:auto!important;transition:none!important;}}
/* Responsive and accessibility variants (ordered by original cascade). */
@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .detail-panel { position: static; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-art { min-height: 280px; }
  .sidebar { display:none; position:static; height:auto; }
  .navigation-open .sidebar {display:flex;position:fixed;z-index:30;top:66px;bottom:0;inset-inline-start:0;width:260px;height:calc(100dvh - 66px);box-shadow:12px 0 40px rgba(0,0,0,.22);}
  .navigation-open .sidebar .logout {display:flex;}
  .navigation-toggle { display:inline-grid; }
  .sidebar > .wordmark, .identity, .logout { display: none; }
  .nav { display:grid; overflow:visible; }
  .nav button { white-space: nowrap; }
  .mobile-header { display: flex; justify-content: space-between; padding: 16px 20px; }
  .page-head { flex-direction: column; }
  .review-card, .detail-head, .refund-head { align-items: flex-start; flex-direction: column; }
  .metrics, .form-grid, .two-column, .inline-form, .facts, .queue-warning { grid-template-columns: 1fr; }
  .queue-warning ul, .queue-warning .button { grid-area: auto / 1; }
}
@media (max-width: 1180px) {
  .financial-control-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .metrics--core { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav {gap:3px;grid-template-columns:1fr;}
  .nav-group { grid-column:1 / -1; }
  .main { padding: 22px 14px 55px; }
  .page-head { gap: 14px; }
  .page-head .head-actions, .sort-select { width: 100%; }
  .order-money-breakdown { grid-template-columns: 1fr; }
  .metrics--core { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .metrics--core { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .payout-workspace .panel-head { align-items: stretch; flex-direction: column; }
  .payout-tabs button { padding: 8px; font-size: 0.8rem; }
  .payout-detail { padding: 16px; }
  .payout-table td, .payout-table th { padding: 10px 8px; }
}
@media (max-width: 480px) {
  .update-card { padding: 16px; gap: 12px; }
}
@media (max-width: 560px) {
  .task-body { padding: 18px; }
  .task-panel > summary { padding: 18px 45px 18px 18px; }
}
@media (max-width: 1400px) {
  .table-filters { grid-template-columns: minmax(140px,1.5fr) repeat(3,minmax(100px,1fr)); }
}
@media (max-width: 1100px) {
  .review-workspace.has-detail { grid-template-columns: minmax(0px, 1fr); }
  .review-detail { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .table-filters {grid-template-columns:1fr 1fr;} .table-filters > :first-child {grid-column:1 / -1;} .review-detail .facts {grid-template-columns:1fr;}
  .review-detail { padding: 16px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0px, 1fr); }
  .sidebar { padding: 12px 14px; }
  .review-detail { width: 100%; }
  .review-workspace .panel-head { flex-wrap: wrap; }
  .review-detail .panel-head { align-items: start; }
}

.language-control { display:flex; align-items:center; gap:8px; width:max-content; margin:0; font-size:12px; color:var(--muted); }
.language-control select { width: auto; min-height: 34px; padding: 5px 8px; background: white; color: #202733; border: 1px solid #e5eaf0; border-radius: 8px; }
.mobile-header .language-control, .mobile-head .language-control { margin: 0; }
[dir=rtl] .eyebrow { letter-spacing: 0; }

/* Home marketing: one live placement, one image per request. */
.marketing-section { display:grid; gap:20px; }
.marketing-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:start; }
.marketing-live { display:grid; gap:14px; }
.marketing-photo { aspect-ratio:1.8; width:100%; overflow:hidden; background:#f4f6f8; display:grid; place-items:center; border-radius:12px; color:#607087; }
.marketing-photo img { width:100%; height:100%; object-fit:cover; }
.marketing-image-preview { min-height:140px; display:grid; place-items:center; border:1px dashed #d5dee8; border-radius:12px; padding:8px; }
.marketing-image-preview .marketing-photo { max-height:280px; }
.marketing-picker { display:grid; gap:12px; min-width:0; }
.marketing-request { display:grid; grid-template-columns:180px minmax(0,1fr); gap:20px; padding:18px; border:1px solid #e5eaf0; border-radius:14px; }
.marketing-request h3,.marketing-live h3 { margin:0; }
.marketing-request .panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.marketing-picker .library-grid { max-height:320px; overflow:auto; }
@media(max-width:760px) { .marketing-layout { grid-template-columns:1fr; } .marketing-request { grid-template-columns:1fr; } .marketing-request .marketing-photo { max-height:220px; } }

/* Money workspaces: one visible task and a shared, aligned field grid. */
.money-tasks { display: grid; gap: 20px; }
.money-task-layout { display: grid; grid-template-columns: 236px minmax(0,1fr); align-items: start; gap: 20px; }
.money-task-menu { display: grid; gap: 8px; }
.money-task-choice { min-height: 52px; padding: 14px 16px; text-align: start; border: 1px solid var(--border,#e3eaf3); border-radius: 10px; background: white; color: var(--ink,#17263c); font: inherit; cursor: pointer; }
.money-task-choice[aria-pressed="true"] { border-color: #2563eb; background: #eef4ff; color: #194bc6; font-weight: 600; }
.money-task-content { min-width: 0; }
.purchase-source-picker { padding-block-end: 16px; border-block-end: 1px solid #e3eaf3; }
.source-choice-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; }
.source-choice-note:empty { display: none; }
.simple-workspace .form-grid > .field:has(textarea), .simple-workspace .form-grid > .technical-details, .simple-workspace .form-grid > button { grid-column: 1 / -1; }
.simple-workspace .form-grid > button { justify-self: start; min-width: 140px; }
.simple-workspace .form-grid { align-items: start; }
.simple-workspace .table-toolbar .field { min-width: min(240px,100%); }
.simple-workspace td small { display: block; color: #64748b; margin-block-start: 4px; }
.source-choice-note bdi, .payout-total { font-variant-numeric: tabular-nums; }
@media(max-width:760px) {
 .money-task-layout { grid-template-columns: minmax(0,1fr); }
 .money-task-menu { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .money-task-choice { padding: 10px; font-size: 13px; }
 .simple-workspace .form-grid > button { width: 100%; }
}

.form-grid__wide { grid-column: 1 / -1; min-width: 0; }

.simple-workspace .snapshot small { display: block; margin-block-start: 4px; color: var(--muted); }
.refund-queue table { min-width: 500px; }
.refund-queue th:nth-child(3), .refund-queue td:nth-child(3) { text-align: center; }

.record-sequence{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-block:12px;color:#52647a}.record-sequence button{min-height:44px}

.admin-shortcuts{border-bottom:1px solid #40536d;padding-bottom:8px;margin-bottom:8px}.admin-shortcuts[hidden]{display:none}.toolbar-icon[aria-pressed=true]{background:#e8efff;color:#174ea6}

@media(max-width:780px){
 .ops-dashboard-grid>.panel{min-width:0;max-width:100%;overflow-x:auto}
 .ops-dashboard-grid>.panel:first-child table{min-width:0;width:100%;table-layout:fixed}
 .ops-dashboard-grid>.panel:first-child th,.ops-dashboard-grid>.panel:first-child td{white-space:normal;overflow-wrap:normal;padding-inline:6px;font-size:12px}
 .ops-dashboard-grid>.panel:first-child th:nth-child(1){width:36%}.ops-dashboard-grid>.panel:first-child th:nth-child(2){width:12%}.ops-dashboard-grid>.panel:first-child th:nth-child(3){width:28%}.ops-dashboard-grid>.panel:first-child th:nth-child(4){width:24%}
 .ops-dashboard-grid>.panel:first-child td .button{min-width:0;padding-inline:6px}
}
