/* EV License · adapted from StyleKit's MIT shadcn analytics layout. */
input[type=password]::-ms-reveal,input[type=password]::-ms-clear { display:none; }
.login-remember { margin-bottom:4px; }
.login-submit[aria-busy=true] { cursor:wait; opacity:.65; }
:root {
  color-scheme:light;
  --bg:#fff;
  --surface:#fff;
  --subtle:#fafafa;
  --hover:#f4f4f5;
  --ink:#18181b;
  --muted:#71717a;
  --line:#e7e7eb;
  --strong-line:#d4d4d8;
  --accent:#18181b;
  --accent-ink:#fafafa;
  --soft:#f4f4f5;
  --teal:#18181b;
  --green:#168363;
  --green-bg:#effaf5;
  --danger:#c44848;
  --danger-bg:#fff4f3;
  --shadow:0 1px 2px #18181b06;
  --sidebar:232px;
  --radius:10px;
  --font:"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
  --text-xs:12px;
  --text-sm:13px;
  --text-base:14px;
  --text-lg:16px;
  --text-title:28px}

:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#101012;
  --surface:#171719;
  --subtle:#141416;
  --hover:#252528;
  --ink:#f4f4f5;
  --muted:#a1a1aa;
  --line:#2c2c30;
  --strong-line:#45454d;
  --accent:#fafafa;
  --accent-ink:#18181b;
  --soft:#242427;
  --teal:#f4f4f5;
  --green:#69c9a8;
  --green-bg:#182d26;
  --danger:#f08a88;
  --danger-bg:#341f22;
  --shadow:0 1px 2px #0003}

* {
  box-sizing:border-box}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:var(--text-base)/1.6 var(--font);
  -webkit-font-smoothing:antialiased}
button,input,select,textarea {
  font:inherit}
button,a,input,select,textarea,summary {
  -webkit-tap-highlight-color:transparent}
button,.button {
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid transparent;
  border-radius:7px;
  min-height:34px;
  padding:7px 12px;
  font-weight:500;
  text-decoration:none;
  white-space:nowrap;
  transition:background .16s,border-color .16s,box-shadow .16s,transform .16s}
button:active:not(:disabled) {
  transform:translateY(1px)}
button:disabled {
  opacity:.4;
  cursor:not-allowed}
button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:2px solid var(--muted);
  outline-offset:3px}
.primary {
  background:var(--accent);
  color:var(--accent-ink);
  box-shadow:var(--shadow)}
.primary:hover:not(:disabled) {
  opacity:.86}
.secondary {
  background:var(--surface);
  color:var(--ink);
  border-color:var(--line);
  box-shadow:var(--shadow)}
.secondary:hover:not(:disabled) {
  background:var(--hover);
  border-color:var(--strong-line)}
.ghost {
  background:transparent;
  color:var(--muted);
  justify-content:flex-start}
.ghost:hover {
  background:var(--hover);
  color:var(--ink)}
.danger {
  color:var(--danger);
  background:var(--surface);
  border-color:var(--line)}
.danger:hover:not(:disabled) {
  background:var(--danger-bg);
  border-color:var(--danger)}
.icon-button {
  width:32px;
  height:32px;
  min-height:32px;
  padding:6px;
  border:0;
  background:transparent;
  color:var(--muted);
  flex-shrink:0}
.icon-button:hover {
  background:var(--hover);
  color:var(--ink)}
.icon {
  display:block;
  width:17px;
  height:17px;
  flex-shrink:0;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none}
img {
  max-width:100%}
.hidden {
  display:none!important}
[hidden] {
  display:none!important}
h1,h2,h3,p {
  margin-top:0}
h1,h2,h3 {
  color:var(--ink)}
h1 {
  font-size:var(--text-title);
  line-height:1.3;
  font-weight:600;
  letter-spacing:-.9px;
  margin-bottom:7px}
h2 {
  font-size:20px;
  letter-spacing:-.5px;
  font-weight:600}
h3 {
  font-size:var(--text-sm);
  font-weight:600;
  margin:24px 0 14px}
.muted {
  color:var(--muted);
  line-height:1.7}
.eyebrow {
  display:block;
  font-size:var(--text-xs);
  font-weight:500;
  letter-spacing:1.2px;
  color:var(--muted)}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0}
kbd {
  font:var(--text-xs) var(--font);
  border:1px solid var(--line);
  border-radius:4px;
  color:var(--muted);
  padding:2px 4px;
  background:var(--surface)}

/* Workspace frame */
.shell {
  min-height:100vh}
.sidebar {
  position:fixed;
  z-index:30;
  inset:0 auto 0 0;
  width:var(--sidebar);
  display:flex;
  flex-direction:column;
  background:var(--subtle);
  border-right:1px solid var(--line);
  padding:24px 14px 12px;
  overflow-y:auto;
  overflow-x:hidden;
  transition:width .2s,transform .2s}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 8px 0 5px;
  text-decoration:none;
  color:var(--ink);
  margin-bottom:26px;
  min-height:36px}
.brand img {
  flex-shrink:0;
  border-radius:9px}
.brand strong {
  display:block;
  font-size:var(--text-lg);
  letter-spacing:-.5px;
  font-weight:600}
.brand span {
  display:block;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:2px}
.nav-search {
  width:100%;
  display:flex;
  justify-content:flex-start;
  background:var(--surface);
  border-color:var(--line);
  box-shadow:var(--shadow);
  color:var(--muted);
  font-size:var(--text-sm);
  margin-bottom:24px;
  padding:7px 9px}
.nav-search kbd {
  margin-left:auto}
.nav-section {
  font-size:var(--text-xs);
  color:var(--muted);
  padding:0 10px;
  letter-spacing:.6px;
  margin:20px 0 7px}
.nav-section:first-child {
  margin-top:0}
nav {
  display:flex;
  flex-direction:column;
  gap:3px}
nav button {
  background:transparent;
  color:var(--muted);
  width:100%;
  justify-content:flex-start;
  min-height:37px;
  padding:8px 10px;
  font-size:var(--text-sm);
  border-radius:6px}
nav button:hover {
  background:var(--hover);
  color:var(--ink)}
nav button.active {
  background:var(--accent);
  color:var(--accent-ink);
  box-shadow:var(--shadow)}
nav button.active .nav-icon {
  color:inherit}
.nav-icon {
  display:flex;
  width:18px;
  margin-right:2px}
.nav-icon .icon {
  width:16px;
  height:16px}
.side-bottom {
  margin-top:auto;
  padding-top:26px}
.workspace-status {
  display:flex;
  gap:6px;
  align-items:center;
  color:var(--muted);
  font-size:var(--text-xs);
  padding:0 9px 13px;
  border-bottom:1px solid var(--line);
  margin-bottom:10px}
.workspace-version {
  margin-left:auto;
  font-size:var(--text-xs);
  letter-spacing:.5px}
.security-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--green);
  flex-shrink:0}
.avatar {
  width:33px;
  height:33px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:9px;
  color:var(--ink);
  font-weight:600;
  font-size:var(--text-sm);
  flex-shrink:0}
.account-menu summary {
  display:flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
  list-style:none;
  padding:7px;
  border-radius:7px}
.account-menu summary::-webkit-details-marker {
  display:none}
.account-menu summary:hover,.account-menu[open] summary {
  background:var(--hover)}
.account-menu summary>.icon,.account-menu summary>[data-icon] {
  margin-left:auto}
.account-menu #identity {
  min-width:0;
  flex:1;
  line-height:1.6;
  overflow:hidden}
.account-menu #identity strong {
  display:block;
  font-size:var(--text-sm);
  font-weight:600;
  text-overflow:ellipsis;
  overflow:hidden}
.account-menu #identity div {
  font-size:var(--text-xs);
  color:var(--muted);
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap}
.account-actions {
  padding:5px;
  margin-top:5px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px}
.account-actions button {
  width:100%;
  font-size:var(--text-sm)}
.account-actions button:last-child {
  color:var(--danger)}
main {
  margin-left:var(--sidebar);
  min-width:0;
  transition:margin-left .2s}
.topbar {
  height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:0 30px;
  border-bottom:1px solid var(--line);
  background:var(--bg);
  position:sticky;
  top:0;
  z-index:20}
.topbar-start,.topbar-end {
  display:flex;
  gap:13px;
  align-items:center;
  min-width:0}
.topbar-start {
  font-size:var(--text-sm)}
.topbar-divider {
  height:16px;
  width:1px;
  background:var(--line);
  margin:0 2px}
.breadcrumb-root,.breadcrumb-slash {
  color:var(--muted)}
.breadcrumb-slash {
  opacity:.45}
#breadcrumb {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap}
.role-chip {
  font-size:var(--text-xs);
  padding:3px 8px;
  background:var(--subtle);
  border:1px solid var(--line);
  border-radius:5px;
  color:var(--muted)}
.page-container {
  padding:29px 30px 14px;
  max-width:1680px;
  margin:0 auto}
.page-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:26px}
.description {
  font-size:var(--text-sm);
  margin-bottom:0;
  max-width:740px}
.header-actions {
  display:flex;
  align-items:center;
  gap:12px}
.today-label {
  font-size:var(--text-sm);
  color:var(--muted);
  white-space:nowrap}
.header-actions button {
  font-size:var(--text-sm)}
.header-actions .icon {
  width:14px;
  height:14px}
footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:30px;
  padding:17px 0 5px;
  border-top:1px solid var(--line)}
footer span:first-child {
  font-weight:600;
  color:var(--ink);
  letter-spacing:-.1px}
.sidebar-scrim {
  display:none}
body.sidebar-collapsed {
  --sidebar:68px}
body.sidebar-collapsed .sidebar {
  padding-left:10px;
  padding-right:10px}
body.sidebar-collapsed .brand {
  padding-left:6px}
body.sidebar-collapsed .brand div,body.sidebar-collapsed .nav-search span:not([data-icon]),body.sidebar-collapsed .nav-search kbd,body.sidebar-collapsed .nav-section,body.sidebar-collapsed nav button>span:last-child {
  display:none}
body.sidebar-collapsed .nav-search,body.sidebar-collapsed nav button {
  justify-content:center;
  padding:8px}
body.sidebar-collapsed .nav-icon {
  margin:0}
body.sidebar-collapsed .nav-search {
  margin-bottom:14px}

@media(min-width:751px) {
  body.sidebar-collapsed .workspace-status,body.sidebar-collapsed #identity,body.sidebar-collapsed .account-menu summary>[data-icon] {
  display:none}
body.sidebar-collapsed .account-menu summary {
  padding:6px;
  justify-content:center}
}

/* Dashboard */
.stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:20px}
.stat {
  min-width:0;
  position:relative;
  padding:21px 21px 18px;
  background:linear-gradient(175deg,var(--surface),var(--subtle));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  transition:box-shadow .2s,transform .2s}
.stat:hover {
  transform:translateY(-2px);
  box-shadow:0 5px 18px #18181b08}
.stat-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:var(--text-sm);
  color:var(--muted);
  margin-bottom:17px}
.stat-label .icon {
  width:15px;
  height:15px;
  color:var(--muted)}
.stat-number {
  font-size:30px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:-1.2px;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere}
.stat-caption {
  margin:14px 0 0;
  font-size:var(--text-sm);
  color:var(--ink)}
.stat-detail {
  display:block;
  color:var(--muted);
  font-size:var(--text-xs);
  margin-top:3px}
.metric-strip {
  display:flex;
  flex-wrap:wrap;
  gap:6px 24px;
  padding:4px 1px 24px;
  font-size:var(--text-sm);
  color:var(--muted)}
.metric-strip strong {
  font-size:var(--text-sm);
  font-weight:500;
  margin-left:6px;
  color:var(--ink)}
.dashboard-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:18px;
  margin-bottom:22px}
.panel {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  min-width:0}
.panel-title {
  padding:19px 22px;
  font-size:var(--text-sm);
  font-weight:600;
  border-bottom:1px solid var(--line)}
.panel-body {
  padding:22px}
.chart-panel {
  padding:22px 22px 15px}
.chart-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px}
.chart-head h2 {
  font-size:var(--text-base);
  letter-spacing:-.2px;
  margin:0 0 5px}
.chart-head p {
  font-size:var(--text-sm);
  color:var(--muted);
  margin:0}
.segmented {
  display:flex;
  border:1px solid var(--line);
  padding:3px;
  border-radius:7px;
  gap:3px;
  background:var(--subtle);
  flex-shrink:0}
.segmented button {
  font-size:var(--text-xs);
  padding:4px 10px;
  min-height:26px;
  background:transparent;
  color:var(--muted);
  border-radius:4px}
.segmented button.active {
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 1px 4px #00000014}
.chart-wrap {
  position:relative;
  min-width:0}
.trend-svg {
  width:100%;
  height:210px;
  display:block;
  overflow:visible}
.chart-grid-line {
  stroke:var(--line);
  stroke-dasharray:3 5;
  stroke-width:1}
.chart-label {
  fill:var(--muted);
  font:var(--text-xs) var(--font)}
.chart-line {
  stroke:var(--ink);
  stroke-width:2;
  fill:none;
  vector-effect:non-scaling-stroke}
.chart-line.secondary-line {
  stroke:var(--muted);
  stroke-dasharray:4 4;
  stroke-width:1.5}
.chart-area {
  fill:var(--soft)}
.chart-hit {
  fill:transparent;
  cursor:crosshair}
.chart-tooltip {
  position:absolute;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 13px;
  font-size:var(--text-sm);
  pointer-events:none;
  box-shadow:0 6px 30px #00000016;
  z-index:5;
  top:10px;
  left:45px;
  line-height:1.9}
.chart-tooltip strong {
  display:block}
.chart-legend {
  display:flex;
  align-items:center;
  gap:18px;
  color:var(--muted);
  font-size:var(--text-xs);
  margin-top:10px}
.chart-legend span {
  display:flex;
  align-items:center;
  gap:6px}
.legend-line {
  display:inline-block;
  width:17px;
  height:2px;
  background:var(--ink)}
.legend-line.dashed {
  background:repeating-linear-gradient(to right,var(--muted) 0 4px,transparent 4px 7px)}
.chart-detail {
  margin-top:12px;
  font-size:var(--text-xs);
  color:var(--muted)}
.chart-detail summary {
  cursor:pointer;
  width:max-content}
.chart-detail table {
  margin-top:8px}
.chart-detail>div {
  max-height:180px;
  overflow:auto}
.status-panel {
  padding:22px}
.status-panel h2 {
  font-size:var(--text-base);
  margin:0 0 4px;
  letter-spacing:-.2px}
.status-panel>p {
  font-size:var(--text-sm);
  color:var(--muted)}
.status-meter {
  display:flex;
  height:9px;
  gap:3px;
  border-radius:3px;
  overflow:hidden;
  margin:25px 0}
.status-meter span {
  min-width:3px;
  background:var(--ink)}
.status-meter span:nth-child(2) {
  background:#a1a1aa}
.status-meter span:nth-child(3) {
  background:#d4d4d8}
.status-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:var(--text-sm);
  padding:9px 0;
  color:var(--muted)}
.status-row strong {
  color:var(--ink);
  font-size:var(--text-sm);
  font-weight:500;
  font-variant-numeric:tabular-nums}
.status-row span {
  display:flex;
  align-items:center;
  gap:7px}
.status-dot {
  width:7px;
  height:7px;
  background:var(--ink);
  border-radius:2px}
.status-row:nth-of-type(3) .status-dot {
  background:#a1a1aa}
.status-row:nth-of-type(4) .status-dot {
  background:#d4d4d8}
.status-note {
  font-size:var(--text-xs);
  color:var(--muted);
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:12px;
  line-height:1.8}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin:0 0 13px}
.section-heading h2 {
  font-size:var(--text-base);
  margin:0;
  letter-spacing:-.2px}
.section-heading p {
  font-size:var(--text-sm);
  color:var(--muted);
  margin:4px 0 0}
.section-heading .quick-actions {
  margin:0}
.section-heading button {
  font-size:var(--text-sm)}
.ratio {
  display:flex;
  align-items:center;
  gap:10px}
.ratio-track {
  height:4px;
  width:70px;
  background:var(--hover);
  border-radius:2px;
  overflow:hidden}
.ratio-fill {
  height:100%;
  background:var(--ink);
  border-radius:2px}

/* Tables and task controls */
.toolbar {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:14px}
.toolbar:empty,.filters:empty {
  display:none}
.toolbar button {
  font-size:var(--text-sm);
  padding:6px 10px;
  min-height:31px}
.toolbar select {
  width:auto;
  max-width:220px;
  min-width:150px;
  font-size:var(--text-sm);
  min-height:31px;
  padding:6px 9px}
.toolbar .selection-count {
  font-size:var(--text-sm);
  color:var(--muted);
  padding:0 7px;
  margin-right:auto}
.toolbar .primary {
  margin-right:3px}
.filters {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:17px}
.filters>input {
  width:240px;
  min-width:0}
.filters>select {
  width:auto;
  max-width:240px}
.filters label {
  font-size:var(--text-sm);
  margin:0}
.filters>button {
  font-size:var(--text-sm)}
.table-wrap {
  overflow:auto;
  max-width:100%;
  scrollbar-width:thin;
  scrollbar-color:var(--strong-line) transparent}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  white-space:nowrap;
  font-size:var(--text-sm)}
th {
  background:var(--subtle);
  color:var(--muted);
  font-weight:500;
  letter-spacing:.1px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  height:42px}
td {
  padding:13px 16px;
  border-bottom:1px solid var(--line);
  max-width:290px;
  overflow:hidden;
  text-overflow:ellipsis;
  height:49px}
tbody tr:last-child td {
  border-bottom:0}
tbody tr {
  transition:background .15s}
tbody tr:hover {
  background:var(--subtle)}
tbody tr:has(input[data-row-id]:checked) {
  background:var(--soft)}
td.code {
  font-family:Consolas,"SFMono-Regular",monospace;
  font-size:var(--text-xs);
  max-width:290px}
td .row-action {
  font-size:var(--text-xs);
  padding:4px 6px;
  min-height:25px;
  background:transparent;
  color:var(--muted);
  font-weight:400}
td .row-action:hover {
  background:var(--hover);
  color:var(--ink)}
td .row-action:last-child {
  margin-right:-6px}
.badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid var(--line);
  border-radius:5px;
  padding:2px 7px;
  min-height:22px;
  background:var(--surface);
  font-size:var(--text-xs);
  color:var(--ink);
  font-weight:400}
.badge:before {
  content:'';
  width:4px;
  height:4px;
  border-radius:50%;
  background:var(--green)}
.badge.bad {
  color:var(--danger);
  background:var(--danger-bg);
  border-color:transparent}
.badge.bad:before {
  background:var(--danger)}
.badge.neutral:before {
  background:var(--muted)}
.empty {
  padding:54px 24px;
  text-align:center;
  color:var(--muted);
  font-size:var(--text-sm);
  white-space:normal}
.empty .icon {
  margin:0 auto 12px;
  width:24px;
  height:24px;
  color:var(--strong-line)}
.empty strong {
  display:block;
  color:var(--ink);
  font-size:var(--text-sm);
  margin-bottom:6px}
.pagination {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  font-size:var(--text-sm);
  color:var(--muted);
  margin-top:16px}
.pagination>span:first-child {
  margin-right:auto}
.pagination button {
  font-size:var(--text-sm);
  min-height:29px;
  padding:5px 9px}
.pagination select {
  width:100px;
  padding:5px 8px;
  font-size:var(--text-sm);
  min-height:29px}
.pagination input {
  max-width:62px;
  font-size:var(--text-sm);
  padding:5px 8px;
  min-height:29px}
.license-table td:first-child,.license-table th:first-child {
  position:sticky;
  left:0;
  z-index:2;
  background:var(--surface);
  width:43px}
.license-table td:nth-child(2),.license-table th:nth-child(2) {
  position:sticky;
  left:43px;
  background:var(--surface);
  z-index:2;
  border-right:1px solid var(--line)}
.license-table th:first-child,.license-table th:nth-child(2) {
  background:var(--subtle)}
.license-table tr:has(input:checked) td:first-child,.license-table tr:has(input:checked) td:nth-child(2) {
  background:var(--soft)}
.license-table .table-wrap {
  max-height:62vh}
.license-table td {
  padding:12px 14px}
.density-toggle {
  margin-left:auto}

/* Forms and editors */
input,select,textarea {
  width:100%;
  min-width:0;
  min-height:35px;
  background:var(--surface);
  color:var(--ink);
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  outline:none;
  box-shadow:var(--shadow);
  transition:border-color .15s,box-shadow .15s}
input::placeholder,textarea::placeholder {
  color:var(--muted);
  opacity:.7}
input:focus,select:focus,textarea:focus {
  border-color:var(--muted);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--muted) 12%,transparent)}
textarea {
  min-height:90px;
  resize:vertical}
label {
  display:block;
  font-size:var(--text-sm);
  font-weight:500;
  color:var(--ink);
  margin-bottom:16px}
label>input,label>select,label>textarea,label>.password-control {
  margin-top:7px}
label small {
  display:block;
  color:var(--muted);
  font-size:var(--text-xs);
  font-weight:400;
  margin-top:5px;
  line-height:1.7}
.check-label {
  display:flex;
  align-items:center;
  gap:8px;
  margin:11px 0;
  font-weight:400}
.check-label input {
  margin:0}
.check-group {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px 15px;
  margin:10px 0 18px}
.field-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 20px}
.duration-fields {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px}
.duration-fields label {
  font-size:var(--text-xs);
  color:var(--muted)}
.duration-fields input {
  font-variant-numeric:tabular-nums}
.notice {
  border:1px solid var(--line);
  background:var(--subtle);
  color:var(--muted);
  padding:12px 14px;
  border-radius:7px;
  font-size:var(--text-sm);
  line-height:1.8;
  margin:0 0 19px}
.quick-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:12px 0}
.chip {
  font-size:var(--text-xs);
  background:var(--surface);
  color:var(--muted);
  border-color:var(--line);
  padding:5px 10px;
  min-height:28px}
.chip:hover {
  color:var(--ink);
  background:var(--hover)}
.chip.active {
  background:var(--accent);
  color:var(--accent-ink);
  border-color:var(--accent)}
.search-panel {
  display:block;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:0 20px 17px;
  box-shadow:var(--shadow);
  margin-bottom:19px}
.tab-bar {
  display:flex;
  gap:24px;
  border-bottom:1px solid var(--line);
  margin-bottom:18px}
.tab {
  padding:13px 0;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  color:var(--muted);
  font-size:var(--text-sm);
  background:transparent}
.tab.active {
  border-bottom-color:var(--ink);
  color:var(--ink)}
.search-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0 16px}
.search-grid label:first-child {
  grid-column:span 2;
  grid-row:span 2}
.search-grid label:first-child textarea {
  min-height:109px}
.search-grid label:first-child small {
  margin-bottom:0}
.search-grid label {
  font-size:var(--text-xs)}
.search-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:3px}
.search-actions button {
  min-height:30px;
  font-size:var(--text-sm)}
.condition-row {
  display:grid;
  grid-template-columns:1.2fr 1fr 1.2fr 1fr auto;
  align-items:center;
  gap:8px;
  margin:11px 0}
.condition-row input {
  width:100%}
.condition-row .ghost {
  min-height:28px;
  padding:5px 9px}
.type-picker {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
  margin-bottom:25px}
.type-choice {
  position:relative;
  display:flex;
  align-items:flex-start;
  flex-direction:column;
  gap:7px;
  padding:18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--ink);
  white-space:normal;
  text-align:left}
.type-choice:hover {
  border-color:var(--strong-line);
  background:var(--subtle)}
.type-choice strong {
  font-size:var(--text-sm);
  font-weight:500}
.type-choice span {
  font-size:var(--text-sm);
  color:var(--muted)}
.type-choice small {
  font-size:var(--text-sm);
  color:var(--ink);
  margin-top:6px}
.type-choice.selected {
  border-color:var(--ink);
  background:var(--subtle);
  box-shadow:0 0 0 1px var(--ink)}
.type-choice.selected:after {
  content:'✓';
  position:absolute;
  right:12px;
  top:12px;
  font-size:var(--text-sm)}
.generate-panel {
  max-width:1040px}
.generation-totals {
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  padding:17px;
  background:var(--subtle);
  border:1px solid var(--line);
  border-radius:7px;
  margin:20px 0;
  font-size:var(--text-sm)}
.generation-totals>span {
  color:var(--muted)}
.generation-totals strong {
  font-weight:500}
.settings-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-bottom:20px}
.settings-grid .panel:first-child {
  grid-row:span 2}
.settings-grid .duration-fields {
  gap:7px}
.policy-row {
  display:flex;
  align-items:center;
  gap:17px;
  padding:14px 0;
  border-bottom:1px solid var(--line);
  font-size:var(--text-sm)}
.policy-row:last-child {
  border-bottom:0}
.policy-row span {
  flex:1;
  font-size:var(--text-sm);
  color:var(--muted)}
.permission-tristates {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 18px}
.license-summary {
  display:flex;
  align-items:center;
  gap:11px;
  padding:14px;
  background:var(--subtle);
  border:1px solid var(--line);
  border-radius:7px;
  word-break:break-all}
.detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:19px;
  margin-bottom:22px}
.detail-grid small {
  display:block;
  color:var(--muted);
  font-size:var(--text-xs);
  margin-bottom:5px}
.detail-grid div {
  font-size:var(--text-sm)}
.device-card {
  border:1px solid var(--line);
  border-radius:8px;
  padding:16px;
  margin-bottom:12px;
  overflow-wrap:anywhere}
.device-card p {
  font-size:var(--text-sm);
  margin:9px 0}
.ledger-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
  font-size:var(--text-sm)}
.ledger-row span,.ledger-row small {
  color:var(--muted)}
.detail-list {
  max-height:45vh;
  overflow:auto}
.upload-preview {
  font-size:var(--text-sm);
  max-height:250px;
  overflow:auto;
  line-height:1.9;
  color:var(--muted)}
.upload-preview strong {
  display:block;
  color:var(--ink);
  margin-bottom:10px}
.result {
  white-space:pre-wrap;
  word-break:break-all;
  font:13px/1.8 Consolas,monospace;
  background:var(--subtle);
  border:1px solid var(--line);
  padding:15px;
  border-radius:7px;
  max-height:50vh;
  overflow:auto}
.mono {
  font-family:Consolas,monospace}
.error {
  font-size:var(--text-sm);
  color:var(--danger);
  line-height:1.7;
  white-space:pre-wrap;
  margin:10px 0 0}
.intro {
  padding:22px;
  line-height:1.8;
  color:var(--muted);
  font-size:var(--text-sm)}

/* Dialogs, search and feedback */
dialog {
  width:720px;
  max-width:calc(100vw - 32px);
  max-height:90dvh;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  padding:0;
  border-radius:12px;
  box-shadow:0 24px 90px #0003;
  overflow:hidden}
dialog::backdrop {
  background:#09090b65;
  backdrop-filter:blur(4px)}
dialog[open] {
  animation:scale-in .18s ease-out}
#modal-form {
  padding:23px 26px 19px}
.modal-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  margin-bottom:22px}
.modal-head .eyebrow {
  font-size:var(--text-xs);
  letter-spacing:1px;
  margin-bottom:8px}
.modal-head h2 {
  margin:0;
  font-size:18px}
.modal-head .icon-button {
  margin-top:-3px;
  margin-right:-7px}
#modal-fields {
  max-height:calc(85dvh - 180px);
  overflow:auto;
  padding:3px 6px 3px 2px;
  scrollbar-width:thin;
  scrollbar-color:var(--line) transparent}
.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line)}
.modal-actions button {
  font-size:var(--text-sm);
  min-width:67px}
.toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:9px;
  padding:12px 18px;
  box-shadow:0 8px 28px #00000012;
  z-index:70;
  font-size:var(--text-sm);
  max-width:90vw;
  animation:toast-in .2s ease-out}
.toast:before {
  content:'✓';
  color:var(--green);
  font-weight:600}
.toast.is-error:before {
  content:'!';
  color:var(--danger)}
.command-dialog {
  width:580px;
  margin-top:min(18vh,160px);
  border-radius:12px}
.command-top {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--line)}
.command-top>.icon {
  color:var(--muted)}
.command-top input {
  border:0;
  box-shadow:none;
  padding:6px 0;
  background:none;
  font-size:var(--text-sm)}
.command-top input:focus {
  box-shadow:none}
.command-top .icon-button {
  width:auto}
.command-results {
  padding:8px;
  max-height:360px;
  overflow:auto}
.command-results button {
  width:100%;
  justify-content:flex-start;
  min-height:41px;
  color:var(--muted);
  background:transparent;
  gap:12px;
  border-radius:6px;
  font-size:var(--text-sm)}
.command-results button:hover,.command-results button.command-active {
  background:var(--hover);
  color:var(--ink)}
.command-results button small {
  margin-left:auto;
  font-size:var(--text-xs);
  color:var(--muted)}
.command-results .nav-section {
  margin:4px 0 6px}
.command-footer {
  padding:10px 17px;
  border-top:1px solid var(--line);
  display:flex;
  gap:16px;
  font-size:var(--text-xs);
  color:var(--muted)}
.command-footer span:last-child {
  margin-left:auto}

/* Login */
.login-wrap {
  min-height:100dvh;
  display:grid;
  grid-template-columns:1fr 1fr}
.login-story {
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:#171719;
  color:#fafafa;
  padding:36px 44px;
  overflow:hidden;
  min-height:100dvh}
.login-story:before {
  content:'';
  position:absolute;
  inset:0;
  background-image:linear-gradient(#ffffff05 1px,transparent 1px),linear-gradient(90deg,#ffffff05 1px,transparent 1px);
  background-size:52px 52px;
  mask-image:linear-gradient(transparent,#000)}
.login-brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:19px;
  font-weight:500;
  letter-spacing:-.5px;
  color:#fafafa;
  text-decoration:none;
  position:relative}
.login-brand img {
  border:1px solid #ffffff25;
  border-radius:9px}
.story-content {
  position:relative;
  max-width:520px;
  margin:70px 0}
.story-tag {
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid #ffffff21;
  padding:5px 10px;
  border-radius:20px;
  color:#a1a1aa;
  font-size:var(--text-xs)}
.story-tag i {
  display:block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#a7d2bf}
.story-content h1 {
  font-size:clamp(34px,3.6vw,55px);
  line-height:1.35;
  letter-spacing:-2px;
  color:#fafafa;
  margin:28px 0 22px;
  font-weight:500}
.story-content p {
  font-size:var(--text-sm);
  color:#92929c;
  line-height:2.2}
.story-symbol {
  position:absolute;
  width:270px;
  height:270px;
  right:-130px;
  bottom:-145px;
  opacity:.22;
  transform:rotate(-13deg);
  pointer-events:none}
.story-symbol img {
  width:100%;
  border:1px solid #ffffff35;
  border-radius:68px;
  box-shadow:0 0 0 24px #ffffff04,0 0 0 48px #ffffff03}
.story-foot {
  position:relative;
  display:flex;
  justify-content:space-between;
  color:#71717a;
  font-size:var(--text-xs);
  letter-spacing:1px}
.login-main {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bg);
  padding:45px 30px}
.login-card {
  width:340px;
  max-width:100%;
  animation:fade-in-up .4s ease-out}
.login-card h2 {
  font-size:26px;
  margin:9px 0 8px;
  letter-spacing:-.8px}
.login-card>.muted {
  font-size:var(--text-sm);
  margin-bottom:31px}
.login-card label {
  font-size:var(--text-sm);
  margin-bottom:20px}
.login-card input:not([type=checkbox]):not([type=radio]) {
  height:41px;
  background:var(--bg);
  font-size:var(--text-sm)}
.password-control {
  display:flex;
  position:relative}
.password-control input {
  padding-right:48px}
.input-action {
  position:absolute;
  right:3px;
  top:4px;
  height:33px;
  min-height:33px;
  font-size:var(--text-xs);
  padding:5px 8px;
  background:transparent;
  color:var(--muted)}
.input-action:hover {
  color:var(--ink)}
.login-submit {
  width:100%;
  justify-content:space-between;
  min-height:40px;
  margin-top:5px;
  font-size:var(--text-sm)}
.login-foot {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:var(--text-xs);
  color:var(--muted);
  margin-top:23px}
.login-copyright {
  position:absolute;
  bottom:28px;
  color:var(--muted);
  font-size:var(--text-xs)}
.login-mobile-logo {
  display:none}

/* Restrained motion;
   all flows remain usable with reduced motion. */
@keyframes fade-in-up {
  from {
  opacity:0;
  transform:translateY(7px)}
to {
  opacity:1;
  transform:translateY(0)}
}
@keyframes scale-in {
  from {
  opacity:0;
  transform:scale(.98) translateY(5px)}
to {
  opacity:1;
  transform:scale(1) translateY(0)}
}
@keyframes toast-in {
  from {
  opacity:0;
  translate:0 8px}
to {
  opacity:1;
  translate:0 0}
}
@keyframes refresh-spin {
  to {
  transform:rotate(360deg)}
}
.page-enter {
  animation:fade-in-up .23s ease-out}
.is-loading .icon {
  animation:refresh-spin .8s linear infinite}
.stat:nth-child(2) {
  animation-delay:30ms}
.stat:nth-child(3) {
  animation-delay:60ms}
.stat:nth-child(4) {
  animation-delay:90ms}
.stat {
  animation:fade-in-up .3s both}

@media(min-width:1600px) {
  .page-container {
  padding:34px 40px 18px}
.topbar {
  padding:0 40px}
.stats {
  gap:20px}
.stat {
  padding:24px}
.trend-svg {
  height:240px}
}

@media(max-width:1150px) {
  :root {
  --sidebar:208px}
.page-container {
  padding:24px}
.topbar {
  padding:0 24px}
.dashboard-grid {
  grid-template-columns:minmax(0,1fr) 240px}
.stat {
  padding:17px}
.stat-number {
  font-size:26px}
.stat-detail {
  font-size:var(--text-xs)}
.today-label {
  display:none}
.search-grid {
  grid-template-columns:repeat(3,minmax(0,1fr))}
.search-grid label:first-child {
  grid-row:span 2;
  grid-column:span 1}
.search-grid label:first-child textarea {
  min-height:115px}
.settings-grid {
  grid-template-columns:1fr}
.settings-grid .panel:first-child {
  grid-row:auto}
.login-story {
  padding:30px}
.story-symbol {
  right:-130px;
  width:220px;
  height:220px}
}

@media(max-width:900px) {
  .stats {
  grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-grid {
  grid-template-columns:1fr}
.status-panel {
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:25px}
.status-panel h2,.status-panel>p,.status-meter,.status-note {
  grid-column:1/-1}
.status-meter {
  margin:16px 0}
.status-note {
  margin-bottom:0}
.login-story {
  padding:28px}
.story-content h1 {
  font-size:35px}
.login-main {
  padding:30px}
.chart-head {
  margin-bottom:17px}
}

@media(max-width:750px) {
  :root {
  --sidebar:232px}
main,body.sidebar-collapsed main {
  margin-left:0}
.sidebar,body.sidebar-collapsed .sidebar {
  width:232px;
  padding:24px 14px 12px;
  transform:translateX(-100%);
  transition:transform .22s;
  z-index:50}
.sidebar-open .sidebar {
  transform:translateX(0)}
body.sidebar-open .sidebar-scrim {
  display:block;
  position:fixed;
  inset:0;
  z-index:45;
  border:0;
  border-radius:0;
  background:#09090b70;
  backdrop-filter:blur(2px);
  width:100%;
  height:100%;
  padding:0}
.topbar {
  height:53px;
  padding:0 15px}
.topbar-start {
  gap:9px}
.topbar-end {
  gap:6px}
.role-chip {
  font-size:var(--text-xs)}
.page-container {
  padding:24px 16px 14px}
.page-header {
  gap:10px;
  margin-bottom:22px;
  align-items:flex-start}
.page-header h1 {
  font-size:24px}
.page-header .description {
  font-size:var(--text-sm);
  max-width:290px}
.header-actions {
  padding-top:2px}
.header-actions button {
  padding:6px 9px;
  min-height:30px}
.header-actions button .icon {
  width:13px;
  height:13px}
.breadcrumb-root {
  display:none}
.breadcrumb-slash {
  display:none}
.stats {
  gap:11px}
.stat {
  padding:15px}
.stat-label {
  font-size:var(--text-xs);
  margin-bottom:13px}
.stat-number {
  font-size:25px}
.stat-caption {
  font-size:var(--text-xs);
  margin-top:13px}
.stat-detail {
  font-size:var(--text-xs);
  line-height:1.6}
.metric-strip {
  gap:7px 15px;
  font-size:var(--text-xs);
  padding-bottom:19px}
.dashboard-grid {
  gap:14px;
  margin-bottom:20px}
.chart-panel,.status-panel {
  padding:17px}
.chart-head {
  gap:8px;
  flex-wrap:wrap}
.chart-head h2 {
  font-size:var(--text-sm)}
.chart-head p {
  font-size:var(--text-xs)}
.segmented button {
  font-size:var(--text-xs);
  padding:4px 7px}
.trend-svg {
  height:180px}
.section-heading {
  align-items:flex-start;
  flex-wrap:wrap}
.section-heading h2 {
  font-size:var(--text-sm)}
.section-heading .quick-actions {
  gap:6px}
.section-heading button {
  font-size:var(--text-xs);
  min-height:29px;
  padding:5px 8px}
.panel-body {
  padding:18px}
.panel-title {
  padding:16px 18px}
.toolbar {
  gap:6px}
.toolbar button {
  font-size:var(--text-xs);
  padding:5px 8px;
  min-height:29px}
.toolbar select {
  font-size:var(--text-xs);
  min-width:130px;
  max-width:160px}
.toolbar .selection-count {
  margin:0;
  padding:0 4px;
  font-size:var(--text-xs)}
.filters>input,.filters>select {
  flex:1 1 140px;
  max-width:100%;
  width:100%}
.filters>button {
  font-size:var(--text-xs)}
.search-panel {
  padding:0 14px 14px}
.search-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 11px}
.search-grid label:first-child {
  grid-column:span 2;
  grid-row:auto}
.search-grid label:first-child textarea {
  min-height:65px}
.search-grid label {
  margin-bottom:12px}
.search-grid input,.search-grid select {
  font-size:var(--text-sm);
  padding:7px 8px}
.search-grid label small {
  font-size:var(--text-xs)}
.tab-bar {
  gap:20px;
  margin-bottom:14px}
.tab {
  font-size:var(--text-sm);
  padding:12px 0}
.condition-row {
  grid-template-columns:1fr 1fr}
.condition-row>button {
  grid-column:2;
  justify-self:end}
.pagination {
  flex-wrap:wrap;
  gap:8px;
  font-size:var(--text-xs)}
.pagination>span:first-child {
  width:100%;
  margin:0}
.pagination select {
  margin-right:auto}
.pagination button {
  font-size:var(--text-xs)}
.type-picker {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px}
.type-choice {
  padding:14px}
.type-choice strong {
  font-size:var(--text-sm)}
.type-choice.selected:after {
  right:9px;
  top:9px}
.generation-totals {
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  font-size:var(--text-sm)}
.field-grid {
  grid-template-columns:1fr}
.duration-fields {
  gap:7px}
.duration-fields input {
  padding:7px;
  font-size:var(--text-sm)}
.check-group {
  grid-template-columns:repeat(2,minmax(0,1fr))}
.policy-row {
  flex-wrap:wrap;
  gap:8px}
.policy-row span {
  flex-basis:calc(100% - 80px)}
.permission-tristates {
  gap:0 10px}
.detail-grid {
  grid-template-columns:1fr 1fr;
  gap:14px}
.ledger-row {
  flex-wrap:wrap;
  gap:7px}
.license-summary {
  font-size:var(--text-sm);
  flex-wrap:wrap}
#modal-form {
  padding:20px 18px 16px}
.modal-head h2 {
  font-size:17px}
.modal-head .eyebrow {
  font-size:var(--text-xs)}
dialog {
  max-width:calc(100vw - 24px);
  max-height:90dvh;
  border-radius:11px}
.command-dialog {
  margin-top:12vh}
.command-footer {
  font-size:var(--text-xs);
  gap:10px}
.command-top input {
  font-size:var(--text-sm)}
.command-results button {
  font-size:var(--text-sm)}
.login-wrap {
  display:flex;
  min-height:100dvh}
.login-story {
  display:none}
.login-main {
  width:100%;
  min-height:100dvh;
  padding:40px 28px}
.login-mobile-logo {
  display:block;
  margin-bottom:30px}
.login-card h2 {
  font-size:26px}
.login-card {
  width:350px}
.login-card>p.muted {
  font-size:var(--text-sm)}
.login-copyright {
  bottom:22px}
footer {
  font-size:var(--text-xs)}
.workspace-status {
  margin-top:10px}
body.sidebar-collapsed .brand div,body.sidebar-collapsed .nav-search span:not([data-icon]),body.sidebar-collapsed .nav-search kbd,body.sidebar-collapsed .nav-section,body.sidebar-collapsed nav button>span:last-child,body.sidebar-collapsed .side-bottom {
  display:revert}
body.sidebar-collapsed nav button {
  justify-content:flex-start;
  padding:8px 10px}
body.sidebar-collapsed .nav-search {
  justify-content:flex-start;
  padding:7px 9px;
  margin-bottom:24px}
body.sidebar-collapsed .nav-section {
  display:block}
body.sidebar-collapsed .side-bottom {
  display:block}
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important}
}

