:root {
  --bg: #eef3fb;
  --bg-deep: #050b14;
  --bg-deep-2: #081321;
  --bg-deep-3: #0d1d33;
  --surface: #ffffff;
  --surface-alt: #f6f9ff;
  --surface-muted: #edf3ff;
  --border: #d9e3f2;
  --border-strong: #bccadd;
  --text: #081120;
  --text-soft: #14233c;
  --muted: #62718a;
  --muted-strong: #8ca0bf;
  --sidebar: #06101d;
  --sidebar-soft: #0b182a;
  --sidebar-border: rgba(130, 156, 196, 0.16);
  --primary: #2f6bff;
  --primary-strong: #1557ff;
  --primary-soft: #e7efff;
  --primary-border: #b6cafc;
  --primary-glow: rgba(47, 107, 255, 0.28);
  --accent: #6ac7ff;
  --danger: #e04f4f;
  --danger-bg: #fff0f0;
  --danger-border: #ffc7c7;
  --warning: #a06700;
  --warning-bg: #fff6dd;
  --warning-border: #f6dc8a;
  --success: #0f8f5a;
  --success-bg: #eafcf3;
  --success-border: #b5f0d1;
  --shadow: 0 18px 48px rgba(8, 17, 32, 0.08);
  --shadow-strong: 0 28px 72px rgba(8, 17, 32, 0.14);
  --shadow-primary: 0 22px 48px rgba(47, 107, 255, 0.24);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  background:
    radial-gradient(circle at top right, rgba(106, 199, 255, 0.12), transparent 24%),
    radial-gradient(circle at top left, rgba(47, 107, 255, 0.10), transparent 28%),
    var(--bg);
  color: var(--text);
}

body {
  line-height: 1.45;
}

.page-loader {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(6, 16, 29, 0.92);
  color: #f8fbff;
  border: 1px solid rgba(130, 156, 196, 0.18);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

html.js-booting .page-loader,
body.is-page-loading .page-loader {
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
}

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

a:hover {
  text-decoration: none;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: var(--primary-soft);
  color: #17357c;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(47, 107, 255, 0.08);
}

.public-layout {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(106, 199, 255, 0.18), transparent 22%),
    radial-gradient(circle at top right, rgba(47, 107, 255, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deep-2) 44%, #eef3fb 44%, #eef3fb 100%);
}

.public-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.auth-panel {
  width: min(560px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(217, 227, 242, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  padding: 30px;
  backdrop-filter: blur(12px);
}

.auth-brand,
.sidebar-brand {
  display: grid;
  gap: 12px;
}

.auth-brand {
  margin-bottom: 24px;
}

.sidebar-brand {
  margin-bottom: 34px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand-logo img {
  height: 36px;
  width: auto;
}

.brand-logo--sidebar img {
  height: 34px;
}

.brand-meta {
  display: grid;
  gap: 4px;
}

.brand-context {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.brand-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.sidebar .brand-context {
  color: var(--accent);
}

.sidebar .brand-subtitle {
  color: #90a4c3;
}

.card,
.stat-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 227, 242, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.card-head {
  margin-bottom: 18px;
}

.card-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.card-head-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.08), rgba(106, 199, 255, 0.12));
  border: 1px solid rgba(47, 107, 255, 0.16);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.card-head h1,
.card-head h2,
.page-head h1 {
  margin: 0 0 6px;
  color: var(--text);
}

.card-head h1,
.page-head h1 {
  font-size: 30px;
  line-height: 1.1;
}

.card-head h2 {
  font-size: 22px;
}

.card-head p,
.page-head p,
.stat-card small,
.inline-note,
.muted,
.toolbar-note {
  color: var(--muted);
}

.page-kicker,
.search-cta-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.page-head--spotlight {
  align-items: stretch;
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at top right, rgba(106, 199, 255, 0.22), transparent 35%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-deep-2) 56%, var(--bg-deep-3) 100%);
  border: 1px solid rgba(130, 156, 196, 0.16);
  box-shadow: var(--shadow-strong);
  color: #f8fbff;
}

.page-head--spotlight h1,
.page-head--spotlight p,
.page-head--spotlight .page-head-copy {
  color: inherit;
}

.page-head-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  max-width: 760px;
}

.page-head--spotlight p {
  color: #d1def3;
}

.search-cta-shell {
  min-width: 340px;
  max-width: 460px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(130, 156, 196, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-cta-copy {
  display: grid;
  gap: 10px;
}

.search-cta-copy strong {
  font-size: 18px;
  line-height: 1.3;
}

.search-cta-note {
  color: #d1def3;
  font-size: 13px;
}

.search-cta-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.search-cta-shell .inline-form {
  gap: 0;
}

.search-cta-shell .inline-field {
  min-width: 0;
}

.search-cta-shell label span {
  color: #d7e5fb;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px 15px;
  font: inherit;
  color: var(--text-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

textarea {
  resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(47, 107, 255, 0.54);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
}

.search-cta-shell select {
  background: rgba(255, 255, 255, 0.96);
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #9ab1d1;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(8, 17, 32, 0.04);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

input[type="radio"] {
  border-radius: 999px;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: #628ce9;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 6.2L4.6 8.8L10 3.4' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

input[type="radio"]:checked {
  background-image: radial-gradient(circle at center, white 0 28%, transparent 33%), linear-gradient(var(--primary), var(--primary));
  background-size: cover;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn.is-loading {
  position: relative;
  opacity: 0.92;
}

.btn.is-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 5v5h-5'/%3E%3Cpath d='M4 19v-5h5'/%3E%3Cpath d='M20 10a8 8 0 0 0-14.13-3.36L4 10'/%3E%3Cpath d='M4 14a8 8 0 0 0 14.13 3.36L20 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  animation: spin 0.9s linear infinite;
}

.btn-secondary.is-loading::after,
.btn-warning.is-loading::after,
.btn-danger.is-loading::after {
  filter: invert(13%) sepia(23%) saturate(1145%) hue-rotate(180deg) brightness(92%) contrast(92%);
}

.btn-primary {
  background: linear-gradient(180deg, #3d79ff 0%, var(--primary) 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(47, 107, 255, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #2f6bff 0%, var(--primary-strong) 100%);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #f8fbff;
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: #ffe8e8;
}

.btn-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.btn-warning:hover {
  background: #fff0c8;
}

.btn-cta {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #67c4ff 0%, #2f6bff 52%, #1448e0 100%);
  color: white;
  box-shadow: 0 18px 40px rgba(47, 107, 255, 0.34);
}

.btn-cta:hover {
  box-shadow: 0 22px 46px rgba(47, 107, 255, 0.40);
}

.btn-cta-search {
  min-width: 180px;
  justify-self: stretch;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 12px;
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
}

.form-links a {
  color: var(--primary);
  font-weight: 600;
}

.flash-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.flash {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
}

.flash-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: #147446;
}

.flash-error {
  background: #fff1f1;
  border-color: #ffcaca;
  color: #a52d2d;
}

.flash-warning {
  background: #fff8e5;
  border-color: #f6dc8a;
  color: #8f5d00;
}

.private-layout .app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(106, 199, 255, 0.14), transparent 26%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-soft) 100%);
  color: #e5efff;
  padding: 30px 22px;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  position: relative;
  display: block;
  padding: 13px 15px 13px 18px;
  border-radius: 14px;
  color: #c5d5ee;
  border: 1px solid transparent;
}

.sidebar-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(130, 156, 196, 0.14);
  color: #fff;
}

.sidebar-nav a.active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.active::before {
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
}

.sidebar-divider {
  height: 1px;
  margin: 8px 0 4px;
  background: rgba(148, 163, 184, 0.14);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.impersonation-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--warning-bg);
  border-bottom: 1px solid var(--warning-border);
  color: #7b4f00;
  padding: 14px 24px;
}

.impersonation-banner span {
  display: block;
  font-size: 13px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(217, 227, 242, 0.84);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title span {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.topbar-title small {
  color: var(--muted);
  letter-spacing: 0.04em;
}

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

.topbar-actions form {
  margin: 0;
}

.page-content {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.stats-grid,
.card-grid,
.card-grid-2 {
  display: grid;
  gap: 18px;
}

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

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

.stat-card {
  padding: 20px;
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 20px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

.meta-grid .full {
  grid-column: 1 / -1;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.meta-grid dd {
  margin: 0;
  font-weight: 700;
}

.inline-form,
.button-row,
.toolbar,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inline-form--search {
  width: 100%;
}

.inline-field {
  min-width: 280px;
}

.inline-field--compact {
  min-width: 0;
  width: 100%;
}

.toolbar {
  margin-bottom: 18px;
}

.toolbar--split {
  justify-content: space-between;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-note {
  font-size: 13px;
}

.selection-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.05), rgba(106, 199, 255, 0.08));
  border: 1px solid rgba(47, 107, 255, 0.14);
  border-radius: 16px;
  color: #1d4ed8;
}

.selection-summary strong {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(217, 227, 242, 0.94);
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(217, 227, 242, 0.84);
  vertical-align: top;
}

.data-table thead th {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr {
  transition: background-color 0.14s ease;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.data-table tbody tr.is-selected {
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.06), rgba(106, 199, 255, 0.09));
}

.checkbox-col {
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.checkbox-col input {
  margin-inline: auto;
}

.tags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid rgba(55, 48, 163, 0.08);
  color: #4338ca;
  font-size: 12px;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
  border: 1px solid transparent;
}

.status-running,
.status-available,
.status-active,
.status-valid,
.status-success,
.status-in-use,
.status-attached {
  background: var(--success-bg);
  color: #147446;
  border-color: var(--success-border);
}

.status-stopped,
.status-stop,
.status-pending_email_verification,
.status-pending,
.status-partial,
.status-warning,
.status-creating,
.status-detaching,
.status-modifying {
  background: #fff8e5;
  color: #8f5d00;
  border-color: #f6dc8a;
}

.status-terminated,
.status-blocked,
.status-invalid,
.status-error,
.status-denied,
.status-deleted {
  background: #fff1f1;
  color: #a52d2d;
  border-color: #ffcaca;
}

.status-neutral,
.status-unknown,
.status-down,
.status-user,
.status-admin {
  background: var(--primary-soft);
  color: #1d4ed8;
  border-color: rgba(47, 107, 255, 0.18);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.empty-state.compact {
  padding: 20px;
}

.inline-warning {
  margin-bottom: 14px;
  padding: 13px 14px;
  background: #fff7e7;
  border: 1px solid #f6dc8a;
  border-radius: 14px;
  color: #8f5d00;
}

.log-context {
  display: inline-block;
  max-width: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal {
  border: none;
  padding: 0;
  border-radius: 22px;
  box-shadow: 0 40px 80px rgba(8, 17, 32, 0.25);
  width: min(560px, calc(100vw - 32px));
  background: #fff;
}

.modal::backdrop {
  background: rgba(8, 17, 32, 0.54);
}

.modal-shell {
  margin: 0;
  padding: 0;
}

.modal-head,
.modal-actions {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-head {
  border-bottom: 1px solid var(--border);
}

.modal-head--search {
  background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-deep-2) 60%, var(--bg-deep-3) 100%);
  color: #f8fbff;
  border-bottom-color: rgba(130, 156, 196, 0.18);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.modal-head--search .icon-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(130, 156, 196, 0.18);
  color: white;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}



.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(47, 107, 255, 0.035);
}

.clickable-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.table-link {
  color: inherit;
  font-weight: 700;
}

.table-link:hover {
  color: var(--primary-strong);
}

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

.detail-sections {
  align-items: start;
}

.detail-grid {
  display: grid;
  gap: 18px;
}

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

.notice-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}

.notice-box strong {
  color: var(--text);
}

.mini-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,255,0.95));
}

.mini-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.mini-card-head strong {
  font-size: 17px;
}

.mini-card-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.meta-grid--detail dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-grid--compact {
  margin-bottom: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-subsection {
  display: grid;
  gap: 10px;
}

.form-split {
  display: grid;
  gap: 14px;
}

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

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

.form-split--2 {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.compact-form {
  gap: 14px;
}

.form-actions-inline {
  display: flex;
  align-items: end;
  height: 100%;
}

.button-row--space-between {
  justify-content: space-between;
}

.action-stack--danger {
  justify-content: flex-start;
}

.ip-list {
  display: grid;
  gap: 10px;
}

.ip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.ip-row strong {
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.toggle-field span {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-soft);
}

.toggle-field--inline {
  justify-content: flex-start;
}

.skeleton-box {
  display: inline-flex;
  width: 100%;
  min-height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(217, 227, 242, 0.72), rgba(255, 255, 255, 0.9), rgba(217, 227, 242, 0.72));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}

.skeleton-box--checkbox {
  width: 18px;
  min-height: 18px;
  border-radius: 6px;
}

.skeleton-box--code {
  max-width: 158px;
}

.skeleton-box--text {
  max-width: 180px;
}

.skeleton-box--wide {
  max-width: 260px;
}

.skeleton-box--badge {
  max-width: 84px;
}

.skeleton-box--chips {
  max-width: 220px;
}

.skeleton-box--heading {
  max-width: 220px;
  min-height: 22px;
}

.table-skeleton-row td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.lazy-card,
.lazy-leaf {
  overflow: hidden;
}

.lazy-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.heading-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.refresh-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(47, 107, 255, 0.18);
  background: rgba(47, 107, 255, 0.08);
  color: var(--primary-strong);
}

.refresh-indicator svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.refresh-indicator.is-active svg {
  animation: spin 0.9s linear infinite;
}

.card-subnote {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-subnote.is-warning {
  color: #8f5d00;
}

.inline-action-form {
  display: inline-flex;
  align-items: center;
}

.button-row--api-actions {
  margin-top: 16px;
}

.inline-action-form--api-check {
  gap: 10px;
}

.validation-scope-box {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.scope-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(47, 107, 255, 0.16);
  background: rgba(47, 107, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.check-pill input[type="checkbox"] {
  accent-color: var(--primary);
}

.refresh-indicator--idle-hidden {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.refresh-indicator--idle-hidden.is-active {
  opacity: 1;
}

#api-key-check-note.is-warning {
  color: #8f5d00;
}

.guidance-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.guidance-list--ordered {
  padding-left: 22px;
}

.api-guidance-grid {
  margin-bottom: 18px;
}

.details-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,255,0.95));
  overflow: hidden;
}

.details-card summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 800;
  color: var(--text);
}

.details-card summary::-webkit-details-marker {
  display: none;
}

.details-card summary::after {
  content: '+';
  float: right;
  color: var(--primary-strong);
}

.details-card[open] summary::after {
  content: '−';
}

.details-card pre {
  margin: 0;
  padding: 0 18px 18px;
  overflow: auto;
}

.details-card code {
  display: block;
  min-width: min-content;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(47, 107, 255, 0.10);
  background: #0b1526;
  color: #d7e5fb;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

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

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 1260px) {
  .page-head--spotlight {
    flex-direction: column;
  }

  .search-cta-shell {
    max-width: none;
  }
}

@media (max-width: 1180px) {
  .stats-grid,
  .card-grid,
  .card-grid-2,
  .detail-grid--2 {
    grid-template-columns: 1fr 1fr;
  }

  .form-split--4,
  .form-split--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .private-layout .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding-bottom: 18px;
  }

  .stats-grid,
  .card-grid,
  .card-grid-2,
  .meta-grid,
  .detail-grid--2,
  .form-split--4,
  .form-split--3,
  .form-split--2 {
    grid-template-columns: 1fr;
  }

  .page-head,
  .page-head-actions,
  .topbar,
  .impersonation-banner,
  .card-head--split,
  .toolbar--split {
    flex-direction: column;
    align-items: stretch;
  }

  .search-cta-controls {
    grid-template-columns: 1fr;
  }

  .btn-cta-search {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-panel,
  .card,
  .page-head--spotlight {
    padding: 20px;
  }

  .page-loader {
    top: 12px;
    right: 12px;
    min-height: 44px;
    padding: 0 12px;
  }

  .page-content,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .sidebar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .data-table th,
  .data-table td {
    padding: 12px 12px;
  }
}

.details-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.notice-box.compact {
  margin-bottom: 0;
}

.compact-list {
  margin-bottom: 0;
}

.resource-tree-shell {
  display: grid;
  gap: 20px;
}

.resource-tree-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-card {
  display: grid;
  gap: 16px;
}

.resource-leaf-grid {
  display: grid;
  gap: 18px;
}

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

.resource-leaf,
.resource-branch {
  border-color: rgba(47, 107, 255, 0.10);
}

.resource-branch-list {
  display: grid;
  gap: 16px;
}

.resource-inline-help {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .resource-leaf-grid--2,
  .detail-grid--2,
  .stats-grid--details,
  .form-split--4,
  .form-split--3 {
    grid-template-columns: 1fr;
  }
}
