:root {
  color-scheme: light;
  --bg: #f2f6f4;
  --bg-elevated: #f8faf9;
  --surface: #ffffff;
  --surface-soft: #f5f8f7;
  --surface-strong: #e8efec;
  --text: #13201d;
  --text-strong: #08130f;
  --muted: #63716d;
  --muted-strong: #46534f;
  --line: #dce5e1;
  --line-strong: #c8d5d0;
  --accent: #0b6b58;
  --accent-strong: #075344;
  --accent-soft: #ddf1eb;
  --accent-contrast: #ffffff;
  --online: #16835f;
  --online-soft: #e0f4ec;
  --online-line: #b9e4d5;
  --attention: #ad6800;
  --attention-soft: #fff1d2;
  --attention-line: #f1d290;
  --inactive: #68736f;
  --inactive-soft: #edf1ef;
  --inactive-line: #d6dedb;
  --danger: #b33a3a;
  --danger-soft: #fbe9e8;
  --danger-line: #efc8c6;
  --focus: #1a8e77;
  --shadow-sm: 0 1px 2px rgba(15, 33, 27, 0.06), 0 5px 18px rgba(15, 33, 27, 0.04);
  --shadow-md: 0 18px 50px rgba(15, 33, 27, 0.1);
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 20px;
  --content-width: 1480px;
  --transition: 160ms ease;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1110;
  --bg-elevated: #101816;
  --surface: #141d1b;
  --surface-soft: #182320;
  --surface-strong: #202e2a;
  --text: #dce7e3;
  --text-strong: #f5faf8;
  --muted: #93a29d;
  --muted-strong: #b1beb9;
  --line: #293733;
  --line-strong: #3a4a45;
  --accent: #55c7aa;
  --accent-strong: #83dcc4;
  --accent-soft: #173a31;
  --accent-contrast: #07130f;
  --online: #55c99f;
  --online-soft: #16372e;
  --online-line: #285545;
  --attention: #efb853;
  --attention-soft: #3b2d16;
  --attention-line: #62481e;
  --inactive: #99a59f;
  --inactive-soft: #242c2a;
  --inactive-line: #39423f;
  --danger: #f17b76;
  --danger-soft: #3b2020;
  --danger-line: #673232;
  --focus: #72d5bb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.14);
  --shadow-md: 0 22px 58px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1110;
    --bg-elevated: #101816;
    --surface: #141d1b;
    --surface-soft: #182320;
    --surface-strong: #202e2a;
    --text: #dce7e3;
    --text-strong: #f5faf8;
    --muted: #93a29d;
    --muted-strong: #b1beb9;
    --line: #293733;
    --line-strong: #3a4a45;
    --accent: #55c7aa;
    --accent-strong: #83dcc4;
    --accent-soft: #173a31;
    --accent-contrast: #07130f;
    --online: #55c99f;
    --online-soft: #16372e;
    --online-line: #285545;
    --attention: #efb853;
    --attention-soft: #3b2d16;
    --attention-line: #62481e;
    --inactive: #99a59f;
    --inactive-soft: #242c2a;
    --inactive-line: #39423f;
    --danger: #f17b76;
    --danger-soft: #3b2020;
    --danger-line: #673232;
    --focus: #72d5bb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.14);
    --shadow-md: 0 22px 58px rgba(0, 0, 0, 0.3);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  padding: 7px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  background: var(--text-strong);
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-mark span {
  display: block;
  width: 4px;
  background: var(--bg);
  border-radius: 2px;
}

.brand-mark span:nth-child(1) { height: 9px; opacity: 0.62; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 13px; opacity: 0.78; }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.theme-switcher {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.theme-option {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.theme-option:hover {
  color: var(--text-strong);
}

.theme-option[aria-pressed="true"] {
  color: var(--text-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-flex;
  min-height: 40px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.button:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button.primary {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: var(--accent);
}

.button.primary:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.subtle {
  background: var(--surface-soft);
}

.button.quiet {
  min-height: 34px;
  padding: 6px 11px;
  color: var(--muted-strong);
  background: transparent;
  border-color: var(--line);
  font-size: 12px;
}

.button.wide {
  width: 100%;
  min-height: 48px;
}

.button-key {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.button-key::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 10px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px 3px 0 -0.5px currentColor;
}

.noscript-message {
  position: fixed;
  z-index: 999;
  inset: auto 16px 16px;
  max-width: 620px;
  margin: auto;
  padding: 13px 16px;
  color: var(--text-strong);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
}

/* Login */

.login-page {
  display: flex;
  min-height: 100svh;
  padding: 0 46px;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 22%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 32%),
    radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 28%),
    var(--bg);
}

.login-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.38;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
}

.login-topbar {
  display: flex;
  width: 100%;
  max-width: 1380px;
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.login-layout {
  display: grid;
  width: 100%;
  max-width: 1160px;
  margin: auto;
  padding: 58px 0 78px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 450px);
  gap: 9vw;
  align-items: center;
}

.login-intro h1 {
  max-width: 680px;
  margin-bottom: 24px;
  color: var(--text-strong);
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.intro-copy {
  max-width: 550px;
  margin-bottom: 44px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.75;
}

.trust-list {
  display: grid;
  max-width: 600px;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.trust-list li {
  display: flex;
  min-width: 0;
  padding: 0 20px;
  gap: 12px;
  border-left: 1px solid var(--line);
}

.trust-list li:first-child {
  padding-left: 0;
  border-left: 0;
}

.trust-icon {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
}

.trust-list strong,
.trust-list small {
  display: block;
}

.trust-list strong {
  margin-bottom: 6px;
  color: var(--text-strong);
  font-size: 12px;
}

.trust-list small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.auth-card {
  position: relative;
  width: 100%;
  padding: 42px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.passkey-visual {
  position: absolute;
  top: 38px;
  right: 40px;
  width: 52px;
  height: 52px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 15px;
}

.passkey-ring {
  position: absolute;
  top: 14px;
  left: 13px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.passkey-stem {
  position: absolute;
  top: 26px;
  left: 27px;
  width: 14px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.passkey-stem::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.auth-card h2 {
  margin-bottom: 12px;
  color: var(--text-strong);
  font-size: 26px;
  letter-spacing: -0.035em;
}

.auth-description {
  max-width: 320px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-state {
  display: flex;
  min-height: 46px;
  padding: 11px 13px;
  margin-bottom: 12px;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
}

.auth-state.ready {
  color: var(--online);
  background: var(--online-soft);
  border-color: var(--online-line);
}

.auth-state.setup {
  color: var(--attention);
  background: var(--attention-soft);
  border-color: var(--attention-line);
}

.auth-state.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.auth-actions {
  display: grid;
  gap: 8px;
}

.auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.auth-message.success {
  color: var(--online);
}

.secure-note {
  display: flex;
  padding-top: 22px;
  margin-top: 20px;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.secure-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  flex: 0 0 auto;
  background: var(--online);
  border: 2px solid var(--online-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--online-line);
}

.secure-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.secure-note strong {
  color: var(--muted-strong);
  font-size: 11px;
}

.login-footer {
  display: flex;
  width: 100%;
  max-width: 1380px;
  min-height: 65px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* Dashboard */

.dashboard-page {
  background:
    radial-gradient(circle at 85% 0, color-mix(in srgb, var(--accent) 6%, transparent), transparent 24%),
    var(--bg);
}

.app-shell {
  width: 100%;
  max-width: var(--content-width);
  min-height: 100vh;
  padding: 0 38px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.readonly-badge {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.readonly-badge span,
.footer-security span {
  width: 6px;
  height: 6px;
  background: var(--online);
  border-radius: 50%;
}

.status-hero {
  display: flex;
  padding: 42px 0 26px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.headline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.status-hero h1 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.hero-description {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.overall-status,
.status-pill,
.job-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.overall-status {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.status-dot,
.mini-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.overall-status.online,
.status-pill.online,
.job-status-pill.online {
  color: var(--online);
  background: var(--online-soft);
  border-color: var(--online-line);
}

.overall-status.online .status-dot,
.status-pill.online::before,
.job-status-pill.online::before,
.overview-card.online .mini-dot {
  background: var(--online);
}

.overall-status.attention,
.status-pill.attention,
.job-status-pill.attention {
  color: var(--attention);
  background: var(--attention-soft);
  border-color: var(--attention-line);
}

.overall-status.attention .status-dot,
.status-pill.attention::before,
.job-status-pill.attention::before,
.overview-card.attention .mini-dot {
  background: var(--attention);
}

.overall-status.inactive,
.overall-status.unknown,
.status-pill.inactive,
.status-pill.unknown,
.job-status-pill.inactive,
.job-status-pill.unknown {
  color: var(--inactive);
  background: var(--inactive-soft);
  border-color: var(--inactive-line);
}

.overall-status.inactive .status-dot,
.overall-status.unknown .status-dot,
.status-pill.inactive::before,
.status-pill.unknown::before,
.job-status-pill.inactive::before,
.job-status-pill.unknown::before,
.overview-card.inactive .mini-dot {
  background: var(--inactive);
}

.status-pill::before,
.job-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.refresh-panel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.refresh-meta {
  display: flex;
  min-width: 156px;
  flex-direction: column;
  align-items: flex-end;
}

.refresh-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.refresh-meta time {
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.button.refresh {
  min-height: 39px;
  padding-inline: 13px;
}

.refresh-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -2px;
  width: 5px;
  height: 5px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-12deg);
}

.button.refresh.loading .refresh-icon {
  animation: spin 700ms linear infinite;
}

.overview-grid {
  display: grid;
  padding-bottom: 42px;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 10px;
}

.overview-card {
  position: relative;
  min-height: 124px;
  padding: 18px 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.overview-card::after {
  content: "";
  position: absolute;
  right: -27px;
  bottom: -38px;
  width: 82px;
  height: 82px;
  opacity: 0.34;
  border: 18px solid var(--line);
  border-radius: 50%;
}

.overview-card.accent {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: var(--accent);
}

.overview-card.accent::after {
  border-color: rgba(255, 255, 255, 0.2);
}

.metric-label,
.metric-value,
.metric-caption {
  position: relative;
  z-index: 1;
  display: block;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
}

.overview-card.accent .metric-label,
.overview-card.accent .metric-caption {
  color: color-mix(in srgb, var(--accent-contrast) 78%, transparent);
}

.metric-value {
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 32px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.overview-card.accent .metric-value {
  color: var(--accent-contrast);
}

.metric-caption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.job-pulse {
  position: relative;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.job-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}

.error-banner {
  display: grid;
  padding: 14px 15px;
  margin: -20px 0 36px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-md);
}

.error-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--danger);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.error-banner strong {
  color: var(--text-strong);
  font-size: 12px;
}

.error-banner p {
  margin: 2px 0 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.services-section,
.jobs-section,
.data-section {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  margin-bottom: 17px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: 21px;
  letter-spacing: -0.03em;
}

.section-description {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.data-heading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.count-legend {
  display: inline-flex;
  min-height: 25px;
  padding: 4px 8px;
  align-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 8px;
  white-space: nowrap;
}

.count-legend strong {
  color: var(--accent);
}

.result-count {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.filter-bar {
  display: flex;
  padding: 10px;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.status-filters,
.filter-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-button {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 10px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.filter-button span {
  display: inline-flex;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border-radius: 999px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.filter-button:hover,
.filter-button.active {
  color: var(--text-strong);
  background: var(--surface-soft);
  border-color: var(--line);
}

.filter-button.active span {
  color: var(--accent-contrast);
  background: var(--accent);
}

.search-field,
.select-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field input,
.select-field select {
  height: 34px;
  color: var(--text-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  outline: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-field input {
  width: 174px;
  padding: 6px 10px 6px 32px;
}

.search-field input::placeholder {
  color: var(--muted);
}

.select-field select {
  min-width: 112px;
  padding: 5px 28px 5px 9px;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent);
}

.search-icon {
  position: absolute;
  z-index: 1;
  left: 11px;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  position: relative;
  min-width: 0;
  padding: 18px 19px 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--inactive);
}

.service-card.online::before { background: var(--online); }
.service-card.attention::before { background: var(--attention); }
.service-card.inactive::before,
.service-card.unknown::before { background: var(--inactive); }

.service-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text-strong) 7%, transparent);
  transform: translateY(-1px);
}

.service-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.service-identity {
  min-width: 0;
}

.service-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.service-name-row h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-chip {
  display: inline-flex;
  max-width: 118px;
  min-height: 19px;
  padding: 2px 6px;
  align-items: center;
  overflow: hidden;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-description {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-state-block {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.status-pill {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 9px;
}

.job-count-note {
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
}

.service-details {
  display: grid;
  padding: 14px 0 12px;
  grid-template-columns: 1.15fr 1fr 0.9fr 1.2fr;
  border-bottom: 1px solid var(--line);
}

.detail-item {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.detail-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-item:last-child {
  padding-right: 0;
}

.detail-label,
.detail-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-value {
  margin-top: 3px;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 740;
  font-variant-numeric: tabular-nums;
}

.metric-progress {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 6px;
  overflow: hidden;
  appearance: none;
  background: var(--surface-strong);
  border: 0;
  border-radius: 2px;
}

.metric-progress::-webkit-progress-bar {
  background: var(--surface-strong);
  border-radius: 2px;
}

.metric-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 2px;
}

.metric-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 2px;
}

.service-foot {
  display: flex;
  min-height: 28px;
  padding-top: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.runtime-state,
.expected-note {
  color: var(--muted);
  font-size: 9px;
}

.runtime-state {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.runtime-state span:first-child {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expected-note {
  flex: 0 0 auto;
}

.expected-note.expected {
  color: var(--accent);
  font-weight: 750;
}

.skeleton-card {
  display: grid;
  min-height: 181px;
  align-content: start;
  gap: 18px;
}

.skeleton-card span,
.skeleton-row span {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, var(--surface-soft), var(--surface-strong), var(--surface-soft));
  background-size: 220% 100%;
  border-radius: 5px;
  animation: shimmer 1.6s infinite linear;
}

.skeleton-card span:nth-child(1) { width: 46%; }
.skeleton-card span:nth-child(2) { width: 84%; height: 48px; }
.skeleton-card span:nth-child(3) { width: 63%; }

.empty-state {
  display: flex;
  min-height: 220px;
  padding: 32px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state h3 {
  margin: 13px 0 4px;
  color: var(--text-strong);
  font-size: 13px;
}

.empty-state p {
  margin-bottom: 16px;
  font-size: 11px;
}

.empty-symbol {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.empty-symbol::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -4px;
  width: 12px;
  height: 2px;
  background: var(--line-strong);
  transform: rotate(45deg);
}

.jobs-section {
  padding-bottom: 48px;
}

.shared-runtime {
  display: grid;
  padding: 14px 16px;
  margin-bottom: 10px;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 18px;
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius-md);
}

.shared-runtime-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.shared-runtime-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 2px solid var(--accent);
  border-radius: 8px;
}

.shared-runtime-mark::before,
.shared-runtime-mark::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.shared-runtime-mark::before {
  top: 8px;
  right: 5px;
  left: 5px;
  box-shadow: 0 7px 0 var(--accent);
}

.shared-runtime-mark::after {
  top: 11px;
  left: -6px;
  width: 5px;
  box-shadow: 29px 0 0 var(--accent);
}

.shared-runtime-identity strong,
.shared-runtime-identity small {
  display: block;
}

.shared-runtime-identity strong {
  color: var(--text-strong);
  font-size: 11px;
}

.shared-runtime-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.shared-runtime-metrics {
  display: grid;
  min-width: 0;
  margin: 0;
  grid-template-columns: 0.75fr 0.7fr 0.7fr 1.2fr 1.45fr;
}

.shared-runtime-metrics > div {
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.shared-runtime-metrics dt,
.shared-runtime-metrics dd {
  margin: 0;
}

.shared-runtime-metrics dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.shared-runtime-metrics dd {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-runtime-metrics dd small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-runtime[data-availability="available"] #broker-availability,
.shared-runtime[data-availability="healthy"] #broker-availability,
.shared-runtime[data-availability="ok"] #broker-availability {
  color: var(--online);
}

.shared-runtime[data-availability="degraded"] #broker-availability {
  color: var(--attention);
}

.shared-runtime[data-availability="unavailable"] #broker-availability {
  color: var(--danger);
}

.jobs-table-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.jobs-table-header,
.job-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.45fr) minmax(80px, 0.58fr) minmax(86px, 0.62fr) minmax(145px, 1.05fr) minmax(126px, 0.9fr) minmax(100px, 0.72fr) minmax(145px, 1fr);
  gap: 10px;
  align-items: center;
}

.jobs-table-header {
  min-height: 35px;
  padding: 7px 16px;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.job-row {
  min-height: 54px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.job-row:first-child {
  border-top: 0;
}

.job-cell {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.job-cell-value {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-cell-note {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-cell-mobile-label {
  display: none;
}

.job-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.job-progress-meta strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-progress-meta small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}

.job-progress-bar {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  appearance: none;
  background: var(--surface-strong);
  border: 0;
  border-radius: 4px;
}

.job-progress-bar::-webkit-progress-bar {
  background: var(--surface-strong);
  border-radius: 4px;
}

.job-progress-bar::-webkit-progress-value {
  background: var(--accent);
  border-radius: 4px;
}

.job-progress-bar::-moz-progress-bar {
  background: var(--accent);
  border-radius: 4px;
}

.job-status-pill {
  width: max-content;
  min-height: 22px;
  padding: 3px 7px;
  font-size: 8px;
}

.skeleton-row span:nth-child(2) { width: 82%; }
.skeleton-row span:nth-child(3) { width: 62%; }
.skeleton-row span:nth-child(4) { width: 74%; }

.data-section {
  padding-bottom: 48px;
}

.monitoring-note {
  display: flex;
  padding: 11px 13px;
  margin-bottom: 10px;
  align-items: center;
  gap: 9px;
  color: var(--attention);
  background: var(--attention-soft);
  border: 1px solid var(--attention-line);
  border-radius: 9px;
}

.monitoring-note > span {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
}

.monitoring-note p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 9px;
}

.monitoring-note strong {
  color: var(--text-strong);
}

.dataset-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dataset-card {
  position: relative;
  min-width: 0;
  min-height: 88px;
  padding: 13px 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.dataset-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
}

.dataset-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataset-metrics {
  display: flex;
  margin-top: 10px;
  align-items: flex-end;
  gap: 17px;
}

.dataset-metric small,
.dataset-metric strong {
  display: block;
}

.dataset-metric small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.dataset-metric strong {
  margin-top: 1px;
  color: var(--text-strong);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.dataset-metric.active strong {
  color: var(--online);
}

.dataset-skeleton {
  display: grid;
  align-content: center;
  gap: 10px;
}

.dataset-skeleton::before {
  display: none;
}

.dataset-skeleton span {
  display: block;
  height: 11px;
  background: linear-gradient(90deg, var(--surface-soft), var(--surface-strong), var(--surface-soft));
  background-size: 220% 100%;
  border-radius: 5px;
  animation: shimmer 1.6s infinite linear;
}

.dataset-skeleton span:first-child { width: 52%; }
.dataset-skeleton span:last-child { width: 78%; height: 22px; }

.persona-subheading {
  display: flex;
  margin: 0 2px 10px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.persona-subheading h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
}

.persona-subheading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.persona-table {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.persona-table-header,
.persona-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) repeat(5, minmax(145px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.persona-table-header {
  min-height: 38px;
  padding: 8px 14px;
  align-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.persona-table-header small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0;
}

.persona-row {
  min-height: 82px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.persona-row:first-child {
  border-top: 0;
}

.persona-cell {
  min-width: 0;
}

.persona-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.persona-initial {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 23%, var(--line));
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
}

.persona-name-copy {
  min-width: 0;
}

.persona-name-copy strong,
.persona-name-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-name-copy strong {
  color: var(--text-strong);
  font-size: 11px;
}

.persona-name-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.persona-level-cell {
  display: flex;
  min-width: 0;
  padding-left: 8px;
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.persona-level-mobile-label {
  display: none;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.level-counts {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.level-count {
  display: flex;
  min-width: 0;
  min-height: 35px;
  padding: 4px 3px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.level-count small,
.level-count strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-count small {
  color: var(--muted);
  font-size: 8px;
}

.level-count strong {
  margin-top: 1px;
  color: var(--text-strong);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.level-count.current {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}

.level-count.current small,
.level-count.current strong {
  color: var(--accent);
}

.level-count.active {
  background: var(--online-soft);
  border-color: var(--online-line);
}

.level-count.active small,
.level-count.active strong {
  color: var(--online);
}

.level-missing {
  display: flex;
  min-height: 35px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  font-size: 8px;
}

.level-job-counts {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-job-counts.active {
  color: var(--attention);
}

.level-job-counts.failed {
  color: var(--danger);
}

.level-boundary {
  display: grid;
  padding-top: 5px;
  margin-top: 5px;
  gap: 2px;
  border-top: 1px dashed var(--line);
}

.level-boundary span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-boundary span.active {
  color: var(--attention);
  font-weight: 700;
}

.level-boundary span.throughput {
  color: var(--muted-strong);
}

.persona-skeleton-row span {
  display: block;
  height: 36px;
  background: linear-gradient(90deg, var(--surface-soft), var(--surface-strong), var(--surface-soft));
  background-size: 220% 100%;
  border-radius: 5px;
  animation: shimmer 1.6s infinite linear;
}

.empty-state.compact {
  min-height: 112px;
  padding: 24px;
  flex-direction: row;
  gap: 17px;
  text-align: left;
}

.empty-state.compact h3 {
  margin-top: 0;
}

.empty-state.compact p {
  margin-bottom: 0;
}

.idle-symbol {
  position: relative;
  display: block;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.idle-symbol::before,
.idle-symbol::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  background: var(--muted);
  border-radius: 50%;
}

.idle-symbol::before { left: 7px; }
.idle-symbol::after { right: 7px; }

.data-symbol {
  position: relative;
  display: block;
  width: 34px;
  height: 29px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 -7px 0 var(--surface-soft);
}

.data-symbol::before,
.data-symbol::after {
  content: "";
  position: absolute;
  right: -2px;
  left: -2px;
  height: 9px;
  border: 2px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 50% 50%;
}

.data-symbol::before { top: 7px; }
.data-symbol::after { top: 15px; }

.dashboard-footer {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.footer-security {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 14px;
  color: var(--accent-contrast);
  background: var(--text-strong);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.75; transform: scale(0.8); }
  70%, 100% { opacity: 0; transform: scale(1.8); }
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  .login-layout {
    gap: 6vw;
  }

  .trust-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .trust-list li,
  .trust-list li:first-child {
    padding: 0;
    border: 0;
  }

  .trust-list small {
    max-width: 360px;
  }

  .overview-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .overview-card {
    grid-column: span 2;
  }

  .overview-card:nth-child(1),
  .overview-card:nth-child(2) {
    grid-column: span 3;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tools {
    justify-content: flex-end;
  }

  .jobs-table-header,
  .job-row {
    grid-template-columns: minmax(140px, 1.35fr) 60px 65px minmax(100px, 1fr) 90px 75px minmax(105px, 1fr);
  }

  .persona-table-header,
  .persona-row {
    grid-template-columns: minmax(130px, 1.1fr) repeat(5, minmax(115px, 1fr));
  }
}

@media (max-width: 840px) {
  .login-page {
    padding: 0 28px;
  }

  .login-layout {
    max-width: 600px;
    padding-top: 28px;
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .login-intro h1 {
    font-size: clamp(40px, 9vw, 62px);
  }

  .trust-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .trust-list li,
  .trust-list li:first-child {
    padding: 0 13px;
    border-left: 1px solid var(--line);
  }

  .trust-list li:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .auth-card {
    max-width: 500px;
    margin: 0 auto;
  }

  .app-shell {
    padding: 0 24px;
  }

  .topbar {
    padding: 15px 0;
    align-items: flex-start;
  }

  .topbar-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .readonly-badge {
    display: none;
  }

  .status-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .refresh-panel {
    width: 100%;
    justify-content: space-between;
  }

  .refresh-meta {
    align-items: flex-start;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .jobs-table-header {
    display: none;
  }

  .shared-runtime {
    grid-template-columns: 1fr;
  }

  .shared-runtime-metrics > div:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .job-row {
    padding: 15px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .job-name-cell,
  .job-progress-cell,
  .job-eta-cell {
    grid-column: 1 / -1;
  }

  .job-cell {
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }

  .job-name-cell {
    padding-top: 0;
    border-top: 0;
  }

  .job-cell-mobile-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 750;
  }

  .persona-table-header {
    display: none;
  }

  .persona-row {
    padding: 15px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .persona-name-cell {
    padding-bottom: 11px;
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .persona-level-cell {
    padding: 0;
    border-left: 0;
  }

  .persona-level-cell:last-child {
    grid-column: 1 / -1;
  }

  .persona-level-mobile-label {
    display: block;
    margin-bottom: 5px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14px;
  }

  .login-page {
    padding: 0 18px;
  }

  .login-topbar {
    min-height: 70px;
  }

  .theme-switcher.compact .theme-option {
    width: 32px;
    overflow: hidden;
    padding-inline: 0;
    text-indent: -999px;
  }

  .theme-switcher.compact .theme-option::after {
    display: block;
    text-indent: 0;
  }

  .theme-switcher.compact .theme-option[data-theme-value="light"]::after { content: "해"; }
  .theme-switcher.compact .theme-option[data-theme-value="dark"]::after { content: "달"; }
  .theme-switcher.compact .theme-option[data-theme-value="system"]::after { content: "자동"; font-size: 9px; }

  .login-layout {
    padding: 46px 0 54px;
    gap: 42px;
  }

  .login-intro h1 {
    margin-bottom: 18px;
    font-size: clamp(38px, 12vw, 54px);
  }

  .intro-copy {
    margin-bottom: 30px;
    font-size: 14px;
  }

  .trust-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trust-list li,
  .trust-list li:first-child {
    padding: 0;
    border: 0;
  }

  .auth-card {
    padding: 30px 24px;
  }

  .passkey-visual {
    top: 27px;
    right: 24px;
    width: 45px;
    height: 45px;
  }

  .passkey-ring { top: 11px; left: 10px; }
  .passkey-stem { top: 23px; left: 24px; }

  .login-footer {
    min-height: 58px;
  }

  .app-shell {
    padding: 0 16px;
  }

  .topbar {
    min-height: 70px;
  }

  .topbar .brand-copy small,
  .topbar .readonly-badge {
    display: none;
  }

  .topbar .theme-option {
    width: 30px;
    overflow: hidden;
    padding-inline: 0;
    text-indent: -999px;
  }

  .topbar .theme-option::after {
    display: block;
    text-indent: 0;
  }

  .topbar .theme-option[data-theme-value="light"]::after { content: "해"; }
  .topbar .theme-option[data-theme-value="dark"]::after { content: "달"; }
  .topbar .theme-option[data-theme-value="system"]::after { content: "자동"; font-size: 9px; }

  .status-hero {
    padding-top: 32px;
  }

  .headline-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-description {
    line-height: 1.65;
  }

  .overview-grid {
    padding-bottom: 32px;
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-card,
  .overview-card:nth-child(1),
  .overview-card:nth-child(2) {
    min-height: 112px;
    padding: 16px;
    grid-column: span 1;
  }

  .overview-card:first-child {
    grid-column: span 2;
  }

  .metric-value {
    font-size: 28px;
  }

  .error-banner {
    margin-top: -12px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .error-banner .button {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
  }

  .filter-bar {
    padding: 8px;
    overflow: hidden;
  }

  .status-filters {
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .status-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-tools {
    width: 100%;
  }

  .search-field {
    flex: 1;
  }

  .search-field input {
    width: 100%;
  }

  .service-card {
    padding: 16px 16px 12px;
  }

  .service-name-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .category-chip {
    max-width: 160px;
  }

  .service-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px 0;
  }

  .detail-item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .data-heading-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
  }

  .dataset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .persona-subheading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .persona-subheading .data-heading-meta {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
  }

  .shared-runtime {
    padding: 14px;
  }

  .shared-runtime-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 0;
  }

  .shared-runtime-metrics > div,
  .shared-runtime-metrics > div:first-child {
    padding: 0 9px;
    border-left: 1px solid var(--line);
  }

  .shared-runtime-metrics > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .shared-runtime-metrics .broker-queue-eta {
    grid-column: 1 / -1;
  }

  .job-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .persona-row {
    grid-template-columns: 1fr;
  }

  .persona-name-cell,
  .persona-level-cell:last-child {
    grid-column: 1;
  }

  .dashboard-footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }
}

@media (max-width: 390px) {
  .refresh-meta {
    min-width: 0;
  }

  .button.refresh {
    padding-inline: 10px;
  }

  .dataset-grid {
    grid-template-columns: 1fr;
  }

  .select-field select {
    min-width: 100px;
    max-width: 116px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .status-dot,
  .mini-dot,
  .readonly-badge span,
  .footer-security span,
  .secure-dot,
  .job-pulse {
    border: 1px solid CanvasText;
  }

  .service-card::before {
    width: 5px;
  }
}
