:root {
  color-scheme: light;
  --cp-bg: #f4f9ff;
  --cp-bg-elevated: #ffffff;
  --cp-surface: #ffffff;
  --cp-surface-soft: #eaf5ff;
  --cp-border: #c8ddf2;
  --cp-border-strong: #78a9d4;
  --cp-text: #293b59;
  --cp-text-muted: #526b89;
  --cp-text-soft: #6b82a0;
  --cp-accent: #218ff2;
  --cp-accent-hover: #1677d2;
  --cp-accent-soft: rgba(33, 143, 242, 0.1);
  --cp-accent-fg: #ffffff;
  --cp-success: #079e9a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #1677d2;
  --cp-shadow: 0 18px 48px rgba(20, 61, 105, 0.14);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(33, 143, 242, 0.14);
  --cp-row-alt: #f3f6f9;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #0b2745;
  --cp-bg-elevated: #123657;
  --cp-surface: #143d69;
  --cp-surface-soft: #1a4b78;
  --cp-border: #315d86;
  --cp-border-strong: #66a8dd;
  --cp-text: #f5faff;
  --cp-text-muted: #b8d2e8;
  --cp-text-soft: #96b9d7;
  --cp-accent: #35b8ff;
  --cp-accent-hover: #63c9ff;
  --cp-accent-soft: rgba(53, 184, 255, 0.16);
  --cp-accent-fg: #082440;
  --cp-success: #2ed8cf;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #64caff;
  --cp-shadow: 0 18px 48px rgba(2, 18, 35, 0.4);
  --cp-overlay: rgba(7, 30, 53, 0.88);
  --cp-panel: rgba(18, 54, 87, 0.78);
  --cp-panel-strong: rgba(11, 39, 69, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(53, 184, 255, 0.16);
  --cp-row-alt: #173f69;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--cp-bg); color: var(--cp-text); font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.topbar { min-height: 68px; padding: 12px clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--cp-border); background: var(--cp-panel-strong); position: sticky; top: 0; z-index: 20; }
.brand, .identity, .button, .filters, .search-field, .drawer-header { display: flex; align-items: center; }
.brand { gap: 12px; color: var(--cp-text); text-decoration: none; font-weight: 700; }
.brand-mark { width: 42px; height: 42px; overflow: hidden; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 0.625rem; }
.brand-mark img { width: 60px; height: 60px; max-width: none; transform: translate(-9px, -4px); }
.identity { gap: 12px; }
.account { display: grid; justify-items: end; font-size: 13px; }
.account span:last-child { color: var(--cp-text-muted); }
.button, .icon-button { border: 1px solid transparent; border-radius: 0.625rem; min-height: 40px; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.button { gap: 8px; padding: 9px 15px; font-weight: 650; }
.button svg, .icon-button svg { width: 18px; height: 18px; }
.button:hover, .icon-button:hover { transform: translateY(-1px); }
.primary { background: var(--cp-accent); color: var(--cp-accent-fg); }
.primary:hover { background: var(--cp-accent-hover); }
.secondary { background: var(--cp-surface); color: var(--cp-text); border-color: var(--cp-border); }
.secondary:hover, .icon-button:hover { border-color: var(--cp-border-strong); background: var(--cp-surface-soft); }
.icon-button { width: 40px; padding: 0; display: grid; place-items: center; background: transparent; color: var(--cp-text); border-color: var(--cp-border); }
main { width: min(1720px, 100%); margin: 0 auto; }
.signin-view { min-height: calc(100vh - 69px); padding: clamp(48px, 9vw, 128px) clamp(24px, 7vw, 100px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 520px); align-items: center; gap: clamp(48px, 8vw, 120px); }
.signin-copy { max-width: 720px; }
.eyebrow { margin: 0 0 10px; color: var(--cp-accent); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 20px; max-width: 800px; font-size: clamp(42px, 6vw, 82px); line-height: 1.02; letter-spacing: 0; }
.lede { max-width: 610px; color: var(--cp-text-muted); font-size: clamp(18px, 2vw, 24px); line-height: 1.55; }
.signin-copy .primary { margin-top: 20px; }
.requirement { margin: 16px 0 0; color: var(--cp-text-soft); font-size: 13px; }
.requirement strong { font-family: Consolas, "Courier New", Courier, monospace; font-weight: 500; }
.brand-visual { width: min(100%, 520px); aspect-ratio: 1; overflow: hidden; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; box-shadow: 0 0 2px var(--cp-border), 0 1px 2px var(--cp-border); }
.brand-visual img { width: 100%; height: 100%; display: block; object-fit: contain; }
.dashboard { padding: 44px clamp(20px, 3vw, 48px) 80px; }
.page-heading, .inventory-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.page-heading h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 36px 0; border-block: 1px solid var(--cp-border); }
.metric { padding: 24px; border-right: 1px solid var(--cp-border); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric span { display: block; margin-bottom: 8px; color: var(--cp-text-muted); font-size: 13px; }
.metric strong { font-size: 32px; }
.inventory { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; box-shadow: 0 0 2px var(--cp-border), 0 1px 2px var(--cp-border); overflow: hidden; }
.inventory-header { padding: 22px 24px; border-bottom: 1px solid var(--cp-border); align-items: start; flex-direction: column; }
.inventory-header h2 { margin: 0 0 3px; font-size: 21px; }
.muted { margin: 0; color: var(--cp-text-muted); font-size: 13px; }
.filters { width: 100%; display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)); gap: 10px; }
.search-field { width: 100%; gap: 8px; padding: 0 12px; background: var(--cp-bg-elevated); border: 1px solid var(--cp-border); border-radius: 0.625rem; }
.search-field:focus-within { border-color: var(--cp-accent); }
.search-field svg { width: 17px; color: var(--cp-text-muted); }
.search-field input { width: 100%; height: 40px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--cp-text); }
.select-field select { width: 100%; height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--cp-border); border-radius: 0.625rem; background: var(--cp-bg-elevated); color: var(--cp-text); }
.clear-filters { justify-content: center; }
.table-wrap { width: 100%; overflow: hidden; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
th, td { min-width: 0; padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--cp-border); vertical-align: middle; overflow-wrap: anywhere; }
th:nth-child(1) { width: 22%; }
th:nth-child(2) { width: 12%; }
th:nth-child(3) { width: 9%; }
th:nth-child(4) { width: 11%; }
th:nth-child(5) { width: 8%; }
th:nth-child(6) { width: 10%; }
th:nth-child(7) { width: 17%; }
th:nth-child(8) { width: 8%; }
th:nth-child(9) { width: 42px; }
th:nth-child(9), td:nth-child(9) { padding-inline: 4px; }
th { color: var(--cp-text-muted); background: var(--cp-surface-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; }
tbody tr { transition: background 120ms ease; }
tbody tr:nth-child(even) { background: var(--cp-row-alt); }
tbody tr:hover { background: var(--cp-accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
.agent-name { display: grid; gap: 3px; min-width: 0; }
.agent-name strong { font-size: 14px; }
.agent-name span, td { color: var(--cp-text-muted); font-size: 13px; }
.agent-name span { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-value { color: var(--cp-text); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.date-value { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip, .status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 0.625rem; font-size: 12px; font-weight: 650; }
.chip { background: var(--cp-surface-soft); border: 1px solid var(--cp-border); color: var(--cp-text); }
.status.available { color: var(--cp-success); background: var(--cp-surface-soft); }
.status.blocked { color: var(--cp-danger); background: var(--cp-surface-soft); }
.row-button { width: 34px; min-height: 34px; margin-left: auto; }
.state { min-height: 300px; padding: 48px 20px; display: grid; place-items: center; align-content: center; text-align: center; }
.state svg { width: 34px; height: 34px; margin-bottom: 12px; color: var(--cp-text-muted); }
.state h3 { margin-bottom: 6px; }
.state p { color: var(--cp-text-muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--cp-border); border-top-color: var(--cp-accent); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: var(--cp-overlay); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 40; width: min(600px, 100%); padding: 28px; overflow-y: auto; background: var(--cp-surface); border-left: 1px solid var(--cp-border); box-shadow: var(--cp-shadow); transform: translateX(100%); transition: transform 220ms ease; }
.drawer.open { transform: translateX(0); }
.drawer-header { justify-content: space-between; align-items: start; gap: 24px; }
.drawer-header h2 { font-size: 28px; }
.drawer-content { display: grid; gap: 24px; }
.detail-section { padding-top: 20px; border-top: 1px solid var(--cp-border); }
.detail-section h3 { font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-item { min-width: 0; }
.detail-item dt { margin-bottom: 4px; color: var(--cp-text-muted); font-size: 12px; }
.detail-item dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.code-block { padding: 14px; overflow: auto; background: var(--cp-surface-soft); border: 1px solid var(--cp-border); border-radius: 0.625rem; font: 12px/1.5 Consolas, "Courier New", Courier, monospace; white-space: pre-wrap; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; background: var(--cp-text); color: var(--cp-bg); border-radius: 0.625rem; box-shadow: var(--cp-shadow); }
.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; }
@media (max-width: 1100px) {
  th, td { padding-inline: 10px; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  th:nth-child(1) { width: 28%; }
  th:nth-child(2) { width: 15%; }
  th:nth-child(5) { width: 12%; }
  th:nth-child(6) { width: 15%; }
  th:nth-child(7) { width: 18%; }
  th:nth-child(8) { width: 12%; }
}
@media (max-width: 820px) {
  .signin-view { grid-template-columns: 1fr; padding-top: 56px; }
  .brand-visual { width: min(100%, 460px); }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n + 2) { border-bottom: 1px solid var(--cp-border); }
  .metric:first-child, .metric { padding: 18px; }
  .inventory-header { align-items: stretch; flex-direction: column; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { width: 100%; }
}
@media (max-width: 560px) {
  .topbar { padding-inline: 14px; }
  .brand > span:last-child, .account, #signOutButton span { display: none; }
  h1 { font-size: 40px; }
  .page-heading { align-items: start; }
  .page-heading .button span { display: none; }
  .dashboard { padding-inline: 14px; }
  .metrics { margin-block: 24px; }
  .metric strong { font-size: 25px; }
  .drawer { padding: 22px 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  th, td { padding: 12px 8px; }
  th:nth-child(2), td:nth-child(2), th:nth-child(6), td:nth-child(6), th:nth-child(7), td:nth-child(7) { display: none; }
  th:nth-child(1) { width: auto; }
  th:nth-child(5) { width: 72px; }
  th:nth-child(8) { width: 82px; }
  th:nth-child(9) { width: 42px; }
  .agent-name span { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: 0.01ms !important; } }