:root{
    --bg:var(--ui-bg);
    --panel:var(--ui-surface);
    --sidebar:var(--ui-sidebar);
    --sidebar-soft:var(--ui-sidebar-secondary);
    --sidebar-bg:var(--sidebar);
    --sidebar-bg-secondary:var(--sidebar-soft);
    --sidebar-bg-hover:rgba(255,255,255,.06);
    --sidebar-bg-active:rgba(140,99,255,.2);
    --sidebar-border:rgba(255,255,255,.08);
    --sidebar-text:var(--ui-sidebar-text);
    --sidebar-text-muted:var(--ui-sidebar-text-muted);
    --sidebar-accent:var(--ui-sidebar-accent);
    --sidebar-scroll-thumb:var(--ui-sidebar-scroll-thumb);
    --sidebar-scroll-thumb-hover:var(--ui-sidebar-scroll-thumb-hover);
    --sidebar-scroll-thumb-active:var(--ui-sidebar-scroll-thumb-active);
    --sidebar-scroll-track:rgba(255,255,255,.12);
    --text:var(--ui-text);
    --muted:var(--ui-muted);
    --border:var(--ui-border);
    --primary:var(--ui-brand);
    --brand-primary:var(--primary);
    --brand-foreground:var(--ui-brand-foreground);
    --brand-muted:var(--ui-muted);
    --primary-soft:var(--ui-brand-soft);
    --success:var(--ui-success);
    --success-bg:var(--ui-success-bg);
    --warning:var(--ui-warning);
    --warning-bg:var(--ui-warning-bg);
    --danger:var(--ui-danger);
    --danger-bg:var(--ui-danger-bg);
    --shadow:var(--ui-shadow);
    --sidebar-width:268px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--text);background:var(--bg)}
button,input,select,textarea{font:inherit}
a{color:inherit}
.app-shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);background:var(--sidebar-bg);color:var(--sidebar-text);display:flex;flex-direction:column;z-index:50;overflow:hidden;transition:width .18s ease,transform .2s ease}
.brand{display:flex;align-items:center;gap:10px;min-height:72px;padding:10px 12px;border-bottom:1px solid var(--sidebar-border);flex:0 0 auto}
.brand-link{display:flex;align-items:center;gap:12px;min-width:0;flex:1;padding:6px;border-radius:9px;text-decoration:none;color:var(--ui-brand-foreground)}
.brand-link:hover{background:rgba(255,255,255,.05)}
.brand-link:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:1px}
.brand-mark{display:block;width:38px;height:38px;object-fit:contain;flex:0 0 auto}
.brand-copy{min-width:0;flex:1}
.brand-name{display:block;font-weight:750;letter-spacing:.2px}
.brand-sub{display:block;font-size:12px;color:var(--sidebar-text-muted);margin-top:2px}
.sidebar-collapse-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:transparent;color:var(--ui-muted);cursor:pointer;flex:0 0 auto}
.sidebar-collapse-button:hover,.sidebar-collapse-button:focus-visible{background:var(--sidebar-bg-hover);color:var(--ui-brand-foreground);outline:none}
.v3-icon{display:block;width:18px;height:18px;flex:0 0 auto}
.sidebar-nav-region{position:relative;flex:1 1 auto;min-height:0;overflow:hidden}
.side-nav{height:100%;padding:8px 10px 20px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sidebar-scroll-thumb) var(--sidebar-scroll-track)}
.side-nav::-webkit-scrollbar{width:7px}
.side-nav::-webkit-scrollbar-track{background:var(--sidebar-scroll-track)}
.side-nav::-webkit-scrollbar-thumb{background:var(--sidebar-scroll-thumb);border:2px solid transparent;border-radius:999px;background-clip:padding-box}
.side-nav:hover::-webkit-scrollbar-thumb{background-color:var(--sidebar-scroll-thumb-hover)}
.side-nav:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:-2px}
.sidebar-scroll-rail{position:absolute;z-index:3;top:10px;right:3px;bottom:10px;width:4px;border-radius:999px;background:var(--sidebar-scroll-track);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}
.sidebar-scroll-thumb{position:absolute;top:0;left:0;width:4px;height:var(--sidebar-scroll-thumb-height,36px);border-radius:999px;background:var(--sidebar-scroll-thumb);opacity:.9;transform:translateY(var(--sidebar-scroll-thumb-top,0));transition:background-color .15s ease,opacity .15s ease}
.sidebar-nav-region.has-overflow .sidebar-scroll-rail{opacity:1;visibility:visible}
.sidebar-nav-region.is-scrolling .sidebar-scroll-thumb{background:var(--sidebar-scroll-thumb-active);opacity:1}
.nav-section-group{margin:5px 0 0}
.nav-section-group:first-child{margin-top:0}
.nav-section-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:34px;padding:12px 10px 6px;border-radius:7px;color:var(--sidebar-text-muted);cursor:pointer;list-style:none;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap}
.nav-section-group>summary::-webkit-details-marker{display:none}
.nav-section-group>summary:hover,.nav-section-group>summary:focus-visible{background:var(--sidebar-bg-hover);color:var(--sidebar-text);outline:2px solid var(--sidebar-accent);outline-offset:1px}
.nav-section-group.is-active>summary{color:var(--sidebar-text-muted)}
.nav-section-chevron{width:13px;height:13px;transition:transform .15s ease}
.nav-section-group[open]>summary .nav-section-chevron{transform:rotate(90deg)}
.nav-section-items{display:grid;grid-template-rows:1fr;opacity:1;transition:opacity .15s ease}
.nav-section-group:not([open])>.nav-section-items{display:none;opacity:0}
.nav-item,.nav-subgroup>summary{display:flex;align-items:center;gap:10px;min-height:42px;padding:9px 10px;border-radius:8px;text-decoration:none;color:var(--sidebar-text);font-size:13px;margin:1px 0;white-space:nowrap}
.nav-item:hover{background:var(--sidebar-bg-hover);color:var(--ui-brand-foreground)}
.nav-item:focus-visible{background:var(--sidebar-bg-hover);color:var(--ui-brand-foreground);outline:2px solid var(--sidebar-accent);outline-offset:1px}
.nav-item.active{background:var(--sidebar-bg-active);color:var(--ui-brand-foreground);box-shadow:inset 3px 0 0 var(--sidebar-accent)}
.nav-item.active>.v3-icon{color:var(--sidebar-accent)}
.nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
.nav-subgroup{margin:1px 0}
.nav-subgroup>summary{cursor:pointer;list-style:none}
.nav-subgroup>summary::-webkit-details-marker{display:none}
.nav-subgroup>summary:hover,.nav-subgroup>summary:focus-visible{background:var(--sidebar-bg-hover);color:var(--ui-brand-foreground);outline:2px solid var(--sidebar-accent);outline-offset:1px}
.nav-subgroup.is-active>summary{color:var(--ui-brand-foreground);background:var(--sidebar-bg-hover)}
.nav-subgroup.is-active>summary>.v3-icon:first-child{color:var(--sidebar-accent)}
.nav-chevron{width:14px;height:14px;margin-left:auto;transition:transform .15s ease}
.nav-subgroup[open]>summary .nav-chevron{transform:rotate(90deg)}
.nav-group-items{padding:0 0 3px 14px}
.nav-group-items .nav-item{font-size:12.5px;color:var(--sidebar-text)}
.user-avatar{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:var(--sidebar-bg-active);color:var(--sidebar-accent);font-size:13px;font-weight:800;flex:0 0 auto}
.topbar-account-copy{min-width:0;max-width:150px}
.user-name,.user-role{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-name{font-size:13px;font-weight:650}
.user-role{font-size:11px;color:var(--ui-muted);margin-top:2px}
.account-chevron{width:14px;height:14px;transition:transform .15s ease}
.topbar-account{position:relative}
.topbar-account>summary{display:flex;align-items:center;gap:9px;min-height:38px;padding:2px 7px 2px 3px;border:1px solid var(--ui-border);border-radius:999px;background:var(--ui-surface);color:var(--ui-text);cursor:pointer;list-style:none}
.topbar-account>summary::-webkit-details-marker{display:none}
.topbar-account>summary:hover,.topbar-account>summary:focus-visible,.topbar-account[open]>summary{background:var(--ui-surface-hover);border-color:var(--ui-border-strong);outline:none}
.topbar-account>summary:focus-visible{box-shadow:var(--ui-focus-ring)}
.topbar-account[open] .account-chevron{transform:rotate(90deg)}
.account-menu{position:absolute;z-index:var(--ui-z-dropdown,500);top:calc(100% + 8px);right:0;width:260px;padding:7px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-surface-elevated);color:var(--ui-text);box-shadow:var(--ui-elevation-floating,0 14px 34px rgba(0,0,0,.24))}
.account-menu-identity{padding:9px 10px 11px;margin-bottom:4px;border-bottom:1px solid var(--ui-border)}
.account-menu-identity strong,.account-menu-identity span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu-identity strong{font-size:13px}
.account-menu-identity span{margin-top:3px;color:var(--ui-muted);font-size:11px}
.logout-button{display:flex;align-items:center;gap:9px;width:100%;border:0;background:transparent;color:var(--ui-text);border-radius:7px;padding:9px 10px;cursor:pointer;text-align:left;text-decoration:none}
.logout-button:hover,.logout-button:focus-visible{background:var(--ui-surface-hover);outline:none}
.main{margin-left:var(--sidebar-width);min-height:100vh;transition:margin-left .18s ease}
.topbar{height:78px;background:var(--ui-surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:20}
.topbar-left{display:flex;align-items:center;gap:14px}
.mobile-brand{display:none;align-items:center;gap:7px;color:var(--ui-text);font-size:12px;font-weight:800;letter-spacing:.08em;text-decoration:none}
.mobile-brand img{width:28px;height:28px;object-fit:contain}
.menu-button{display:none;border:1px solid var(--border);background:var(--ui-surface);border-radius:8px;padding:8px 10px;cursor:pointer}
.page-kicker{font-size:12px;color:var(--muted);font-weight:650}
.page-title{font-size:21px;margin:2px 0 0;line-height:1.2}
.tenant-chip{background:var(--ui-surface-muted);color:var(--ui-text-secondary);border-radius:999px;padding:8px 12px;font-size:12px;font-weight:650}
.shell-scope-switcher select{max-width:260px;min-height:36px;padding:7px 30px 7px 10px;border:1px solid var(--ui-border);border-radius:999px;background:var(--ui-surface);color:var(--ui-text);font-size:12px;font-weight:650}
.shell-scope-switcher select:focus-visible{outline:none;box-shadow:var(--ui-focus-ring)}
.content{padding:26px 28px 50px;max-width:1680px;margin:0 auto}
.alert{border-radius:8px;padding:12px 14px;margin-bottom:16px;font-size:14px}
.alert.success{background:var(--success-bg);color:var(--success)}
.alert.error{background:var(--danger-bg);color:var(--danger)}
.toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.tenant-filter label{display:block;font-size:12px;color:var(--muted);font-weight:650;margin-bottom:5px}
.tenant-filter select{min-width:280px;border:1px solid var(--ui-border-strong);border-radius:8px;background:var(--ui-surface);padding:9px 11px}
.metric-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:14px}
.metric-card{background:var(--panel);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:12px;padding:17px}
.metric-label{font-size:12px;color:var(--muted);font-weight:650}
.metric-value{font-size:30px;font-weight:760;letter-spacing:-.04em;margin:7px 0}
.metric-total{font-size:16px;color:var(--ui-muted);font-weight:650}
.metric-foot{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--ui-muted)}
.status-dot.online{background:var(--ui-success)}
.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px;margin-top:16px}
.panel{background:var(--ui-surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:18px;margin-top:16px}
.dashboard-grid .panel{margin-top:0}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:15px}
.panel-head h2{font-size:16px;margin:0}
.panel-head p{font-size:12px;color:var(--muted);margin:4px 0 0}
.text-link{color:var(--primary);font-size:12px;text-decoration:none;font-weight:650}
.health-list{display:flex;flex-direction:column}
.health-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}
.health-row:last-child{border-bottom:0}
.health-row strong{display:block;font-size:13px}
.health-row span:not(.status-badge){display:block;font-size:12px;color:var(--muted);margin-top:3px}
.status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700;white-space:nowrap}
.status-badge.success{color:var(--success);background:var(--success-bg)}
.status-badge.warning{color:var(--warning);background:var(--warning-bg)}
.status-badge.neutral{color:var(--ui-text-secondary);background:var(--ui-surface-muted)}
.performance-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.performance-item{border:1px solid var(--border);background:var(--ui-surface-soft);border-radius:9px;padding:14px}
.performance-item span{display:block;color:var(--muted);font-size:12px}
.performance-item strong{display:block;margin-top:7px;font-size:22px}
.quick-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}
.quick-card{text-decoration:none;border:1px solid var(--border);border-radius:9px;padding:14px;background:var(--ui-surface-soft);transition:.15s ease}
.quick-card:hover{border-color:var(--ui-primary);background:var(--primary-soft);transform:translateY(-1px)}
.quick-card strong{display:block;font-size:13px}
.quick-card span{display:block;font-size:11px;color:var(--muted);margin-top:4px;line-height:1.4}
.table-wrap{overflow:auto}
.data-table{width:100%;border-collapse:collapse;min-width:980px}
.data-table th,.data-table td{text-align:left;border-bottom:1px solid var(--border);padding:10px 8px;font-size:12px;vertical-align:middle}
.data-table th{color:var(--muted);font-size:11px;font-weight:700;background:var(--ui-surface-soft)}
.data-table tbody tr:hover{background:var(--ui-surface-soft)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.nowrap{white-space:nowrap}
.empty-state{text-align:center!important;color:var(--muted);padding:28px!important}
@media(max-width:1280px){
    .metric-grid{grid-template-columns:repeat(3,1fr)}
    .quick-grid{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:981px){
    html.sidebar-collapsed{--sidebar-width:76px}
    html.sidebar-collapsed .brand{justify-content:center;padding-inline:9px}
    html.sidebar-collapsed .brand-link{justify-content:center;padding:6px}
    html.sidebar-collapsed .brand-mark{width:36px;height:36px}
    html.sidebar-collapsed .brand-copy,
    html.sidebar-collapsed .nav-label,
    html.sidebar-collapsed .nav-section-title,
    html.sidebar-collapsed .nav-section-chevron,
    html.sidebar-collapsed .account-copy,
    html.sidebar-collapsed .account-chevron{display:none}
    html.sidebar-collapsed .sidebar-collapse-button{position:absolute;top:55px;width:26px;height:26px;background:var(--sidebar-bg-secondary);z-index:2}
    html.sidebar-collapsed .side-nav{padding-inline:10px;padding-top:12px}
    html.sidebar-collapsed .nav-section-group{margin:6px 14px;border-top:1px solid rgba(255,255,255,.09)}
    html.sidebar-collapsed .nav-section-group:first-child{margin-top:0;border-top:0}
    html.sidebar-collapsed .nav-section-group>summary{display:none}
    html.sidebar-collapsed .nav-section-group>.nav-section-items,
    html.sidebar-collapsed .nav-section-group:not([open])>.nav-section-items{display:block;opacity:1}
    html.sidebar-collapsed .nav-item{justify-content:center;min-height:43px;padding:10px}
    html.sidebar-collapsed .nav-item.active{box-shadow:inset 3px 0 0 var(--sidebar-accent)}
    html.sidebar-collapsed .nav-subgroup>summary{display:none}
    html.sidebar-collapsed .nav-subgroup>.nav-group-items{display:block;padding:0}
    html.sidebar-collapsed .nav-subgroup:not([open])>.nav-group-items{display:block}
    html.sidebar-collapsed .nav-group-items .nav-item{justify-content:center;min-height:43px;padding:10px}
}
@media(max-width:980px){
    .sidebar{width:268px;transform:translateX(-100%)}
    body.sidebar-open .sidebar{transform:translateX(0)}
    .main{margin-left:0}
    .sidebar-collapse-button{display:none}
    .menu-button{display:inline-flex;align-items:center;justify-content:center}
    .mobile-brand{display:inline-flex}
    .topbar-account-copy{display:none}
    .topbar-account>summary{width:38px;padding:1px;justify-content:center}
    .topbar-account .account-chevron{display:none}
    body.sidebar-open::before{content:"";position:fixed;inset:0;z-index:45;background:rgba(15,23,42,.48)}
    .dashboard-grid{grid-template-columns:1fr}
    .topbar{padding:0 18px}
    .content{padding:20px 18px 40px}
}
@media(max-width:680px){
    .metric-grid{grid-template-columns:repeat(2,1fr)}
    .quick-grid{grid-template-columns:repeat(2,1fr)}
    .toolbar{align-items:stretch;flex-direction:column}
    .tenant-filter select{width:100%;min-width:0}
    .tenant-chip{display:none}
    .topbar-page-identity{display:none}
    .shell-scope-switcher select{width:126px;max-width:32vw;text-overflow:ellipsis}
}
@media(max-width:430px){
    .metric-grid,.quick-grid,.performance-grid{grid-template-columns:1fr}
}
html[data-theme="dark"] body{color-scheme:dark}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .panel{background:var(--panel)}
html[data-theme="dark"] .tenant-chip,
html[data-theme="dark"] .performance-item,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .data-table th{background:var(--ui-surface-soft);color:var(--text)}
html[data-theme="dark"] .quick-card:hover{background:var(--ui-brand-soft);border-color:var(--ui-primary)}
html[data-theme="dark"] .data-table tbody tr:hover{background:var(--ui-surface-soft)}
html[data-theme="dark"] .tenant-filter select,
html[data-theme="dark"] .menu-button,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:var(--ui-surface-soft);color:var(--text);border-color:var(--ui-border)}
html[data-theme="dark"] .status-badge.neutral{background:var(--ui-surface-muted);color:var(--ui-text)}
html[data-theme="dark"] .logout-button{border-color:var(--ui-border)}
html[data-theme="dark"] .topbar-account>summary,
html[data-theme="dark"] .account-menu,
html[data-theme="dark"] .shell-scope-switcher select{background:var(--ui-surface-soft);color:var(--ui-text);border-color:var(--ui-border)}
.topbar-actions{display:flex;align-items:center;gap:10px}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--ui-border-strong);background:var(--ui-surface);color:var(--ui-text-secondary);border-radius:999px;padding:7px 11px;font-size:12px;font-weight:650;cursor:pointer}
.theme-toggle:hover{background:var(--ui-surface-hover)}
html[data-theme="dark"] .theme-toggle{background:var(--ui-surface-soft);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme="dark"] .theme-toggle:hover{background:var(--ui-surface-hover)}
@media(prefers-reduced-motion:reduce){.sidebar,.main,.nav-chevron,.nav-section-chevron,.nav-section-items{transition:none}.side-nav{scroll-behavior:auto}}

/* VOYLOX V4 premium shell foundation. Feature layouts remain intentionally unchanged. */
.v4-skip-link{position:fixed;z-index:var(--ui-z-toast,1000);top:10px;left:50%;padding:9px 14px;border-radius:var(--ui-radius-sm,8px);background:var(--ui-brand);color:var(--ui-brand-foreground);font-size:13px;font-weight:700;text-decoration:none;transform:translate(-50%,-160%);transition:transform var(--ui-motion-fast,120ms) var(--ui-motion-ease,ease)}
.v4-skip-link:focus{transform:translate(-50%,0)}
.sidebar{box-shadow:10px 0 32px rgba(12,8,24,.08)}
.brand{min-height:76px;padding:12px 14px}
.brand-link{border-radius:var(--ui-radius-sm,8px)}
.brand-name{font-size:14px;letter-spacing:.08em}
.brand-sub{font-size:11px}
.nav-item,.nav-subgroup>summary{min-height:40px;border-radius:var(--ui-radius-sm,8px);transition:background-color var(--ui-motion-fast,120ms) var(--ui-motion-ease,ease),color var(--ui-motion-fast,120ms) var(--ui-motion-ease,ease)}
.nav-item.active{background:linear-gradient(90deg,rgba(139,92,246,.25),rgba(103,232,249,.08));box-shadow:inset 2px 0 0 var(--sidebar-accent)}
.account-menu{border-radius:var(--ui-radius,12px);box-shadow:var(--ui-elevation-floating,0 14px 34px rgba(0,0,0,.3))}
.topbar{height:76px;background:color-mix(in srgb,var(--ui-surface) 92%,transparent);border-color:var(--ui-border);backdrop-filter:blur(16px);z-index:var(--ui-z-sticky,400)}
.page-kicker{font-size:11px;font-weight:700;letter-spacing:.055em;text-transform:uppercase}
.page-title{font-size:var(--ui-type-page-title,22px);font-weight:var(--ui-weight-bold,750);letter-spacing:-.025em}
.content{width:100%;max-width:var(--ui-content-wide,1680px);padding:var(--ui-space-6,24px) var(--ui-space-8,32px) var(--ui-space-12,48px)}
.tenant-chip{border:1px solid var(--ui-border);background:var(--ui-surface-soft);color:var(--ui-text-secondary)}
.theme-toggle{min-height:var(--ui-control-height-small,36px);border-color:var(--ui-border);background:var(--ui-surface);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast,120ms),border-color var(--ui-motion-fast,120ms)}
#themeIcon{display:inline-grid;place-items:center}
#themeIcon .v3-icon{width:var(--ui-icon,16px);height:var(--ui-icon,16px)}
.theme-icon-sun{display:none}
html[data-theme="dark"] .theme-icon-moon{display:none}
html[data-theme="dark"] .theme-icon-sun{display:block}
html[data-theme="dark"] .topbar{background:color-mix(in srgb,var(--ui-surface) 92%,transparent)}
@media(max-width:980px){.content{padding:var(--ui-space-5,20px) var(--ui-space-4,16px) var(--ui-space-10,40px)}}
@media(max-width:390px){.topbar{height:68px;padding:0 10px}.topbar-left,.topbar-actions{gap:6px}.page-title{font-size:19px}.theme-toggle{width:36px;padding:0;justify-content:center}.theme-toggle #themeLabel{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.shell-scope-switcher select{width:112px;max-width:112px}.account-menu{position:fixed;top:62px;right:10px;width:min(280px,calc(100vw - 20px))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}


/* Consolidated module layer: preserved after shell rules from former modules.css. */

/* MT-PBX Shared Module UI V1 */

.module-subtitle{
    margin:0 0 18px;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}
.validation-box{
    margin-bottom:16px;
    padding:12px 14px;
    border:1px solid color-mix(in srgb,var(--danger) 28%,transparent);
    border-radius:9px;
    background:var(--danger-bg);
    color:var(--danger);
    font-size:13px;
}
.validation-box div+div{margin-top:4px}
.module-toolbar{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
}
.filter-panel,
.form-panel{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow);
    padding:16px;
    margin-bottom:16px;
}
.filter-row,
.form-row{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:10px;
}
.field{
    display:flex;
    flex-direction:column;
    gap:5px;
    min-width:150px;
}
.field.grow{flex:1 1 220px}
.field label{
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.control,
.field input,
.field select,
.table-control{
    width:100%;
    min-height:38px;
    border:1px solid var(--ui-border-strong);
    border-radius:8px;
    background:var(--ui-surface);
    color:var(--ui-text-secondary);
    padding:8px 10px;
    outline:none;
}
.control:focus,
.field input:focus,
.field select:focus,
.table-control:focus{
    border-color:var(--ui-info);
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.field select{min-width:165px}
.action-row{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
}
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:36px;
    border:1px solid transparent;
    border-radius:8px;
    padding:7px 11px;
    cursor:pointer;
    text-decoration:none;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}
.btn.primary{
    background:var(--primary);
    color:var(--ui-brand-foreground);
}
.btn.secondary{
    background:var(--ui-surface);
    border-color:var(--ui-border-strong);
    color:var(--ui-text-secondary);
}
.btn.warning{
    background:var(--warning-bg);
    color:var(--warning);
    border-color:color-mix(in srgb,var(--warning) 18%,transparent);
}
.btn.danger{
    background:var(--danger-bg);
    color:var(--danger);
    border-color:color-mix(in srgb,var(--danger) 18%,transparent);
}
.btn:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.module-card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow);
    overflow:hidden;
    margin-bottom:16px;
}
.module-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding:16px 17px 0;
}
.module-card-head h2{
    margin:0;
    font-size:15px;
}
.module-card-head p{
    margin:4px 0 0;
    font-size:12px;
    color:var(--muted);
}
.module-table-wrap{
    width:100%;
    overflow:auto;
}
.module-table{
    width:100%;
    border-collapse:collapse;
    min-width:980px;
}
.module-table th,
.module-table td{
    padding:11px 12px;
    border-bottom:1px solid var(--border);
    text-align:left;
    vertical-align:middle;
    font-size:12px;
}
.module-table th{
    color:var(--muted);
    background:var(--ui-surface-soft);
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}
.module-table tbody tr:hover{
    background:var(--ui-surface-soft);
}
.module-table tr:last-child td{
    border-bottom:0;
}
.module-table .table-control{
    min-width:120px;
    min-height:34px;
    padding:6px 8px;
    font-size:12px;
}
.module-table .wide-control{min-width:190px}
.module-table .actions-cell{min-width:280px}
.badge{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:4px 8px;
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}
.badge.success{
    background:var(--success-bg);
    color:var(--success);
}
.badge.warning{
    background:var(--warning-bg);
    color:var(--warning);
}
.badge.danger{
    background:var(--danger-bg);
    color:var(--danger);
}
.badge.info{
    background:var(--primary-soft);
    color:var(--primary);
}
.badge.neutral{
    background:var(--ui-surface-muted);
    color:var(--ui-text-secondary);
}
.help-text,
.module-note{
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
}
.module-note{
    margin:12px 2px 18px;
}
.empty-row{
    padding:28px 14px!important;
    text-align:center!important;
    color:var(--muted);
}
.pagination{
    margin-top:16px;
}
.pagination nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}
.pagination nav>div{
    display:flex;
    align-items:center;
    gap:6px;
}
.pagination a,
.pagination span[aria-current="page"]>span,
.pagination span[aria-disabled="true"]>span{
    display:inline-flex;
    min-width:34px;
    min-height:34px;
    align-items:center;
    justify-content:center;
    border:1px solid var(--border);
    border-radius:7px;
    background:var(--panel);
    color:var(--text);
    text-decoration:none;
    padding:6px 9px;
    font-size:12px;
}
.pagination span[aria-current="page"]>span{
    background:var(--primary);
    border-color:var(--primary);
    color:var(--ui-brand-foreground);
}
.pagination svg{
    width:16px;
    height:16px;
}
.pagination p{
    color:var(--muted);
    font-size:12px;
}
.mono{
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}
.muted{color:var(--muted)}
.nowrap{white-space:nowrap}
.audio-control{
    width:210px;
    height:32px;
}
.stats-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(145px,1fr));
    gap:12px;
    margin-bottom:16px;
}
.stat-card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow);
    padding:15px;
}
.stat-label{
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.stat-value{
    margin-top:6px;
    font-size:25px;
    font-weight:760;
    letter-spacing:-.03em;
}
.stat-foot{
    color:var(--muted);
    font-size:11px;
    margin-top:3px;
}
.notice{
    padding:12px 14px;
    margin-bottom:16px;
    border:1px solid color-mix(in srgb,var(--warning) 18%,transparent);
    border-radius:9px;
    background:var(--warning-bg);
    color:var(--warning);
    font-size:12px;
}
.timeline{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:14px 0 4px;
}
.timeline-item{
    border-left:3px solid var(--border);
    background:var(--ui-surface-soft);
    border-radius:5px;
    padding:10px 12px;
}
.timeline-title{
    font-size:12px;
    font-weight:750;
}
.timeline-detail{
    margin-top:4px;
    color:var(--muted);
    font-size:11px;
    overflow-wrap:anywhere;
}
.section-title{
    margin:0 0 12px;
    font-size:15px;
}
.technical-details summary{
    cursor:pointer;
    font-size:12px;
    font-weight:700;
    color:var(--primary);
    padding:4px 0;
}
.target-stack select{
    min-width:190px;
}
html[data-theme="dark"] .control,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .table-control,
html[data-theme="dark"] .btn.secondary{
    background:var(--ui-surface-soft);
    border-color:var(--ui-border);
    color:var(--text);
}
html[data-theme="dark"] .module-table th,
html[data-theme="dark"] .module-table tbody tr:hover,
html[data-theme="dark"] .timeline-item{
    background:var(--ui-surface-soft);
}
html[data-theme="dark"] .badge.neutral{
    background:var(--ui-surface-muted);
    color:var(--ui-text);
}
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span[aria-disabled="true"]>span{
    background:var(--ui-surface-soft);
    border-color:var(--ui-border);
}
@media(max-width:1280px){
    .stats-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
    .module-toolbar{
        align-items:stretch;
        flex-direction:column;
    }
    .filter-row,
    .form-row{
        display:grid;
        grid-template-columns:1fr;
    }
    .field,
    .field.grow{
        min-width:0;
    }
    .field select{
        min-width:0;
    }
    .stats-grid{
        grid-template-columns:repeat(2,1fr);
    }
}
@media(max-width:430px){
    .stats-grid{grid-template-columns:1fr}
}
