:root {
  color-scheme: light;
  --navy: #14173D;
  --navy-2: #1B2256;
  --navy-3: #5F74F3;
  --ink: #182230;
  --muted: #667085;
  --line: #d9e0ea;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --blue: #2563EB;
  --green: #059669;
  --amber: #F59E0B;
  --red: #DC2626;
  --miq-button-radius: 999px;
  --miq-button-height: 36px;
  --miq-button-border: #cfd8e3;
  --miq-button-text: #1f2933;
  --miq-button-focus: rgba(37, 99, 235, .24);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Cal Sans"; src: url("assets/fonts/CalSans-VariableFont.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { background: linear-gradient(180deg, #9A3412 0%, #D97706 62%, #F59E0B 100%); color: #fff; padding: 16px 12px; }
.brand-lockup { padding: 10px 12px 24px; }
.brand-logo { display: block; width: 170px; max-width: 100%; height: auto; }
.brand-subtitle { color: #FFF7ED; font-family: "Cal Sans", "Inter", sans-serif; font-size: 15px; font-weight: 600; letter-spacing: .02em; margin: 8px 0 0; }
.nav { display: grid; gap: 8px; }
.nav button { text-align: left; border: 0; border-radius: 6px; padding: 8px 9px; color: #FFFDF5; background: transparent; font-size: 13px; font-weight: 600; }
.nav button:hover, .nav button.active { color: #7C2D12; background: linear-gradient(90deg, rgba(255,251,235,.96), rgba(254,243,199,.88)); box-shadow: 0 1px 5px rgba(124,45,18,.16); }
.main { min-width: 0; padding: 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Cal Sans", "Inter", "Segoe UI", sans-serif; font-optical-sizing: auto; letter-spacing: -.015em; }
h1 { margin-bottom: 5px; font-size: 29px; }
h2 { font-size: 21px; margin-bottom: 5px; }
.muted { color: var(--muted); }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px rgba(24, 39, 75, .04); }
.content-grid { display: grid; gap: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric { padding: 19px; }
.metric .value { font-size: 30px; font-weight: 700; margin: 6px 0 3px; }
.metric .label { color: var(--muted); font-size: 13px; }
.section { padding: 21px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.toolbar { display: flex; gap: 9px; flex-wrap: wrap; }
.filter-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.filter-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.switch-track { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border: 1px solid #c4ccd7; border-radius: 999px; background: #d9dee7; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.switch-track > span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: transform .16s ease; }
.filter-toggle input:checked + .switch-track { border-color: #D97706; background: #F59E0B; }
.filter-toggle input:checked + .switch-track > span { transform: translateX(16px); }
.filter-toggle input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(245,158,11,.28); }
.button { appearance: none; border: 1px solid var(--miq-button-border); background: #fff; color: var(--miq-button-text); border-radius: var(--miq-button-radius); padding: 8px 12px; min-height: var(--miq-button-height); font-size: 12px; font-weight: 800; transition: background .14s ease, border-color .14s ease, box-shadow .14s ease; }
.button:hover { border-color: #b9c7d8; background: #f8fbff; }
.button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--miq-button-focus); }
.button.primary { color: #fff; background: var(--blue); border-color: #1d4ed8; }
.button.primary:hover { background: #1d4ed8; }
.button.danger { color: #fff; background: var(--red); border-color: var(--red); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.clickable-row { cursor: pointer; transition: background .14s ease, box-shadow .14s ease; }
.clickable-row:hover { background: #fff8eb; }
.clickable-row:focus-visible { outline: 2px solid #F59E0B; outline-offset: -2px; }
.health-link { appearance: none; padding: 0; border: 0; background: transparent; }
.health-link .status { cursor: pointer; box-shadow: 0 0 0 1px rgba(24,34,48,.08); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
.store-list-item { display: grid; gap: 2px; margin-bottom: 7px; }
.store-list-item:last-child { margin-bottom: 0; }
.store-list-item span { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: #edf1f7; color: var(--muted); }
.status.active, .status.healthy { color: var(--green); background: #e5f6ef; }
.status.pending, .status.unknown { color: var(--amber); background: #fff4d9; }
.status.retired, .status.revoked, .status.inactive { color: var(--red); background: #fdebea; }
.notice { border-left: 4px solid var(--blue); background: #edf4ff; padding: 13px 15px; color: #29446e; }
.notice strong { display: block; margin-bottom: 3px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(440px, 100%); padding: 30px; }
.login-brand { margin: -30px -30px 24px; padding: 24px 30px; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, #14173D, #202860); }
.login-logo { display: block; width: 230px; max-width: 100%; height: auto; margin: 0 auto; }
.field { display: grid; gap: 6px; margin: 13px 0; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: #fff; }
.error { color: var(--red); background: #fff0ef; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.empty { color: var(--muted); padding: 22px 8px; }
.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(10, 18, 40, .46); }
.modal { width: min(540px, 100%); padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mono { font-family: Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15,23,42,.2); }
.detail-drawer { position: fixed; z-index: 41; top: 0; right: 0; width: min(720px, calc(100vw - 32px)); height: 100vh; background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 36px rgba(15,23,42,.16); display: grid; grid-template-rows: auto 1fr; animation: drawer-in .2s ease-out; }
.detail-drawer > header { min-height: 66px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff8eb; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-drawer > header h2 { margin: 3px 0 0; }
.drawer-body { overflow: auto; padding: 18px; }
.drawer-section { padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-section h3, .eyebrow { color: var(--muted); font-family: "Inter", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; }
.detail-item { min-width: 0; }
.detail-item span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.detail-item strong { display: block; font-size: 13px; overflow-wrap: anywhere; user-select: text; }
.workstation-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.detail-grid > .workstation-card { grid-column: 1 / -1; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
@media (max-width: 980px) { .shell { grid-template-columns: 1fr; } .sidebar { padding: 18px; } .nav { grid-template-columns: repeat(3, 1fr); } .metric-grid { grid-template-columns: repeat(2, 1fr); } .main { padding: 20px; } }
@media (max-width: 620px) { .topbar, .section-head { align-items: flex-start; flex-direction: column; } .metric-grid, .two-col, .detail-grid, .workstation-card { grid-template-columns: 1fr; } .nav { grid-template-columns: 1fr 1fr; } .detail-drawer { width: calc(100vw - 12px); } }
