/* Dashboard shell: UI-only structure replacement */
:root{
  --sidebar-width:220px;
  --sidebar-collapsed:62px;
  --header-height:62px;
  --dashboard-bg:#f3f5f9;
  --sidebar-bg:#ffffff;
  --header-bg:rgba(255,255,255,.92);
  --card-bg:#ffffff;
  --hover-bg:#f1f4fa;
}
body{background:var(--dashboard-bg);font-size:13px}
.dashboard-layout{min-height:100vh;padding-left:var(--sidebar-width);transition:padding-left .2s ease}
.dashboard-main{min-width:0}
.dashboard-sidebar{
  position:fixed;z-index:70;inset:0 auto 0 0;width:var(--sidebar-width);display:flex;flex-direction:column;
  color:var(--ink);border-right:1px solid var(--line);background:var(--sidebar-bg);transition:width .2s ease,transform .2s ease;
}
.sidebar-head{height:var(--header-height);padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.sidebar-head .brand{min-width:0;gap:9px}.sidebar-head .brand-mark{width:34px;height:34px;flex:none;border-radius:9px;font-size:15px;box-shadow:none}
.sidebar-head .brand-mark:after{display:none}.sidebar-head .brand b{font-size:14px}.sidebar-head .brand small{font-size:7px}
.sidebar-toggle,.header-icon-button{
  width:32px;height:32px;flex:none;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;
  color:var(--muted);background:var(--surface);cursor:pointer;transition:.16s;border-color .16s,background .16s,color .16s;
}
.sidebar-toggle{font-size:22px}.sidebar-toggle:hover,.header-icon-button:hover{color:var(--brand);border-color:rgba(109,74,255,.38);background:rgba(109,74,255,.07)}
.sidebar-nav{padding:12px 9px;display:flex;flex:1;flex-direction:column;gap:3px;overflow-y:auto}
.nav-label{margin:12px 9px 5px;color:var(--faint);font-size:9px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;white-space:nowrap}
.nav-item{height:38px;padding:0 10px;display:flex;align-items:center;gap:10px;border-radius:8px;color:var(--muted);text-decoration:none;font-weight:650;white-space:nowrap;transition:.15s}
.nav-item:hover{color:var(--ink);background:var(--hover-bg)}.nav-item.active{color:var(--brand);background:rgba(109,74,255,.10)}
.nav-icon{width:20px;height:20px;flex:none;display:grid;place-items:center;border-radius:6px;font:700 13px var(--mono)}
.nav-item.active .nav-icon{color:white;background:var(--brand)}.nav-icon-paypal{color:#0874d1;background:rgba(8,116,209,.10)}
.sidebar-foot{padding:13px 15px;border-top:1px solid var(--line);display:grid;gap:5px;color:var(--faint)}
.sidebar-status{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:10px;white-space:nowrap}
.sidebar-status i{width:7px;height:7px;flex:none;border-radius:50%;background:var(--warning);box-shadow:0 0 0 3px rgba(245,158,66,.12)}
.sidebar-status.online i{background:var(--success);box-shadow:0 0 0 3px rgba(28,168,121,.12)}
.sidebar-status.offline i{background:var(--danger);box-shadow:0 0 0 3px rgba(220,82,96,.12)}
.sidebar-foot small{font-size:9px}
.sidebar-collapsed .dashboard-layout{padding-left:var(--sidebar-collapsed)}
.sidebar-collapsed .dashboard-sidebar{width:var(--sidebar-collapsed)}
.sidebar-collapsed .brand-copy,.sidebar-collapsed .nav-text,.sidebar-collapsed .nav-label{display:none}
.sidebar-collapsed .sidebar-head{padding:0 14px}.sidebar-collapsed .sidebar-toggle{position:absolute;left:46px;width:24px;height:24px;border-radius:50%;background:var(--surface);transform:rotate(180deg)}
.sidebar-collapsed .sidebar-nav{padding-inline:8px}.sidebar-collapsed .nav-item{justify-content:center;padding:0}.sidebar-collapsed .sidebar-foot{align-items:center;padding-inline:0}.sidebar-collapsed .sidebar-status{justify-content:center}

.dashboard-header{
  position:sticky;z-index:60;top:0;height:var(--header-height);padding:0 22px;display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--line);background:var(--header-bg);backdrop-filter:blur(18px);
}
.header-leading,.header-actions,.header-title-row{display:flex;align-items:center}.header-leading{gap:11px}.header-actions{gap:10px}.header-project{display:block;margin-bottom:2px;color:var(--brand);font-size:8px;font-weight:800;letter-spacing:.15em}
.header-title-row{gap:8px;color:var(--faint);font-size:11px}.header-title-row h1{margin:0;color:var(--ink);font:700 15px var(--display);letter-spacing:-.01em}
.service-status{height:30px;padding:0 10px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:7px;color:var(--muted);background:var(--surface);font-size:10px;font-weight:700}
.service-status i{width:7px;height:7px;border-radius:50%;background:var(--warning)}.service-status.online i{background:var(--success)}.service-status.offline i{background:var(--danger)}
.mobile-only{display:none}

.dashboard-content{width:100%;max-width:1680px;margin:0 auto;padding:18px 20px 28px}
.page-section{scroll-margin-top:calc(var(--header-height) + 12px)}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:12px}
.page-heading h2{margin:2px 0 3px;font:700 20px var(--display);letter-spacing:-.025em}.page-heading p{margin:0;color:var(--muted);font-size:11px}
.page-kicker{color:var(--brand);font:800 8px var(--display);letter-spacing:.16em}.updated-at{color:var(--faint);font-size:10px;white-space:nowrap}
.status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.status-card{min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--card-bg);box-shadow:0 4px 16px rgba(37,43,68,.04)}
.status-card-head{height:24px;display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:10px}
.status-card-icon{width:24px;height:24px;display:grid;place-items:center;border-radius:7px;font:800 10px var(--mono)}
.status-card-icon.success{color:var(--success);background:rgba(28,168,121,.10)}.status-card-icon.primary{color:var(--brand);background:rgba(109,74,255,.10)}
.status-card-icon.info{color:var(--brand-2);background:rgba(5,169,199,.10)}.status-card-icon.warning{color:var(--warning);background:rgba(245,158,66,.11)}
.status-card-label{display:block;margin-bottom:5px;color:var(--muted);font-size:10px}.status-card strong{display:block;overflow:hidden;color:var(--ink);font:700 17px var(--display);text-overflow:ellipsis;white-space:nowrap}
.status-card small{display:block;overflow:hidden;margin-top:6px;color:var(--faint);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.mini-tag{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border-radius:5px;font-size:8px;font-weight:800;letter-spacing:.04em}
.mini-tag.neutral{color:var(--muted);background:var(--surface-3)}.mini-tag.online{color:var(--success);background:rgba(28,168,121,.11)}
.mini-tag.running{color:var(--brand);background:rgba(109,74,255,.11)}.mini-tag.error{color:var(--danger);background:rgba(220,82,96,.11)}

.data-summary-panel{margin:10px 0;padding:14px}.section-heading,.section-heading>div{display:flex;align-items:center}.section-heading{justify-content:space-between;gap:12px}.section-heading>div{gap:10px}
.section-heading h3{margin:0 0 2px;font-size:13px}.section-heading p{margin:0;color:var(--muted);font-size:9px}
.empty-state{min-height:64px;margin-top:12px;padding:12px;display:flex;align-items:center;justify-content:center;gap:11px;border:1px dashed var(--line);border-radius:9px;color:var(--muted);background:var(--surface-2)}
.empty-state>span{width:27px;height:27px;display:grid;place-items:center;border-radius:7px;color:var(--faint);background:var(--surface-3)}.empty-state b{display:block;color:var(--ink);font-size:11px}.empty-state p{margin:3px 0 0;font-size:9px}

.workspace-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,.62fr);gap:12px;align-items:start}
.panel{border-radius:12px;background:var(--card-bg);box-shadow:0 5px 20px rgba(37,43,68,.05);backdrop-filter:none}.panel:before{height:2px}
.form-panel,.status-panel,.result-panel{padding:18px}.panel-heading{margin-bottom:16px}.panel-heading h2{font-size:16px}.section-index{width:28px;height:28px;border-radius:7px;font-size:10px}
.public-limit-note{margin:-2px 0 16px;padding:10px 12px;border-radius:8px}.field{margin-bottom:13px}
textarea,input,select{padding:10px 11px;border-radius:8px}.token-field textarea{min-height:105px}.field-group{margin:18px 0}.choice-grid{gap:7px}
.choice,.rail{padding:10px;border-radius:9px}.choice{min-height:58px}.rail{min-height:70px}.rail-icon{width:25px;height:25px;border-radius:6px;font-size:12px}
.proxy-block{margin:18px 0;padding:14px;border-radius:10px}.block-heading{margin-bottom:12px}.proxy-pool-input{min-height:150px;padding:11px}
.conditional-fields{padding:13px 13px 1px;border-radius:9px}.toggle-line{padding:11px}.primary-button,.secondary-button{min-height:38px;border-radius:8px;padding:0 14px;gap:12px;font-size:11px}
.form-actions,.result-actions{margin-top:16px}.right-stack{top:calc(var(--header-height) + 12px);gap:12px}.progress-orbit{width:168px;height:168px}.progress-orbit strong{font-size:30px}.log-box{height:220px;border-radius:8px}
.dashboard-footer{width:100%;padding:18px 2px 0;margin:0;display:flex;justify-content:space-between;color:var(--muted);font-size:9px}.dashboard-footer p{margin:0}

/* Shared future-safe controls: no new feature is introduced. */
table{width:100%;border-collapse:collapse;background:var(--card-bg)}th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{position:sticky;top:0;color:var(--muted);background:var(--surface-2);font-size:10px}
tbody tr:hover{background:var(--hover-bg)}dialog{color:var(--ink);border:1px solid var(--line);border-radius:12px;background:var(--card-bg);box-shadow:var(--shadow)}dialog::backdrop{background:rgba(5,8,16,.55)}

.dark{
  --dashboard-bg:#080c14;--sidebar-bg:#0b101a;--header-bg:rgba(11,16,26,.92);--card-bg:#101722;--hover-bg:#151e2c;
}
.dark body{background:var(--dashboard-bg)}.dark .dashboard-sidebar,.dark .dashboard-header{border-color:#202b3b}
.dark .status-card,.dark .panel{box-shadow:none}.dark .empty-state{background:#0c131e}.dark .service-status{background:#101722}

.sidebar-backdrop{position:fixed;z-index:65;inset:0;background:rgba(5,8,16,.58);backdrop-filter:blur(2px)}
@media(max-width:1180px){.status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-grid{grid-template-columns:1fr}.right-stack{position:static;grid-template-columns:1fr 1fr}}
@media(max-width:760px){
  :root{--header-height:58px}.dashboard-layout,.sidebar-collapsed .dashboard-layout{padding-left:0}
  .dashboard-sidebar,.sidebar-collapsed .dashboard-sidebar{width:min(260px,84vw);transform:translateX(-101%);box-shadow:18px 0 50px rgba(0,0,0,.2)}
  .mobile-sidebar-open .dashboard-sidebar{transform:translateX(0)}.sidebar-collapsed .brand-copy,.sidebar-collapsed .nav-text,.sidebar-collapsed .nav-label{display:initial}
  .sidebar-collapsed .sidebar-head{padding:0 12px}.sidebar-collapsed .sidebar-toggle{position:static;width:32px;height:32px;transform:none}
  .sidebar-collapsed .nav-item{justify-content:flex-start;padding:0 10px}.sidebar-collapsed .sidebar-foot{align-items:stretch;padding:13px 15px}.sidebar-collapsed .sidebar-status{justify-content:flex-start}
  .mobile-only{display:grid}.dashboard-header{padding:0 12px}.header-project{display:none}.header-title-row>span{display:none}.service-status>span{display:none}.service-status{width:30px;padding:0;justify-content:center}
  .dashboard-content{padding:13px 11px 22px}.page-heading{align-items:flex-start}.updated-at{display:none}.status-grid{grid-template-columns:1fr 1fr;gap:7px}.status-card{padding:11px}.status-card strong{font-size:14px}
  .data-summary-panel{padding:12px}.compact-heading>.mini-tag{display:none}.workspace-grid{gap:9px}.right-stack{grid-template-columns:1fr}
  .form-panel,.status-panel,.result-panel{padding:14px}.plan-grid{grid-template-columns:1fr 1fr}.rail-grid{grid-template-columns:1fr 1fr;overflow:visible}.two-cols{grid-template-columns:1fr}
  .block-heading{flex-direction:column}.proxy-foot{flex-direction:column;align-items:stretch}.retry-setting{grid-template-columns:1fr}.form-actions,.result-actions{flex-direction:column}.primary-button,.secondary-button{width:100%}
  .dashboard-footer{display:block}.dashboard-footer p{margin-top:5px}
}
@media(max-width:420px){.status-grid{grid-template-columns:1fr}.rail-grid{grid-template-columns:1fr}.status-card small{white-space:normal}}

/* PayPal real-statistics module inside the shared admin visual language. */
body[data-dashboard-page="paypal"]{--panel:var(--surface);--field:var(--surface-2);--accent:var(--brand)}
body[data-dashboard-page="paypal"] .success-observatory{grid-template-columns:minmax(220px,.7fr) 1.3fr;gap:12px;margin:0 0 12px;padding:14px;border-color:var(--line);background:var(--card-bg)}
body[data-dashboard-page="paypal"] .success-observatory::before{display:none}
body[data-dashboard-page="paypal"] .success-beacon{gap:11px}
body[data-dashboard-page="paypal"] .success-beacon h2{margin:3px 0;font-size:15px}
body[data-dashboard-page="paypal"] .success-beacon p{font-size:9px;line-height:1.5}
body[data-dashboard-page="paypal"] .beacon-orbit{width:58px;height:58px;border-radius:9px;background:rgba(28,168,121,.08);box-shadow:none}
body[data-dashboard-page="paypal"] .beacon-orbit::before,body[data-dashboard-page="paypal"] .beacon-orbit::after,body[data-dashboard-page="paypal"] .beacon-orbit i{display:none}
body[data-dashboard-page="paypal"] .beacon-orbit span{inset:10px;border-radius:8px;box-shadow:none}
body[data-dashboard-page="paypal"] .beacon-orbit b{font-size:16px}
body[data-dashboard-page="paypal"] .success-kpis>div{min-height:62px;padding:10px;border-radius:8px;background:var(--surface-2);backdrop-filter:none}
body[data-dashboard-page="paypal"] .success-kpis strong{margin:5px 0 3px;font-size:15px}
body[data-dashboard-page="paypal"] .success-timeline-wrap{padding-top:11px}
body[data-dashboard-page="paypal"] .success-timeline{height:76px;padding-block:5px 13px;border-radius:8px}
body[data-dashboard-page="paypal"] .recent-wrap{margin-top:18px;padding-top:16px}
body[data-dashboard-page="paypal"] .recent-head h3{font-size:14px}
@media(max-width:980px){body[data-dashboard-page="paypal"] .success-observatory{grid-template-columns:1fr}}
