:root {
  /* Webflow-inspired design system */
  --color-blue: #146ef5;
  --color-blue-400: #3b89ff;
  --color-blue-300: #006acc;
  --color-blue-hover: #0055d4;
  --color-purple: #7a3dff;
  --color-pink: #ed52cb;
  --color-green: #00d722;
  --color-orange: #ff6b00;
  --color-yellow: #ffae13;
  --color-red: #ee1d36;
  /* Legacy aliases */
  --color-brand-magenta: #3b89ff;
  --color-brand-orange: #ff6b00;
  --color-dark-blue: #146ef5;
  --color-soft-lavender: #3b89ff;
  --color-white: #ffffff;
  --color-black: #080808;
  --color-black-40: rgba(8, 8, 8, 0.4);
  --color-dark-blue-deep: #0055d4;
  --color-teal-deep: #146ef5;
  --color-teal-mid: #00875a;
  /* Semantic tokens */
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-nav: #ffffff;
  --bg-soft: #f8f8f8;
  --bg-glass-dark: rgba(8, 8, 8, 0.32);
  --bg-glass-light: rgba(255, 255, 255, 0.12);
  --text-primary: #080808;
  --text-secondary: #5a5a5a;
  --text-muted: #ababab;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.72);
  --border-color: #d8d8d8;
  --border-color-dark: rgba(255, 255, 255, 0.14);
  /* 5-layer cascade shadow */
  --shadow-card: rgba(0, 0, 0, 0) 0px 84px 24px, rgba(0, 0, 0, 0.01) 0px 54px 22px, rgba(0, 0, 0, 0.04) 0px 30px 18px, rgba(0, 0, 0, 0.08) 0px 13px 13px, rgba(0, 0, 0, 0.09) 0px 3px 7px;
  --shadow-soft: rgba(0, 0, 0, 0) 0px 84px 24px, rgba(0, 0, 0, 0.01) 0px 54px 22px, rgba(0, 0, 0, 0.04) 0px 30px 18px, rgba(0, 0, 0, 0.08) 0px 13px 13px, rgba(0, 0, 0, 0.09) 0px 3px 7px;
  /* Radius — conservative, sharp */
  --radius-sharp: 2px;
  --radius-card: 4px;
  --radius-lg: 8px;
  --radius-surface: 8px;
  --font-display: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", "Courier New", Consolas, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg-page: #080808;
  --bg-card: #111111;
  --bg-nav: #0a0a0a;
  --bg-soft: #161616;
  --bg-glass-dark: rgba(0, 0, 0, 0.32);
  --bg-glass-light: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #555555;
  --border-color: #2a2a2a;
  --border-color-dark: rgba(255, 255, 255, 0.1);
  --shadow-card: rgba(0, 0, 0, 0) 0px 84px 24px, rgba(0, 0, 0, 0.05) 0px 54px 22px, rgba(0, 0, 0, 0.1) 0px 30px 18px, rgba(0, 0, 0, 0.15) 0px 13px 13px, rgba(0, 0, 0, 0.18) 0px 3px 7px;
  --shadow-soft: rgba(0, 0, 0, 0) 0px 84px 24px, rgba(0, 0, 0, 0.05) 0px 54px 22px, rgba(0, 0, 0, 0.1) 0px 30px 18px, rgba(0, 0, 0, 0.15) 0px 13px 13px, rgba(0, 0, 0, 0.18) 0px 3px 7px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-page);
}

body {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.16px;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-page);
}

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

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

img {
  display: block;
  max-width: 100%;
}

.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;
}

.container {
  width: min(1360px, calc(100% - 48px));
  margin: 0 24px 0 24px;
}

.eyebrow,
.card-label,
th {
  margin: 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lede,
.metric-sub,
.card p,
.panel p {
  color: var(--text-secondary);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.8px;
}

.page-title-list {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -0.63px;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.04;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.22px;
  font-weight: 500;
}

p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-nav);
  overflow: visible;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 16px 12px 16px 24px;
  flex-wrap: nowrap;
  overflow: visible;
  scrollbar-width: thin;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-card);
  background: var(--color-blue);
  border: 1px solid var(--color-blue-hover);
  box-shadow: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.18px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.site-header .eyebrow,
.site-header .tenant-control label {
  color: var(--text-secondary);
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.18px;
  color: var(--text-primary);
}

.site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}

.tenant-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  white-space: nowrap;
}

.tenant-control .eyebrow {
  margin: 0;
}

.site-header .tenant-control select {
  min-width: 180px;
  padding-right: 40px;
  border-color: var(--border-color);
  background: var(--bg-page) !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.site-header .tenant-control select option {
  background: var(--bg-page) !important;
  color: var(--text-primary) !important;
}

.site-header .tenant-control select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(20, 110, 245, 0.2);
}

.profile-menu {
  position: relative;
}

.profile-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-soft);
  box-shadow: none;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease, color 150ms ease;
}

.profile-avatar-button:hover,
.profile-avatar-button:focus-visible,
.profile-menu[data-open="true"] .profile-avatar-button,
.profile-menu:hover .profile-avatar-button,
.profile-menu:focus-within .profile-avatar-button {
  border-color: var(--color-blue);
  background: rgba(20, 110, 245, 0.06);
  color: var(--color-blue);
  transform: translateY(-1px);
}

.profile-avatar-image,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
}

.profile-avatar-image {
  display: block;
  object-fit: cover;
}

.profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-fallback svg {
  width: 18px;
  height: 18px;
}

.profile-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  display: grid;
  gap: 4px;
  min-width: 292px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 140ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

.profile-menu:hover .profile-menu-panel,
.profile-menu[data-open="true"] .profile-menu-panel,
.profile-menu:focus-within .profile-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.profile-menu-header {
  display: grid;
  gap: 2px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.profile-menu-eyebrow {
  margin: 0 0 2px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.profile-menu-header strong {
  font-size: 14px;
  font-weight: 500;
}

.profile-menu-header span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.profile-menu-theme {
  display: grid;
  gap: 8px;
  padding: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.profile-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-theme-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 72px;
  padding: 10px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.profile-theme-option:hover,
.profile-theme-option:focus-visible {
  border-color: var(--color-blue);
  color: var(--text-primary);
  background: rgba(20, 110, 245, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.profile-theme-option[data-active="true"] {
  border-color: var(--color-blue);
  background: rgba(20, 110, 245, 0.1);
  color: var(--text-primary);
}

.profile-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.profile-theme-icon svg {
  width: 18px;
  height: 18px;
}

.profile-theme-option span:last-child {
  font-size: 12px;
  font-weight: 600;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  background: rgba(20, 110, 245, 0.08);
  outline: none;
}

.profile-menu-button {
  font: inherit;
}

.profile-menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex: 0 0 16px;
}

.profile-menu-item-icon svg {
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .profile-avatar-button,
  .profile-menu-panel {
    transition: none;
  }
}

.page-shell {
  padding: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 110, 245, 0.3);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 78% 14%, rgba(59, 137, 255, 0.3), transparent 24%),
    radial-gradient(circle at 58% 16%, rgba(20, 110, 245, 0.35), transparent 26%),
    linear-gradient(135deg, #0055d4 0%, #146ef5 52%, #1a7aff 100%);
  box-shadow: var(--shadow-soft);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: auto auto 20px -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 137, 255, 0.2), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: -80px -40px auto auto;
  width: 420px;
  height: 320px;
  background: radial-gradient(circle, rgba(59, 137, 255, 0.28), rgba(20, 110, 245, 0.18), transparent 72%);
  filter: blur(22px);
  pointer-events: none;
}

.page-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: start;
  padding: 16px 56px;
}

.page-hero-copy {
  display: grid;
  gap: 14px;
}

.page-hero .eyebrow,
.page-hero h1,
.hero-aside .eyebrow {
  color: var(--text-on-dark);
}

.page-hero-copy .lede {
  max-width: 700px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.135px;
  color: var(--text-on-dark-muted);
}

.hero-badges,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.actions.actions-center {
  justify-content: center;
}

.page-hero .badge {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
}

.theme-settings {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
}

.theme-settings-copy {
  display: grid;
  gap: 8px;
}

.theme-settings-field {
  min-width: 0;
}

.profile-theme-settings {
  align-items: start;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.theme-choice-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.theme-choice-card:hover,
.theme-choice-card:focus-visible {
  border-color: var(--color-blue);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
  outline: none;
}

.theme-choice-card[data-active="true"] {
  border-color: var(--color-blue);
  background: rgba(20, 110, 245, 0.08);
  box-shadow: var(--shadow-card);
}

.theme-choice-card strong {
  font-size: 18px;
  font-weight: 540;
  line-height: 1.14;
}

.theme-choice-card span:last-child {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.theme-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(20, 110, 245, 0.1);
  color: var(--color-blue);
}

.theme-choice-icon svg {
  width: 20px;
  height: 20px;
}

.actions form {
  margin: 0;
  display: inline-flex;
}

.hero-aside {
  align-self: start;
}

.hero-aside-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border-color-dark);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: var(--color-white);
}

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

.hero-aside .eyebrow,
.login-research-band .eyebrow {
  margin-bottom: 8px;
}

.hero-stat {
  display: grid;
  gap: 1px;
}

.hero-stat-value {
  color: var(--color-white);
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.96px;
  font-weight: 540;
}

.hero-stat-label,
.hero-note {
  color: var(--text-on-dark-muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: normal;
}

.content-shell {
  padding-top: 20px;
  padding-bottom: 80px;
  width: 100%;
  margin: 0;
}

.app-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.left-nav {
  position: sticky;
  top: 89px;
  display: grid;
  gap: 0;
  align-self: start;
  margin-left: 12px;
}

.left-nav-card {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
}

.left-nav-card + .left-nav-card {
  margin-top: 16px;
}

.left-nav-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.left-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--text-secondary);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.left-nav-link:hover,
.left-nav-link.active {
  border-color: var(--border-color);
  background: var(--color-white);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.left-nav-link-label {
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.15px;
}

.left-nav-link-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: inherit;
  opacity: 0.6;
}

.left-nav-meta {
  display: grid;
  gap: 16px;
}

.left-nav-admin-section {
  border-color: rgba(0, 135, 90, 0.2);
  background: rgba(0, 135, 90, 0.04);
}

.left-nav-admin-eyebrow {
  color: var(--color-teal-mid);
}

.badge-admin {
  background: rgba(0, 135, 90, 0.08);
  color: var(--color-teal-mid);
  border: 1px solid rgba(0, 135, 90, 0.2);
}

.badge-success {
  background: var(--color-teal-mid);
  color: var(--color-white);
  border: 1px solid var(--color-teal-mid);
}

.stat-grid {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
}

.setting-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.setting-list li {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
}

.muted {
  opacity: 0.4;
}

.secondary-text {
  opacity: 0.6;
  font-size: 0.875em;
}

.left-nav-stat {
  display: grid;
  gap: 4px;
}

.left-nav-stat-value {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.18px;
}

.left-nav-stat-label {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.workspace-main {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding-right: 24px;
}

.workspace-main .page-hero {
  margin-top: 0;
}

.page-header,
.panel,
.card,
.callout,
.login-panel,
.login-hero,
.info-card,
.table-wrap,
.asset-preview,
.asset-banner-frame {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-surface);
  background: var(--bg-card);
}

.panel,
.card,
.page-header,
.login-panel {
  box-shadow: var(--shadow-card);
}

.panel,
.page-header {
  padding: 24px;
}

.card {
  padding: 32px;
}

.panel > .panel,
.panel > .grid-2 > .panel,
.panel > .grid-3 > .panel,
.panel > .grid-2 > .card,
.panel > .grid-3 > .card,
.theme-settings,
.info-card,
.asset-preview,
.asset-banner-frame {
  background: var(--bg-soft);
  box-shadow: none;
}

.panel > h3 + .table-wrap,
.panel > h3 + .empty,
.panel > .eyebrow + h3 + .table-wrap,
.panel > .eyebrow + h3 + .empty {
  margin-top: 14px;
}

.stack,
.stack-md,
.stack-lg {
  display: grid;
}

.stack {
  gap: 16px;
}

.stack-md {
  gap: 20px;
}

.stack-lg {
  gap: 24px;
}

.grid-2,
.grid-3,
.grid-4,
.stats-grid,
.info-grid {
  display: grid;
  column-gap: 24px;
  row-gap: 12px;
}

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

.admin-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 2.8fr) minmax(120px, 0.85fr);
  column-gap: 24px;
  row-gap: 12px;
  align-items: end;
}

.admin-filter-row .field {
  min-width: 0;
}

.audit-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 640px);
  column-gap: 24px;
  row-gap: 12px;
  align-items: end;
}

.audit-search-field {
  min-width: 0;
}

.audit-search-status {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  border-color: var(--border-color);
  background: var(--bg-soft);
  cursor: default;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-toolbar + h3 {
  margin-top: 18px;
}

.infrastructure-overview-grid {
  align-items: start;
}

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

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

.stats-grid {
  margin-bottom: 0;
}

.infra-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid .card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 250, 248, 1)),
    var(--bg-card);
}

.metric {
  font-size: clamp(1.73rem, 2.67vw, 2.67rem);
  line-height: 1.05;
  letter-spacing: -1.92px;
  color: var(--text-primary);
}

.metric-sub {
  font-size: 14px;
  line-height: 1.4;
}

.field {
  display: grid;
  gap: 8px;
}

.grid-span-2 {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 540;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.input-like {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.input-like-multiline {
  min-height: 112px;
  white-space: pre-wrap;
}

.audit-json {
  margin: 0;
  overflow: auto;
  word-break: break-word;
}

.audit-detail-grid {
  align-items: start;
}

.audit-detail-panel {
  align-self: start;
  grid-template-rows: auto 1fr;
  height: 100%;
}

.audit-detail-panel .audit-json {
  min-height: 260px;
  height: 100%;
  align-self: start;
}

.field-help {
  min-height: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
}

.stack-sm {
  display: grid;
  gap: 14px;
}

.field-help[data-state="available"] {
  color: #0e5f4d;
}

.field-help[data-state="unavailable"] {
  color: #8f2f26;
}

.field-help[data-state="checking"] {
  color: var(--color-dark-blue);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--text-primary);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(20, 110, 245, 0.2);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  accent-color: var(--color-dark-blue);
}

input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-dark-blue);
  flex: 0 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translate(6px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button:disabled:hover {
  box-shadow: none;
  transform: none;
}

.button.primary {
  background: var(--color-blue);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--color-blue-hover);
}

.button.secondary,
.button.subtle {
  background: var(--color-white);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.button.secondary {
  background: rgba(20, 110, 245, 0.08);
  border-color: rgba(20, 110, 245, 0.3);
  color: var(--color-blue);
}

.button.danger {
  background: #fff6f5;
  color: #8f2f26;
  border-color: rgba(181, 65, 53, 0.18);
}

.button.wide {
  width: 100%;
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.callout {
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: none;
  color: var(--text-primary);
}

.callout.error {
  color: #8f2f26;
  border-color: rgba(181, 65, 53, 0.18);
  background: #fff6f5;
}

.callout.success {
  color: #0e5f4d;
  border-color: rgba(20, 125, 100, 0.18);
  background: #f5fffb;
}

.callout.info {
  color: var(--color-blue);
  border-color: rgba(20, 110, 245, 0.2);
  background: rgba(20, 110, 245, 0.08);
}

.callout.callout-critical-center {
  color: #8f2f26;
  border-color: rgba(181, 65, 53, 0.24);
  background: #fff1ef;
  text-align: center;
}

.callout.callout-on-dark {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--color-blue);
}

.callout-typing-shell {
  margin-bottom: 0;
}

.callout-typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  max-width: 100%;
  border-right: 2px solid currentColor;
  animation: callout-typing 5.4s steps(48, end) infinite, callout-caret 0.9s step-end infinite;
}

.callout-waiting-text {
  color: #ffffff;
}

@keyframes callout-typing {
  0% {
    width: 0;
  }
  55% {
    width: 100%;
  }
  85% {
    width: 100%;
  }
  100% {
    width: 0;
  }
}

@keyframes callout-caret {
  0%,
  100% {
    border-right-color: rgba(255, 255, 255, 0.95);
  }
  50% {
    border-right-color: transparent;
  }
}

.split {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
}

.table-wrap {
  overflow: auto;
  box-shadow: none;
  background: var(--bg-card);
}

.table-wrap .button {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 14px;
}

.table-wrap.table-wrap-compact table {
  min-width: 0;
  table-layout: fixed;
}

.table-wrap.table-wrap-compact th,
.table-wrap.table-wrap-compact td {
  padding: 12px 14px;
  font-size: 13px;
  word-break: break-word;
}

.table-wrap.table-wrap-compact th {
  font-size: 12px;
}

.table-wrap.table-wrap-compact .mono {
  overflow-wrap: anywhere;
}

.table-wrap.table-wrap-compact .compartment-table {
  table-layout: fixed;
  min-width: 1040px;
}

.compartment-table .col-compartment-name {
  width: 16%;
}

.compartment-table .col-compartment-group {
  width: 15%;
}

.compartment-table .col-compartment-policy {
  width: 18%;
}

.compartment-table .col-compartment-path {
  width: 18%;
}

.compartment-table .col-compartment-status {
  width: 8%;
}

.compartment-table .col-compartment-created {
  width: 12%;
}

.compartment-table .compartment-lifecycle-cell,
.compartment-table .compartment-created-cell {
  white-space: nowrap;
  word-break: normal;
}

.compartment-table .compartment-created-cell {
  font-variant-numeric: tabular-nums;
}

.table-wrap.table-wrap-compact .actions {
  gap: 6px;
}

.table-wrap.table-wrap-compact .button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
 }

.tenant-list-table .col-tenant {
  width: 17%;
}

.tenant-list-table .col-uuid {
  width: 25%;
}

.tenant-list-table .col-slug {
  width: 16%;
}

.tenant-list-table .col-projects,
.tenant-list-table .col-members {
  width: 7%;
}

.tenant-list-table .col-default {
  width: 6%;
}

.tenant-list-table .col-actions {
  width: 22%;
}

.tenant-list-table td:last-child .actions {
  justify-content: flex-end;
}

.user-list-table.user-list-table-console th:nth-child(3),
.user-list-table.user-list-table-console td:nth-child(3),
.user-list-table.user-list-table-console th:nth-child(4),
.user-list-table.user-list-table-console td:nth-child(4) {
  width: 128px;
  white-space: nowrap;
}

.user-list-table.user-list-table-console th:nth-child(5),
.user-list-table.user-list-table-console td:nth-child(5) {
  width: 172px;
  white-space: nowrap;
}

.user-list-table.user-list-table-admin th:nth-child(3),
.user-list-table.user-list-table-admin td:nth-child(3),
.user-list-table.user-list-table-admin th:nth-child(4),
.user-list-table.user-list-table-admin td:nth-child(4),
.user-list-table.user-list-table-admin th:nth-child(5),
.user-list-table.user-list-table-admin td:nth-child(5),
.user-list-table.user-list-table-admin th:nth-child(6),
.user-list-table.user-list-table-admin td:nth-child(6) {
  width: 150px;
  white-space: nowrap;
}

.audit-log-table th:nth-child(4),
.audit-log-table td:nth-child(4) {
  width: 110px;
  white-space: nowrap;
}

.audit-log-table th:nth-child(5),
.audit-log-table td:nth-child(5) {
  width: 170px;
  white-space: nowrap;
}

.default-tenant-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.default-tenant-choice span {
  color: var(--text-primary);
  font-size: 13px;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 540;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

thead th:first-child {
  border-top-left-radius: var(--radius-surface);
}

thead th:last-child {
  border-top-right-radius: var(--radius-surface);
}

td {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

tbody tr {
  transition: background-color 150ms ease;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(250, 250, 248, 0.9);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-visible {
  outline: 2px solid rgba(20, 110, 245, 0.3);
  outline-offset: -2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-primary);
}

.badge.compact {
  min-height: 20px;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.2;
}

.badge.status-ready,
.badge.status-active {
  color: var(--color-teal-mid);
  border-color: rgba(21, 85, 85, 0.24);
  background: rgba(14, 48, 48, 0.08);
}

.badge.status-warning {
  color: #92600a;
  border-color: rgba(146, 96, 10, 0.28);
  background: rgba(146, 96, 10, 0.08);
}

.badge.status-error {
  color: #8b1a1a;
  border-color: rgba(139, 26, 26, 0.28);
  background: rgba(139, 26, 26, 0.08);
}

.badge.status-info {
  color: #1a4f8b;
  border-color: rgba(26, 79, 139, 0.28);
  background: rgba(26, 79, 139, 0.08);
}

.badge.status-missing {
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
}

.trend-list {
  display: grid;
  gap: 12px;
}

.trend-chart {
  display: grid;
  gap: 14px;
}

.trend-chart-shell {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.trend-chart-scale {
  display: grid;
  align-content: space-between;
  justify-items: end;
  padding: 8px 0 30px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
}

.trend-chart-canvas {
  position: relative;
}

.trend-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.trend-chart-gridline {
  stroke: rgba(41, 40, 39, 0.12);
  stroke-width: 1;
}

.trend-chart-area {
  fill: rgba(20, 110, 245, 0.1);
}

.trend-chart-line {
  fill: none;
  stroke: var(--color-blue);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart-point {
  fill: var(--color-white);
  stroke: var(--color-blue-400);
  stroke-width: 3;
}

.trend-chart-axis {
  display: grid;
  align-items: end;
  min-height: 24px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
  gap: 8px;
}

.trend-chart-axis-label {
  min-width: 0;
  white-space: nowrap;
  text-align: center;
}

.trend-chart-axis-label-0 {
  text-align: left;
}

.trend-chart-axis-label-2 {
  text-align: right;
}

.trend-chart-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trend-chart-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 250, 248, 1));
}

.trend-chart-summary strong {
  font-size: 18px;
  line-height: 1.2;
}

.infra-chart {
  display: grid;
  gap: 20px;
}

.infra-chart-bars {
  display: grid;
  gap: 14px;
}

.infra-chart-row {
  display: grid;
  gap: 8px;
}

.infra-chart-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.infra-chart-label strong {
  font-size: 15px;
  line-height: 1.3;
}

.infra-chart-label span {
  color: var(--text-secondary);
  font-size: 13px;
}

.infra-chart-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(41, 40, 39, 0.08);
}

.infra-chart-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: rgba(41, 40, 39, 0.16);
}

.infra-chart-track > span.is-active {
  background: linear-gradient(90deg, var(--color-blue-hover), var(--color-blue));
}

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

.trend-row {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 250, 248, 1));
}

.progress {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: var(--radius-sharp);
  background: rgba(41, 40, 39, 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue-400), var(--color-blue));
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.inline-form .field {
  flex: 1 1 220px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.asset-preview,
.asset-banner-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 16px;
  background: var(--bg-soft);
}

.asset-preview {
  min-height: 180px;
}

.asset-logo {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
}

.asset-banner {
  width: 100%;
  max-width: 340px;
  object-fit: cover;
}

.asset-empty {
  color: var(--text-secondary);
}

.login-page {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 32px 0;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  margin: 0 auto;
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 48px;
  background:
    radial-gradient(circle at 78% 14%, rgba(59, 137, 255, 0.3), transparent 24%),
    radial-gradient(circle at 58% 16%, rgba(20, 110, 245, 0.35), transparent 26%),
    linear-gradient(135deg, #0055d4 0%, #146ef5 52%, #1a7aff 100%);
  box-shadow: var(--shadow-soft);
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: auto auto -80px -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 137, 255, 0.2), transparent 72%);
  filter: blur(18px);
}

.login-hero-copy,
.login-panel-head {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.login-hero,
.login-hero h1,
.login-hero h2,
.login-hero h3,
.login-hero .eyebrow {
  color: var(--text-on-dark);
}

.login-hero .lede,
.login-research-card,
.login-research-card .eyebrow {
  color: var(--text-on-dark-muted);
}

.login-research-card h2,
.login-research-card h3,
.login-research-card strong,
.login-research-card .metric,
.login-research-card .hero-stat-value {
  color: var(--text-on-dark);
}

.login-hero .lede,
.login-panel .lede {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.135px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.info-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.info-card {
  padding: 20px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
}

.info-card h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.22px;
}

.info-card p:last-child {
  color: var(--text-secondary);
}

.login-research-band {
  margin-top: auto;
}

.login-research-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border-color-dark);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.login-research-card-single {
  grid-template-columns: minmax(0, 1fr);
}

.login-panel {
  align-self: center;
  padding: 32px;
  background: var(--color-white);
}

.stack > label,
.stack-md > label,
.stack-lg > label,
.panel > label {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
}

.input-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-copy-row input {
  flex: 1;
}

.copy-confirmation {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #0e5f4d;
}

.site-footer {
  background: var(--color-blue);
  color: var(--color-white);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  width: 100%;
  margin: 0;
  padding: 10px 20px 10px 24px;
}

.site-footer .eyebrow {
  color: var(--text-on-dark-muted);
}

.footer-wordmark {
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.36px;
}

/* Dark mode header */
html[data-theme="dark"] .site-header .eyebrow,
html[data-theme="dark"] .site-header .tenant-control label {
  color: var(--text-on-dark-muted);
}

html[data-theme="dark"] .brand-copy strong {
  color: var(--text-on-dark);
}

html[data-theme="dark"] .profile-avatar-button {
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

html[data-theme="dark"] .profile-avatar-button:hover,
html[data-theme="dark"] .profile-menu:hover .profile-avatar-button,
html[data-theme="dark"] .profile-menu:focus-within .profile-avatar-button {
  border-color: var(--color-blue);
  background: rgba(20, 110, 245, 0.15);
  color: var(--color-blue-400);
}

html[data-theme="dark"] .site-header .tenant-control select {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary);
  border-color: var(--border-color);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

html[data-theme="dark"] .site-header .tenant-control select option {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .profile-menu-panel {
  background: rgba(17, 17, 17, 0.98);
  border-color: var(--border-color);
}

html[data-theme="dark"] .profile-theme-option {
  background: var(--bg-card);
  color: var(--text-secondary);
}

html[data-theme="dark"] .profile-theme-option:hover,
html[data-theme="dark"] .profile-theme-option:focus-visible,
html[data-theme="dark"] .profile-theme-option[data-active="true"] {
  background: rgba(20, 110, 245, 0.12);
  border-color: var(--color-blue);
  color: var(--text-primary);
}

html[data-theme="dark"] .profile-menu-item:hover,
html[data-theme="dark"] .profile-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .left-nav-link:hover,
html[data-theme="dark"] .left-nav-link.active {
  background: rgba(20, 110, 245, 0.1);
  border-color: rgba(20, 110, 245, 0.3);
  color: var(--color-blue-400);
}

html[data-theme="dark"] .panel > .panel,
html[data-theme="dark"] .panel > .grid-2 > .panel,
html[data-theme="dark"] .panel > .grid-3 > .panel,
html[data-theme="dark"] .panel > .grid-2 > .card,
html[data-theme="dark"] .panel > .grid-3 > .card,
html[data-theme="dark"] .theme-settings,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .asset-preview,
html[data-theme="dark"] .asset-banner-frame {
  background: var(--bg-soft);
}

html[data-theme="dark"] .stats-grid .card {
  background: linear-gradient(180deg, rgba(20, 20, 20, 1), rgba(14, 14, 14, 1)), var(--bg-card);
}

html[data-theme="dark"] .trend-row {
  background: linear-gradient(180deg, rgba(17, 17, 17, 1), rgba(12, 12, 12, 1));
}

html[data-theme="dark"] .theme-choice-card {
  background: var(--bg-card);
}

html[data-theme="dark"] .theme-choice-card[data-active="true"] {
  background: rgba(20, 110, 245, 0.1);
  border-color: rgba(20, 110, 245, 0.4);
}

html[data-theme="dark"] .theme-choice-icon {
  background: rgba(20, 110, 245, 0.12);
}

html[data-theme="dark"] .input-like,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .button.subtle {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: var(--text-primary);
}

html[data-theme="dark"] .table-wrap {
  background: var(--bg-card);
}

html[data-theme="dark"] table,
html[data-theme="dark"] .badge {
  background: transparent;
}

html[data-theme="dark"] th {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1100px) {
  .site-header-inner,
  .site-actions {
    align-items: stretch;
  }

  .site-header-inner {
    gap: 16px;
  }

  .site-actions {
    align-items: center;
    justify-content: flex-end;
  }

  .left-nav {
    position: static;
    margin-left: 0;
  }

  .page-hero-grid,
  .app-workspace,
  .split,
  .login-shell,
  .grid-4,
  .stats-grid,
  .grid-3,
  .grid-2,
  .info-grid,
  .login-research-card,
  .audit-toolbar,
  .theme-settings,
  .theme-choice-grid {
    grid-template-columns: 1fr;
  }

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

  .login-panel {
    max-width: none;
  }

  .hero-aside-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 16px 12px 16px 16px;
  }

  .container {
    width: min(1360px, calc(100% - 32px));
    margin: 0 16px 0 16px;
  }

  .login-page {
    padding-top: 20px;
  }

  .site-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .tenant-control,
  .profile-avatar-button {
    min-width: max-content;
    width: auto;
  }

  .content-shell {
    width: min(1360px, calc(100% - 32px));
    margin: 0 16px 0 16px;
  }

  .left-nav-card {
    border-radius: var(--radius-card);
  }

  .workspace-main {
    padding-right: 0;
  }

  .page-hero-grid,
  .left-nav-card,
  .login-hero,
  .login-panel {
    padding: 24px;
  }

  .site-footer-inner {
    padding: 10px 16px 10px 16px;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
    letter-spacing: -1.2px;
  }

  h2 {
    font-size: 28px;
    letter-spacing: -0.28px;
  }

  .hero-badges,
  .actions,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .trend-chart-shell {
    grid-template-columns: 1fr;
  }

  .trend-chart-scale {
    display: none;
  }

  .trend-chart-summary {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }
}

/* ── OCI Provisioning overlay ──────────────────────────────────────────── */

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

.provision-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 12, 31, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.provision-overlay.hidden {
  display: none;
}

.provision-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(14, 12, 31, 0.18);
  text-align: center;
}

.provision-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(20, 110, 245, 0.2);
  border-top-color: var(--color-blue);
  border-radius: 50%;
  animation: provision-spin 0.8s linear infinite;
  margin: 0 auto 24px;
  will-change: transform;
}

.provision-spinner.done {
  animation: none;
  border-color: #14b889;
  border-top-color: #14b889;
}

.provision-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-blue);
  margin: 0 0 6px;
}

.provision-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 24px;
  min-height: 20px;
}

.provision-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  text-align: left;
  margin-bottom: 20px;
}

.provision-step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 220px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-surface);
  background: rgba(41, 40, 39, 0.03);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.provision-step.active {
  color: var(--color-blue);
  font-weight: 500;
}

.provision-step.done {
  color: #0e5f4d;
}

.provision-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
}

.provision-step.active .provision-step-icon {
  background: rgba(20, 110, 245, 0.15);
}

.provision-step.done .provision-step-icon {
  background: rgba(20, 184, 137, 0.12);
}

.provision-progress {
  height: 6px;
  border-radius: 3px;
  background: rgba(41, 40, 39, 0.08);
  overflow: hidden;
}

.provision-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue-400), var(--color-blue));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.provision-actions {
  margin-top: 24px;
}

.provision-page-card {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.provision-page-card .provision-steps {
  text-align: left;
  align-items: stretch;
}

.provision-console-panel {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-surface);
  background: #101721;
  text-align: left;
}

.provision-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.provision-console-status {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
}

.provision-console {
  margin: 0;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  color: #d8e6f5;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.provision-page-card .provision-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.field-inline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.field-inline input[type="checkbox"] {
  margin-top: 4px;
}

.model-picker-overlay {
  z-index: 950;
}

.model-picker-card {
  max-width: 1280px;
  width: min(1024px, 128vw);
  text-align: left;
  max-height: 256vh;
  overflow: auto;
}

.budget-modal-card {
  max-width: 760px;
  width: min(760px, 96vw);
  text-align: left;
}

.budget-modal-actions,
.budget-section-head {
  justify-content: space-between;
  align-items: flex-start;
}

.budget-form-grid {
  row-gap: 16px;
}

.budget-checkbox-field {
  grid-column: 1 / -1;
}

.model-picker-actions {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.model-picker-table {
  max-height: 68vh;
  overflow: auto;
}

/* OCI user registration checklist */
.oci-missing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.oci-missing-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #a93226;
}

.oci-missing-icon {
  flex-shrink: 0;
  font-style: normal;
}

.oci-all-ok {
  font-size: 0.85rem;
  color: #1e8449;
}
