@font-face { font-family: Vazirmatn; src: url('/static/fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --bg:#fafafa; --card:#fff; --line:#e4e4e7; --ink:#18181b; --muted:#71717a; --accent:#18181b; --ok:#15803d; --warn:#a16207; --bad:#b91c1c; --soft:#f4f4f5; --sidebar:224px; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { scroll-padding-top:88px; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:Vazirmatn,Tahoma,sans-serif; font-size:14px; line-height:1.75; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
a:hover { color:#09090b; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:2px solid #a1a1aa; outline-offset:3px; }
.icon { flex-shrink:0; vertical-align:middle; }
.sidebar { position:fixed; inset-block:0; inset-inline-start:0; width:var(--sidebar); padding:24px 14px 14px; border-inline-end:1px solid var(--line); background:#fff; display:flex; flex-direction:column; z-index:20; overflow-y:auto; }
.brand { display:flex; align-items:center; gap:11px; padding:0 9px 24px; }
.brand-mark { background:#18181b; color:#fff; border-radius:9px; width:37px; height:37px; display:grid; place-items:center; }
.brand b { display:block; font-size:17px; letter-spacing:-.5px; line-height:1.4; }
.brand small,.sidebar-footer small { display:block; color:var(--muted); font-size:11px; }
.nav-group { margin:10px 0 22px; }
.nav-label { padding:0 12px 8px; color:#a1a1aa; font-size:11px; font-weight:500; }
.nav-link { display:flex; align-items:center; gap:11px; min-height:40px; border-radius:6px; padding:8px 12px; margin:3px 0; color:#52525b; font-size:13px; transition:background .15s,color .15s; }
.nav-link:hover { background:#f4f4f5; }
.nav-link.active { background:#f1f1f2; color:#18181b; font-weight:650; }
.sidebar-footer { margin-top:auto; padding:16px 5px 0; border-top:1px solid var(--line); display:flex; gap:10px; align-items:center; }
.sidebar-footer b { font-size:12px; font-weight:550; }
.sidebar-footer .icon-button { margin-inline-start:auto; }
.avatar { width:32px; height:32px; display:grid; place-items:center; background:var(--soft); border:1px solid var(--line); border-radius:50%; }
.workspace { margin-inline-start:var(--sidebar); min-width:0; }
.topbar { position:sticky; top:0; z-index:10; min-height:65px; display:flex; align-items:center; gap:18px; padding:12px 28px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.96); }
.breadcrumb { display:flex; align-items:center; gap:14px; color:var(--muted); white-space:nowrap; font-size:12px; min-width:0; }
.breadcrumb b { color:var(--ink); font-weight:500; overflow:hidden; text-overflow:ellipsis; max-width:230px; }
.breadcrumb-separator { color:#d4d4d8; }
.global-search { margin-inline-start:auto; display:flex; align-items:center; gap:9px; background:#fafafa; border:1px solid var(--line); border-radius:7px; width:250px; max-width:100%; padding:0 10px; color:var(--muted); }
.global-search input { min-width:0; min-height:34px; border:0; background:transparent; padding:5px 0; font-size:12px; outline:0; box-shadow:none; }
.global-search:focus-within { outline:2px solid #a1a1aa; outline-offset:2px; }
kbd { font:11px ui-monospace,monospace; padding:1px 5px; border:1px solid var(--line); border-radius:3px; background:var(--card); }
.wrap { max-width:1600px; margin:0 auto; padding:28px 28px 48px; }
.wrap:focus { outline:0; }
.skip-link { position:fixed; top:-100px; inset-inline-start:20px; z-index:100; background:var(--ink); color:#fff; padding:8px 15px; border-radius:6px; }
.skip-link:focus { top:12px; color:white; }
h1 { font-size:25px; font-weight:700; line-height:1.5; margin:0 0 18px; overflow-wrap:anywhere; letter-spacing:-.5px; }
h2 { font-size:14px; font-weight:600; margin:20px 0 12px; color:var(--ink); }
.card>h2:first-child { margin-top:0; }
p { margin:0 0 14px; }
.grid,.grid2,.grid3 { display:grid; gap:16px; margin-bottom:20px; }
.grid { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
.grid2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid>* , .grid2>* , .grid3>* { min-width:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:9px; padding:20px; box-shadow:0 1px 2px #00000003; }
.kpi .v { font-size:28px; font-weight:650; direction:ltr; text-align:right; font-variant-numeric:tabular-nums; letter-spacing:-1px; line-height:1.6; margin:8px 0 3px; }
.kpi .l { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#52525b; font-size:12px; }
.kpi .l .icon { color:#a1a1aa; }
.kpi .s { color:var(--muted); font-size:11px; }
.kpi .v.small { font-size:17px; }
.tw { overflow-x:auto; max-width:100%; scrollbar-width:thin; scrollbar-color:#d4d4d8 transparent; overscroll-behavior-inline:contain; }
table { width:100%; border-collapse:collapse; background:var(--card); }
th,td { padding:12px 10px; border-bottom:1px solid #f0f0f2; text-align:right; font-size:12px; vertical-align:middle; }
th { background:#fafafa; color:var(--muted); font-weight:500; white-space:nowrap; }
tr:last-child td { border-bottom:0; }
tr:hover td { background:#fafafa; }
td a { font-weight:500; }
td a:hover { text-decoration:underline; text-underline-offset:4px; }
.num,.ltr { direction:ltr; text-align:left; font-variant-numeric:tabular-nums; }
.mono { font-family:ui-monospace,Consolas,Menlo,monospace; font-size:11px; }
.badge { display:inline-flex; align-items:center; gap:4px; padding:2px 7px; border-radius:5px; font-size:10px; font-weight:500; white-space:nowrap; border:1px solid transparent; line-height:1.7; }
.b-ok { background:#f0fdf4; color:#15803d; border-color:#dcfce7; }
.b-warn { background:#fffbeb; color:#a16207; border-color:#fef3c7; }
.b-bad { background:#fef2f2; color:#b91c1c; border-color:#fee2e2; }
.b-mute { background:#f4f4f5; color:#71717a; border-color:#e4e4e7; }
.b-info { background:#f4f4f5; color:#3f3f46; border-color:#e4e4e7; }
input,select,textarea { color:var(--ink); padding:8px 10px; border:1px solid var(--line); border-radius:6px; width:100%; background:#fff; min-width:0; font-size:13px; }
input,select { min-height:37px; }
input::placeholder,textarea::placeholder { color:#a1a1aa; }
input:disabled,select:disabled,textarea:disabled { background:#fafafa; color:#a1a1aa; cursor:not-allowed; }
input[type=checkbox] { width:15px; height:15px; min-height:0; accent-color:#18181b; margin:0; }
textarea { min-height:80px; resize:vertical; line-height:1.8; }
textarea.code,input.code { direction:ltr; text-align:left; font-family:ui-monospace,Consolas,Menlo,monospace; font-size:12px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 13px; border:1px solid transparent; border-radius:6px; background:var(--accent); color:#fff; font:500 12px Vazirmatn,Tahoma,sans-serif; cursor:pointer; line-height:1.6; transition:background .15s,box-shadow .15s; text-align:center; }
.btn:hover { background:#303036; color:#fff; }
.btn.sec { background:var(--card); color:var(--ink); border-color:var(--line); box-shadow:0 1px 2px #00000004; }
.btn.sec:hover { background:#f4f4f5; }
.btn.danger { background:#fff; color:var(--bad); border-color:#fecaca; }
.btn.danger:hover { background:#fef2f2; }
.btn.ok { background:#15803d; }
.btn.sm { min-height:29px; padding:4px 10px; font-size:11px; }
.btn:disabled { opacity:.5; cursor:wait; }
.icon-button { width:34px; min-width:34px; height:34px; display:inline-grid; place-items:center; background:transparent; border:1px solid transparent; border-radius:6px; color:#71717a; cursor:pointer; }
.icon-button:hover { background:var(--soft); color:var(--ink); }
.menu-trigger { display:none; }
.row { display:flex; flex-wrap:wrap; gap:14px; align-items:flex-end; }
.row>* { flex:1; min-width:140px; max-width:100%; }
.row>.w2 { flex:2; }
.row>.fit { flex:0 0 auto; min-width:0; }
label { display:block; color:#52525b; font-size:12px; margin-bottom:6px; font-weight:500; }
.chk { display:inline-flex; gap:8px; align-items:center; max-width:100%; font-size:12px; color:var(--ink); margin-inline-end:12px; overflow-wrap:anywhere; }
.chk input { flex:0 0 auto; }
form .row + .row { margin-top:16px; }
.flash { padding:12px 16px; border-radius:7px; margin-bottom:20px; font-size:13px; border:1px solid; }
.flash.ok { background:#f0fdf4; color:#166534; border-color:#dcfce7; }
.flash.err { background:#fef2f2; color:#991b1b; border-color:#fee2e2; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.inline,form.inline { display:inline; }
.pager { display:flex; gap:6px; align-items:center; margin-top:16px; flex-wrap:wrap; }
.bar { height:5px; background:var(--soft); border-radius:99px; overflow:hidden; }
.bar>i { display:block; height:100%; background:var(--accent); }
.login { max-width:380px; margin:10vh auto; }
pre { background:#fafafa; border:1px solid var(--line); color:#3f3f46; padding:16px; border-radius:7px; direction:ltr; text-align:left; font-size:12px; overflow-x:auto; white-space:pre-wrap; word-break:break-word; }
.chart { height:260px; position:relative; }
.chart.sm { height:220px; }
details summary { cursor:pointer; font-weight:500; }
details summary:hover { color:var(--ink); }
.head { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-bottom:20px; }
.head h1 { margin:0; }
.tabs { display:inline-flex; gap:3px; padding:4px; background:#f1f1f2; border-radius:7px; }
.tab { padding:5px 13px; border-radius:5px; color:#71717a; font-weight:500; font-size:12px; white-space:nowrap; }
.tab.on { background:#fff; color:#18181b; box-shadow:0 1px 3px #00000012; }
.stack { display:flex; flex-direction:column; gap:14px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:26px; }
.page-heading h1 { margin:0 0 5px; }
.page-heading p { color:var(--muted); font-size:12px; margin:0; }
.heading-actions { display:flex; gap:8px; flex-wrap:wrap; }
.dashboard-nav { display:flex; gap:24px; margin-bottom:26px; border-bottom:1px solid var(--line); }
.dashboard-nav a { padding:0 0 12px; color:var(--muted); font-size:12px; }
.dashboard-nav a[aria-current] { color:var(--ink); border-bottom:2px solid var(--ink); }
.section-heading { display:flex; align-items:center; gap:14px; justify-content:space-between; flex-wrap:wrap; margin:26px 0 16px; }
.section-heading h2 { font-size:16px; margin:0; }
.section-heading p { color:var(--muted); font-size:11px; margin:4px 0 0; }
.dashboard-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.dashboard-kpis .card { padding:18px; }
.chart-header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:20px; }
.chart-header h2 { margin:0; font-size:14px; }
.chart-header p { font-size:11px; color:var(--muted); margin:3px 0 0; }
.chart-header .badge { margin-top:2px; }
.chart-card { padding-bottom:12px; }
.financial-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line); border-radius:8px; background:var(--card); margin-bottom:20px; }
.financial-strip>div { padding:16px 20px; border-inline-end:1px solid var(--line); }
.financial-strip>div:last-child { border:0; }
.financial-strip .l { color:var(--muted); font-size:11px; }
.financial-strip .v { display:block; font-weight:600; font-size:17px; margin:3px 0; direction:ltr; text-align:right; font-variant-numeric:tabular-nums; }
.financial-strip .s { color:var(--muted); font-size:10px; }
.detail-section { background:var(--card); border:1px solid var(--line); border-radius:9px; margin-bottom:20px; padding:18px 20px; }
.detail-section>summary { display:flex; align-items:center; gap:10px; list-style:none; font-size:13px; }
.detail-section>summary::-webkit-details-marker { display:none; }
.detail-section>summary::after { content:'+'; margin-inline-start:auto; font-size:18px; color:var(--muted); }
.detail-section[open]>summary::after { content:'−'; }
.detail-section[open]>summary { margin-bottom:22px; }
.detail-section>summary .muted { font-weight:400; font-size:11px; }
.live-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.live-metrics .card { padding:14px 18px; }
.live-metrics a:hover { border-color:#a1a1aa; }
.live-metrics .v { font-size:23px; margin:3px 0; }
.live-details { margin-top:16px; border-top:1px solid var(--line); padding-top:14px; }
.live-details>summary { display:flex; justify-content:space-between; font-size:12px; }
.live-details[open]>summary { margin-bottom:16px; }
.refresh-tools { display:flex; align-items:center; gap:10px; }
#live-status { color:var(--muted); font-size:11px; }
#live-status[data-state=error] { color:var(--bad); }
.status-login { margin-inline-start:6px; text-decoration:underline; text-underline-offset:3px; }
.queue-status { display:inline-flex; align-items:center; gap:6px; }
.status-dot { width:6px; height:6px; border-radius:50%; background:currentColor; display:inline-block; }
.table-tools { display:flex; gap:12px; align-items:center; margin-bottom:16px; }
.table-tools input { max-width:300px; }
.empty-state { text-align:center; color:var(--muted); padding:28px 16px; font-size:12px; }
.mobile-menu { inset:0 0 0 auto; margin:0; height:100dvh; max-height:100dvh; width:280px; max-width:calc(100vw - 35px); padding:16px; border:0; border-inline-end:1px solid var(--line); border-radius:0; color:var(--ink); background:var(--card); }
.mobile-menu::backdrop { background:#09090b66; backdrop-filter:blur(2px); }
.mobile-menu-head { display:flex; align-items:center; justify-content:space-between; padding:0 8px 8px; }
@media (min-width:1600px) { .wrap { padding:36px 40px 60px; } }
@media (max-width:1200px) { .dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .grid3 { grid-template-columns:repeat(2,minmax(0,1fr)); } .grid3>.card:last-child { grid-column:1/-1; } }
@media (max-width:1024px) { .sidebar { display:none; } .workspace { margin-inline-start:0; } .menu-trigger { display:inline-grid; } .topbar { padding:10px 20px; min-height:60px; } .wrap { padding:24px 20px 40px; } .dashboard-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:760px) { .grid2,.grid3 { grid-template-columns:1fr; } .dashboard-kpis,.live-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .financial-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .financial-strip>div { border-bottom:1px solid var(--line); } .financial-strip>div:nth-child(2) { border-inline-end:0; } .financial-strip>div:nth-child(n+3) { border-bottom:0; } .breadcrumb>span { display:none; } .page-heading { align-items:flex-start; } .chart { height:240px; } .heading-actions .btn { min-height:38px; } }
@media (max-width:480px) { .wrap { padding:20px 14px 32px; } .topbar { padding:9px 12px; gap:8px; } .breadcrumb { display:none; } .global-search { width:auto; flex:1; } .global-search kbd { display:none; } .maintenance-label { font-size:9px; padding:2px 4px; } h1 { font-size:23px; } .card { padding:16px; } .grid,.grid2,.grid3 { gap:12px; } .dashboard-kpis .card { padding:14px; } .kpi .v { font-size:25px; } .kpi .l { font-size:11px; } .kpi .s { font-size:10px; } .financial-strip>div { padding:12px; } .financial-strip .v { font-size:15px; } .dashboard-nav { gap:18px; } .dashboard-nav a { font-size:11px; } .tabs { width:100%; justify-content:space-between; } .tab { flex:1; text-align:center; padding:5px 8px; } .detail-section { padding:16px; } .detail-section>summary { flex-wrap:wrap; gap:4px; } .detail-section>summary .muted { display:none; } .row>* { min-width:min(140px,100%); } .btn { min-height:38px; } .live-metrics .card { padding:12px 14px; } .refresh-tools { flex-wrap:wrap; } .login { margin:8vh auto; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }

/* Broadcast composition and immutable preview. */
.broadcast-card { margin-bottom:16px; }
.broadcast-plans { border:1px solid var(--line); border-radius:8px; padding:12px; margin:12px 0 20px; min-width:0; }
.broadcast-plans legend { padding:0 6px; }
.broadcast-preview { border:1px solid var(--line); border-radius:12px; padding:16px; }
.broadcast-photo { display:block; width:auto; max-width:100%; max-height:360px; object-fit:contain; border-radius:8px; margin:0 auto 12px; }
.broadcast-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.broadcast-cancel { margin-top:12px; }
[data-broadcast] .grid2 { margin-bottom:16px; }
[data-broadcast] strong[data-count] { font-size:24px; display:block; margin-top:8px; }

/* Receipt metadata can contain unbroken transaction IDs and long warnings. */
.payment-details { overflow-wrap:anywhere; }
.payment-details .badge { white-space:normal; }

/* Provider benchmark reports: contain long identifiers and narrow-screen metrics. */
#benchmark-report .page-heading { margin-bottom:12px; }
#benchmark-report .kpi .v { font-size:clamp(18px, 2vw, 28px); overflow-wrap:anywhere; }
#benchmark-report td:last-child { min-width:150px; max-width:320px; overflow-wrap:anywhere; }
#benchmark-report pre { max-width:100%; }
#benchmark-form [hidden], #benchmark-report [hidden] { display:none !important; }

/* Analytics uses the same minimal shell; tables scroll inside their cards. */
#analytics-report .kpi .v { font-size:clamp(18px, 2vw, 28px); overflow-wrap:anywhere; }
#analytics-report .chart-header>div { min-width:0; }
#analytics-report .grid2 { margin-bottom:16px; }
.analytics-filters { margin-top:0; }
.analytics-note { line-height:1.9; }
.analytics-empty { height:100%; display:flex; align-items:center; justify-content:center; text-align:center; color:var(--muted); }
#analytics-report section { scroll-margin-top:88px; }
.log-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:16px; align-items:end; }
.log-filters > div { min-width:0; }
.log-filters input, .log-filters select { width:100%; min-width:0; box-sizing:border-box; }
.log-identifiers { max-width:310px; overflow-wrap:anywhere; }
.log-header { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.log-header h1 { margin:0; }
@media (max-width:480px) { #analytics-report .dashboard-nav { gap:12px; } #analytics-report .analytics-plot { height:260px; } }
