/* DevCloud institutional theme
 * Inspired by the restrained color balance of Turkish public-sector portals,
 * while retaining a distinct DevCloud identity and interaction model.
 */

:root {
  --bg-main: #f3f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f9fc;
  --bg-input: #ffffff;
  --border-color: #cfd7e5;
  --border-focus: #d50032;
  --text-main: #323a47;
  --text-muted: #687589;
  --heading: #263244;
  --primary: #d50032;
  --primary-hover: #b7002b;
  --primary-soft: #fff1f4;
  --secondary: #323a47;
  --secondary-hover: #222a36;
  --success: #087a61;
  --success-bg: #eaf7f3;
  --warning: #8c7e2e;
  --warning-bg: #faf7e8;
  --danger: #c6283d;
  --danger-bg: #fff0f2;
  --gold: #a3953b;
  --pale-blue: #e6ecf5;
  --font-sans: Arial, "Segoe UI", Helvetica, sans-serif;
  --shadow-card: 0 7px 22px rgba(38, 50, 68, 0.07);
}

html {
  background: var(--bg-main);
  color-scheme: light;
}

body {
  background:
    linear-gradient(180deg, rgba(230, 236, 245, 0.72) 0, rgba(243, 246, 250, 0) 210px),
    var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  letter-spacing: 0.005em;
}

body::before {
  background: var(--primary);
  content: "";
  height: 4px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
}

::selection {
  background: rgba(213, 0, 50, 0.18);
  color: var(--heading);
}

a { color: #9e0026; }
a:hover { color: var(--primary); }

:focus-visible {
  outline: 3px solid rgba(213, 0, 50, 0.3);
  outline-offset: 2px;
}

/* Institutional header */
.navbar {
  align-items: stretch;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 3px 14px rgba(38, 50, 68, 0.08);
  min-height: 76px;
  padding: 0 2rem;
  top: 4px;
}

.navbar-brand-group {
  align-items: center;
  display: flex;
}
.navbar-brand {
  align-items: center;
  color: var(--heading);
  display: flex;
  gap: 0.8rem;
  padding: 0.85rem 0;
  text-decoration: none;
}

.navbar-brand:hover { color: var(--heading); text-decoration: none; }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  color: var(--heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}
.brand-tcmb {
  color: var(--heading, #263244);
  font-weight: 900;
}
.brand-ai {
  color: var(--primary, #d50032);
  font-weight: 800;
}
.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 0.18rem;
}
.brand-meta { align-items: center; display: inline-flex; gap: 0.35rem; margin-left: 0.25rem; }
.version-chip,
.repository-link {
  background: var(--pale-blue);
  border: 1px solid #d4deeb;
  border-radius: 999px;
  color: #536176;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.2rem 0.48rem;
}
.repository-link {
  align-items: center;
  background: #fff;
  color: #536176;
  display: inline-flex;
  font-family: var(--font-sans);
  gap: 0.2rem;
  text-decoration: none;
}
.repository-link:hover {
  background: var(--primary-soft);
  border-color: #efb2c0;
  color: var(--primary);
  text-decoration: none;
}

.nav-links { gap: 0.2rem; }
.nav-link {
  align-items: center;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #4c596d;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.35rem 0.8rem 0.2rem;
}
.nav-link:hover,
.nav-link.active {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.nav-link-admin { color: #75691f; }
.text-muted { color: var(--text-muted); }
.text-destructive { color: var(--danger); }

/* Page structure */
.container {
  max-width: 1280px;
  padding: 2rem 1.5rem 3rem;
}
.page-heading {
  align-items: flex-end;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.page-heading h1,
.card-title,
[style*="color: #fff"] {
  color: var(--heading) !important;
}
.page-heading h1 {
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.page-heading p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.3rem; }
.page-kicker {
  color: var(--primary);
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

/* Panels and cards */
.card,
.usage-card,
.modal {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: var(--shadow-card);
}
.card { padding: 1.4rem; }
.card-header {
  border-bottom: 1px solid var(--pale-blue);
  margin-bottom: 1.15rem;
  padding-bottom: 0.9rem;
}
.card-title { font-size: 1.08rem; font-weight: 700; }
.workspace-card { border-top: 3px solid var(--secondary); }
.workspace-card:hover {
  border-color: #adbed2;
  border-top-color: var(--primary);
  box-shadow: 0 10px 26px rgba(38, 50, 68, 0.11);
  transform: translateY(-1px);
}
.empty-state { border-top: 3px solid var(--gold); }
.auth-shell { margin: 3rem auto; max-width: 460px; }
.auth-card { border-top: 4px solid var(--primary); padding: 1.8rem; }
.auth-card .card-header { border-bottom: 0; }

/* Controls */
.btn {
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 650;
  min-height: 36px;
  padding: 0.55rem 1.05rem;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: #fff; border-color: #adbed2; color: var(--secondary); }
.btn-secondary:hover { background: var(--pale-blue); border-color: #9eafc3; color: var(--heading); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-warning { background: var(--warning-bg); border-color: #d6ca84; color: #675c17; }
.btn-danger { background: #fff; border-color: #e1a5af; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn:disabled { cursor: not-allowed; filter: grayscale(0.2); opacity: 0.58; }

.form-label { color: #4b596d; font-size: 0.8rem; font-weight: 700; }
.form-input,
.form-select,
.form-textarea {
  background: #fff;
  border-color: #bfcbd9;
  border-radius: 2px;
  color: var(--heading);
  min-height: 42px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.08);
}
.form-input::placeholder,
.form-textarea::placeholder { color: #9aa6b5; }

/* Read-only catalog fields with an explicit in-field edit affordance. */
.inline-edit-control {
  min-width: 0;
  position: relative;
}
.inline-edit-control .form-input { padding-inline-end: 5.4rem; }
.inline-edit-control .form-input[readonly] {
  background: #f8fafc;
  color: var(--heading);
  cursor: default;
}
.inline-edit-control.is-editing .form-input {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.08);
}
.inline-edit-toggle {
  background: #fff;
  border: 0;
  border-left: 1px solid #d5dde8;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 750;
  inset-block: 2px;
  inset-inline-end: 2px;
  min-width: 4.8rem;
  padding: 0 0.55rem;
  position: absolute;
}
.inline-edit-toggle:hover { background: var(--primary-soft); }
.inline-edit-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.inline-edit-control.is-editing .inline-edit-toggle {
  background: var(--primary-soft);
  border-left-color: #efb2c0;
}

/* Progressive file-picker fallback and enhanced control */
.form-input[type="file"] { padding: 0.25rem; }
.form-input[type="file"]::file-selector-button {
  background: #fff;
  border: 1px solid #adbed2;
  border-radius: 2px;
  color: var(--secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  margin-right: 0.65rem;
  min-height: 32px;
  padding: 0.4rem 0.75rem;
}
.form-input[type="file"]::file-selector-button:hover {
  background: var(--pale-blue);
  border-color: #9eafc3;
  color: var(--heading);
}
.file-picker {
  align-items: stretch;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}
.file-picker:not(.is-enhanced) { display: block; }
.file-picker.is-enhanced {
  background: #fff;
  border: 1px solid #bfcbd9;
  border-radius: 2px;
  min-height: 42px;
}
.file-picker.is-enhanced:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.08);
}
.file-picker-input {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  min-height: 0;
  padding: 0;
}
.file-picker-trigger {
  border-block: 0;
  border-left: 0;
  border-radius: 0;
  min-height: 40px;
  white-space: nowrap;
}
.file-picker-selection {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 0.78rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.55rem 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-picker.has-selection .file-picker-selection {
  color: var(--heading);
  font-weight: 600;
}
@media (max-width: 460px) {
  .file-picker.is-enhanced { grid-template-columns: minmax(0, 1fr); }
  .file-picker-trigger { border-bottom: 1px solid #adbed2; border-right: 0; width: 100%; }
  .file-picker-selection { min-height: 40px; }
}

.selectable-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-left: 3px solid #adbed2;
  border-radius: 2px;
}
.selectable-card:hover { background: #f9fbfd; border-color: #aebdce; border-left-color: var(--gold); }
.selectable-card.selected {
  background: var(--primary-soft);
  border-color: #ef8ca3;
  border-left-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(213, 0, 50, 0.08);
}
.template-card-title {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Status and data */
.badge {
  border-radius: 2px;
  font-size: 0.66rem;
  letter-spacing: 0.045em;
  padding: 0.25rem 0.55rem;
}
.badge-running { background: var(--success-bg); border-color: #a5d8ca; color: #06634f; }
.badge-stopped { background: #eef2f7; border-color: #ccd6e2; color: #59677a; }
.badge-creating,
.badge-starting { background: var(--warning-bg); border-color: #d9ce91; color: #75691f; }
.badge-error { background: var(--danger-bg); border-color: #edb4bd; color: var(--danger); }
.badge-flavor { background: #eaf1f8; border-color: #bfd0e2; color: #334f6f; }
.badge-template { background: #f3f0e2; border-color: #d7cc90; color: #716620; }
.badge-neutral { background: #f6f8fb; border-color: #d5dde8; color: #637083; }
.badge-role-admin { background: var(--warning-bg); border-color: #d8cc8b; color: #71651c; }
.badge-role-user { background: #eaf1f8; border-color: #bfd0e2; color: #334f6f; }

.table { color: var(--text-main); }
.table th {
  background: var(--secondary);
  border-bottom: 0;
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.table td { border-bottom-color: #e1e7ef; }
.table tbody tr:nth-child(even) td { background: #fafbfd; }
.table tr:hover td { background: #f1f5fa; }
code { color: #8d0022; }
#admin-nodes-table th,
#admin-nodes-table td {
  vertical-align: middle;
}
#admin-nodes-table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.25;
}
[hidden] { display: none !important; }
.admin-data-table th { white-space: nowrap; }
.admin-data-table td { vertical-align: middle; }
.admin-data-table .badge,
.admin-table-actions .btn,
.flavor-type { white-space: nowrap; }
.admin-table-actions { justify-content: flex-end; }
#admin-flavor-settings-table {
  min-width: 820px;
  table-layout: fixed;
}
#admin-flavor-settings-table th:nth-child(1) { width: 24%; }
#admin-flavor-settings-table th:nth-child(2) { width: 22%; }
#admin-flavor-settings-table th:nth-child(3) { width: 8%; }
#admin-flavor-settings-table th:nth-child(4) { width: 12%; }
#admin-flavor-settings-table th:nth-child(5) { width: 34%; }
.flavor-profile-cell strong,
.flavor-profile-cell code { display: block; }
.flavor-profile-cell code { margin-top: 0.2rem; }
.flavor-resource-summary {
  align-items: center;
  display: flex;
  gap: 0.9rem;
}
.flavor-resource-summary > span {
  display: grid;
  gap: 0.1rem;
  min-width: 3.5rem;
}
.flavor-resource-summary > span + span {
  border-left: 1px solid var(--border-color);
  padding-left: 0.9rem;
}
.flavor-resource-summary small {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.flavor-edit-field { margin: 0; }
.flavor-resource-edit {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flavor-resource-edit .form-input { min-width: 0; width: 100%; }
#admin-flavor-settings-table tr.is-editing td { background: var(--primary-soft); }
.admin-data-table tr[aria-busy="true"] { opacity: 0.7; }

/* Resource usage */
.usage-card {
  background: #fff;
  border-top: 3px solid var(--secondary);
  padding: 1.2rem;
}
.usage-card:nth-child(2) { border-top-color: var(--primary); }
.usage-card-heading h2 { color: var(--heading); }
.usage-eyebrow { color: #748197; }
.usage-icon {
  background: #edf2f8;
  border-color: #ced9e6;
  border-radius: 2px;
  color: var(--secondary);
}
.usage-row-label strong { color: var(--heading); }
.usage-track { background: #e2e8f0; }
.usage-track span { background: var(--secondary); }
.usage-quota-summary { color: #748197; }
.usage-remaining { color: #748197; }
.usage-track-quota span { background: var(--secondary); }
.usage-row-quota.is-warning .usage-track-quota span { background: var(--gold); }
.usage-row-quota.is-critical .usage-track-quota span { background: var(--primary); }
.usage-row-quota.is-critical .usage-row-label strong { color: var(--primary); }
.usage-card-note { color: #748197; }

/* Modal and logs */
.modal-backdrop { background: rgba(24, 31, 43, 0.62); backdrop-filter: blur(2px); }
.modal { border-top: 4px solid var(--primary); }
.terminal-window {
  background: #202a38;
  border-color: #3a485e;
  border-radius: 2px;
  color: #d9e3ee;
}
.log-info { color: #9fc8ea; }
.log-success { color: #79d2b9; }
.log-error { color: #ff9aaa; }
.log-warning { color: #ffd28a; }
.log-dim { color: #9caabc; }
.pulse-dot { background: var(--primary); box-shadow: 0 0 0 0 rgba(213, 0, 50, 0.55); }

.download-update-card { border-top: 3px solid var(--gold); }
.download-update-logs { color: #d9e3ee; }
.download-filename { color: var(--heading); }
.download-item + .download-item { border-top-color: var(--pale-blue); }
.quota-summary strong { color: var(--heading); }

/* Categorized admin workspace */
.admin-page-heading { margin-bottom: 1.25rem; }
.admin-shell {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 230px minmax(0, 1fr);
}
.admin-category-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 1rem;
}
.admin-category-link {
  align-items: center;
  border-left: 3px solid transparent;
  color: var(--text-main);
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 62px;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.admin-category-link + .admin-category-link { border-top: 1px solid var(--border-color); }
.admin-category-link:hover { background: var(--pale-blue); color: var(--heading); }
.admin-category-link.is-active {
  background: var(--primary-soft);
  border-left-color: var(--primary);
  color: var(--heading);
}
.admin-category-icon {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #d7e0eb;
  color: var(--text-muted);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.admin-category-link.is-active .admin-category-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.admin-category-link strong { display: block; font-size: 0.8rem; }
.admin-category-link small {
  color: var(--text-muted);
  display: block;
  font-size: 0.65rem;
  margin-top: 0.12rem;
}
.admin-section-content { min-width: 0; }
.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.admin-section-jumps {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.55rem;
}
.admin-section-jumps a {
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}
.admin-section-jumps a:hover {
  background: #fff;
  border-color: var(--border-color);
  color: var(--heading);
}
.admin-card-tools { align-items: center; display: flex; flex-wrap: wrap; gap: 0.65rem; }
.admin-search-field { margin: 0; min-width: 220px; }
.admin-search-field .form-input { min-height: 36px; width: 100%; }
.admin-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}
.admin-feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 1.5rem;
}
.admin-overview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-overview-card {
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--secondary);
  box-shadow: var(--shadow-card);
  color: var(--text-main);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.admin-overview-card:hover {
  border-left-color: var(--primary);
  box-shadow: 0 10px 26px rgba(38, 50, 68, 0.12);
  transform: translateY(-1px);
}
.admin-overview-index {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 750;
}
.admin-overview-copy strong { color: var(--heading); display: block; font-size: 0.92rem; }
.admin-overview-copy small { color: var(--text-muted); display: block; font-size: 0.72rem; line-height: 1.45; margin-top: 0.22rem; }
.admin-overview-arrow { color: var(--primary); font-size: 1.15rem; }

/* Admin user and quota cards */
.admin-users-panel {
  margin-bottom: 2rem;
  overflow: hidden;
  padding: 0;
}
.admin-users-panel > .card-header {
  align-items: center;
  margin: 0;
  padding: 1.25rem 1.4rem;
}
.admin-section-description {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

/* Workspace flavor picker */
.workspace-create-modal { max-width: 880px; }
.flavor-picker-heading p {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}
.flavor-section + .flavor-section { margin-top: 1.1rem; }
.flavor-section-heading {
  align-items: baseline;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.flavor-section-heading h3 {
  color: var(--heading);
  font-size: 0.83rem;
  font-weight: 750;
}
.flavor-section-heading span {
  color: var(--text-muted);
  font-size: 0.68rem;
}
.flavor-grid {
  display: grid;
  gap: 0.65rem;
}
.flavor-grid-cpu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flavor-card {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 0.8rem;
  position: relative;
}
.flavor-choice-input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}
.flavor-card:has(.flavor-choice-input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.22);
  outline: 2px solid transparent;
}
.flavor-selected-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  display: none;
  font-size: 0.65rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  width: 1.25rem;
}
.flavor-card.selected .flavor-selected-mark { display: flex; }
.flavor-card-title {
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 750;
  padding-right: 1.45rem;
}
.flavor-card-code {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  margin-top: 0.05rem;
}
.flavor-card-resources {
  color: #25364d;
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 0.65rem;
}
.flavor-card-resources b { color: #97a5b7; padding: 0 0.2rem; }
.flavor-card-description {
  color: var(--text-muted);
  font-size: 0.67rem;
  line-height: 1.38;
  margin-top: 0.35rem;
}
.flavor-card-gpu {
  display: block;
  min-height: 0;
  padding: 1rem;
}
.gpu-flavor-title-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.gpu-flavor-metrics {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.85rem;
}
.gpu-flavor-metrics span {
  background: #f5f8fb;
  border: 1px solid #dce4ee;
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 0.5rem 0.6rem;
}
.gpu-flavor-metrics strong {
  color: var(--heading);
  display: block;
  font-size: 0.82rem;
}
.gpu-flavor-details {
  color: #536176;
  display: grid;
  font-size: 0.7rem;
  gap: 0.25rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.7rem;
  overflow-wrap: anywhere;
}
.gpu-flavor-details b { color: var(--heading); }
.gpu-flavor-note {
  color: var(--text-muted);
  font-size: 0.64rem;
  margin-top: 0.55rem;
}
.flavor-picker .flavor-card.is-unavailable {
  background: #fbf7f7;
  border-color: #e6c6cb;
  cursor: not-allowed;
  filter: none;
  opacity: 1;
}
.flavor-picker .flavor-card.is-unavailable:hover {
  background: #fbf7f7;
  border-color: #e6c6cb;
  border-left-color: #e6c6cb;
}
.gpu-flavor-unavailable {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  font-size: 0.68rem;
  margin-top: 0.65rem;
  padding: 0.45rem 0.55rem;
}
.selected-flavor-summary {
  align-self: center;
  color: #536176;
  font-size: 0.7rem;
  margin-right: auto;
}

@media (max-width: 720px) {
  .flavor-grid-cpu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpu-flavor-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpu-flavor-details { grid-template-columns: minmax(0, 1fr); }
  .selected-flavor-summary { flex-basis: 100%; }
}

@media (max-width: 460px) {
  .flavor-grid-cpu { grid-template-columns: minmax(0, 1fr); }
  .flavor-section-heading { align-items: flex-start; flex-direction: column; gap: 0.1rem; }
}
.section-eyebrow {
  color: var(--primary);
  display: block;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}
.admin-section-count {
  background: var(--pale-blue);
  border: 1px solid #d4deeb;
  border-radius: 999px;
  color: #536176;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
}
.admin-user-list { display: grid; }
.admin-user-card {
  align-items: center;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(230px, 0.85fr) minmax(230px, 0.8fr) minmax(360px, 1.35fr);
  padding: 1.25rem 1.4rem;
}
.admin-user-card + .admin-user-card { border-top: 1px solid #e1e7ef; }
.admin-user-card:nth-child(even) { background: #fafbfd; }
.admin-user-header { min-width: 0; }
.admin-user-identity { align-items: flex-start; display: flex; gap: 0.75rem; min-width: 0; }
.admin-user-id {
  align-items: center;
  background: var(--secondary);
  border-radius: 2px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 750;
  height: 32px;
  justify-content: center;
  min-width: 38px;
  padding: 0 0.4rem;
}
.admin-user-copy { display: flex; flex-direction: column; min-width: 0; }
.admin-user-name { color: var(--heading); font-size: 0.95rem; }
.admin-user-full-name { color: var(--text-main); font-size: 0.78rem; margin-top: 0.12rem; }
.admin-user-email {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}
.admin-user-badges { align-items: center; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; padding-left: 3.25rem; }
.admin-user-status { align-items: center; display: inline-flex; font-size: 0.7rem; font-weight: 700; gap: 0.3rem; }
.admin-user-status::before { border-radius: 50%; content: ""; height: 7px; width: 7px; }
.admin-user-status.is-active { color: var(--success); }
.admin-user-status.is-active::before { background: var(--success); }
.admin-user-status.is-inactive { color: var(--danger); }
.admin-user-status.is-inactive::before { background: var(--danger); }
.admin-user-usage,
.admin-quota-form { min-width: 0; }
.admin-user-usage h3,
.admin-quota-form h3 {
  color: #5d6a7d;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}
.admin-quota-metric + .admin-quota-metric { margin-top: 0.5rem; }
.admin-quota-label { align-items: baseline; display: flex; font-size: 0.68rem; justify-content: space-between; margin-bottom: 0.2rem; }
.admin-quota-label span { color: var(--heading); font-weight: 750; }
.admin-quota-label strong { color: var(--text-muted); font-weight: 600; }
.admin-quota-track { background: #e2e8f0; height: 4px; overflow: hidden; }
.admin-quota-track span { background: var(--primary); display: block; height: 100%; }
.admin-quota-form .quota-input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-quota-form .quota-field .form-input { min-width: 0; width: 100%; }
.admin-quota-form .quota-actions { justify-content: flex-start; }
.admin-quota-form h3 small,
.admin-quota-source {
  color: #8592a5;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 0.3rem;
  text-transform: none;
}
.admin-quota-source.is-user { color: #9a5b00; }
.admin-quota-source.is-group { color: #1d4f91; }
.admin-quota-source.is-unit { color: #a0002a; }
.admin-quota-form .form-input.is-override { border-color: #d39b2a; background: #fffaf0; }
.admin-quota-form .form-input::placeholder,
.group-quota-form .form-input::placeholder { color: #9aa6b6; }
.badge-override { background: #fff4dd; border: 1px solid #f0d49b; color: #8a5600; }

/* Admin users grouped by directory team */
.admin-team-list { border-top: 1px solid #e1e7ef; }
.admin-team-group + .admin-team-group { border-top: 1px solid #e1e7ef; }
.admin-team-group[hidden] { display: none; }
.admin-team-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: 14px minmax(180px, 1fr) auto minmax(260px, auto);
  list-style: none;
  padding: 0.9rem 1.4rem;
}
.admin-team-summary::-webkit-details-marker { display: none; }
.admin-team-summary:hover { background: #f7f9fc; }
.admin-team-group[open] > .admin-team-summary { background: var(--pale-blue); border-bottom: 1px solid #d4deeb; }
.admin-team-group.is-default > .admin-team-summary { border-left: 3px solid var(--secondary); }
.admin-team-chevron {
  border-bottom: 2px solid #5d6a7d;
  border-right: 2px solid #5d6a7d;
  height: 7px;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  width: 7px;
}
.admin-team-group[open] .admin-team-chevron { transform: rotate(45deg); }
.admin-team-heading { display: flex; flex-direction: column; min-width: 0; }
.admin-team-name { color: var(--heading); font-size: 0.9rem; }
.admin-team-units { color: var(--text-muted); font-size: 0.68rem; margin-top: 0.1rem; overflow-wrap: anywhere; }
.admin-team-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.admin-team-quota { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.admin-team-quota-item {
  background: #fff;
  border: 1px solid #d4deeb;
  color: var(--heading);
  font-size: 0.68rem;
  padding: 0.18rem 0.45rem;
  white-space: nowrap;
}
.admin-team-quota-item b { color: #5d6a7d; font-weight: 750; margin-right: 0.15rem; }
.admin-team-quota-item.is-inherited { border-style: dashed; color: #8592a5; }
.admin-team-totals {
  color: var(--text-muted);
  font-size: 0.66rem;
  grid-column: 2 / -1;
  text-align: right;
}
.admin-team-body { background: #fcfdfe; }
.group-quota-form {
  background: #f5f8fb;
  border-bottom: 1px solid #e1e7ef;
  padding: 1rem 1.4rem;
}
.group-quota-form h3 {
  color: #5d6a7d;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}
.group-quota-form .quota-input-grid { grid-template-columns: repeat(4, minmax(0, 160px)); }
.group-quota-form .quota-actions { justify-content: flex-start; }
.admin-team-body .admin-user-card { padding: 1rem 1.4rem 1rem 2.6rem; }
.admin-team-empty { color: var(--text-muted); font-size: 0.75rem; padding: 1rem 1.4rem 1.1rem 2.6rem; }

@media (max-width: 1050px) {
  .admin-team-summary { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .admin-team-quota,
  .admin-team-totals { grid-column: 2 / -1; justify-content: flex-start; text-align: left; }
}
@media (max-width: 620px) {
  .admin-team-summary { grid-template-columns: 14px minmax(0, 1fr); padding: 0.85rem 1rem; }
  .admin-team-badges { grid-column: 2; }
  .group-quota-form { padding: 0.9rem 1rem; }
  .group-quota-form .quota-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-team-body .admin-user-card { padding: 1rem; }
}

/* Footer */
.site-footer {
  background: var(--secondary);
  border-top: 4px solid var(--primary);
  color: #d9e0e9;
  font-size: 0.72rem;
  margin-top: auto;
}
.site-footer-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1280px;
  padding: 1rem 1.5rem;
}
.site-footer strong { color: #fff; }
.site-footer-version { color: #d6ca84; font-family: var(--font-mono); }

@media (max-width: 1050px) {
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-user-card {
    align-items: stretch;
    grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.1fr);
  }
  .admin-user-header { grid-column: 1 / -1; }
  .admin-user-badges { padding-left: 3.25rem; }
}

@media (max-width: 860px) {
  .navbar { align-items: flex-start; flex-direction: column; padding: 0.55rem 1rem 0; }
  .navbar-brand { padding: 0.4rem 0; }
  .nav-links { overflow-x: auto; width: 100%; }
  .nav-link { min-height: 40px; white-space: nowrap; }
  .container { padding: 1.4rem 1rem 2.5rem; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .page-heading .btn { align-self: flex-start; }
  .site-footer-inner { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .brand-subtitle { display: none; }
  .admin-shell { display: block; }
  .admin-category-nav {
    flex-direction: row;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    position: static;
  }
  .admin-category-link {
    border-bottom: 3px solid transparent;
    border-left: 0;
    flex: 0 0 170px;
  }
  .admin-category-link + .admin-category-link { border-left: 1px solid var(--border-color); border-top: 0; }
  .admin-category-link.is-active { border-bottom-color: var(--primary); border-left-color: transparent; }
}

@media (max-width: 620px) {
  .admin-stat-grid,
  .admin-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-category-link { flex-basis: 150px; grid-template-columns: 28px minmax(0, 1fr); padding-inline: 0.7rem; }
  .admin-category-icon { height: 26px; width: 26px; }
  .admin-card-tools,
  .admin-search-field { width: 100%; }
  .admin-users-panel > .card-header { align-items: flex-start; flex-direction: column; }
  .admin-user-card { grid-template-columns: minmax(0, 1fr); padding: 1.1rem; }
  .admin-user-header { grid-column: auto; }
  .admin-user-badges { padding-left: 0; }
  .admin-quota-form .quota-input-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-quota-form .quota-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Responsive data-density and long-value hardening */
.admin-section-content,
.admin-section-content > *,
.admin-feature-grid > *,
.admin-overview-copy,
.download-item > * {
  min-width: 0;
}
.admin-section-description,
.download-filename,
.download-meta,
.repository-link,
.workspace-card,
.model-card {
  overflow-wrap: anywhere;
}
.responsive-form-grid--platform {
  grid-template-columns: minmax(240px, 1fr) minmax(110px, 0.3fr) auto;
  margin-bottom: 1rem;
}
.platform-update-card {
  border-top: 3px solid var(--success);
}
.platform-version-summary {
  align-items: stretch;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin-bottom: 0.75rem;
}
.platform-version-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--secondary);
  min-width: 0;
  padding: 0.8rem 1rem;
}
.platform-version-item:last-child { border-top-color: var(--primary); }
.platform-version-item strong {
  color: var(--heading);
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.platform-version-arrow {
  align-self: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 700;
}
.platform-current-release {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--secondary);
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  min-width: 0;
  padding: 0.85rem 1rem;
}
.platform-current-release-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.platform-current-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.065em;
  margin-bottom: 0.18rem;
  text-transform: uppercase;
}
.platform-current-release code {
  color: var(--primary);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.platform-current-release p {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 0;
  max-width: 360px;
  text-align: right;
}
.platform-update-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  margin-bottom: 1rem;
}
.platform-update-option {
  align-content: start;
  background: #fff;
  border: 1px solid var(--border-color);
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
}
.platform-update-option--primary {
  border-top: 3px solid var(--primary);
}
.platform-option-heading {
  align-items: start;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 30px minmax(0, 1fr);
}
.platform-option-heading strong {
  color: var(--heading);
  display: block;
  font-size: 0.88rem;
}
.platform-option-heading small {
  color: var(--text-muted);
  display: block;
  font-size: 0.68rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}
.platform-option-index {
  align-items: center;
  background: var(--pale-blue);
  color: var(--secondary);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.platform-update-option--primary .platform-option-index {
  background: var(--primary);
  color: #fff;
}
.platform-git-fields {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.28fr);
}
.platform-update-option .form-group {
  margin: 0;
  min-width: 0;
}
.unsigned-update-control {
  align-items: flex-start;
  background: var(--warning-bg);
  border: 1px solid #ded49a;
  color: #665d25;
  cursor: pointer;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.75rem;
}
.unsigned-update-control input {
  accent-color: var(--warning);
  height: 1rem;
  margin: 0.1rem 0 0;
  width: 1rem;
}
.unsigned-update-control strong {
  color: #514918;
  display: block;
  font-size: 0.74rem;
}
.unsigned-update-control small {
  display: block;
  font-size: 0.66rem;
  line-height: 1.45;
  margin-top: 0.12rem;
}
.unsigned-update-control:has(input:checked) {
  background: var(--danger-bg);
  border-color: #e1a5af;
  color: #873041;
}
.unsigned-update-control:has(input:checked) strong {
  color: var(--danger);
}
.platform-update-option > .btn {
  justify-self: start;
}
.platform-update-check-message,
.platform-update-status-message {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 0;
}
.platform-update-check-message.is-success,
.platform-update-status-message.is-success { color: var(--success); }
.platform-update-check-message.is-error,
.platform-update-status-message.is-error { color: var(--danger); }
.platform-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.platform-update-actions .btn { flex: 1 1 180px; }
.platform-update-status-message {
  background: #fff;
  border-left: 3px solid var(--secondary);
  margin-bottom: 0.65rem;
  padding: 0.6rem 0.75rem;
}
.platform-update-log {
  background: #f7f9fc;
  border: 1px solid var(--border-color);
  padding: 0.85rem;
}
.platform-update-log-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.platform-update-log-heading strong {
  color: var(--heading);
  display: block;
  font-size: 0.82rem;
}
.platform-log-live {
  align-items: center;
  color: var(--success);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 700;
  gap: 0.35rem;
}
.platform-log-live > span {
  background: var(--success);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}
.platform-update-log .terminal-window {
  margin: 0;
  max-height: 220px;
  min-height: 92px;
}
.responsive-form-grid--download {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-bottom: 1rem;
  padding: 1rem;
}
.image-new-template-fields {
  background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 10px;
  margin: 0 0 1rem;
  padding: 0.9rem;
}
.image-new-template-fields legend {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0 0.35rem;
}
.image-import-grid {
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.image-import-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.image-import-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.image-import-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.25rem;
}
.image-import-actions .quota-form-status {
  flex: 1 1 180px;
  margin: 0;
}
.image-import-actions .btn { flex: 0 0 auto; }
.image-catalog-shell {
  border: 0;
  container: image-catalog / inline-size;
}
#workspace-image-table {
  border: 1px solid var(--border-color);
  min-width: 1080px;
  table-layout: fixed;
}
#workspace-image-table th:nth-child(1) { width: 18%; }
#workspace-image-table th:nth-child(2) { width: 14%; }
#workspace-image-table th:nth-child(3) { width: 16%; }
#workspace-image-table th:nth-child(4) { width: 7%; }
#workspace-image-table th:nth-child(5) { width: 23%; }
#workspace-image-table th:nth-child(6) { width: 9%; }
#workspace-image-table th:nth-child(7) { width: 13%; }
#workspace-image-table td { padding: 0.8rem 0.7rem; }
.image-cell-title,
.image-cell-source,
.image-cell-hash { min-width: 0; }
.image-cell-title > strong,
.image-cell-title > code,
.image-cell-title > small,
.image-cell-source > small {
  display: block;
  margin-top: 0.2rem;
}
.image-cell-title > strong { margin-top: 0; }
.image-cell-title > small,
.image-cell-source > small {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
.image-cell-size,
.admin-table-status { white-space: nowrap; }
.image-hash-value {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  margin-top: 0.3rem;
  min-width: 0;
}
.image-hash-value:first-child { margin-top: 0; }
.image-hash-value code {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-value-button {
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.copy-value-button:hover { color: var(--primary-hover); }
.copy-value-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.worker-sync-list { margin-top: 0.45rem; min-width: 0; }
.worker-sync-item { margin: 0.45rem 0; min-width: 0; }
.worker-sync-heading {
  align-items: flex-start;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  min-width: 0;
}
.worker-sync-heading small:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.worker-sync-heading small:last-child { flex: 0 0 auto; }
.worker-sync-track {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.worker-sync-fill {
  background: var(--primary);
  height: 100%;
  transition: width 0.3s;
}
.worker-sync-fill.is-failed { background: var(--danger); }
.worker-sync-size,
.worker-sync-error { display: block; overflow-wrap: anywhere; }
#admin-nodes-table {
  min-width: 0;
  table-layout: fixed;
}
#admin-nodes-table th:nth-child(1) { width: 18%; }
#admin-nodes-table th:nth-child(2) { width: 7%; }
#admin-nodes-table th:nth-child(3) { width: 7%; }
#admin-nodes-table th:nth-child(4) { width: 8%; }
#admin-nodes-table th:nth-child(5) { width: 14%; }
#admin-nodes-table th:nth-child(6) { width: 9%; }
#admin-nodes-table th:nth-child(7) { width: 14%; }
#admin-nodes-table th:nth-child(8) { width: 23%; }
#admin-nodes-table td {
  overflow-wrap: anywhere;
  padding: 0.7rem 0.5rem;
}
.node-name {
  color: var(--heading);
  font-size: 0.86rem;
  font-weight: 700;
}
.node-hostname-cell,
.node-last-seen-cell {
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.35;
  margin-top: 0.12rem;
}
.node-release-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
.node-release-line .badge {
  font-size: 0.58rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.15rem 0.32rem;
  text-transform: none;
}
.node-upgrade-detail {
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.35;
  margin-top: 0.3rem;
  max-height: 5.5rem;
  overflow: auto;
  white-space: pre-wrap;
}
.node-upgrade-detail.is-error { color: var(--danger); }
.node-upgrade-detail.is-hidden { display: none; }
.node-status-cell { text-align: center !important; }
.node-resource-cell {
  font-size: 0.73rem;
  font-weight: 700;
}
.node-resource-cell span {
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 500;
}
.node-resource-track {
  background: #e2e8f0;
  height: 4px;
  margin-top: 0.32rem;
  max-width: 70px;
  overflow: hidden;
  width: 100%;
}
.node-resource-fill {
  background: var(--secondary);
  height: 100%;
}
.node-resource-fill--memory { background: var(--success); }
.node-disk-cell {
  color: var(--heading);
  font-size: 0.73rem;
  font-weight: 700;
}
.node-container-summary { margin-top: 0.25rem; }
.node-container-count { padding: 0.15rem 0.35rem; }
.node-gpu-detail {
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.35;
  margin-top: 0.25rem;
  max-width: 190px;
  overflow-wrap: anywhere;
}
.node-gpu-slots-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.68rem;
  margin-top: 0.35rem;
}
.node-gpu-slots {
  font-size: 0.72rem;
  height: auto;
  margin-top: 0.2rem;
  max-width: 170px;
  padding: 0.2rem 0.3rem;
  width: 100%;
}
.node-labels-container {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}
.node-labels-container .badge {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-transform: none;
}
.node-labels-container .btn {
  min-height: 28px;
  padding: 0.2rem 0.45rem;
}
.no-labels {
  color: var(--text-muted);
  font-size: 0.7rem;
}
.node-actions {
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}
.node-actions .btn {
  min-height: 30px;
  padding: 0.28rem 0.42rem;
  width: 100%;
}
#admin-workspace-table { min-width: 940px; }

@container image-catalog (max-width: 1000px) {
  #workspace-image-table {
    border: 0;
    min-width: 0 !important;
    table-layout: auto;
  }
  #workspace-image-table thead {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  #workspace-image-table,
  #workspace-image-table tbody,
  #workspace-image-table tr,
  #workspace-image-table td { display: block; width: 100%; }
  #workspace-image-table tbody {
    display: grid;
    gap: 0.85rem;
  }
  #workspace-image-table tr {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(38, 50, 68, 0.06);
  }
  #workspace-image-table td {
    align-items: start;
    background: #fff !important;
    border-bottom: 1px solid #e7ecf2;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
    padding: 0.75rem !important;
    text-align: left !important;
  }
  #workspace-image-table td:last-child { border-bottom: 0; }
  #workspace-image-table td::before {
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }
  #workspace-image-table td.table-empty {
    display: block;
    text-align: center !important;
  }
  #workspace-image-table td.table-empty::before { content: none; }
  #workspace-image-table .admin-table-actions { justify-content: flex-start; }
  #workspace-image-table .image-hash-value { max-width: 34rem; }
}

@media (max-width: 1050px) {
  .responsive-form-grid--platform,
  .responsive-form-grid--download { grid-template-columns: minmax(0, 1fr); }
  .responsive-form-grid--platform .btn,
  .responsive-form-grid--download .btn { width: 100%; }
  .platform-update-options { grid-template-columns: minmax(0, 1fr); }
  .platform-git-fields { grid-template-columns: minmax(0, 1fr); }
  .platform-update-option > .btn { justify-self: stretch; width: 100%; }
}

@media (max-width: 1050px) {
  .responsive-card-table-shell {
    border: 0;
    overflow: visible;
  }
  .responsive-card-table {
    min-width: 0 !important;
  }
  .responsive-card-table thead {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  .responsive-card-table,
  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td { display: block; width: 100%; }
  .responsive-card-table tbody {
    display: grid;
    gap: 0.85rem;
  }
  .responsive-card-table tr {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(38, 50, 68, 0.06);
  }
  .responsive-card-table td {
    align-items: start;
    background: #fff !important;
    border-bottom: 1px solid #e7ecf2;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(90px, 0.36fr) minmax(0, 1fr);
    padding: 0.75rem !important;
    text-align: left !important;
  }
  .responsive-card-table td:last-child { border-bottom: 0; }
  .responsive-card-table td::before {
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }
  .responsive-card-table td.table-empty {
    display: block;
    text-align: center !important;
  }
  .responsive-card-table td.table-empty::before { content: none; }
  .responsive-card-table .table-actions { justify-content: flex-start; }
}

@media (max-width: 1180px) {
  .worker-table-shell {
    border: 0;
    overflow: visible;
  }
  #admin-nodes-table {
    min-width: 0 !important;
  }
  #admin-nodes-table thead { display: none; }
  #admin-nodes-table,
  #admin-nodes-table tbody,
  #admin-nodes-table tr,
  #admin-nodes-table td {
    display: block;
    width: 100%;
  }
  #admin-nodes-table tbody {
    display: grid;
    gap: 0.85rem;
  }
  #admin-nodes-table tr {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(38, 50, 68, 0.06);
  }
  #admin-nodes-table td {
    align-items: start;
    background: #fff !important;
    border-bottom: 1px solid #e7ecf2;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(110px, 0.3fr) minmax(0, 1fr);
    padding: 0.75rem !important;
    text-align: left !important;
  }
  #admin-nodes-table td:last-child { border-bottom: 0; }
  #admin-nodes-table td::before {
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }
  #admin-nodes-table td.table-empty {
    display: block;
    text-align: center !important;
  }
  #admin-nodes-table td.table-empty::before { content: none; }
  .node-status-cell { text-align: left !important; }
  .node-actions { justify-content: flex-start; }
  .node-actions .btn { flex: 0 1 auto; min-width: 74px; }
}

@media (max-width: 620px) {
  .platform-version-summary { grid-template-columns: minmax(0, 1fr); }
  .platform-version-arrow { display: none; }
  .platform-current-release {
    align-items: flex-start;
    flex-direction: column;
  }
  .platform-current-release p {
    max-width: none;
    text-align: left;
  }
  .platform-update-log-heading {
    align-items: flex-start;
  }
  #admin-nodes-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
  .node-actions .btn { flex: 1 1 110px; }
}

@media (max-width: 460px) {
  .responsive-card-table td { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .admin-section-jumps a { flex: 1 1 140px; text-align: center; }
  .badge,
  .admin-section-count { width: auto; }
  .table-actions .btn { flex: 1 1 120px; }
}

/* Keep image catalog cards compact when the admin content column narrows. */
@container image-catalog (max-width: 1000px) {
  #workspace-image-table tr {
    display: grid;
    grid-template-areas:
      "title title status"
      "source hash size"
      "worker worker actions";
    grid-template-columns: minmax(11rem, 0.8fr) minmax(14rem, 1.4fr) auto;
  }
  #workspace-image-table td {
    border-bottom: 0;
    display: block;
    min-width: 0;
    padding: 0.65rem 0.75rem !important;
    width: auto;
  }
  #workspace-image-table td::before {
    display: block;
    margin-bottom: 0.25rem;
  }
  #workspace-image-table .image-cell-title { grid-area: title; }
  #workspace-image-table .image-cell-source {
    border-top: 1px solid #e7ecf2;
    grid-area: source;
  }
  #workspace-image-table .image-cell-hash {
    border-left: 1px solid #e7ecf2;
    border-top: 1px solid #e7ecf2;
    grid-area: hash;
  }
  #workspace-image-table .image-cell-size {
    border-left: 1px solid #e7ecf2;
    border-top: 1px solid #e7ecf2;
    grid-area: size;
  }
  #workspace-image-table .image-cell-worker {
    border-top: 1px solid #e7ecf2;
    grid-area: worker;
  }
  #workspace-image-table .admin-table-status {
    align-self: center;
    grid-area: status;
    justify-self: end;
    text-align: right !important;
  }
  #workspace-image-table .image-cell-actions {
    align-self: stretch;
    border-left: 1px solid #e7ecf2;
    border-top: 1px solid #e7ecf2;
    grid-area: actions;
  }
  #workspace-image-table td.table-empty {
    grid-column: 1 / -1;
    width: auto;
  }
  #workspace-image-table .image-cell-title::before,
  #workspace-image-table .admin-table-status::before,
  #workspace-image-table .image-cell-actions::before { content: none; }
  #workspace-image-table .image-cell-title > small,
  #workspace-image-table .image-cell-source > small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #workspace-image-table .image-cell-actions .admin-table-actions {
    align-items: center;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: flex-end;
  }
  #workspace-image-table .image-cell-actions .btn {
    flex: 0 0 auto;
    min-height: 36px;
  }
}

@container image-catalog (max-width: 620px) {
  #workspace-image-table tr {
    grid-template-areas:
      "title status"
      "source size"
      "hash hash"
      "worker worker"
      "actions actions";
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #workspace-image-table .image-cell-hash,
  #workspace-image-table .image-cell-worker,
  #workspace-image-table .image-cell-actions { border-left: 0; }
}

@container image-catalog (max-width: 380px) {
  #workspace-image-table .image-cell-actions .admin-table-actions { flex-wrap: wrap; }
  #workspace-image-table .image-cell-actions .btn { flex: 1 1 120px; }
}

/* Result of the last toggle/delete, shown under that image's buttons. */
#workspace-image-table .image-action-status {
  display: block;
  margin-top: 0.5rem;
  max-width: 28rem;
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}
#workspace-image-table .image-cell-actions:has(.image-action-status) .admin-table-actions {
  height: auto;
}

.workspace-card > *,
.workspace-card [style*="display: flex"] > *,
.model-card > * { min-width: 0; }
.workspace-storage-path {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
.workspace-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}
.workspace-card-actions > .table-actions { min-width: 0; }
.file-manager-table { min-width: 640px; }

@media (max-width: 620px) {
  .workspace-card-actions { align-items: stretch; flex-direction: column; }
  .workspace-card-actions > .btn { width: 100%; }
  .workspace-card-actions .table-actions .btn { flex: 1 1 140px; }
}
/* Workspace detail metrics and tabs */
.workspace-metrics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}
.workspace-metrics-grid > .card { min-width: 0; }
.workspace-tabs-nav {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  white-space: nowrap;
}
.tab-btn:hover { background: #eef3f8; color: var(--heading); }
.tab-btn.active {
  background: #fff;
  border-bottom-color: var(--primary);
  color: var(--heading);
}

@media (max-width: 1100px) {
  .workspace-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace-metrics-grid { grid-template-columns: minmax(0, 1fr); }
  .tab-btn { padding-inline: 0.9rem; }
}

/* MLflow analytics */
.mlflow-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}
.mlflow-stat-card { display: grid; gap: 0.35rem; }
.mlflow-stat-card span { color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.mlflow-stat-card strong { color: var(--heading); font-size: clamp(1.45rem, 3vw, 2.25rem); }
.mlflow-lineage-card,
.mlflow-run-data-card { margin-bottom: 1rem; }
.mlflow-section-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.mlflow-section-heading .card-title { margin-bottom: 0.2rem; }
.mlflow-section-heading p { font-size: 0.82rem; margin: 0; }
.mlflow-section-heading > .badge { flex: 0 0 auto; white-space: nowrap; }
.mlflow-lineage-list { display: grid; gap: 0.65rem; }
.mlflow-lineage-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 0.9fr) auto;
  padding: 0.85rem;
}
.mlflow-lineage-node { min-width: 0; }
.mlflow-lineage-node > span {
  color: var(--text-muted);
  display: block;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}
.mlflow-lineage-node strong,
.mlflow-lineage-node code,
.mlflow-lineage-node .admin-user-name {
  display: block;
  overflow-wrap: anywhere;
}
.mlflow-lineage-node code { font-size: 0.68rem; margin-top: 0.15rem; }
.mlflow-lineage-node--model > div { align-items: center; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mlflow-lineage-arrow {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #efb2c0;
  border-radius: 50%;
  color: var(--primary);
  display: inline-flex;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}
.mlflow-lineage-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: flex-end; }
.mlflow-lineage-actions .btn { white-space: nowrap; }
.mlflow-lineage-empty {
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  padding: 1rem;
  text-align: center;
}
.mlflow-lineage-empty p { margin: 0.25rem 0 0; }
.mlflow-value-grid {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}
.mlflow-parameter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mlflow-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mlflow-value-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-top: 2px solid #adbed2;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.8rem;
}
.mlflow-value-item--metric { border-top-color: var(--primary); }
.mlflow-value-item dt {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}
.mlflow-value-item dd { margin: 0; min-width: 0; }
.mlflow-value-item dd code {
  color: var(--heading);
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}
.mlflow-value-item--metric dd code {
  color: #8d0022;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mlflow-value-item dd small {
  color: var(--text-muted);
  display: block;
  font-size: 0.65rem;
  margin-top: 0.25rem;
}
.mlflow-value-empty {
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
}
.mlflow-overview-grid { gap: 1rem; margin-bottom: 1rem; }
.mlflow-status-summary { display: grid; gap: 0.55rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mlflow-status-item { align-items: center; background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; display: flex; justify-content: space-between; padding: 0.7rem; }
.mlflow-compact-list { display: grid; gap: 0.65rem; }
.mlflow-compact-item { align-items: center; border-bottom: 1px solid #e7ecf2; display: flex; gap: 0.75rem; justify-content: space-between; padding-bottom: 0.65rem; }
.mlflow-compact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.mlflow-filter-builder { align-items: end; display: grid; gap: 0.65rem; grid-template-columns: 0.9fr 1.2fr 0.7fr 1.2fr auto; }
.mlflow-filter-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.75rem 0; min-height: 1.8rem; }
.mlflow-filter-chip { align-items: center; background: #f4f6f9; border: 1px solid var(--border-color); border-radius: 999px; display: inline-flex; gap: 0.4rem; padding: 0.35rem 0.6rem; }
.mlflow-filter-chip button { background: transparent; border: 0; color: var(--text-muted); cursor: pointer; font-weight: 800; padding: 0; }
.mlflow-saved-filter-row { align-items: end; display: grid; gap: 0.65rem; grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto auto; margin-top: 0.75rem; }
.mlflow-chart-shell { background: #fbfcfe; border: 1px solid var(--border-color); border-radius: 10px; min-height: 310px; overflow: hidden; padding: 0.75rem; }
.mlflow-chart-shell svg { display: block; height: auto; width: 100%; }
.mlflow-chart-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.mlflow-chart-legend span { align-items: center; display: inline-flex; font-size: 0.78rem; gap: 0.35rem; }
.mlflow-chart-swatch { border-radius: 50%; height: 9px; width: 9px; }
.mlflow-artifact-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: space-between; margin-bottom: 0.75rem; }
.mlflow-artifact-list { display: grid; gap: 0.5rem; }
.mlflow-artifact-item { align-items: center; background: #fff; border: 1px solid var(--border-color); border-radius: 8px; display: flex; gap: 0.75rem; justify-content: space-between; padding: 0.7rem; }
.mlflow-artifact-item code { overflow-wrap: anywhere; }
.mlflow-artifact-preview { background: #111827; border-radius: 10px; color: #e5e7eb; margin-top: 1rem; max-height: 520px; overflow: auto; padding: 1rem; }
.mlflow-artifact-preview pre { color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; margin: 0; white-space: pre-wrap; word-break: break-word; }
.mlflow-artifact-preview img { background: #fff; display: block; height: auto; margin: auto; max-width: 100%; }

@media (max-width: 1050px) {
  .mlflow-lineage-item { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .mlflow-lineage-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 900px) {
  .mlflow-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mlflow-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .mlflow-filter-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mlflow-filter-builder .btn { width: 100%; }
  .mlflow-saved-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mlflow-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .mlflow-parameter-grid { grid-template-columns: minmax(0, 1fr); }
  .mlflow-lineage-item { grid-template-columns: minmax(0, 1fr); }
  .mlflow-lineage-arrow { transform: rotate(90deg); }
  .mlflow-lineage-actions { grid-column: auto; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .mlflow-stat-grid,
  .mlflow-filter-builder,
  .mlflow-saved-filter-row,
  .mlflow-metric-grid { grid-template-columns: minmax(0, 1fr); }
  .mlflow-status-summary { grid-template-columns: minmax(0, 1fr); }
  .mlflow-section-heading { align-items: flex-start; flex-direction: column; gap: 0.55rem; }
  .mlflow-lineage-actions .btn { flex: 1 1 130px; }
}


/* Management workspace information hierarchy */
.admin-page-heading {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}
.admin-section-content > [id],
.admin-section-content section[id],
.admin-section-content form[id] {
  scroll-margin-top: 5rem;
}
.admin-section-jumps {
  box-shadow: 0 4px 14px rgba(38, 50, 68, 0.06);
  position: sticky;
  top: 1rem;
  z-index: 8;
}
.admin-section-jumps-label {
  color: var(--heading);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.55rem;
  text-transform: uppercase;
}
.admin-section-jumps a {
  border-radius: 2px;
  white-space: nowrap;
}
.admin-section-jumps a::before {
  color: #a6b1c0;
  content: "#";
  margin-right: 0.25rem;
}
.admin-section-jumps a:hover::before,
.admin-section-jumps a:focus-visible::before { color: var(--primary); }

.admin-stat-grid { margin: 0 0 1.25rem; }
.admin-stat-card {
  border-top: 3px solid var(--secondary);
  min-height: 112px;
  padding: 1rem 1.1rem;
  position: relative;
}
.admin-stat-card::after {
  background: currentColor;
  content: "";
  height: 28px;
  opacity: 0.08;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 28px;
}
.admin-stat-card dt {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.admin-stat-card dd {
  color: var(--heading);
  font-size: 1.8rem;
  font-weight: 750;
  line-height: 1;
  margin: 1rem 0 0;
}
.admin-stat-card--workspaces { border-top-color: var(--primary); color: var(--primary); }
.admin-stat-card--workspaces dd { color: var(--primary); }
.admin-stat-card--active { border-top-color: var(--gold); color: var(--gold); }
.admin-stat-card--active dd { color: var(--success); }
.admin-stat-card--workers { border-top-color: #7656b5; color: #7656b5; }
.admin-stat-card--workers dd { color: #7656b5; }
.admin-overview-card { min-height: 82px; padding: 0.85rem 1rem; }

.admin-settings-card,
.admin-management-card,
.admin-integration-card,
.admin-directory-card,
.admin-users-panel,
.worker-table-shell {
  scroll-margin-top: 5rem;
}
.admin-management-card,
.admin-settings-card,
.admin-integration-card,
.admin-directory-card {
  box-shadow: 0 5px 16px rgba(38, 50, 68, 0.06);
}
.admin-action-card--template { border-top: 3px solid #7656b5; }
.admin-action-card-button { justify-content: center; width: 100%; }
.admin-section-content details:not(.tree-row):not(.tree-editor) {
  background: #f8fafc;
  border: 1px solid var(--border-color) !important;
  border-radius: 2px !important;
  padding: 0.8rem 1rem !important;
}
.admin-section-content details:not(.tree-row):not(.tree-editor) > summary {
  color: var(--heading) !important;
  cursor: pointer;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  list-style-position: outside;
}
.admin-section-content details:not(.tree-row):not(.tree-editor)[open] > summary {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.8rem;
  padding-bottom: 0.7rem;
}

.admin-subsection {
  border-top: 1px solid var(--border-color);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}
.admin-subsection-heading { margin-bottom: 0.9rem; }
.admin-subsection-heading h3 {
  color: var(--heading);
  font-size: 1rem;
  margin: 0;
}
.admin-subsection-heading p {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin: 0.25rem 0 0;
}
.admin-package-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-package-grid > section {
  border: 1px solid var(--border-color) !important;
  border-top: 3px solid var(--secondary) !important;
  min-width: 0;
}
.admin-package-grid > section + section { border-top-color: var(--gold) !important; }

.admin-modal--wide { max-width: 680px; }
.admin-modal--compact { max-width: 480px; }
.admin-modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.admin-modal-close {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}
.admin-modal-close:hover { background: var(--primary-soft); color: var(--primary); }
.admin-modal-actions {
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
}
.admin-code-input { font-family: var(--font-mono); font-size: 0.85rem; }
.admin-modal .form-help {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.3rem;
}
.node-actions .btn-danger {
  border-top-color: #e1a5af;
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

@media (max-width: 1050px) {
  .admin-section-jumps {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .admin-package-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .admin-section-jumps { top: 0.5rem; }
}

@media (max-width: 620px) {
  .admin-section-jumps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
  .admin-section-jumps-label { grid-column: 1 / -1; }
  .admin-section-jumps a {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
  }
  .admin-stat-card { min-height: 92px; }
  .admin-stat-card dd { margin-top: 0.7rem; }
  .admin-modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .admin-modal-actions .btn { width: 100%; }
}

/* ---------- GenAI: sub navigation ---------- */
.genai-subnav { border-bottom: 1px solid var(--border-color); display: flex; gap: 0.25rem; margin: 0 0 1.25rem; }
.genai-subnav a {
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: -1px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
}
.genai-subnav a:hover { color: var(--heading); }
.genai-subnav a.active { border-bottom-color: var(--primary); color: var(--primary); }

/* ---------- GenAI: stats page ---------- */
.genai-stats-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.genai-segmented { background: #fff; border: 1px solid var(--border-color); border-radius: 6px; display: inline-flex; overflow: hidden; }
.genai-segmented button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
}
.genai-segmented button:last-of-type { border-right: 0; }
.genai-segmented button.active { background: var(--primary); color: #fff; }
.genai-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1rem; }
.genai-kpi {
  background: linear-gradient(135deg, #fff 0%, #fff 60%, var(--primary-soft) 100%);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.15rem;
}
.genai-kpi:nth-child(2) { border-left-color: #2563eb; }
.genai-kpi:nth-child(3) { border-left-color: #0f766e; }
.genai-kpi:nth-child(4) { border-left-color: #f59e0b; }
.genai-kpi span { color: var(--text-muted); font-size: 0.7rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.genai-kpi strong { color: var(--heading); font-size: 2rem; line-height: 1.2; margin: 0.25rem 0; }
.genai-kpi small { color: var(--text-muted); font-size: 0.74rem; }
.genai-chart-card { margin-bottom: 1rem; }
.genai-chart { min-height: 260px; width: 100%; }
.genai-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); margin-bottom: 1rem; }
.genai-grid > .card { margin: 0; }
.genai-svg { display: block; overflow: visible; }
.genai-grid-line { stroke: #e2e8f0; stroke-width: 1; }
.genai-axis { fill: #8592a5; font-size: 10.5px; }
.genai-bar { transition: opacity 0.15s ease; }
.genai-svg:hover .genai-bar { opacity: 0.85; }
.genai-arc { cursor: pointer; transition: stroke-width 0.15s ease; }
.genai-arc:hover { stroke-width: 30; }
.genai-donut-total { fill: var(--heading); font-size: 22px; font-weight: 750; }
.genai-donut-wrap { align-items: center; display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; padding: 0.5rem 0; }
.genai-legend { display: grid; flex: 1 1 180px; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.genai-legend li { align-items: center; display: grid; font-size: 0.78rem; gap: 0.5rem; grid-template-columns: 10px 1fr auto; }
.genai-legend i, .genai-legend-inline i { border-radius: 3px; display: inline-block; height: 10px; width: 10px; }
.genai-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genai-legend b { color: var(--heading); }
.genai-legend-inline { align-items: center; display: inline-flex; font-size: 0.74rem; gap: 0.3rem; margin-left: 0.8rem; }
.genai-tooltip {
  background: #263244;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 0.5rem 0.65rem;
  pointer-events: none;
  position: absolute;
  z-index: 1000;
}
.genai-board { display: grid; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.genai-board-row { align-items: center; border-radius: 6px; display: grid; gap: 0.75rem; grid-template-columns: 2rem 1fr; padding: 0.45rem 0.4rem; }
.genai-board-row:hover { background: #f7f9fc; }
.genai-board-row.is-podium { background: linear-gradient(90deg, var(--primary-soft), transparent 70%); }
.genai-board-rank { color: var(--text-muted); font-size: 1rem; font-weight: 750; text-align: center; }
.genai-board-row.is-podium .genai-board-rank { font-size: 1.35rem; }
.genai-board-body { min-width: 0; }
.genai-board-head { align-items: baseline; display: flex; gap: 0.5rem; justify-content: space-between; }
.genai-board-head strong { color: var(--heading); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genai-board-head span { color: var(--heading); font-size: 0.85rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.genai-board-track { background: #edf1f6; border-radius: 99px; height: 7px; margin: 0.3rem 0 0.2rem; overflow: hidden; }
.genai-board-track span { border-radius: 99px; display: block; height: 100%; transition: width 0.4s ease; }
.genai-board-body small { color: var(--text-muted); font-size: 0.7rem; }
/* The viewer's own row; pinned when it is outside the top of the board. */
.genai-board-row.is-self { background: #e9f1fb; box-shadow: inset 3px 0 0 #2563eb; }
.genai-board-row.is-self .genai-board-head strong::after { color: #2563eb; content: " (siz)"; font-weight: 700; }
.genai-board-row.is-pinned { border-top: 1px dashed #c9d4e3; margin-top: 0.3rem; }
.genai-board-row.is-idle { opacity: 0.6; }

/* Personal scopes on the stats page: "Müdürlüğüm" and "Takımım". */
.genai-scope {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem 0.25rem;
}
#scope-unit { border-top: 4px solid var(--primary); }
#scope-team { border-top: 4px solid #0f766e; }
.genai-scope-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; margin-bottom: 0.85rem; }
.genai-scope-head h2 { color: var(--heading); font-size: 1.25rem; margin: 0.15rem 0; }
.genai-scope-rank {
  background: var(--pale-blue);
  border-radius: 99px;
  color: var(--heading);
  font-size: 0.8rem;
  font-weight: 750;
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
}
.genai-kpis-compact .genai-kpi { box-shadow: none; padding: 0.7rem 0.9rem; }
.genai-kpis-compact .genai-kpi strong { font-size: 1.45rem; }
.genai-scope .card { box-shadow: none; }
.genai-section-title { color: var(--heading); font-size: 1.05rem; margin: 0.5rem 0 0.85rem; }

/* ---------- GenAI: admin user cards and groups ---------- */
.admin-user-llm {
  align-items: center;
  border-top: 1px dashed #d8e0eb;
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr auto;
  padding-top: 0.85rem;
}
.admin-user-llm h3 {
  color: #5d6a7d;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  margin: 0;
  text-transform: uppercase;
}
.admin-user-llm h3 small { color: #8592a5; font-size: 0.6rem; font-weight: 600; letter-spacing: 0; margin-left: 0.3rem; text-transform: none; }
.admin-llm-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.admin-llm-metrics div { display: flex; flex-direction: column; }
.admin-llm-metrics span { color: var(--text-muted); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.admin-llm-metrics strong { color: var(--heading); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.admin-user-llm.is-idle strong { color: #a0abbb; }
.admin-llm-spark { justify-self: end; }
.admin-team-llm {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.4rem;
  grid-column: 2 / -1;
}
.admin-team-llm[hidden] { display: none; }
@media (max-width: 900px) {
  .admin-user-llm { grid-template-columns: 1fr; }
  .admin-llm-spark { justify-self: start; }
}
.admin-user-llm[hidden],
.genai-kpi[hidden],
.admin-llm-metrics div[hidden],
.genai-segmented button[hidden] { display: none; }

/* ---------- Admin users: compact müdürlük -> team -> user tree ---------- */
.admin-users-head { align-items: flex-start; gap: 1rem; }
.admin-users-head .admin-section-description { font-size: 0.74rem; margin-top: 0.2rem; }
.tree-sync {
  border-top: 1px solid #e1e7ef;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 0.25rem 1rem;
  padding: 0.5rem 1.25rem;
}
.tree-sync:empty { display: none; }
.tree-sync.has-warning a { color: #9a5b00; font-weight: 700; }
.tree-sync.is-busy { color: var(--heading); }
.tree-sync.is-error { background: var(--danger-bg); color: var(--danger); }
.tree { border-top: 1px solid #e1e7ef; }
.tree-section[hidden], .tree-row[hidden] { display: none; }
.tree-section-label {
  background: #f4f6fa;
  border-top: 1px solid #e1e7ef;
  color: #5d6a7d;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0;
  padding: 0.4rem 1.25rem;
  text-transform: uppercase;
}
.tree-section-label span { color: var(--text-muted); font-weight: 600; letter-spacing: 0; margin-left: 0.5rem; text-transform: none; }
.tree-row { border-top: 1px solid #e8ecf2; }
.tree-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 0.25rem 0.9rem;
  grid-template-columns: 12px minmax(200px, 1fr) auto minmax(150px, 190px) minmax(150px, 190px);
  list-style: none;
  padding: 0.45rem 1.25rem;
}
.tree-summary::-webkit-details-marker { display: none; }
.tree-summary:hover { background: #f7f9fc; }
.tree-chevron {
  border-bottom: 2px solid #7a8698;
  border-right: 2px solid #7a8698;
  height: 6px;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  width: 6px;
}
.tree-row[open] > .tree-summary > .tree-chevron { transform: rotate(45deg); }
.tree-row[open] > .tree-summary { background: #f2f5fa; }
.tree-name { align-items: baseline; display: flex; flex-wrap: wrap; gap: 0.1rem 0.4rem; min-width: 0; }
.tree-name strong { color: var(--heading); font-size: 0.82rem; }
.tree-name small { color: var(--text-muted); flex-basis: 100%; font-size: 0.66rem; overflow-wrap: anywhere; }
.tree-row.is-unit > .tree-summary { border-left: 3px solid var(--primary); padding-left: calc(1.25rem - 3px); }
.tree-row.is-unit > .tree-summary .tree-name strong { font-size: 0.88rem; }
.tree-row.is-default > .tree-summary { border-left: 3px solid var(--secondary); padding-left: calc(1.25rem - 3px); }
.tree-row.is-nested > .tree-summary { padding-left: 2.4rem; }
.tree-quota { display: flex; flex-wrap: nowrap; gap: 0.25rem; justify-content: flex-end; }
.tree-quota-item {
  background: #fff;
  border: 1px solid #d4deeb;
  color: var(--heading);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  padding: 0.08rem 0.35rem;
  white-space: nowrap;
}
.tree-quota-item b { color: #7a8698; font-weight: 700; margin-right: 0.2rem; }
.tree-quota-item.is-inherited { border-style: dashed; color: #8592a5; }
.tree-llm { align-items: center; color: var(--primary); display: flex; font-size: 0.64rem; font-weight: 700; gap: 0.35rem; min-width: 0; white-space: nowrap; }
.tree-name .tag { align-self: center; }
.tree-llm:empty::before { color: #b5bfcc; content: "LLM —"; font-weight: 600; }
.tree-totals { color: var(--text-muted); font-size: 0.64rem; text-align: right; }
.tree-totals b { color: var(--success); }
.tree-body { background: #fbfcfe; border-top: 1px solid #e8ecf2; }
.tree-row.is-unit > .tree-body { border-left: 3px solid #f0c4cf; }
.tree-empty { color: var(--text-muted); font-size: 0.72rem; margin: 0; padding: 0.6rem 1.25rem 0.7rem 2.4rem; }

/* Folded quota editors. */
.tree-editor { border-bottom: 1px solid #e8ecf2; }
.tree-editor > summary {
  color: #1d4f91;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  list-style: none;
  padding: 0.4rem 1.25rem 0.4rem 2.4rem;
}
.tree-editor > summary::-webkit-details-marker { display: none; }
.tree-editor > summary::before { content: "+ "; }
.tree-editor[open] > summary::before { content: "− "; }
.tree-editor > summary small { color: var(--text-muted); font-weight: 500; margin-left: 0.35rem; }
.tree-editor[open] { background: #f3f6fa; }
.tree-form { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; padding: 0.15rem 1.25rem 0.65rem 2.4rem; }
.tree-field { display: flex; flex-direction: column; font-size: 0.64rem; gap: 0.15rem; width: 112px; }
.tree-field > span { color: #5d6a7d; font-weight: 700; }
.tree-field .form-input { font-size: 0.78rem; height: 30px; padding: 0.2rem 0.45rem; }
.tree-field .form-input.is-override { background: #fffaf0; border-color: #d39b2a; }
.tree-field .form-input::placeholder { color: #9aa6b6; }
.tree-form-actions { align-items: center; display: flex; gap: 0.4rem; }
.btn.btn-xs { font-size: 0.7rem; line-height: 1.2; padding: 0.3rem 0.65rem; }

/* Source of a quota value. */
.src { color: #8592a5; font-size: 0.58rem; font-weight: 650; letter-spacing: 0.02em; }
.src.is-user { color: #9a5b00; }
.src.is-group { color: #1d4f91; }
.src.is-unit { color: #a0002a; }

/* Small tags next to names. */
.tag {
  background: #f1f4f8;
  border: 1px solid #d9e0ea;
  border-radius: 3px;
  color: #5d6a7d;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0 0.3rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-admin { background: #263244; border-color: #263244; color: #fff; }
.tag-head { background: #e9f1fb; border-color: #bcd2ee; color: #1d4f91; }
.tag-override { background: #fff4dd; border-color: #f0d49b; color: #8a5600; }
.tag-inactive { background: var(--danger-bg); border-color: #f2c2c9; color: var(--danger); }
.tag-warn { background: #fff7e6; border-color: #f0d49b; color: #8a5600; text-transform: none; }

/* User table: one dense row per user. */
.user-table { --user-cols: minmax(220px, 1.7fr) repeat(4, minmax(84px, 1fr)) minmax(120px, 1.1fr) 52px; }
.user-table-head,
.user-table .user-row {
  align-items: center;
  column-gap: 0.75rem;
  display: grid;
  grid-template-columns: var(--user-cols);
  padding: 0.35rem 1.25rem 0.35rem 2.4rem;
}
.tree-row.is-nested .user-table-head,
.tree-row.is-nested .user-table .user-row { padding-left: 3.4rem; }
.user-table-head {
  color: #8592a5;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding-bottom: 0.2rem;
  padding-top: 0.45rem;
  text-transform: uppercase;
}
.user-table .user-row { border-top: 1px solid #edf0f5; }
.user-table .user-row:hover { background: #f7f9fc; }
.user-table .user-row[hidden] { display: none; }
.user-row.is-inactive { opacity: 0.6; }
.user-row-identity { align-items: center; display: flex; gap: 0.55rem; min-width: 0; }
.user-row-id { color: #9aa6b6; flex: 0 0 auto; font-size: 0.62rem; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 1.8rem; }
.user-row-copy { display: flex; flex-direction: column; min-width: 0; }
.user-row-line { align-items: center; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.user-row-line strong { color: var(--heading); font-size: 0.78rem; }
.user-row-copy small { color: var(--text-muted); font-size: 0.64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row-copy small a { color: inherit; }
.user-row-username { color: #4b5768; font-weight: 700; }
.user-metric, .user-llm { display: grid; font-size: 0.66rem; gap: 0.1rem; min-width: 0; }
.user-metric-label { display: none; }
.user-metric-value { color: var(--text-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-metric-value b { color: var(--heading); font-weight: 700; }
.user-metric-bar { background: #e5eaf1; height: 3px; overflow: hidden; }
.user-metric-bar i { background: #7d8ea6; display: block; height: 100%; }
.user-metric.is-full .user-metric-bar i { background: var(--primary); }
.user-llm .user-metric-value small { color: #8592a5; margin-left: 0.2rem; }
.user-llm.is-idle .user-metric-value { color: #b5bfcc; }
.user-llm-spark { height: 16px; overflow: hidden; }
.user-llm-spark svg { display: block; height: 16px; width: 100%; }
.user-row-actions { text-align: right; }
.user-row-form { border-top: 1px dashed #d8e0eb; grid-column: 1 / -1; margin-top: 0.35rem; padding: 0.45rem 0 0.15rem; }
.user-row-form[hidden] { display: none; }

@media (max-width: 1100px) {
  .tree-summary { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .tree-llm, .tree-totals { grid-column: 2 / -1; text-align: left; }
  .user-table { --user-cols: minmax(0, 1fr) repeat(2, minmax(80px, 0.6fr)) 52px; }
  .user-table-head { display: none; }
  .user-table .user-row { row-gap: 0.35rem; }
  .user-row-identity { grid-column: 1 / -2; }
  .user-row-actions { grid-column: -2; grid-row: 1; }
  .user-metric-label { color: #8592a5; display: block; font-size: 0.56rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
  .user-llm { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .tree-summary, .tree-row.is-nested > .tree-summary { padding-left: 0.9rem; }
  .user-table .user-row, .tree-row.is-nested .user-table .user-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0.9rem; padding-right: 0.9rem; }
  .user-row-identity { grid-column: 1 / -1; }
  .user-row-actions { grid-column: 1 / -1; grid-row: auto; text-align: left; }
  .tree-form, .tree-editor > summary { padding-left: 0.9rem; }
}

/* ---------- Live update progress (controller panel and worker rows) ---------- */
.platform-log-live[hidden] { display: none; }
.platform-log-live > span { animation: update-live-pulse 1.4s ease-in-out infinite; }
@keyframes update-live-pulse { 50% { opacity: 0.25; } }
.update-progress { margin: 0 0 0.75rem; }
.update-progress[hidden] { display: none; }
.update-progress-head { align-items: baseline; display: flex; gap: 0.75rem; justify-content: space-between; margin-bottom: 0.3rem; }
.update-progress-label { color: var(--heading); font-size: 0.8rem; }
.update-progress-percent { color: var(--heading); font-size: 0.8rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.update-progress-track { background: #e5eaf1; border-radius: 99px; height: 8px; overflow: hidden; position: relative; }
.update-progress-track > span {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 99px;
  display: block;
  height: 100%;
  transition: width 0.6s ease;
}
.update-progress-text { color: var(--text-muted); display: block; font-size: 0.7rem; margin-top: 0.3rem; min-height: 1em; }
.update-progress.is-indeterminate .update-progress-track > span {
  animation: update-progress-slide 1.6s linear infinite;
  background: linear-gradient(90deg, transparent, #3b82f6 40%, #3b82f6 60%, transparent);
  width: 40% !important;
}
@keyframes update-progress-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.update-progress.is-done .update-progress-track > span { background: var(--success); }
.update-progress.is-failed .update-progress-track > span { background: var(--danger); }
.update-progress.is-failed .update-progress-label { color: var(--danger); }
.update-progress.is-rollback .update-progress-track > span { background: #d39b2a; }
.update-progress.is-compact { margin: 0.35rem 0 0.15rem; max-width: 260px; }
.update-progress.is-compact .update-progress-track { height: 5px; }
.update-progress.is-compact .update-progress-text { font-size: 0.64rem; margin-top: 0.2rem; }
@media (prefers-reduced-motion: reduce) {
  .update-progress-track > span, .platform-log-live > span { animation: none !important; transition: none; }
}

.platform-update-status-message.is-warning { background: var(--warning-bg); border-left-color: #d39b2a; color: #7a5a00; }

/* ---------- MLflow: deployment target (AI Factory / Kubernetes) ---------- */
.deploy-targets { display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.deploy-target {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.deploy-target:hover { border-color: #9fb3cd; }
.deploy-target.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.deploy-target-head { align-items: center; display: flex; gap: 0.5rem; justify-content: space-between; }
.deploy-target-head strong { color: var(--heading); font-size: 0.88rem; }
.deploy-target small { color: var(--text-muted); font-size: 0.72rem; line-height: 1.35; }
.deploy-pipeline { counter-reset: deploy-step; display: grid; gap: 0.5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0.25rem 0 1rem; padding: 0; }
.deploy-pipeline li {
  background: #f6f8fb;
  border: 1px dashed #c9d4e3;
  border-radius: 6px;
  counter-increment: deploy-step;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
}
.deploy-pipeline li strong::before { color: var(--primary); content: counter(deploy-step) ". "; }
.deploy-pipeline li strong { color: var(--heading); font-size: 0.78rem; }
.deploy-pipeline li small { color: var(--text-muted); font-size: 0.66rem; line-height: 1.3; }
.deploy-target-note { background: var(--warning-bg); border-left: 3px solid #d39b2a; color: #6b5200; font-size: 0.74rem; margin: 0 0 0.75rem; padding: 0.55rem 0.7rem; }
.deploy-button-group { white-space: nowrap; }
.deploy-button-group .btn + .btn, .mlflow-lineage-actions .btn + .btn { margin-left: 0.35rem; }
@media (max-width: 620px) {
  .deploy-targets, .deploy-pipeline { grid-template-columns: minmax(0, 1fr); }
}
