:root{
  --bg:#090b0e;
  --panel:#0e1115;
  --panel-raised:#12161b;
  --rule:#272c33;
  --rule-soft:#1b2026;
  --text:#e5e8ec;
  --text-strong:#f5f6f7;
  --muted:#838b95;
  --faint:#9099a3;
  --accent:#9fb3c4;
  --positive:#4fa87a;
  --negative:#d66565;
  --warning:#c49a55;
  --mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums}
body{overflow-x:hidden}
button{font:inherit}
button:focus-visible{outline:1px solid var(--accent);outline-offset:2px}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:#080a0c}
.auth-terminal{width:min(460px,100%);padding:34px 36px 30px;border:1px solid var(--rule);border-top:2px solid #8796a4;background:var(--panel);border-radius:2px}
.auth-brand{display:flex;align-items:baseline;justify-content:space-between;gap:20px}
.auth-brand b{font-size:16px;letter-spacing:.16em;color:var(--text-strong)}
.auth-brand span{font:10px/1 var(--mono);letter-spacing:.12em;color:var(--faint)}
.auth-rule{height:1px;background:var(--rule);margin:20px 0 28px}
.system-code{margin:0;color:var(--accent);font:10px/1.4 var(--mono);letter-spacing:.13em;text-transform:uppercase}
.auth-terminal h1{margin:9px 0 10px;font-size:25px;line-height:1.2;font-weight:600;letter-spacing:-.02em}
.auth-copy{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.auth-scope{margin:26px 0 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.auth-scope div{display:grid;grid-template-columns:100px 1fr;padding:9px 0;border-bottom:1px solid var(--rule-soft)}
.auth-scope div:last-child{border-bottom:0}
.auth-scope dt,.auth-scope dd{margin:0;font:10px/1.3 var(--mono);letter-spacing:.06em}
.auth-scope dt{color:var(--faint)}
.auth-scope dd{text-align:right;color:#b9c1c9}
.primary-btn,.refresh-btn,.text-btn{border:1px solid var(--rule);background:#151a20;color:var(--text);border-radius:2px;cursor:pointer;text-transform:uppercase;letter-spacing:.08em}
.primary-btn{width:100%;margin-top:24px;padding:11px 16px;font:600 11px/1.2 var(--mono);border-color:#55616d;background:#20262d}
.primary-btn:hover,.refresh-btn:hover,.text-btn:hover{background:#252c34;border-color:#65717d}
.auth-status{margin-top:16px;color:var(--muted);font:10px/1.5 var(--mono);text-align:center}
.auth-error,.integrated-error{color:#e18484;font:11px/1.5 var(--mono)}
.auth-error{margin-top:10px;text-align:center}
.auth-terminal small{display:block;margin-top:18px;color:var(--faint);font-size:11px;line-height:1.5;text-align:center}
.portal-app{width:100%;min-height:100vh}
.portal-header{height:54px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--rule);background:#0b0e11;position:sticky;top:0;z-index:50}
.brand-block,.header-meta{display:flex;align-items:center}
.brand-wordmark{font-size:13px;font-weight:700;letter-spacing:.16em;color:var(--text-strong)}
.header-divider{width:1px;height:16px;margin:0 15px;background:#3a4149}
.header-product{font:10px/1 var(--mono);letter-spacing:.1em;color:var(--muted)}
.header-meta{height:100%;gap:0;font-family:var(--mono);font-size:10px}
.header-label{color:var(--faint);padding-right:7px}
.clock{color:#cbd1d7;min-width:62px}
.user-email{margin-left:18px;padding-left:18px;border-left:1px solid var(--rule);color:var(--muted);max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.text-btn{margin-left:14px;padding:7px 9px;font:9px/1 var(--mono);background:transparent}
.portal-nav{height:43px;padding:0 24px;display:flex;align-items:stretch;justify-content:space-between;border-bottom:1px solid var(--rule);background:#0e1115;position:sticky;top:54px;z-index:45}
.nav-inner{display:flex;align-items:stretch;gap:28px}
.portal-tab{position:relative;border:0;background:transparent;color:#747d87;padding:0;font:600 10px/43px var(--mono);letter-spacing:.08em;cursor:pointer}
.portal-tab:hover{color:#cbd1d7}
.portal-tab.active{color:var(--text-strong)}
.portal-tab.active:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#9aa8b5}
.nav-classification{align-self:center;color:#89929c;font:10px/1 var(--mono);letter-spacing:.07em}
.portal-panel{display:none}
.portal-panel.active{display:block}
.integrated-shell{width:min(1680px,100%);margin:0 auto;padding:28px 24px 44px}
.integrated-heading{min-height:73px;display:flex;align-items:flex-start;justify-content:space-between;gap:24px;border-bottom:1px solid var(--rule);padding-bottom:20px}
.integrated-heading h1{margin:7px 0 0;color:var(--text-strong);font-size:23px;line-height:1.2;font-weight:550;letter-spacing:-.02em}
.heading-actions{display:flex;align-items:center;gap:10px;padding-top:4px}
.asof-block{min-width:176px;text-align:right;padding-right:14px;border-right:1px solid var(--rule)}
.asof-block span{display:block;color:var(--faint);font:10px/1 var(--mono);letter-spacing:.06em}
.asof-block b{display:block;margin-top:6px;color:#aab2bb;font:500 10px/1 var(--mono)}
.system-state{display:inline-flex;align-items:center;gap:7px;min-height:28px;padding:0 10px;border:1px solid var(--rule);border-radius:2px;color:var(--muted);font:600 10px/1 var(--mono);letter-spacing:.05em;white-space:nowrap}
.status-marker{width:6px;height:6px;background:var(--warning);display:inline-block}
.system-state.normal{color:#91c5aa;border-color:#315442}.system-state.normal .status-marker{background:var(--positive)}
.system-state.review{color:#d0ac6d;border-color:#5a482c}.system-state.review .status-marker{background:var(--warning)}
.system-state.blocked{color:#df8585;border-color:#5c3030}.system-state.blocked .status-marker{background:var(--negative)}
.refresh-btn{height:28px;padding:0 10px;font:600 9px/1 var(--mono)}
.refresh-btn:disabled{opacity:.45;cursor:not-allowed}
.integrated-error{margin-top:14px;padding:10px 12px;border:1px solid #563030;background:#1a1113}
.integrated-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin-top:20px;border:1px solid var(--rule);background:var(--panel)}
.integrated-kpis article{min-width:0;padding:15px 16px 14px;border-right:1px solid var(--rule)}
.integrated-kpis article:last-child{border-right:0}
.integrated-kpis span{display:block;color:#969fa9;font:600 10px/1.2 var(--mono);letter-spacing:.05em;white-space:nowrap}
.integrated-kpis strong{display:block;margin-top:11px;color:var(--text-strong);font:600 19px/1.05 var(--mono);letter-spacing:-.025em;white-space:nowrap}
.integrated-kpis small{display:block;margin-top:9px;color:#929ba5;font:10px/1.2 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.integrated-shell .positive{color:var(--positive)!important}.integrated-shell .negative{color:var(--negative)!important}
.integrated-section{margin-top:20px;border:1px solid var(--rule);background:var(--panel);border-radius:2px}
.section-title{height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--rule)}
.section-title>div{display:flex;align-items:center;gap:10px}
.section-index{color:#929ba5;font:10px/1 var(--mono)}
.section-title h2{margin:0;color:#dfe3e7;font-size:12px;line-height:1;font-weight:600;letter-spacing:.01em}
.section-title>span{color:#929ba5;font:10px/1 var(--mono);letter-spacing:.04em}
.integrated-table-wrap{width:100%;overflow:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.integrated-table-wrap:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}
.integrated-shell table{width:100%;max-width:100%;border-collapse:collapse;min-width:0;table-layout:fixed}
.integrated-shell th{height:32px;padding:0 11px;border-bottom:1px solid var(--rule);background:#11151a;color:#9aa3ad;text-align:right;font:600 10px/1 var(--mono);letter-spacing:.035em;white-space:nowrap}
.integrated-shell td{height:37px;padding:0 11px;border-bottom:1px solid var(--rule-soft);color:#c0c7ce;text-align:right;font:11px/1 var(--mono);white-space:nowrap}
.integrated-shell tbody tr:last-child td{border-bottom:0}
.integrated-shell tbody tr:hover td{background:#12171c}
.integrated-shell th:first-child,.integrated-shell td:first-child{text-align:left}
.integrated-shell th:nth-child(2),.integrated-shell td:nth-child(2){text-align:left}
.integrated-shell td b{color:#e2e6ea;font-weight:600}
.venue-status-table{min-width:0}
.venue-status-table td:first-child{color:#eef0f2;font-weight:700;letter-spacing:.04em}
.venue-status-table th:nth-child(n+3),.venue-status-table td:nth-child(n+3){text-align:right}
.venue-status-table th:nth-child(2),.venue-status-table td:nth-child(2){text-align:left}
.closed table{table-layout:auto}
.venue-state{display:inline-flex;align-items:center;gap:6px;font:600 9px/1 var(--mono);letter-spacing:.05em}
.venue-state.normal{color:#85b99e}.venue-state.normal .status-marker{background:var(--positive)}
.venue-state.review{color:#c6a061}.venue-state.review .status-marker{background:var(--warning)}
.venue-state.blocked{color:#d17878}.venue-state.blocked .status-marker{background:var(--negative)}
.venue-tag{color:#8f99a3;font:600 9px/1 var(--mono);letter-spacing:.04em}
.tp-ok{color:#78b895!important;font-weight:600}.tp-block{color:#d46f6f!important;font-weight:600}
.integrated-shell .empty{text-align:center!important;color:#929ba5!important;height:70px!important;font:10px/1 var(--mono)!important;letter-spacing:.05em}
.integrated-footer{display:flex;justify-content:space-between;gap:20px;margin-top:16px;padding-top:12px;border-top:1px solid var(--rule);color:#8f98a2;font:10px/1.4 var(--mono);letter-spacing:.04em}
@media (max-width:1240px){
  .integrated-shell table{min-width:1080px}
  .integrated-shell .venue-status-table{min-width:1240px}
  .integrated-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .integrated-kpis article:nth-child(3){border-right:0}
  .integrated-kpis article:nth-child(-n+3){border-bottom:1px solid var(--rule)}
}
@media (max-width:760px){
  .portal-header{height:50px;padding:0 12px}
  .header-product,.user-email,.header-label{display:none}
  .header-divider{display:none}
  .header-meta{margin-left:auto}
  .portal-nav{top:50px;height:42px;padding:0 12px;overflow-x:auto}
  .nav-inner{gap:20px;min-width:max-content}
  .portal-tab{line-height:42px}
  .nav-classification{display:none}
  .integrated-shell{padding:20px 12px 36px}
  .integrated-heading{display:block;padding-bottom:16px}
  .integrated-heading h1{font-size:19px}
  .heading-actions{margin-top:16px;justify-content:space-between}
  .asof-block{text-align:left;margin-right:auto;padding-right:10px;min-width:0}
  .integrated-kpis{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}
  .integrated-kpis article{padding:13px 12px;border-bottom:1px solid var(--rule)}
  .integrated-kpis article:nth-child(odd){border-right:1px solid var(--rule)}
  .integrated-kpis article:nth-child(2n){border-right:0}
  .integrated-kpis article:nth-last-child(-n+2){border-bottom:0}
  .integrated-kpis strong{font-size:16px}
  .integrated-section{margin-top:14px}
  .section-title{height:auto;min-height:46px;padding:10px 11px;align-items:flex-start;gap:10px}
  .section-title>span{max-width:45%;text-align:right;line-height:1.35}
  .integrated-table-wrap{overflow:auto}
  .integrated-shell th:first-child,.integrated-shell td:first-child{position:sticky;left:0;z-index:2;background:var(--panel)}
  .integrated-shell th:first-child{z-index:3;background:#11151a}
  .integrated-shell tbody tr:hover td:first-child{background:#12171c}
  .integrated-footer{display:block}
  .integrated-footer span{display:block;margin-top:5px}
  .auth-terminal{padding:28px 22px}
}
@media (max-width:430px){
  .brand-wordmark{font-size:11px}
  .integrated-kpis{grid-template-columns:1fr}
  .integrated-kpis article{border-right:0!important;border-bottom:1px solid var(--rule)!important}
  .integrated-kpis article:last-child{border-bottom:0!important}
  .asof-block{display:none}
  .heading-actions{justify-content:flex-end}
}
