:root {
  --brand: #0b7fd3;
  --brand-hover: #086bb3;
  --brand-strong: #07528f;
  --brand-soft: #e8f5ff;
  --accent: #18a8a0;
  --accent-soft: #e5f8f5;
  --navy: #061824;
  --navy-soft: #0d2a3c;
  --ink: #102434;
  --muted: #627587;
  --canvas: #f1f6f9;
  --surface: #ffffff;
  --border: #dfe6ef;
  --border-soft: #edf1f6;
  --success: #147a55;
  --success-soft: #e8f6f0;
  --warning: #9a5b00;
  --warning-soft: #fff5df;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --shadow-sm: 0 10px 32px rgba(13, 49, 75, .07);
  --shadow-lg: 0 30px 90px rgba(4, 27, 47, .24);
  --radius: 19px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { background: var(--canvas); }
body { background: radial-gradient(circle at 72% -10%, rgba(78, 188, 234, .11), transparent 32%), var(--canvas); }
body.modal-open, body.nav-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
::selection { color: var(--surface); background: var(--brand); }
:focus-visible { outline: 3px solid rgba(13, 108, 181, .28); outline-offset: 2px; }

.eyebrow, .section-kicker, .nav-caption {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow.inverse { color: #75c9ff; }
.muted { color: var(--muted); }

.brand-lockup { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-lockup > span:last-child { display: grid; gap: 1px; }
.brand-lockup strong { color: inherit; font-family: var(--font-display); font-size: 20px; font-weight: 760; line-height: 1; letter-spacing: -.035em; }
.brand-lockup small { color: currentColor; font-size: 9px; font-weight: 700; letter-spacing: .16em; opacity: .65; text-transform: uppercase; }
.brand-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 10px 26px rgba(4, 43, 72, .2);
}
.brand-symbol img { display: block; width: 100%; height: 100%; border-radius: inherit; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(430px, .85fr); background: var(--surface); }
.login-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 78px);
  color: var(--surface);
  background:
    radial-gradient(circle at 16% 18%, rgba(36, 169, 231, .36), transparent 24%),
    radial-gradient(circle at 80% 76%, rgba(24, 168, 160, .2), transparent 34%),
    linear-gradient(145deg, #041521 0%, #072b42 52%, #0a5581 125%);
}
.login-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .11;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom right, #000, transparent 78%);
}
.login-lockup { color: var(--surface); }
.login-message { position: relative; z-index: 2; max-width: 760px; margin: auto 0; padding: 80px 0; }
.login-message h1 { max-width: 740px; margin: 0; font-family: var(--font-display); font-size: clamp(44px, 5vw, 74px); font-weight: 300; line-height: 1.04; letter-spacing: -.045em; }
.login-copy { max-width: 610px; margin: 28px 0 0; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.65; }
.login-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.login-features span { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.07); font-size: 11px; font-weight: 700; backdrop-filter: blur(9px); }
.login-features i { width: 6px; height: 6px; border-radius: 50%; background: #61c8ff; box-shadow: 0 0 0 4px rgba(97,200,255,.12); }
.network-art { position: absolute; z-index: 0; right: -110px; bottom: -130px; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.network-art::before, .network-art::after { content: ""; position: absolute; inset: 62px; border: 1px solid rgba(255,255,255,.09); border-radius: inherit; }
.network-art::after { inset: 132px; }
.network-art i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #4fc3ff; box-shadow: 0 0 0 7px rgba(79,195,255,.11); }
.network-art i:nth-child(1) { left: 20%; top: 23%; }.network-art i:nth-child(2) { left: 57%; top: 8%; }.network-art i:nth-child(3) { left: 74%; top: 48%; }.network-art i:nth-child(4) { left: 36%; top: 66%; }.network-art i:nth-child(5) { left: 12%; top: 73%; }

.login-panel { display: grid; place-items: center; padding: clamp(32px, 6vw, 90px); background: var(--surface); }
.login-card-shell, .login-card { width: min(100%, 430px); }
.login-card-shell .login-card { width: 100%; }
.login-card h2 { margin: 0; font-family: var(--font-display); font-size: clamp(34px, 3vw, 46px); font-weight: 400; letter-spacing: -.035em; }
.login-intro { margin: 12px 0 36px; font-size: 14px; }
.mobile-logo { display: none; margin-bottom: 54px; color: var(--ink); }
.field, label { display: grid; gap: 8px; margin: 18px 0; color: #33475a; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  color: var(--ink);
  border: 1px solid #cbd7e1;
  border-radius: 11px;
  outline: none;
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: #98a5b3; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13,108,181,.11); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 86px; }
.password-control button { position: absolute; top: 50%; right: 7px; min-height: 34px; padding: 6px 10px; transform: translateY(-50%); color: var(--brand); border: 0; border-radius: 8px; background: transparent; font-size: 11px; font-weight: 800; }
.password-control button:hover { background: var(--brand-soft); }
.form-error { min-height: 20px; margin: 4px 0 8px; color: var(--danger); font-size: 12px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; color: #8592a0; font-size: 10px; text-align: center; }
.login-security i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.two-factor-code { font-size: 25px; font-weight: 750; letter-spacing: .28em; text-align: center; }
.two-factor-back { margin-top: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 16px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
  background: #edf2f6;
  font-size: 12px;
  font-weight: 800;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:disabled { opacity: .48; transform: none; box-shadow: none; }
.button.primary { color: var(--surface); background: var(--brand); }
.button.primary:hover:not(:disabled) { background: var(--brand-hover); }
.button.accent { color: var(--surface); background: var(--brand); }
.button.ghost { color: var(--brand-strong); border-color: var(--border); background: var(--surface); }
.button.danger { color: var(--danger); border-color: #efc7c3; background: var(--danger-soft); }
.button.warning { color: var(--warning); border-color: #ecd39f; background: var(--warning-soft); }
.button.small { min-height: 34px; padding: 6px 12px; font-size: 11px; }
.button.wide { width: 100%; min-height: 50px; margin-top: 8px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.space-top { margin-top: 20px; }
.space-top-compact { margin-top: 16px; }
.login-submit b { margin-left: auto; font-size: 17px; font-weight: 400; }
.login-submit.loading b { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; font-size: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar-overlay { position: fixed; z-index: 29; inset: 0; visibility: hidden; border: 0; background: rgba(5, 24, 40, .55); opacity: 0; transition: opacity .2s, visibility .2s; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 252px;
  display: flex;
  flex-direction: column;
  padding: 21px 14px 15px;
  color: var(--surface);
  background:
    radial-gradient(circle at 12% 3%, rgba(20,137,214,.22), transparent 28%),
    radial-gradient(circle at 86% 78%, rgba(24,168,160,.09), transparent 30%),
    linear-gradient(180deg, var(--navy) 0%, #08283d 100%);
  box-shadow: 8px 0 40px rgba(4,27,47,.08);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 20px; }
.sidebar-head .brand-lockup { color: var(--surface); }
.sidebar-head .brand-symbol { flex-basis: 38px; height: 38px; border-radius: 12px; }
.icon-button.sidebar-close { display: none; }
.nav-caption { margin: 0 12px 10px; color: rgba(255,255,255,.38); font-size: 9px; }
.nav { display: grid; gap: 3px; }
.nav-sections { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-right: 3px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.nav-sections .nav-caption { margin-top: 2px; }
.nav-sections .nav-group-gap { margin-top: 12px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  padding: 8px 11px;
  color: rgba(255,255,255,.68);
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  transition: color .15s, background .15s;
}
.nav-item:hover { color: var(--surface); background: rgba(255,255,255,.07); }
.nav-item.active { color: var(--surface); background: linear-gradient(135deg, #108ada, #0873c4); box-shadow: 0 10px 26px rgba(5,92,154,.34); }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; color: currentColor; font-size: 16px; }
.nav-icon svg { width: 19px; height: 19px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-system { flex: 0 0 auto; margin-top: 8px; }
.sidebar-system .nav-caption { margin-top: 10px; }
.system-settings-item { margin-bottom: 9px; }
.sidebar-status { display: flex; gap: 11px; align-items: center; min-height: 58px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.04); }
.sidebar-status strong, .profile-card strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-status small, .profile-card small { display: block; overflow: hidden; margin-top: 3px; color: rgba(255,255,255,.48); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #778695; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.status-dot.online { background: #42d397; box-shadow: 0 0 0 4px rgba(66,211,151,.12); }
.profile-card { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; margin-top: 10px; padding: 11px 12px; border: 1px solid transparent; border-radius: 14px; color: var(--surface); background: rgba(255,255,255,.055); text-align: left; transition: border-color .15s, background .15s; }
.profile-card:hover { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.09); }
.profile-copy { min-width: 0; }
.profile-arrow { margin-left: auto; color: rgba(255,255,255,.4); font-size: 20px; }
.avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: var(--surface); border-radius: 11px; background: var(--brand); font-size: 12px; font-weight: 900; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 18px; min-height: 78px; padding: 13px clamp(22px, 3vw, 42px); border-bottom: 1px solid rgba(211,225,234,.86); background: rgba(255,255,255,.88); box-shadow: 0 8px 28px rgba(8,43,66,.035); backdrop-filter: blur(22px); }
.topbar h1 { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 740; letter-spacing: -.04em; }
.view-heading .eyebrow { margin-bottom: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.global-search-trigger { display: flex; align-items: center; gap: 9px; min-width: 218px; min-height: 42px; padding: 7px 8px 7px 12px; color: #526779; border: 1px solid #d6e2ea; border-radius: 12px; background: rgba(246,249,251,.92); font-size: 10px; font-weight: 750; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.global-search-trigger:hover { color: var(--ink); border-color: #b7d2e3; background: var(--surface); box-shadow: var(--shadow-sm); }
.global-search-trigger svg { width: 17px; height: 17px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; }
.global-search-trigger span { flex: 1; }
kbd { display: inline-grid; place-items: center; min-width: 28px; min-height: 24px; padding: 3px 6px; color: #6d7d8b; border: 1px solid #d9e3ea; border-bottom-width: 2px; border-radius: 7px; background: #fff; box-shadow: 0 1px 0 rgba(5,31,47,.04); font: 8px var(--font-sans); font-weight: 800; white-space: nowrap; }
.live-pill { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 7px 12px; color: var(--success); border: 1px solid #cde6da; border-radius: 999px; background: var(--success-soft); }
.live-pill > i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(20,122,85,.1); }
.live-pill > span { display: grid; gap: 1px; }
.live-pill strong { font-size: 10px; line-height: 1; }
.live-pill small { color: var(--muted); font-size: 8px; line-height: 1; white-space: nowrap; }
.live-pill.connected > i { animation: pulse 2s infinite; }
.live-pill.connecting, .live-pill.syncing, .live-pill.reconnecting { color: var(--brand); border-color: #cfe3f2; background: var(--brand-soft); }
.live-pill.connecting > i, .live-pill.syncing > i, .live-pill.reconnecting > i { animation: pulse 1.1s infinite; }
.live-pill.unavailable { color: var(--danger); border-color: #efcfcc; background: var(--danger-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 15%, transparent); } }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--ink); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 20px; }
.menu-button { display: none; }
.content { width: min(100%, 1640px); margin: 0 auto; padding: 26px clamp(22px, 3vw, 42px) 54px; }
.ui-icon { width: 20px; height: 20px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 720; letter-spacing: -.04em; }
.section-head p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.section-head p strong { color: var(--ink); }
.section-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; color: var(--brand-strong); border: 1px solid #cfe2f0; border-radius: 999px; background: var(--brand-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.section-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 2s infinite; }
.dashboard-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); gap: 30px; align-items: center; margin-bottom: 18px; padding: clamp(24px, 3vw, 38px); color: #fff; border-radius: 25px; background: linear-gradient(125deg, #062237 0%, #075b93 65%, #078f9c 132%); box-shadow: 0 22px 55px rgba(5,59,96,.19); }
.dashboard-hero::before { content: ""; position: absolute; z-index: -1; right: -82px; top: -118px; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 52px rgba(255,255,255,.03), 0 0 0 105px rgba(255,255,255,.018); }
.dashboard-hero .section-kicker { color: #75dcff; }
.dashboard-hero h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px); font-weight: 620; letter-spacing: -.045em; }
.dashboard-hero-copy > p:not(.section-kicker) { margin: 8px 0 0; color: rgba(255,255,255,.66); font-size: 12px; }
.dashboard-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.dashboard-quick-actions button { display: grid; grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 9px; align-items: center; min-width: 178px; min-height: 58px; padding: 9px 10px; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.07); text-align: left; backdrop-filter: blur(10px); transition: background .15s, border-color .15s, transform .15s; }
.dashboard-quick-actions button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.12); }
.dashboard-quick-actions button > .ui-icon { width: 21px; color: #77dfff; }
.dashboard-quick-actions button span { display: grid; gap: 2px; }
.dashboard-quick-actions button strong { font-size: 10px; }
.dashboard-quick-actions button small { color: rgba(255,255,255,.52); font-size: 8px; }
.quick-arrow { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.network-score { display: grid; align-content: center; min-height: 180px; padding: 23px; border: 1px solid rgba(255,255,255,.12); border-radius: 19px; background: rgba(3,27,44,.24); backdrop-filter: blur(14px); }
.network-score > span { color: rgba(255,255,255,.58); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.network-score > strong { margin-top: 9px; font-family: var(--font-display); font-size: 42px; font-weight: 650; letter-spacing: -.06em; }
.network-score progress { width: 100%; height: 7px; margin: 12px 0; overflow: hidden; border: 0; border-radius: 999px; background: rgba(255,255,255,.13); }
.network-score progress::-webkit-progress-bar { border-radius: inherit; background: rgba(255,255,255,.13); }
.network-score progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, #66d7ff, #68e5c3); }
.network-score progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, #66d7ff, #68e5c3); }
.network-score small { color: rgba(255,255,255,.49); font-size: 8px; line-height: 1.5; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; min-height: 142px; padding: 19px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card::after { content: ""; position: absolute; right: -36px; bottom: -54px; width: 112px; height: 112px; border: 1px solid rgba(13,108,181,.08); border-radius: 50%; box-shadow: 0 0 0 22px rgba(13,108,181,.025); }
.stat-card.primary { color: var(--surface); border-color: var(--brand); background: linear-gradient(145deg, #0d6cb5, #084d82); box-shadow: 0 14px 34px rgba(13,108,181,.22); }
.stat-card.primary::after { border-color: rgba(255,255,255,.12); box-shadow: 0 0 0 22px rgba(255,255,255,.035); }
.stat-card.primary .stat-label, .stat-card.primary .stat-foot { color: rgba(255,255,255,.68); }
.stat-card.online-card { border-color: #cce5da; background: linear-gradient(145deg, #fff, #effaf5); }
.stat-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--brand); border-radius: 11px; background: var(--brand-soft); }
.stat-icon.success { color: var(--success); background: var(--success-soft); }
.stat-icon .ui-icon { width: 18px; height: 18px; }
.stat-card.primary .stat-icon { color: var(--surface); background: rgba(255,255,255,.14); }
.stat-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { position: relative; z-index: 1; display: block; margin-top: 20px; font-family: var(--font-display); font-size: 36px; font-weight: 720; line-height: 1; letter-spacing: -.055em; }
.stat-foot { position: relative; z-index: 1; display: block; margin-top: 9px; color: var(--muted); font-size: 10px; }
.stat-foot b { color: inherit; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(270px, .68fr); gap: 17px; }
.panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel.pad { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 82px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.panel-head h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 720; letter-spacing: -.025em; }
.panel-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.panel-head .section-kicker { margin-bottom: 3px; font-size: 8px; }
.health-stack { display: grid; gap: 1px; background: var(--border-soft); }
.health-item { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 13px 17px; background: var(--surface); }
.health-item > span { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 11px; font-weight: 700; }
.health-item strong { font-size: 12px; }
.service-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--brand); border-radius: 10px; background: var(--brand-soft); font-style: normal; }
.service-icon .ui-icon { width: 17px; height: 17px; }
.service-icon.offline { color: var(--danger); background: var(--danger-soft); }

.toolbar-panel { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 15px; padding: 11px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }
.search { position: relative; flex: 1 1 320px; }
.search input { min-height: 44px; padding-left: 42px; }
.search > span { position: absolute; left: 14px; top: 12px; display: grid; place-items: center; color: var(--brand); pointer-events: none; }
.search > span .ui-icon { width: 18px; height: 18px; }
.filter-select { width: 180px; min-height: 44px; }
.toolbar-action { min-height: 44px; border-radius: 11px; }
.icon-action .ui-icon { width: 17px; height: 17px; }
.gateway-toolbar-count { gap: 4px; flex-basis: 100%; min-height: 28px; margin-left: 3px; padding: 0 4px; }
.gateway-toolbar-count strong { color: var(--ink); font-size: 11px; }
.gateway-results { position: relative; transition: opacity .15s; }
.gateway-results.loading { opacity: .62; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.table-wrap.borderless { border: 0; border-radius: 0; box-shadow: none; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.dashboard-table th:nth-child(7), .dashboard-table td:nth-child(7) { display: none; }
th { position: sticky; z-index: 1; top: 0; padding: 12px 14px; color: #617587; border-bottom: 1px solid var(--border); background: #f6f9fb; text-align: left; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { height: 52px; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr[data-id] { cursor: pointer; transition: background .15s, box-shadow .15s; }
tbody tr[data-id]:hover { background: #f4f9fd; }
tbody tr[data-id]:focus-visible { position: relative; z-index: 2; outline: 3px solid rgba(13,108,181,.24); outline-offset: -3px; }
.row-updated { animation: row-update .85s ease-out; }
@keyframes row-update { from { background: #dff1fc; } }
.gateway-number { color: var(--brand-strong); }
.gateway-address { min-width: 180px; max-width: 320px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .01em; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status.online { color: var(--success); background: var(--success-soft); }.status.online::before { background: var(--success); }
.status.offline { color: #80534f; background: #f7efee; }.status.offline::before { background: #b07b75; }
.status.work { color: var(--brand-strong); background: var(--brand-soft); }.status.work::before { background: var(--brand); }
.status.store { color: var(--warning); background: var(--warning-soft); }.status.store::before { background: #d18a16; }
.route-list { display: flex; flex-wrap: wrap; gap: 5px; min-width: 110px; }
.route-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 3px 7px; color: #496274; border: 1px solid #e2eaf0; border-radius: 999px; background: #f3f6f8; font-size: 8px; font-weight: 700; }
.route-tag button { border: 0; padding: 0; color: var(--danger); background: none; font-weight: 900; }
.audit-details { min-width: 90px; }
.audit-details summary { color: var(--brand); cursor: pointer; font-size: 10px; font-weight: 800; }
.audit-details code { display: block; width: min(420px, 42vw); max-height: 130px; overflow: auto; margin-top: 8px; padding: 9px; color: #d4edff; border-radius: 8px; background: var(--navy); font: 9px/1.5 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 54px 20px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 7px; color: var(--ink); font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.pagination span { color: var(--muted); font-size: 10px; }

.stack-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stack-toolbar label { flex: 1 1 420px; max-width: 650px; margin: 0; }
.stack-summary { display: flex; align-items: baseline; gap: 7px; padding: 0 4px 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.stack-summary strong { color: var(--brand-strong); font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.callout { margin: 0 0 16px; padding: 15px 17px; border: 1px solid #cfe2f0; border-radius: 14px; background: var(--brand-soft); }
.callout strong { display: block; margin-bottom: 4px; color: var(--brand-strong); font-size: 11px; }
.callout p { margin: 0; color: #536f84; font-size: 10px; line-height: 1.55; }
.callout code { font: 9px "SFMono-Regular", Consolas, monospace; }
.callout.warning { border-color: #ecd39f; background: var(--warning-soft); }
.callout.warning strong { color: var(--warning); }.callout.warning p { color: #78571f; }
.callout.success { border-color: #cce5da; background: var(--success-soft); }
.callout.success strong { color: var(--success); }.callout.success p { color: #3d6b59; }
.callout.compact { margin: 0 0 18px; padding: 13px 14px; }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 14px; }
.resource-empty { border: 1px dashed #cbd9e4; border-radius: var(--radius); background: rgba(255,255,255,.55); }
.resource-card { display: flex; flex-direction: column; min-width: 0; min-height: 300px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .16s, border-color .16s, box-shadow .16s; }
.resource-card:hover { transform: translateY(-2px); border-color: #bfd8ea; box-shadow: 0 12px 30px rgba(18,48,72,.1); }
.resource-card-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.resource-card-head > div { min-width: 0; }
.resource-card h3 { overflow: hidden; margin: 2px 0 5px; font-family: var(--font-display); font-size: 18px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.resource-card p { display: -webkit-box; overflow: hidden; min-height: 30px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.resource-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; color: var(--surface); border-radius: 12px; background: linear-gradient(145deg, var(--brand), var(--brand-strong)); font-size: 9px; font-weight: 900; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(13,108,181,.18); }
.resource-icon.small { flex-basis: 34px; height: 34px; border-radius: 10px; font-size: 8px; box-shadow: none; }
.resource-id { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; padding: 10px 11px; border-radius: 10px; background: #f3f7fa; }
.resource-id span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.resource-id strong { overflow: hidden; color: var(--brand-strong); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.resource-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.resource-meta div { padding: 9px 10px; border: 1px solid var(--border-soft); border-radius: 10px; }
.resource-meta dt { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.resource-meta dd { margin: 0; font-size: 10px; font-weight: 800; }
.uuid-line { min-width: 0; margin: 14px 0; }
.uuid-line span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.uuid-line code, .heading-uuid { display: block; overflow: hidden; color: #526678; font: 9px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.resource-open { width: 100%; margin-top: auto; }
.nested-load-error { display: grid; gap: 16px; max-width: 760px; }
.nested-load-error > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.breadcrumb { display: flex; align-items: center; gap: 7px; margin: -5px 0 18px; color: var(--muted); font-size: 10px; }
.breadcrumb button { padding: 3px 0; color: var(--brand); border: 0; background: none; font-size: inherit; font-weight: 800; }
.breadcrumb button:hover { text-decoration: underline; }.breadcrumb strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.tenant-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 13px; padding: 23px; color: var(--surface); border-radius: var(--radius); background: linear-gradient(135deg, #071a2a, #0b4e7c); box-shadow: 0 16px 38px rgba(4,27,47,.18); }
.tenant-hero h2 { margin: 0; font-family: var(--font-display); font-size: 27px; font-weight: 400; }
.tenant-hero p:not(.section-kicker) { margin: 8px 0 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.5; }
.tenant-identifiers { display: grid; gap: 8px; width: min(100%, 420px); }
.tenant-identifiers > span { min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: rgba(255,255,255,.55); background: rgba(255,255,255,.055); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tenant-identifiers strong, .tenant-identifiers code { display: block; overflow: hidden; margin-top: 5px; color: var(--surface); font-size: 10px; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.tenant-identifiers code { font-family: "SFMono-Regular", Consolas, monospace; font-weight: 400; }
.resource-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.resource-stats > span { min-height: 35px; padding: 8px 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 9px; }
.resource-stats strong { color: var(--ink); font-size: 10px; }
.chirpstack-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.resource-list, .profile-list { display: grid; gap: 1px; background: var(--border-soft); }
.resource-list-item, .profile-item { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 75px; padding: 12px 15px; color: var(--ink); border: 0; background: var(--surface); text-align: left; }
.resource-list-item { transition: background .15s; }.resource-list-item:hover { background: #f4f9fd; }
.resource-list-item > span:nth-child(2), .profile-item > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.resource-list-item strong, .profile-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-list-item small, .profile-item small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.resource-list-item code, .profile-item code { overflow: hidden; color: #7b8996; font: 8px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.resource-list-item b { margin-left: auto; color: var(--brand); font-size: 17px; font-weight: 400; }
.heading-uuid { max-width: 430px; margin-top: 9px; }
.application-identifiers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.application-identifiers > span { min-width: 180px; padding: 8px 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.application-identifiers strong, .application-identifiers code { display: block; overflow: hidden; margin-top: 4px; color: var(--ink); font-size: 9px; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.application-identifiers code { font-family: "SFMono-Regular", Consolas, monospace; font-weight: 400; }
.toolbar-count { display: inline-flex; align-items: center; min-height: 42px; margin-left: auto; padding: 0 9px; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.cell-note { display: block; max-width: 280px; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.device-import-input { min-height: 230px; font: 10px/1.55 "SFMono-Regular", Consolas, monospace; }
.form-grid label small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.insecure-option { color: var(--danger); border-color: #efcfcc; background: var(--danger-soft); }
.import-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 17px; }
.import-summary span { display: grid; gap: 5px; padding: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 12px; background: #f8fafb; font-size: 8px; font-weight: 800; text-align: center; text-transform: uppercase; }
.import-summary strong { color: var(--brand-strong); font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.import-summary.has-errors span:nth-child(n+3) strong { color: var(--warning); }
.import-results { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.import-result { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 52px; padding: 9px 13px; border-bottom: 1px solid var(--border-soft); }
.import-result:last-child { border-bottom: 0; }
.import-result code { color: var(--ink); font: 9px "SFMono-Regular", Consolas, monospace; }
.import-result span { display: grid; gap: 3px; }.import-result strong { color: var(--success); font-size: 9px; }.import-result small { color: var(--muted); font-size: 9px; }
.import-result.skipped strong { color: var(--warning); }.import-result.failed strong, .import-result.partial_failure strong, .import-result.rolled_back strong { color: var(--danger); }
.import-result.missing_keys strong { color: var(--danger); }
.import-jobs-panel { margin: 16px 0; }
.import-job-list { display: grid; gap: 1px; background: var(--border-soft); }
.import-job-row { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(120px, 260px) 20px; gap: 14px; align-items: center; min-height: 62px; padding: 11px 16px; color: var(--ink); border: 0; background: var(--surface); text-align: left; transition: background .15s; }
.import-job-row:hover { background: #f4f9fd; }
.import-job-row > span:first-child { display: grid; gap: 4px; }
.import-job-row strong { font-size: 10px; }.import-job-row small { color: var(--muted); font-size: 9px; }
.import-job-row b { color: var(--brand); font-size: 17px; font-weight: 400; }
.import-job-mini-progress, .import-job-progress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #e5edf3; }
.import-job-mini-progress::-webkit-progress-bar, .import-job-progress::-webkit-progress-bar { border-radius: inherit; background: #e5edf3; }
.import-job-mini-progress::-webkit-progress-value, .import-job-progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--brand), #3bc4aa); transition: width .25s ease; }
.import-job-mini-progress::-moz-progress-bar, .import-job-progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--brand), #3bc4aa); transition: width .25s ease; }
.import-job-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.import-job-state code { overflow: hidden; color: var(--muted); font: 9px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.import-job-progress { height: 10px; margin: 8px 0; }
.import-job-progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 10px; }
.import-job-progress-label strong { color: var(--ink); }
.result-filter { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 10px; }

.settings-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 188px;
  margin-bottom: 16px;
  padding: 30px 32px;
  color: #fff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 20%, rgba(90,190,255,.28), transparent 26%),
    radial-gradient(circle at 62% 115%, rgba(45,211,174,.2), transparent 34%),
    linear-gradient(135deg, #071827 0%, #0a3151 56%, #0e64a5 130%);
  box-shadow: 0 20px 48px rgba(7, 35, 58, .17);
}
.settings-hero::after { content: ""; position: absolute; right: -86px; top: -118px; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 92px rgba(255,255,255,.018); }
.settings-hero > * { position: relative; z-index: 1; }
.settings-hero h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); font-weight: 730; letter-spacing: -.05em; }
.settings-hero p:not(.section-kicker) { max-width: 660px; margin: 12px 0 0; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.6; }
.settings-hero .section-kicker { color: #66c8ff; }
.settings-hero-badge { display: flex; align-items: center; gap: 12px; min-width: 235px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.075); backdrop-filter: blur(10px); }
.settings-hero-badge > i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #4ae0aa; box-shadow: 0 0 0 6px rgba(74,224,170,.11); }
.settings-hero-badge span { display: grid; gap: 4px; min-width: 0; }
.settings-hero-badge strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.settings-hero-badge small { color: rgba(255,255,255,.58); font-size: 9px; }
.settings-status-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 78px; margin-bottom: 17px; padding: 14px 17px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-status-card.restart { border-color: #ecd39f; background: linear-gradient(90deg, #fffaf0, #fff); }
.settings-status-card.ready { border-color: #cae7db; background: linear-gradient(90deg, #f1fbf6, #fff); }
.settings-status-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--success); border-radius: 13px; background: var(--success-soft); font-size: 18px; font-weight: 800; }
.settings-status-card.restart .settings-status-icon { color: var(--warning); background: var(--warning-soft); }
.settings-status-card strong { display: block; font-size: 12px; }
.settings-status-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-layout { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav-panel { position: sticky; top: 106px; display: grid; gap: 5px; padding: 9px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
.settings-nav-panel button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 9px; color: var(--muted); border: 0; border-radius: 11px; background: transparent; font-size: 10px; font-weight: 750; text-align: left; }
.settings-nav-panel button:hover { color: var(--brand-strong); background: var(--brand-soft); }
.settings-nav-panel button span { display: grid; place-items: center; flex: 0 0 27px; height: 27px; color: var(--brand); border-radius: 8px; background: var(--brand-soft); font-size: 8px; font-weight: 850; }
.settings-main { display: grid; gap: 16px; min-width: 0; }
.settings-card { scroll-margin-top: 108px; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-card-head { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 17px 20px; border-bottom: 1px solid var(--border-soft); background: linear-gradient(180deg, #fff, #fcfdff); }
.settings-card-head > div { min-width: 0; }
.settings-card-head h3 { margin: 0; font-size: 17px; font-weight: 730; letter-spacing: -.035em; }
.settings-card-head p:not(.section-kicker) { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-card-head .section-kicker { margin-bottom: 3px; font-size: 8px; }
.settings-card-icon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; color: #fff; border-radius: 13px; background: linear-gradient(145deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 20px rgba(13,108,181,.18); font-size: 9px; font-weight: 850; letter-spacing: .05em; }
.settings-card-icon.account { background: linear-gradient(145deg, #6d5ee7, #4338aa); }
.settings-card-icon.neutral { color: var(--ink); background: #edf2f7; box-shadow: none; }
.settings-count { margin-left: auto; padding: 6px 9px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; font-size: 8px; font-weight: 750; white-space: nowrap; }
.settings-form { padding: 4px 20px 20px; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.settings-fields.password-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-field { position: relative; align-content: start; min-width: 0; margin: 16px 0 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 14px; background: #fbfcfe; }
.settings-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.settings-field-head strong { color: var(--ink); font-size: 11px; }
.settings-field > input, .settings-field > select { margin-top: 9px; background: #fff; }
.settings-field > small, .settings-switch-row small { display: block; min-height: 27px; margin-top: 8px; color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.5; }
.settings-field > code { display: block; overflow: hidden; margin-top: 9px; color: #8c98a7; font: 8px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.secret-clear-option { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 8px; font-weight: 600; }
.secret-clear-option input { width: 14px; min-height: 14px; margin: 0; }
.setting-state { flex: 0 0 auto; color: var(--success); font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.setting-state.pending { color: var(--warning); }
.settings-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; margin: 16px 0 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 14px; background: #fbfcfe; }
.settings-switch-row > span:first-child { min-width: 0; }
.settings-switch-row strong { color: var(--ink); font-size: 11px; }
.settings-switch-row small { min-height: auto; }
.switch-control { position: relative; display: block; flex: 0 0 44px; width: 44px; height: 25px; }
.switch-control input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.switch-control i { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e0; transition: background .18s; }
.switch-control i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(20,40,60,.22); transition: transform .18s; }
.switch-control input:checked + i { background: var(--brand); }
.switch-control input:checked + i::after { transform: translateX(19px); }
.switch-control input:focus-visible + i { outline: 3px solid rgba(13,108,181,.25); outline-offset: 2px; }
.settings-save-row { display: flex; align-items: end; justify-content: flex-end; gap: 14px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--border-soft); }
.settings-save-row.single-action { align-items: center; justify-content: space-between; }
.settings-save-row.single-action > span { font-size: 9px; }
.settings-password-confirm { width: min(100%, 340px); margin: 0; }
.settings-password-confirm input { min-height: 42px; }
.compact-card .settings-card-head { border-bottom: 0; }
.deployment-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border-top: 1px solid var(--border-soft); background: var(--border-soft); }
.deployment-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; padding: 12px 18px; background: #fff; }
.deployment-list span { display: grid; gap: 3px; }
.deployment-list strong { font-size: 9px; }
.deployment-list small { color: var(--muted); font-size: 8px; }
.deployment-list code { overflow: hidden; max-width: 260px; color: var(--brand-strong); font: 9px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.restart-overlay { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 24px; color: #fff; background: rgba(5,24,40,.94); backdrop-filter: blur(18px); }
.restart-overlay > div { max-width: 480px; text-align: center; }
.restart-overlay .eyebrow { margin-top: 22px; color: #70cfff; }
.restart-overlay h2 { margin: 8px 0 12px; font-size: 32px; letter-spacing: -.045em; }
.restart-overlay p:last-child { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.6; }
.restart-spinner { display: block; width: 48px; height: 48px; margin: auto; border: 4px solid rgba(255,255,255,.18); border-top-color: #5bc7ff; border-radius: 50%; animation: spin .8s linear infinite; }

.map-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin: -5px 0 14px; }
.map-stat-grid > div { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 11px 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.map-stat-grid span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.map-stat-grid strong { color: var(--brand-strong); font-family: var(--font-display); font-size: 23px; letter-spacing: -.04em; }
.gateway-map-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 11px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.gateway-map-toolbar .search { min-width: 260px; }
.gateway-map-toolbar .filter-select { flex: 0 0 180px; }
.gateway-map-visible { margin-left: auto; padding-right: 7px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.gateway-map-visible strong { color: var(--ink); font-size: 11px; }
.gateway-map-layout { display: grid; grid-template-columns: minmax(520px, 1.6fr) minmax(360px, .72fr); gap: 14px; align-items: stretch; }
.gateway-map-panel { position: relative; isolation: isolate; overflow: hidden; height: clamp(590px, calc(100vh - 330px), 760px); min-height: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #e9eef3; box-shadow: var(--shadow-sm); }
.gateway-map-canvas { width: 100%; height: 100%; background: linear-gradient(145deg, #e7eef3, #f5f8fa); }
.gateway-map-canvas.leaflet-container { color: var(--ink); font-family: var(--font-sans); }
.gateway-map-canvas .leaflet-control-zoom { overflow: hidden; border: 1px solid rgba(12,55,89,.14); border-radius: 12px; box-shadow: 0 8px 24px rgba(12,55,89,.14); }
.gateway-map-canvas .leaflet-control-zoom a { color: var(--brand-strong); border-color: var(--border-soft); }
.gateway-map-canvas .leaflet-control-attribution { color: #53677a; background: rgba(255,255,255,.9); font-size: 8px; }
.gateway-map-canvas .leaflet-tooltip { padding: 8px 10px; color: var(--ink); border: 0; border-radius: 9px; background: rgba(255,255,255,.96); box-shadow: 0 8px 25px rgba(5,32,51,.16); font-size: 10px; font-weight: 800; }
.gateway-map-canvas .leaflet-tooltip::before { border-top-color: rgba(255,255,255,.96); }
.map-tile-warning { position: absolute; z-index: 900; top: 12px; left: 50%; width: min(520px, calc(100% - 120px)); padding: 9px 13px; transform: translateX(-50%); color: #76531b; border: 1px solid #e8cd91; border-radius: 11px; background: rgba(255,247,226,.95); box-shadow: var(--shadow-sm); font-size: 9px; line-height: 1.45; text-align: center; }
.gateway-map-legend { position: absolute; z-index: 800; left: 50%; bottom: 18px; display: flex; gap: 12px; padding: 8px 11px; transform: translateX(-50%); border: 1px solid rgba(12,55,89,.12); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(12,55,89,.14); backdrop-filter: blur(10px); }
.gateway-map-legend span { display: inline-flex; align-items: center; gap: 5px; color: #53677a; font-size: 8px; font-weight: 800; white-space: nowrap; }
.gateway-map-legend i { width: 7px; height: 7px; border-radius: 50%; }
.gateway-map-legend i.excellent { background: #16865f; }.gateway-map-legend i.weak { background: #d48a13; }.gateway-map-legend i.offline { background: #9b5960; }
.gateway-map-side { display: flex; flex-direction: column; gap: 14px; height: clamp(590px, calc(100vh - 330px), 760px); min-height: 0; }
.gateway-map-list-panel, .gateway-map-detail { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.gateway-map-list-panel { display: flex; flex: 0 0 292px; min-height: 0; flex-direction: column; }
.gateway-map-list-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 13px 15px; border-bottom: 1px solid var(--border-soft); }
.gateway-map-list-panel h3, .map-detail-head h3 { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: -.025em; }
.gateway-map-list-panel > header small { padding: 5px 7px; color: var(--success); border-radius: 999px; background: var(--success-soft); font-size: 8px; font-weight: 900; }
.gateway-map-list { flex: 1; overflow: auto; overscroll-behavior: contain; }
.map-gateway-list-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 59px; padding: 10px 13px; color: var(--ink); border: 0; border-bottom: 1px solid var(--border-soft); background: var(--surface); text-align: left; transition: background .15s, box-shadow .15s; }
.map-gateway-list-item:hover { background: #f5f9fc; }.map-gateway-list-item.selected { position: relative; z-index: 1; background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.map-gateway-dot { width: 8px; height: 8px; border-radius: 50%; background: #aa7470; box-shadow: 0 0 0 4px rgba(155,89,96,.09); }
.map-gateway-dot.online { background: var(--success); box-shadow: 0 0 0 4px rgba(20,122,85,.09); }
.map-gateway-list-copy { display: grid; min-width: 0; gap: 4px; }
.map-gateway-list-copy strong { color: var(--brand-strong); font-size: 11px; }
.map-gateway-list-copy small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.map-gateway-list-meta { display: grid; justify-items: end; gap: 4px; }
.map-gateway-list-meta small { color: #8a98a6; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.map-quality { color: var(--brand); font-size: 9px; font-weight: 850; }
.map-quality.excellent, .map-quality.stable { color: var(--success); }.map-quality.weak { color: var(--warning); }.map-quality.poor, .map-quality.offline { color: var(--danger); }
.map-list-empty { display: grid; place-items: center; min-height: 170px; padding: 24px; color: var(--muted); text-align: center; }
.map-list-empty strong { color: var(--ink); font-size: 13px; }.map-list-empty span { margin-top: 5px; font-size: 9px; }
.gateway-map-detail { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.map-detail-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 75px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); background: rgba(255,255,255,.96); backdrop-filter: blur(9px); }
.map-detail-head small { display: block; overflow: hidden; max-width: 220px; margin-top: 3px; color: var(--muted); font: 8px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.map-detail-body { padding: 14px; }
.map-detail-highlight { display: grid; gap: 10px; padding: 13px; color: #fff; border-radius: 14px; background: linear-gradient(135deg, #092238, #0c588c); }
.map-detail-highlight > div:first-child { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.map-detail-highlight span { color: rgba(255,255,255,.64); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.map-detail-highlight strong { grid-column: 2; grid-row: 1; color: #7fe2b8; font-size: 13px; }
.map-detail-highlight small { grid-column: 1 / -1; color: rgba(255,255,255,.54); font-size: 8px; line-height: 1.4; }
.map-ping-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.map-ping-values span { display: grid; gap: 4px; padding: 7px; border-radius: 8px; background: rgba(255,255,255,.07); text-align: center; }
.map-ping-values b { color: #fff; font-size: 9px; letter-spacing: 0; text-transform: none; }
.map-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 11px 0 0; }
.map-detail-grid div { min-width: 0; padding: 9px 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: #f8fafc; }
.map-detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.map-detail-grid dd { overflow: hidden; margin: 0; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.map-detail-section { margin-top: 13px; }
.map-detail-section h4 { margin: 0 0 7px; color: var(--muted); font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.map-info-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--border-soft); }
.map-info-list > div { display: grid; grid-template-columns: minmax(75px, .55fr) minmax(0, 1fr); gap: 9px; padding: 8px 10px; background: #f8fafc; }
.map-info-list span { color: var(--muted); font: 8px "SFMono-Regular", Consolas, monospace; }
.map-info-list strong { overflow-wrap: anywhere; font-size: 9px; }
.map-info-empty { padding: 11px; color: var(--muted); background: #f8fafc; font-size: 9px; }
.map-raw-details { margin-top: 13px; }
.map-raw-details summary { color: var(--brand); cursor: pointer; font-size: 9px; font-weight: 800; }
.map-raw-details .json-view { margin-top: 8px; font-size: 8px; }
.map-detail-empty { display: grid; place-items: center; min-height: 100%; padding: 34px 24px; color: var(--muted); text-align: center; }
.map-detail-empty > span { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 14px; color: var(--brand); border-radius: 15px; background: var(--brand-soft); font-size: 25px; }
.map-detail-empty strong { color: var(--ink); font-family: var(--font-display); font-size: 17px; }
.map-detail-empty p { max-width: 290px; margin: 7px 0 0; font-size: 9px; line-height: 1.6; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: stretch end; background: rgba(5,24,40,.55); backdrop-filter: blur(4px); }
.modal { width: min(820px, calc(100vw - 44px)); height: 100%; max-height: none; overflow: hidden; border-radius: 24px 0 0 24px; background: var(--surface); box-shadow: var(--shadow-lg); animation: drawer-in .22s ease-out; }
.modal.wide { width: min(960px, calc(100vw - 44px)); }.modal.narrow { width: min(520px, calc(100vw - 44px)); }
.modal.command-modal { align-self: center; justify-self: center; width: min(680px, calc(100vw - 40px)); height: auto; max-height: min(720px, calc(100vh - 48px)); border: 1px solid rgba(255,255,255,.5); border-radius: 24px; animation: command-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(35px); opacity: .7; } }
@keyframes command-in { from { transform: translateY(10px) scale(.985); opacity: .6; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; min-height: 84px; padding: 17px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.modal-body { height: calc(100vh - 84px); overflow: auto; padding: 22px; }
.command-modal .modal-header { min-height: 76px; }
.command-modal .modal-body { height: auto; max-height: calc(100vh - 124px); padding: 14px; }
.command-search-form { position: relative; display: flex; align-items: center; gap: 11px; margin: 0; padding: 0 12px; border: 1px solid #bdd7e7; border-radius: 14px; background: #f8fbfd; box-shadow: 0 0 0 4px rgba(11,127,211,.07); }
.command-search-form > span { display: grid; color: var(--brand); }
.command-search-form > span .ui-icon { width: 21px; height: 21px; }
.command-search-form input { flex: 1; min-height: 56px; padding: 10px 0; border: 0; background: transparent; box-shadow: none; font-size: 14px; font-weight: 650; }
.command-search-form input:focus { box-shadow: none; }
.command-results { min-height: 250px; padding: 14px 0 2px; }
.command-empty { display: grid; justify-items: center; padding: 25px 18px 22px; color: var(--muted); text-align: center; }
.command-empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 12px; color: var(--brand); border-radius: 15px; background: var(--brand-soft); }
.command-empty-icon.muted-icon { color: #8192a0; background: #eef3f6; }
.command-empty strong { color: var(--ink); font-family: var(--font-display); font-size: 16px; }
.command-empty p { max-width: 430px; margin: 7px 0 0; font-size: 10px; line-height: 1.55; }
.command-empty.error-state strong { color: var(--danger); }
.command-section-label, .command-results-head { display: flex; align-items: center; justify-content: space-between; margin: 0 7px 8px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.command-results-head strong { color: var(--brand-strong); font-size: 8px; }
.command-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.command-quick-grid button { display: grid; grid-template-columns: 32px minmax(0, 1fr) 14px; gap: 8px; align-items: center; min-height: 64px; padding: 9px; color: var(--ink); border: 1px solid var(--border); border-radius: 12px; background: #fff; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.command-quick-grid button:hover { transform: translateY(-1px); border-color: #bad8ea; background: var(--brand-soft); }
.command-quick-grid button > .ui-icon { width: 20px; color: var(--brand); }
.command-quick-grid button span { display: grid; min-width: 0; gap: 3px; }
.command-quick-grid button strong { font-size: 9px; }.command-quick-grid button small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.command-result-list { display: grid; gap: 5px; }
.command-result-list button { display: grid; grid-template-columns: 43px minmax(0, 1fr) 18px; gap: 11px; align-items: center; width: 100%; min-height: 68px; padding: 8px 10px; color: var(--ink); border: 1px solid transparent; border-radius: 13px; background: transparent; text-align: left; transition: border-color .15s, background .15s; }
.command-result-list button:hover, .command-result-list button:focus-visible { border-color: #cce1ee; background: #f2f9fd; }
.command-gateway-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #98615c; border-radius: 12px; background: #f7efee; }
.command-gateway-icon.online { color: var(--success); background: var(--success-soft); }
.command-result-copy { display: grid; min-width: 0; gap: 3px; }
.command-result-copy > strong { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.command-result-copy > strong small { color: var(--success); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.command-gateway-icon.offline + .command-result-copy > strong small { color: #98615c; }
.command-result-copy > span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.command-result-copy code { color: #8b9aa6; font: 8px "SFMono-Regular", Consolas, monospace; }
.command-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 220px; color: var(--muted); font-size: 10px; }
.command-loading span { width: 16px; height: 16px; border: 2px solid #cfe1eb; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
.command-footer { display: flex; justify-content: flex-end; gap: 14px; padding: 10px 5px 1px; color: var(--muted); border-top: 1px solid var(--border-soft); font-size: 8px; }
.command-footer span { display: inline-flex; align-items: center; gap: 5px; }
.command-footer kbd { min-width: 24px; min-height: 20px; }
.gateway-overview-hero { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 14px; padding: 18px; color: #fff; border-radius: 17px; background: linear-gradient(125deg, #071f31, #075b91 78%, #078e99 145%); box-shadow: 0 16px 36px rgba(7,73,114,.16); }
.gateway-overview-icon { display: grid; place-items: center; width: 54px; height: 54px; color: #86e2ff; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.08); }
.gateway-overview-icon .ui-icon { width: 28px; height: 28px; }
.gateway-overview-copy { min-width: 0; }
.gateway-overview-copy .section-kicker { margin-bottom: 3px; color: #79dcff; font-size: 8px; }
.gateway-overview-copy h2 { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -.045em; }
.gateway-overview-copy > p:not(.section-kicker) { overflow: hidden; margin: 4px 0 0; color: rgba(255,255,255,.57); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.gateway-overview-health { display: grid; justify-items: end; gap: 6px; }
.gateway-overview-health .status { color: #6de1b0; background: rgba(46,198,139,.13); }.gateway-overview-health .status::before { background: currentColor; }
.gateway-overview-health .status.offline { color: #f2aaa4; background: rgba(212,81,69,.15); }
.gateway-overview-health .map-quality { color: #a9e6f5; font-size: 8px; }.gateway-overview-health small { color: rgba(255,255,255,.49); font-size: 8px; }
.gateway-overview-routes { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 3px; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: 13px; background: #f7fafc; }
.gateway-overview-routes .section-kicker { margin-bottom: 2px; font-size: 7px; }.gateway-overview-routes h3 { margin: 0; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.detail-item { min-height: 76px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 12px; background: #f7f9fb; }
.detail-item span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.detail-item strong { font-size: 11px; overflow-wrap: anywhere; }
.map-link { color: var(--brand); font-weight: 800; text-underline-offset: 3px; }
.map-link:hover { color: var(--brand-hover); }
.table-link { padding: 0; color: var(--brand); border: 0; background: none; font: inherit; font-weight: 800; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.table-link:hover { color: var(--brand-hover); text-decoration-color: currentColor; }
.tabs { position: sticky; z-index: 3; top: -22px; display: flex; gap: 3px; margin: -22px -22px 20px; padding: 12px 22px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.tab { flex: 1; min-height: 38px; padding: 8px; color: var(--muted); border: 0; border-radius: 999px; background: transparent; font-size: 10px; font-weight: 800; }
.tab:hover { color: var(--brand); background: var(--brand-soft); }
.tab.active { color: var(--surface); background: var(--brand); box-shadow: 0 7px 18px rgba(13,108,181,.2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--border); }
.command-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.command-card { padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfd; }
.command-card h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 14px; font-weight: 500; }
.command-card p { min-height: 32px; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.permission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 12px 0; }
.user-two-factor-card { margin: 20px 0 24px; padding: 20px; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 12px; background: #f8fbfb; }
.user-two-factor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 7px; }
.user-two-factor-head h3 { margin: 3px 0 0; font-size: 19px; }
.user-two-factor-card > .muted { margin: 0 0 16px; font-size: 11px; line-height: 1.55; }
.user-two-factor-fields { margin-bottom: -12px; }
.user-two-factor-fields label[hidden] { display: none; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 10px; font-weight: 650; }
.check input { width: 16px; min-height: 16px; margin: 0; }
.danger-zone { margin-top: 22px; padding: 16px; border: 1px solid #efcfcc; border-radius: 13px; background: var(--danger-soft); }
.danger-zone h4 { margin: 0 0 5px; color: var(--danger); font-family: var(--font-display); font-weight: 500; }
.danger-zone p { margin: 0 0 12px; color: #885e59; font-size: 10px; line-height: 1.5; }
.json-view { max-height: 230px; overflow: auto; margin: 0; padding: 13px; color: #d4edff; border-radius: 11px; background: var(--navy); font: 10px/1.55 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast { padding: 13px 15px; color: var(--surface); border-radius: 12px; background: var(--navy-soft); box-shadow: var(--shadow-lg); font-size: 11px; animation: toast-in .2s ease-out; }
.toast.error { background: #842d25; }.toast.success { background: var(--brand-strong); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.skeleton { min-height: 130px; border-radius: 15px; background: linear-gradient(90deg, #eaf0f4 20%, #f8fafb 40%, #eaf0f4 60%); background-size: 200% 100%; animation: loading 1.4s infinite; }
@keyframes loading { to { background-position: -200% 0; } }

@media (max-width: 1180px) {
  .dashboard-hero { grid-template-columns: 1fr; }
  .network-score { min-height: 138px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .dashboard-table th:nth-child(6), .dashboard-table td:nth-child(6) { display: none; }
  .settings-layout { grid-template-columns: 185px minmax(0, 1fr); }
  .settings-fields.password-fields { grid-template-columns: 1fr 1fr; }
  .settings-fields.password-fields .settings-field:last-child { grid-column: 1 / -1; }
  .gateway-map-layout { grid-template-columns: minmax(0, 1fr); }
  .gateway-map-panel { height: 610px; }
  .gateway-map-side { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(360px, 1fr); height: 500px; }
  .gateway-map-list-panel { min-height: 0; }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; background: var(--surface); }
  .login-brand { min-height: 245px; padding: 28px; }
  .login-lockup { margin-bottom: 44px; }
  .login-message { margin: 0; padding: 10px 0 28px; }
  .login-message .eyebrow, .login-copy, .login-features { display: none; }
  .login-message h1 { max-width: 620px; font-size: clamp(32px, 8vw, 48px); }
  .network-art { width: 260px; height: 260px; right: -80px; bottom: -120px; }
  .login-panel { min-height: calc(100vh - 245px); padding: 35px 24px 50px; }
  .mobile-logo { display: none; }
  .app-shell { display: block; }
  .sidebar { width: 280px; transform: translateX(-102%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  body.nav-open .sidebar-overlay { visibility: visible; opacity: 1; }
  .icon-button.sidebar-close { display: inline-grid; color: var(--surface); border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.06); }
  .workspace { min-height: 100vh; }
  .menu-button { display: inline-grid; }
  .topbar { min-height: 82px; padding: 14px 16px; }
  .topbar h1 { font-size: 21px; }
  .view-heading .eyebrow { display: none; }
  .topbar-actions { gap: 7px; }
  .global-search-trigger { min-width: 42px; width: 42px; padding: 0; justify-content: center; }
  .global-search-trigger span, .global-search-trigger kbd { display: none; }
  .topbar-actions > .button { min-width: 42px; padding-inline: 12px; }
  .live-pill { min-height: 40px; padding: 7px 10px; }
  .live-pill small { display: none; }
  .content { padding: 22px 15px 40px; }
  .dashboard-hero { padding: 24px; border-radius: 20px; }
  .dashboard-quick-actions button { flex: 1 1 180px; }
  .network-score { min-height: 125px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-badge { min-height: 32px; }
  .stack-toolbar, .tenant-hero { align-items: stretch; flex-direction: column; }
  .stack-toolbar label, .tenant-identifiers { width: 100%; max-width: none; }
  .stack-toolbar label { flex: 0 0 auto; }
  .stack-summary { width: 100%; justify-content: flex-start; padding: 0; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 280px; }
  .tenant-hero { padding: 20px; }
  .chirpstack-split { grid-template-columns: 1fr; }
  .import-summary { grid-template-columns: repeat(3, 1fr); }
  .toolbar-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .filter-select { width: 100%; }
  .map-stat-grid { grid-template-columns: 1fr 1fr; }
  .gateway-map-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .gateway-map-toolbar .search { grid-column: 1 / -1; min-width: 0; }
  .gateway-map-toolbar .filter-select { width: 100%; }
  .gateway-map-visible { margin-left: 0; padding: 0 4px; text-align: right; }
  .gateway-map-panel { height: 520px; }
  .gateway-map-side { display: flex; height: auto; }
  .gateway-map-list-panel { flex-basis: 340px; }
  .gateway-map-detail { flex: none; min-height: 520px; max-height: 720px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .form-grid, .command-grid, .permission-grid { grid-template-columns: 1fr; }
  .modal, .modal.wide, .modal.narrow { width: 100%; max-width: none; border-radius: 0; }
  .modal.command-modal { width: calc(100% - 24px); border-radius: 20px; }
  .modal-body { padding: 18px; }
  .tabs { top: -18px; margin: -18px -18px 18px; padding-inline: 18px; overflow-x: auto; }
  .gateway-table thead { display: none; }
  .gateway-table tbody { display: grid; gap: 10px; padding: 10px; background: var(--canvas); }
  .gateway-table tbody tr[data-id] { position: relative; display: grid; gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .gateway-table tbody tr[data-id]::after { content: "→"; position: absolute; top: 16px; right: 14px; color: var(--brand); font-size: 18px; }
  .gateway-table td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: center; height: auto; min-height: 42px; padding: 9px 14px; border-bottom: 1px solid var(--border-soft); }
  .gateway-table td:first-child { padding-right: 46px; background: #f8fafc; }
  .gateway-table td::before { content: attr(data-label); color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .gateway-table .gateway-address { min-width: 0; max-width: none; }
  .gateway-table .empty-row { display: table-row; }
  .gateway-table .empty-row td { display: table-cell; }
  .dashboard-table th:nth-child(6), .dashboard-table td:nth-child(6) { display: grid; }
  .device-table thead { display: none; }
  .device-table tbody { display: grid; gap: 10px; padding: 10px; background: var(--canvas); }
  .device-table tbody tr { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
  .device-table td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; height: auto; min-height: 42px; padding: 9px 14px; }
  .device-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .device-table td[colspan] { display: block; }
  .settings-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
  .settings-hero-badge { width: 100%; min-width: 0; }
  .settings-status-card { grid-template-columns: 42px minmax(0, 1fr); }
  .settings-status-card > .button, .settings-status-card > .status { grid-column: 1 / -1; width: 100%; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav-panel { position: static; display: flex; overflow-x: auto; }
  .settings-nav-panel button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .settings-fields, .settings-fields.password-fields { grid-template-columns: 1fr; }
  .settings-fields.password-fields .settings-field:last-child { grid-column: auto; }
  .settings-save-row { align-items: stretch; flex-direction: column; }
  .settings-password-confirm { width: 100%; max-width: none; }
  .deployment-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .login-brand { min-height: 220px; }
  .login-message h1 { font-size: 30px; }
  .login-panel { min-height: calc(100vh - 220px); }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 128px; }
  .dashboard-hero { padding: 21px 18px; }
  .dashboard-hero h2 { font-size: 29px; }
  .dashboard-quick-actions { display: grid; }
  .dashboard-quick-actions button { width: 100%; }
  .network-score > strong { font-size: 36px; }
  .toolbar-panel { grid-template-columns: 1fr; }
  .search { grid-column: auto; }
  .toolbar-count { justify-content: center; margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .gateway-overview-hero { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
  .gateway-overview-icon { width: 43px; height: 43px; }
  .gateway-overview-health { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; }
  .gateway-overview-health small { justify-self: end; }
  .gateway-overview-routes { align-items: flex-start; flex-direction: column; }
  .command-quick-grid { grid-template-columns: 1fr; }
  .command-footer { display: none; }
  .resource-meta { grid-template-columns: 1fr; }
  .import-summary { grid-template-columns: repeat(2, 1fr); }
  .import-result { grid-template-columns: 1fr; gap: 5px; }
  .import-job-row { grid-template-columns: minmax(0, 1fr) 22px; }
  .import-job-mini-progress { grid-column: 1 / -1; grid-row: 2; }
  .import-job-row b { grid-column: 2; grid-row: 1; }
  .pagination { justify-content: space-between; }
  .pagination span { text-align: center; }
  .topbar { gap: 10px; }
  .topbar h1 { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .topbar-actions { flex: 0 0 auto; gap: 7px; margin-left: 0; }
  .live-pill { position: relative; justify-content: center; width: 40px; padding: 0; }
  .live-pill > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar-actions #logout-button { width: 42px; overflow: hidden; gap: 0; color: transparent; font-size: 0; }
  .topbar-actions #logout-button::before { content: "↗"; color: var(--brand); font-size: 17px; }
  .settings-hero { min-height: 210px; padding: 22px; border-radius: 20px; }
  .settings-hero h2 { font-size: 29px; }
  .settings-card-head { align-items: flex-start; padding: 16px; }
  .settings-count { display: none; }
  .settings-form { padding-inline: 13px; }
  .settings-field, .settings-switch-row { margin-top: 12px; padding: 12px; }
  .settings-status-card { padding: 13px; }
  .gateway-map-toolbar { grid-template-columns: 1fr; }
  .gateway-map-toolbar .search { grid-column: auto; }
  .gateway-map-visible { text-align: left; }
  .gateway-map-panel { height: 430px; border-radius: 16px; }
  .gateway-map-legend { bottom: 10px; gap: 7px; padding: 7px 9px; }
  .gateway-map-legend span { font-size: 7px; }
  .map-tile-warning { top: 58px; width: calc(100% - 24px); }
  .map-detail-grid { grid-template-columns: 1fr; }
}

@media (min-width: 821px) and (max-height: 780px) {
  .sidebar { padding-top: 15px; padding-bottom: 12px; }
  .sidebar-head { padding-bottom: 11px; }
  .sidebar-head .brand-symbol { flex-basis: 34px; height: 34px; }
  .sidebar-head .brand-lockup strong { font-size: 18px; }
  .nav-item { min-height: 37px; padding-block: 6px; font-size: 11px; }
  .nav-sections .nav-group-gap { margin-top: 7px; }
  .nav-caption { margin-bottom: 4px; font-size: 8px; }
  .sidebar-system { margin-top: 5px; }
  .sidebar-system .nav-caption { display: none; }
  .system-settings-item { margin-bottom: 5px; }
  .sidebar-status { min-height: 44px; padding-block: 7px; }
  .profile-card { margin-top: 6px; padding-block: 7px; }
}

.modal.raw-data-modal { width: min(1180px, calc(100vw - 40px)); max-height: calc(100vh - 36px); }
.raw-data-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.raw-data-toolbar .toolbar-count { margin-left: auto; }
.raw-live-status { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid #d5e2ee; border-radius: 999px; background: #eef5fb; color: #547086; font-size: 12px; font-weight: 700; }
.raw-live-status.connected { border-color: #bfe7d1; background: #eaf8f1; color: #137b4f; }
.raw-live-status.error { border-color: #f4c5c1; background: #fff0ef; color: #b93830; }
.raw-data-list { display: grid; gap: 12px; }
.raw-data-card { padding: 15px; border: 1px solid #dce6ef; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgb(20 52 76 / 5%); }
.raw-data-card > header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.raw-data-card > header time { margin-left: auto; color: #71869a; font-size: 12px; }
.raw-data-card h4 { margin: 12px 0; font-size: 15px; }
.raw-source, .raw-direction { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.raw-source.frame { background: #eaf2ff; color: #1e63aa; }
.raw-source.event { background: #e9f8f1; color: #167950; }
.raw-direction { background: #f1f4f7; color: #62768a; }
.raw-direction.uplink { background: #edf8ee; color: #2f7d3c; }
.raw-direction.downlink { background: #fff4e7; color: #a96013; }
.raw-hex-list { display: grid; gap: 10px; margin-bottom: 12px; }
.raw-hex-list > div { display: grid; grid-template-columns: minmax(180px, auto) 1fr auto; gap: 8px; align-items: center; padding: 11px 12px; border-radius: 11px; background: #081d2c; color: #d9edff; }
.raw-hex-list span { color: #8fb0c8; font-size: 11px; font-weight: 700; }
.raw-hex-list code { overflow-wrap: anywhere; white-space: pre-wrap; }
.raw-hex-list .button { border-color: #36566d; color: #d9edff; }
.button.tiny { min-height: 27px; padding: 4px 8px; font-size: 10px; }
.raw-data-card details { margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf1f5; }
.raw-data-card summary { color: #47647a; font-size: 12px; font-weight: 700; cursor: pointer; }
.raw-data-card .json-view { max-height: 360px; }
.raw-no-payload, .raw-truncated { margin: 8px 0; color: #75899b; font-size: 12px; }

.archive-application-strip { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 18px 20px; }
.archive-application-strip h3 { margin: 2px 0 5px; font-size: 16px; }
.archive-application-strip small { color: var(--muted); }
.archive-source-summary { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.archive-source-summary h3 { margin: 3px 0 7px; }
.archive-source-summary p { margin: 0; color: var(--muted); }
.archive-scope-grid, .archive-record-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.archive-scope-grid > div, .archive-record-scope > div { min-width: 0; padding: 12px; border: 1px solid #dce6ef; border-radius: 11px; background: #f8fbfd; }
.archive-scope-grid dt, .archive-record-scope dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.archive-scope-grid dd, .archive-record-scope dd { margin: 0; overflow-wrap: anywhere; }
.archive-source-actions { margin-bottom: 18px; }
.archive-action-confirmation { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: -4px 0 18px; padding: 14px 15px; border: 1px solid #efc2be; border-radius: 13px; background: #fff6f5; box-shadow: 0 8px 22px rgb(122 37 30 / 6%); }
.archive-action-confirmation > div:first-child { min-width: 0; }
.archive-action-confirmation strong { color: #8f2d26; font-size: 13px; }
.archive-action-confirmation p { margin: 4px 0 0; color: #765a57; font-size: 11px; line-height: 1.5; }
.archive-token-row + .archive-action-confirmation { margin: -1px 0 0; }
.archive-action-confirmation .button-row { flex: 0 0 auto; }
.archive-api-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e2eaf1; }
.archive-token-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin: 16px 0; }
.archive-token-form label { display: grid; gap: 7px; color: var(--text); font-size: 12px; font-weight: 750; }
.archive-token-list { display: grid; gap: 8px; }
.archive-token-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid #dce6ef; border-radius: 12px; }
.archive-token-row > span:first-child { display: grid; min-width: 0; gap: 3px; }
.archive-token-row code { overflow-wrap: anywhere; color: var(--brand); }
.archive-token-row small { color: var(--muted); }
.archive-token-reveal { display: grid; gap: 12px; margin: 16px 0; padding: 15px; border: 1px solid #f0d595; border-radius: 14px; background: #fffaf0; }
.archive-token-reveal textarea { min-height: 76px; resize: vertical; font-family: var(--mono, monospace); }
.archive-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: -2px 0 16px; }
.archive-status-card { display: flex; min-width: 0; gap: 13px; align-items: center; padding: 15px 17px; border: 1px solid #dbe6ef; border-radius: 15px; background: rgb(255 255 255 / 88%); box-shadow: 0 7px 24px rgb(20 52 76 / 4%); }
.archive-status-card > span:last-child { display: grid; min-width: 0; gap: 3px; }
.archive-status-card small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.archive-status-card strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.archive-status-icon, .archive-status-value { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #edf3f8; color: #5e7589; font-size: 18px; font-weight: 850; }
.archive-status-icon .ui-icon { width: 21px; height: 21px; }
.archive-status-card.ready .archive-status-icon, .archive-status-card.ready .archive-status-value { background: #e7f7ef; color: #17855b; }
.archive-status-card.warning .archive-status-icon, .archive-status-card.warning .archive-status-value { background: #fff5df; color: #a86c0c; }
.archive-status-card.error .archive-status-icon, .archive-status-card.error .archive-status-value { background: #fff0ef; color: #b93830; }
.archive-setup-callout { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding: 15px 17px; border: 1px solid #f0d595; border-radius: 15px; background: #fffaf0; }
.archive-setup-callout > div { min-width: 0; flex: 1; }
.archive-setup-callout strong { font-size: 14px; }
.archive-setup-callout p { margin: 4px 0 0; color: #796544; font-size: 12px; line-height: 1.5; }
.archive-setup-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #ffe9b8; color: #97610b; font-size: 20px; }
.archive-filter-panel { margin-bottom: 18px; padding: 0; overflow: hidden; border: 1px solid #dbe6ef; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.archive-filter-heading { display: flex; gap: 22px; align-items: end; justify-content: space-between; padding: 20px 22px 17px; border-bottom: 1px solid #e7edf2; background: linear-gradient(135deg, #fbfdff 0%, #f5faff 100%); }
.archive-filter-heading h3 { margin: 3px 0 5px; font-size: 18px; }
.archive-filter-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.archive-filter-kicker { color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.archive-source-picker { display: grid; width: min(440px, 44%); min-width: 280px; gap: 7px; color: var(--text); font-size: 11px; font-weight: 800; }
.archive-hierarchy { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 20px 22px; }
.archive-scope-field { display: grid; min-width: 0; align-content: start; gap: 8px; padding: 0 15px; border-right: 1px solid #e6edf3; }
.archive-scope-field:first-child { padding-left: 0; }
.archive-scope-field:last-child { padding-right: 0; border-right: 0; }
.archive-field-title { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 11px; font-weight: 850; }
.archive-field-title b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: #e8f3ff; color: var(--brand); font-size: 10px; }
.archive-scope-field select, .archive-scope-field input { min-width: 0; }
.archive-selection-detail { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 750; }
.archive-selection-detail > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-selection-detail code { min-width: 0; overflow: hidden; color: #71869a; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.archive-device-detail { grid-template-columns: minmax(0, 1fr); }
.archive-time-filter { display: flex; gap: 24px; align-items: end; justify-content: space-between; padding: 17px 22px; border-top: 1px solid #e7edf2; background: #fbfcfd; }
.archive-period-presets { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.archive-period-presets > span { margin-right: 2px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.archive-period-button { min-height: 32px; padding: 5px 11px; border: 1px solid #d7e3ed; border-radius: 999px; background: #fff; color: #526c81; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.archive-period-button:hover { border-color: #9ec9ed; color: var(--brand); }
.archive-period-button.active { border-color: #b5d9f6; background: #eaf5ff; color: #0875c7; }
.archive-date-fields { display: flex; gap: 9px; align-items: end; }
.archive-date-fields label { display: grid; min-width: 205px; gap: 6px; color: var(--text); font-size: 10px; font-weight: 800; }
.archive-date-arrow { min-height: 42px; color: #93a6b6; line-height: 42px; }
.archive-filter-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 15px 22px; border-top: 1px solid #e7edf2; }
.archive-filter-actions .button.primary { min-width: 190px; }
.archive-results-head { display: flex; gap: 16px; align-items: end; justify-content: space-between; margin: 20px 2px 13px; color: var(--muted); }
.archive-results-head > div { display: grid; gap: 2px; }
.archive-results-head > div > span { color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.archive-results-head > div > strong { color: var(--text); font-size: 18px; }
.archive-results-head small { text-align: right; }
.archive-query-empty { min-height: 190px; border: 1px dashed #ccdae5; border-radius: 17px; background: rgb(255 255 255 / 58%); }
.archive-query-empty span { max-width: 560px; color: var(--muted); line-height: 1.5; }
.archive-query-empty.error { border-color: #edc5c1; background: #fff9f8; }
.archive-query-empty .button { margin-top: 5px; }
.archive-event-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.archive-event-meta span { padding: 7px 10px; border-radius: 8px; background: #eef4f8; color: #5d7387; font-size: 11px; }
.archive-record-scope { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-record-scope > div { padding: 9px 11px; }
.archive-more { display: flex; justify-content: center; padding: 18px; }

@media (max-width: 1180px) {
  .archive-hierarchy { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .archive-scope-field:nth-child(2) { padding-right: 0; border-right: 0; }
  .archive-scope-field:nth-child(3) { padding-left: 0; }
  .archive-time-filter { align-items: stretch; flex-direction: column; }
  .archive-date-fields label { min-width: 0; flex: 1; }
}

@media (max-width: 760px) {
  .modal.raw-data-modal { width: calc(100vw - 16px); }
  .raw-data-toolbar .toolbar-count { margin-left: 0; }
  .raw-hex-list > div { grid-template-columns: 1fr; }
  .raw-data-card > header time { width: 100%; margin-left: 0; }
  .archive-application-strip, .archive-source-summary, .archive-token-row, .archive-results-head, .archive-filter-heading, .archive-setup-callout, .archive-action-confirmation { align-items: stretch; flex-direction: column; }
  .archive-scope-grid, .archive-record-scope, .archive-token-form, .archive-status-grid, .archive-hierarchy { grid-template-columns: 1fr; }
  .archive-source-picker { width: 100%; min-width: 0; }
  .archive-hierarchy { gap: 0; padding: 10px 16px; }
  .archive-scope-field, .archive-scope-field:first-child, .archive-scope-field:nth-child(3), .archive-scope-field:last-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid #e6edf3; }
  .archive-scope-field:last-child { border-bottom: 0; }
  .archive-time-filter, .archive-filter-actions { padding-right: 16px; padding-left: 16px; }
  .archive-date-fields { align-items: stretch; flex-direction: column; }
  .archive-date-arrow { display: none; }
  .archive-filter-actions .button { min-width: 0; flex: 1; }
  .archive-results-head small { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* WUM industrial interface — brochure-inspired visual system */
:root {
  --brand: #0f7f8d;
  --brand-hover: #0a6b76;
  --brand-strong: #075965;
  --brand-soft: #e6f3f3;
  --accent: #ec4c3b;
  --accent-soft: #fff0ed;
  --navy: #122630;
  --navy-soft: #1b3540;
  --ink: #333b40;
  --muted: #68777d;
  --canvas: #f3f5f4;
  --surface: #ffffff;
  --border: #d7dfdf;
  --border-soft: #e9eeee;
  --success: #16825f;
  --success-soft: #e8f6ef;
  --warning: #9b670e;
  --warning-soft: #fff6e2;
  --danger: #bd3d31;
  --danger-soft: #fff0ee;
  --shadow-sm: 0 8px 24px rgba(29, 48, 54, .055);
  --shadow-lg: 0 32px 90px rgba(12, 28, 35, .28);
  --radius: 14px;
}

html { scrollbar-color: #aebfc1 transparent; scrollbar-width: thin; }
body {
  background:
    linear-gradient(115deg, rgba(15, 127, 141, .035), transparent 34%),
    var(--canvas);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #aebfc1; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--brand); }
:focus-visible { outline-color: rgba(15, 127, 141, .32); }

.eyebrow, .section-kicker, .nav-caption {
  color: var(--brand);
  font-size: 9px;
  letter-spacing: .16em;
}
.eyebrow.inverse { color: #77d0d3; }

.brand-lockup { gap: 13px; }
.brand-wordmark { display: block; flex: 0 0 auto; width: 94px; height: auto; }
.brand-product { display: grid; gap: 2px; padding-left: 12px; border-left: 1px solid currentColor; }
.brand-lockup .brand-product strong { font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.brand-lockup .brand-product small { font-size: 7px; letter-spacing: .18em; opacity: .62; }

.login-page { grid-template-columns: minmax(540px, 1.12fr) minmax(440px, .88fr); background: var(--canvas); }
.login-brand {
  padding: clamp(34px, 5vw, 76px);
  background:
    radial-gradient(ellipse at 18% 8%, rgba(70, 118, 132, .42), transparent 38%),
    radial-gradient(ellipse at 88% 92%, rgba(15, 127, 141, .29), transparent 38%),
    linear-gradient(145deg, #101a22 0%, #172d38 48%, #0e202a 100%);
}
.login-brand::before {
  opacity: .14;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(135deg, #000, transparent 68%);
}
.login-lockup { position: relative; z-index: 3; }
.login-message { max-width: 780px; padding-block: 72px; }
.login-message h1 {
  max-width: 760px;
  font-size: clamp(48px, 5.15vw, 78px);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.055em;
}
.login-message h1 span { color: #72c7cb; font-weight: 300; }
.login-copy { max-width: 660px; margin-top: 30px; color: rgba(255,255,255,.7); font-size: 16px; line-height: 1.65; }
.login-features { gap: 10px; margin-top: 34px; }
.login-features span {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  font-size: 10px;
}
.login-features b { color: #fff; font-weight: 850; }
.login-features i { border-radius: 2px; background: var(--accent); box-shadow: none; }
.network-art {
  right: -185px;
  bottom: -250px;
  width: 720px;
  height: 720px;
  border: 0;
  border-radius: 43% 57% 38% 62%;
  background:
    repeating-radial-gradient(ellipse at 44% 38%, transparent 0 44px, rgba(137,204,207,.13) 46px 48px, transparent 50px 76px);
  filter: blur(.2px);
  opacity: .88;
  transform: rotate(-18deg);
}
.network-art::before, .network-art::after { display: none; }
.network-art i { width: 7px; height: 7px; background: #73d0d3; box-shadow: 0 0 0 6px rgba(115,208,211,.1); }

.login-panel { padding: clamp(28px, 6vw, 88px); background: #f1f3f2; }
.login-card-shell {
  width: min(100%, 470px);
  padding: clamp(28px, 3.2vw, 44px);
  border: 1px solid var(--border);
  border-top: 5px solid var(--brand);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 45, 51, .11);
}
.login-card h2 { font-size: clamp(34px, 3vw, 44px); font-weight: 680; color: var(--ink); }
.login-intro { margin-bottom: 32px; }
.login-security { margin-top: 24px; color: #77858a; }
.login-security i { border-radius: 2px; background: var(--brand); }

.field, label { gap: 8px; color: #455359; font-size: 11px; font-weight: 780; }
input, select, textarea {
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  border-color: #cbd5d5;
  border-radius: 9px;
  background-color: #fbfcfc;
  font-size: 13px;
}
select {
  appearance: none;
  height: 50px;
  min-width: 0;
  min-height: 50px;
  padding: 0 54px 0 15px;
  border-color: #bccbcb;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Crect x='.5' y='.5' width='33' height='33' rx='8.5' fill='%23eaf4f3' stroke='%23d2e4e2'/%3E%3Cpath d='m12 15 5 5 5-5' fill='none' stroke='%230f7f8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 34px 34px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  cursor: pointer;
  font-weight: 720;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #9eb6b8; background-color: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background-color: #fff; box-shadow: 0 0 0 4px rgba(15,127,141,.11); }
input:disabled, select:disabled, textarea:disabled { color: #849095; border-color: #e0e5e5; background-color: #f1f3f3; opacity: 1; }
select:disabled { cursor: not-allowed; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Crect x='.5' y='.5' width='33' height='33' rx='8.5' fill='%23e6eaea' stroke='%23d9dfdf'/%3E%3Cpath d='m12 15 5 5 5-5' fill='none' stroke='%238b989c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@supports (appearance: base-select) {
  select,
  select::picker(select) { appearance: base-select; }
  select { align-items: center; }
  select::picker-icon { display: none; }
  select::picker(select) {
    max-height: min(420px, 60vh);
    margin-block: 6px;
    overflow: auto;
    padding: 6px;
    color: var(--ink);
    border: 1px solid #b8c9c9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(18, 53, 59, .18);
  }
  select option {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
  }
  select option:hover { background: var(--brand-soft); }
  select option:checked { color: #fff; background: var(--brand); }
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
textarea { line-height: 1.55; }
.password-control button { color: var(--brand-strong); border-radius: 7px; }
.password-control button:hover { background: var(--brand-soft); }
.two-factor-code { font-size: 26px; }

.button {
  min-height: 43px;
  padding: 10px 17px;
  border-radius: 9px;
  font-size: 11px;
  letter-spacing: .015em;
}
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(24,51,58,.11); }
.button.primary, .button.accent { background: var(--brand); box-shadow: 0 8px 20px rgba(15,127,141,.18); }
.button.primary:hover:not(:disabled), .button.accent:hover:not(:disabled) { background: var(--brand-hover); }
.button.ghost { color: var(--brand-strong); border-color: #cbd7d7; background: #fff; }
.button.danger { color: var(--danger); border-color: #efc5c0; background: var(--danger-soft); box-shadow: none; }
.button.warning { color: var(--warning); border-color: #ead4a3; background: var(--warning-soft); }
.button.small { border-radius: 8px; }
.button.wide { min-height: 52px; }

.app-shell { grid-template-columns: 270px minmax(0, 1fr); }
.sidebar {
  width: 270px;
  padding: 24px 17px 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(42,109,120,.24), transparent 34%),
    linear-gradient(180deg, #132832 0%, #0d2029 100%);
  box-shadow: 10px 0 40px rgba(12,29,36,.08);
}
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent) 0 30%, var(--brand) 30% 100%); }
.sidebar-head { padding: 2px 8px 24px; }
.sidebar-head .brand-wordmark { width: 78px; }
.sidebar-head .brand-product { color: #fff; }
.nav-caption { margin: 0 12px 9px; color: #71aeb4; opacity: .78; }
.nav-sections .nav-group-gap { margin-top: 15px; }
.nav-item {
  position: relative;
  min-height: 44px;
  padding: 9px 12px;
  color: rgba(255,255,255,.64);
  border-radius: 9px;
  font-size: 12px;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--brand); box-shadow: 0 9px 24px rgba(5,67,76,.24); }
.nav-item.active::before { content: ""; position: absolute; left: -4px; width: 3px; height: 22px; border-radius: 2px; background: var(--accent); }
.nav-icon { width: 23px; }
.nav-icon svg { width: 18px; height: 18px; }
.sidebar-status, .profile-card { border-radius: 10px; background: rgba(255,255,255,.045); }
.profile-card { border-top: 1px solid rgba(255,255,255,.07); }
.avatar { border-radius: 8px; background: var(--brand); }
.workspace { grid-column: 2; }

.topbar {
  min-height: 86px;
  padding-inline: clamp(22px, 3vw, 46px);
  border-bottom-color: rgba(205,216,216,.9);
  background: rgba(255,255,255,.93);
  box-shadow: 0 8px 26px rgba(27,49,55,.035);
}
.topbar h1 { font-size: 24px; font-weight: 760; color: var(--ink); }
.global-search-trigger { min-width: 220px; border-color: #d2dddd; border-radius: 9px; background: #f6f8f7; }
.global-search-trigger:hover { border-color: #a9c1c3; }
kbd { border-radius: 5px; color: var(--brand-strong); }
.live-pill { border-radius: 9px; }
.live-pill > i { border-radius: 2px; }
.icon-button { border-color: #d2dddd; border-radius: 9px; }
.content { width: min(100%, 1580px); padding: 30px clamp(22px, 3vw, 46px) 58px; }

.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 27px; font-weight: 760; }
.section-badge { border-radius: 8px; }
.section-badge i { border-radius: 2px; }
.dashboard-hero, .settings-hero, .tenant-hero {
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(79,130,143,.38), transparent 43%),
    radial-gradient(ellipse at 90% 100%, rgba(15,127,141,.28), transparent 37%),
    linear-gradient(135deg, #132630, #1a3541 54%, #10242d);
  box-shadow: 0 20px 48px rgba(15,35,43,.15);
}
.dashboard-hero::after, .settings-hero::before, .tenant-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--accent); }
.dashboard-hero::before, .settings-hero::after { border-color: rgba(112,199,203,.15); box-shadow: 0 0 0 52px rgba(112,199,203,.025), 0 0 0 105px rgba(112,199,203,.016); }
.dashboard-hero .section-kicker, .settings-hero .section-kicker { color: #77d0d3; }
.dashboard-quick-actions button { border-radius: 9px; }
.dashboard-quick-actions button > .ui-icon { color: #76ced1; }
.network-score { border-radius: 11px; }
.network-score progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), #72c9cc); }
.network-score progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), #72c9cc); }

.stat-card, .panel, .toolbar-panel, .stack-toolbar, .table-wrap, .resource-card,
.settings-status-card, .settings-card, .gateway-map-panel, .gateway-map-list-panel,
.gateway-map-detail, .archive-filter-panel, .archive-status-card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-card { min-height: 136px; }
.stat-card.primary { border-color: var(--brand); background: linear-gradient(145deg, #0f7f8d, #075965); box-shadow: 0 14px 32px rgba(15,127,141,.2); }
.stat-card.online-card { border-color: #c9e2d8; }
.stat-icon, .service-icon, .resource-icon, .settings-card-icon { border-radius: 8px; }
.resource-icon, .settings-card-icon { background: var(--brand); box-shadow: 0 8px 18px rgba(15,127,141,.16); }
.panel-head { min-height: 78px; }
.panel-head h3 { font-weight: 760; }
.toolbar-panel, .stack-toolbar, .gateway-map-toolbar { padding: 12px; background: rgba(255,255,255,.96); }
.search input { background-color: #fbfcfc; }
.filter-select { height: 46px; min-height: 46px; padding-left: 13px; }
.select-context { display: block; overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

table { font-size: 12px; }
th {
  padding-block: 13px;
  color: var(--brand-strong);
  border-bottom-color: #cfdcdc;
  background: #edf5f4;
  font-size: 8px;
  letter-spacing: .12em;
}
td { height: 54px; }
tbody tr[data-id]:hover { background: #eef7f6; }
tbody tr[data-id]:focus-visible { outline-color: rgba(15,127,141,.28); }
@keyframes row-update { from { background: #dcefee; } }
.status { border-radius: 6px; }
.status::before { border-radius: 2px; }
.route-tag, .resource-stats > span { border-radius: 6px; }
.callout { border-color: #bfdddd; border-left: 4px solid var(--brand); border-radius: 9px; }
.empty { border-radius: 12px; }

.resource-card { min-height: 292px; }
.resource-card:hover { border-color: #9dc6c8; box-shadow: 0 14px 30px rgba(18,53,59,.09); }
.resource-id, .resource-meta div, .detail-item, .command-card, .application-identifiers > span { border-radius: 8px; background: #f5f7f6; }
.resource-list-item:hover, .profile-item:hover { background: #eef7f6; }
.tenant-hero { position: relative; overflow: hidden; }
.tabs { gap: 6px; background: rgba(255,255,255,.98); }
.tab { border: 1px solid transparent; border-radius: 7px; }
.tab:hover { border-color: #c7dddd; }
.tab.active { border-color: var(--brand); background: var(--brand); box-shadow: none; }
.check { border-radius: 8px; background: #fafbfb; }
.danger-zone { border-left: 4px solid var(--danger); border-radius: 9px; }
.json-view, .raw-hex-list > div { border-radius: 8px; background: #102630; }

.settings-hero { min-height: 176px; }
.settings-hero-badge { border-radius: 9px; }
.settings-hero-badge > i { border-radius: 2px; }
.settings-nav-panel { border-radius: 11px; }
.settings-nav-panel button { border-radius: 7px; }
.settings-nav-panel button span { border-radius: 6px; }
.settings-card-head { min-height: 88px; background: #fff; }
.settings-card-head::before { content: ""; align-self: stretch; width: 3px; margin: -17px 0 -17px -20px; background: var(--brand); }
.settings-card-icon.account { background: var(--accent); }
.settings-field, .settings-switch-row { border-color: #e0e7e7; border-radius: 9px; background: #f7f9f8; }
.settings-field:hover, .settings-switch-row:hover { border-color: #c5d6d6; }
.settings-count { border-radius: 6px; }
.switch-control i { background: #c4cece; }
.switch-control input:checked + i { background: var(--brand); }
.switch-control input:focus-visible + i { outline-color: rgba(15,127,141,.25); }

.modal-backdrop { background: rgba(10,24,30,.6); backdrop-filter: blur(7px); }
.modal { border-left: 4px solid var(--brand); border-radius: 16px 0 0 16px; }
.modal.command-modal { border: 1px solid rgba(255,255,255,.6); border-top: 4px solid var(--brand); border-radius: 15px; }
.modal-header { min-height: 86px; background: #fff; }
.modal-header h2 { font-weight: 720; }
.command-search-form { border-color: #a9ccce; border-radius: 9px; background: #f7faf9; box-shadow: 0 0 0 4px rgba(15,127,141,.065); }
.command-quick-grid button, .command-result-list button { border-radius: 9px; }
.command-quick-grid button:hover, .command-result-list button:hover, .command-result-list button:focus-visible { border-color: #acd0d2; background: var(--brand-soft); }
.command-empty-icon, .command-gateway-icon { border-radius: 8px; }

.gateway-map-panel { background: #e8eceb; }
.gateway-map-canvas { background: linear-gradient(145deg, #e4eae9, #f4f6f5); }
.gateway-map-canvas .leaflet-control-zoom { border-radius: 8px; }
.gateway-map-legend { border-radius: 8px; }
.map-gateway-list-item:hover { background: #eef7f6; }
.map-gateway-list-item.selected { background: var(--brand-soft); }
.map-gateway-dot { border-radius: 2px; }
.map-detail-highlight { border-radius: 9px; background: linear-gradient(135deg, #132832, #17505a); }

.raw-live-status, .raw-source, .raw-direction { border-radius: 6px; }
.raw-data-card { border-color: var(--border); border-radius: 11px; box-shadow: var(--shadow-sm); }
.archive-filter-heading { background: #f7f9f8; }
.archive-field-title b { border-radius: 5px; color: #fff; background: var(--brand); }
.archive-period-button { border-radius: 7px; }
.archive-period-button:hover { border-color: #9bc7ca; color: var(--brand); }
.archive-period-button.active { border-color: #abd2d4; color: var(--brand-strong); background: var(--brand-soft); }
.archive-scope-grid > div, .archive-record-scope > div, .archive-token-row { border-color: var(--border); border-radius: 8px; background: #f7f9f8; }
.archive-status-icon, .archive-status-value, .archive-setup-icon { border-radius: 8px; }
.archive-query-empty { border-radius: 11px; }
.archive-event-meta span { border-radius: 6px; }
.toast { border-radius: 9px; border-left: 4px solid #71c7cb; background: var(--navy-soft); }
.toast.success { background: var(--brand-strong); }
.toast.error { border-left-color: #f29a91; background: #842d25; }
.skeleton { border-radius: 11px; background: linear-gradient(90deg, #e3e9e8 20%, #f8faf9 40%, #e3e9e8 60%); background-size: 200% 100%; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 244px minmax(0, 1fr); }
  .sidebar { width: 244px; }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: 310px; }
  .login-message { padding: 52px 0 28px; }
  .login-message .eyebrow, .login-copy { display: block; }
  .login-features { display: none; }
  .login-message h1 { font-size: clamp(38px, 9vw, 56px); }
  .login-lockup { display: inline-flex; }
  .login-panel { min-height: auto; padding: 28px 20px 46px; }
  .login-card-shell { box-shadow: 0 16px 45px rgba(24,45,51,.09); }
  .mobile-logo { display: none; }
  .app-shell { display: block; }
  .workspace { margin-left: 0; }
  .sidebar { width: min(292px, 88vw); }
  .global-search-trigger { flex: 0 0 42px; min-width: 42px; width: 42px; }
  .content { padding: 22px 16px 48px; }
  input, select, textarea { font-size: 16px; }
  .modal { border-left: 0; border-top: 4px solid var(--brand); border-radius: 15px 15px 0 0; }
}

@media (max-width: 520px) {
  .login-brand { min-height: 278px; padding: 28px 22px; }
  .login-message { padding-top: 38px; }
  .login-message h1 { font-size: 36px; }
  .login-copy { margin-top: 18px; font-size: 13px; }
  .login-message .eyebrow { display: none; }
  .login-features span:nth-child(3) { display: none; }
  .brand-wordmark { width: 78px; }
  .brand-product { padding-left: 9px; }
  .login-card-shell { padding: 28px 20px; }
  .topbar { min-height: 74px; padding-inline: 14px; }
  .topbar h1 { font-size: 20px; }
  .dashboard-hero, .settings-hero, .tenant-hero { border-radius: 12px; }
}
