/* ══════════════════════════════════════════
   RadiusOS Central Dashboard — Stylesheet
   ══════════════════════════════════════════ */

:root {
  --bg:          #0d1117;
  --bg2:         #161b22;
  --bg3:         #21262d;
  --bg4:         #2d333b;
  --border:      #30363d;
  --border2:     #444c56;
  --accent:      #58a6ff;
  --accent-dim:  #1f4a7d;
  --success:     #3fb950;
  --danger:      #f85149;
  --warning:     #d29922;
  --info:        #58a6ff;
  --purple:      #bc8cff;
  --orange:      #e3b341;
  --text:        #e6edf3;
  --text2:       #8b949e;
  --text3:       #6e7681;
  --sidebar-w:   240px;
  --radius:      8px;
  --radius-sm:   5px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:        'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { font-size: 14px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .85em; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ══════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════ */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a2744 0%, var(--bg) 60%);
}

.login-container { width: 100%; max-width: 380px; padding: 24px; }

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
}

.login-logo { text-align: center; margin-bottom: 32px; }

.login-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border-radius: 14px;
  margin-bottom: 12px;
}

.login-title { font-size: 22px; font-weight: 700; color: var(--text); }
.login-sub   { font-size: 12px; color: var(--text2); margin-top: 4px; }

.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-hint { text-align: center; color: var(--text3); font-size: 11px; margin-top: 20px; }

/* ══════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-name { font-weight: 700; font-size: 15px; display: block; }
.brand-sub  { font-size: 10px; color: var(--text2); display: block; }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-link:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-dim); color: var(--accent); }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info { display: flex; align-items: center; gap: 8px; }

.user-avatar {
  width: 28px; height: 28px;
  background: var(--bg4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border2);
}

.user-name { font-size: 13px; font-weight: 500; }

.logout-btn {
  color: var(--text2);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover { background: var(--bg3); color: var(--danger); text-decoration: none; }

/* ── Main area ── */
.main {
  flex: 1;
  margin-right: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.menu-toggle svg { width: 20px; height: 20px; }

.page-title { font-size: 16px; font-weight: 600; flex: 1; }

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

.server-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text2);
}

.page-body { padding: 24px; flex: 1; }

/* ══════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════ */

/* ── Cards ── */
.section-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title { font-size: 14px; font-weight: 600; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--border2); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.icon-blue   { background: rgba(88,166,255,.15); color: var(--accent); }
.icon-green  { background: rgba(63,185,80,.15);  color: var(--success); }
.icon-purple { background: rgba(188,140,255,.15); color: var(--purple); }
.icon-orange { background: rgba(227,179,65,.15);  color: var(--orange); }

.stat-label { font-size: 12px; color: var(--text2); display: block; }
.stat-value { font-size: 26px; font-weight: 700; display: block; line-height: 1.2; margin-top: 2px; }
.stat-sm    { font-size: 18px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, opacity .15s, border-color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #0d1117; border-color: var(--accent); }
.btn-primary:hover { background: #79b8ff; border-color: #79b8ff; }

.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #ff6b6b; border-color: #ff6b6b; }

.btn-blue    { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-dim); }
.btn-blue:hover { background: #1f5490; }

.btn-success { background: rgba(63,185,80,.15); color: var(--success); border-color: rgba(63,185,80,.3); }
.btn-success:hover { background: rgba(63,185,80,.25); }

.btn-ghost   { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

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

.btn-full  { width: 100%; justify-content: center; padding: 10px 14px; }
.btn-sm    { padding: 5px 10px; font-size: 12px; }
.btn-xs    { padding: 3px 7px; font-size: 11px; }

.btn-group { display: flex; gap: 8px; align-items: center; }
.btn-group-full { display: flex; flex-direction: column; gap: 8px; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: var(--font);
  width: 100%;
  transition: border-color .15s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }

select.form-input { cursor: pointer; }

.form-hint { font-size: 11px; color: var(--text3); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  background: var(--bg3);
  color: var(--text2);
  font-weight: 600;
  padding: 10px 16px;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg3); }

.empty-row {
  text-align: center;
  color: var(--text3);
  padding: 40px !important;
  font-size: 13px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
}
.badge-success { background: rgba(63,185,80,.15);  color: var(--success); }
.badge-danger  { background: rgba(248,81,73,.15);  color: var(--danger); }
.badge-warning { background: rgba(210,153,34,.15); color: var(--warning); }
.badge-neutral { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.badge-info    { background: rgba(88,166,255,.15); color: var(--accent); }

/* ── Status dots ── */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.online  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot.offline { background: var(--text3); }
.online-sm  { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.offline-sm { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }

/* ── Version chip ── */
.version-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--text2);
}
.version-chip-sm {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
}

/* ── Op type chip ── */
.op-type {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}
.op-type-update { color: var(--accent); border-color: var(--accent-dim); background: rgba(88,166,255,.07); }
.op-type-add    { color: var(--success); border-color: rgba(63,185,80,.3); background: rgba(63,185,80,.07); }
.op-type-build  { color: var(--purple); border-color: rgba(188,140,255,.3); background: rgba(188,140,255,.07); }
.op-type-delete { color: var(--danger); border-color: rgba(248,81,73,.3); background: rgba(248,81,73,.07); }

/* ── Action buttons cell ── */
.action-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Alerts ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-danger  { background: rgba(248,81,73,.1);  border-color: rgba(248,81,73,.3);  color: #ff8484; }
.alert-info    { background: rgba(88,166,255,.1); border-color: rgba(88,166,255,.3); color: #8bcbff; }
.alert-success { background: rgba(63,185,80,.1);  border-color: rgba(63,185,80,.3);  color: #6de680; }

/* ── Text utils ── */
.text-muted  { color: var(--text2); }
.text-sm     { font-size: 12px; }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }

/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  width: 100%;
  animation: modalIn .18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal-sm { max-width: 400px; }
.modal-md { max-width: 540px; }
.modal-lg { max-width: 760px; }

.modal-form {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.enrollment-confirmation-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 15px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { background: var(--bg3); color: var(--text); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.confirm-msg {
  padding: 16px 20px 0;
  color: var(--text2);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-line;
}

/* Generic modal (dynamically populated) */
#genericModal .modal-box { max-width: 460px; }

/* ══════════════════════════════════════════
   TERMINAL / LOG VIEWER
   ══════════════════════════════════════════ */

.terminal {
  background: #0d1117;
  color: #c9d1d9;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 16px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  flex: 1;
  min-height: 200px;
  max-height: 500px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════ */

#toastContainer {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  border: 1px solid transparent;
  animation: toastIn .2s ease;
  max-width: 340px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: none; }
}

.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-20px); }
}

.toast-success { background: #162521; border-color: rgba(63,185,80,.4);  color: #6de680; }
.toast-danger  { background: #200f0e; border-color: rgba(248,81,73,.4);  color: #ff8484; }
.toast-warning { background: #1e1a0e; border-color: rgba(210,153,34,.4); color: #e3c85a; }
.toast-info    { background: #0e1b2e; border-color: rgba(88,166,255,.4); color: #8bcbff; }

/* ══════════════════════════════════════════
   VERSIONS PAGE
   ══════════════════════════════════════════ */

.versions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 20px;
}

.version-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, transform .15s;
}
.version-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.version-latest { border-color: var(--accent); background: rgba(88,166,255,.05); }

.version-number {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}

.version-meta { font-size: 11px; }
.version-tag  { min-height: 22px; }
.version-actions { margin-top: auto; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 4px 0;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.info-item:nth-child(odd) { border-left: none; }
.info-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; }
.info-value { font-size: 13px; color: var(--text); }

/* ══════════════════════════════════════════
   UPDATES PAGE
   ══════════════════════════════════════════ */

.two-col-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.update-form { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

.clients-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .1s;
}
.check-item:hover { background: var(--bg4); }

.check-item input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.check-label { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.check-label strong { font-size: 13px; }

.update-summary {
  background: var(--bg3);
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.ops-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 500px;
  overflow-y: auto;
}

.op-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: background .1s, border-color .1s;
}
.op-item:hover { background: var(--bg4); border-color: var(--border2); }

.op-item-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-target { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
.op-version { font-family: var(--mono); font-size: 12px; color: var(--text2); }
.op-time { margin-top: 4px; }

/* ══════════════════════════════════════════
   DASHBOARD — WG STATUS
   ══════════════════════════════════════════ */

.wg-status-box {
  padding: 16px 20px;
  min-height: 60px;
}

.wg-peers { display: flex; flex-direction: column; gap: 10px; }

.wg-peer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  gap: 8px;
}
.wg-peer-status { display: flex; align-items: center; gap: 8px; }
.wg-peer-ip { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.wg-peer-detail { display: flex; gap: 4px; }

/* ══════════════════════════════════════════
   SPINNER
   ══════════════════════════════════════════ */

.spinner-sm {
  display: inline-block;
  width: 8px; height: 8px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

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

/* ══════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  grid-column: 1/-1;
  text-align: center;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-layout { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-item { border-left: none !important; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(100%);
    width: 220px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: -4px 0 20px rgba(0,0,0,.5);
  }

  .main { margin-right: 0; }
  .menu-toggle { display: flex; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-body { padding: 16px; }
  .topbar { padding: 0 16px; }

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

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .versions-grid { grid-template-columns: 1fr; }
  .action-btns { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════
   RADTEST PAGE
   ══════════════════════════════════════════ */

.rt-wrapper { display: flex; flex-direction: column; gap: 20px; max-width: 1100px; }

/* Form card */
.rt-form-card .card-header { border-bottom: 1px solid var(--border); padding: 20px 24px 16px; }
.card-title-row { display: flex; align-items: center; gap: 8px; }
.card-title-row h2, .card-title-row h3 { margin: 0; }
.card-title-icon { color: var(--accent); flex-shrink: 0; width: 20px; height: 20px; }
.card-subtitle { color: var(--text2); font-size: 12px; margin-top: 4px; }

.rt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.rt-span2 { grid-column: span 2; }

.rt-select { background: var(--bg3); }

.input-with-btn {
  display: flex;
  gap: 6px;
}
.input-with-btn .form-control { flex: 1; min-width: 0; }

.form-hint { font-size: 11px; color: var(--text2); margin-top: 4px; min-height: 16px; }
.form-hint-inline { font-size: 11px; color: var(--text3); font-weight: 400; }

.rt-advanced-toggle {
  color: var(--text2);
  font-size: 12px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rt-advanced-toggle svg { transition: transform .2s; }
.rt-advanced-panel { margin-top: 12px; padding: 16px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }
.rt-adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.rt-run-row { display: flex; align-items: center; gap: 16px; }
.rt-run-btn { min-width: 180px; display: flex; align-items: center; gap: 8px; justify-content: center; }

/* Loading */
.rt-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
}
.rt-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* Status Banner */
.rt-status-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.rt-status-banner.rt-accept  { background: rgba(63,185,80,.1);  border-color: var(--success); }
.rt-status-banner.rt-reject  { background: rgba(248,81,73,.1);  border-color: var(--danger);  }
.rt-status-banner.rt-error   { background: rgba(210,153,34,.1); border-color: var(--warning); }

.rt-status-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  flex-shrink: 0;
}
.rt-accept .rt-status-icon  { background: rgba(63,185,80,.15);  color: var(--success); }
.rt-reject .rt-status-icon  { background: rgba(248,81,73,.15);  color: var(--danger);  }
.rt-error  .rt-status-icon  { background: rgba(210,153,34,.15); color: var(--warning); }

.rt-status-body { flex: 1; }
.rt-status-body h2 { font-size: 20px; margin: 0 0 4px; font-family: var(--mono); }
.rt-status-body p  { margin: 0; color: var(--text2); font-size: 13px; }

.rt-reply-msg-badge { font-size: 13px; padding: 6px 14px; border-radius: 20px; font-family: var(--mono); }

/* Result grid */
.rt-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Attributes table */
.rt-attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rt-attr-table th {
  text-align: right;
  padding: 8px 10px;
  background: var(--bg3);
  color: var(--text2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.rt-attr-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.rt-attr-table tr:last-child td { border-bottom: none; }
.rt-attr-table tr:hover td { background: var(--bg3); }
.rt-attr-important td { background: rgba(88,166,255,.05); }
.rt-attr-important:hover td { background: rgba(88,166,255,.09) !important; }

.rt-attr-name { font-size: 12px; color: var(--accent); }
.rt-attr-val  { font-family: var(--mono); font-size: 12px; color: var(--text); }
.rt-attr-hint { font-size: 11px; }

.rt-hint-chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg4);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text2);
  font-family: var(--mono);
}
.rt-hint-warn { background: rgba(210,153,34,.15); color: var(--warning); }
.rt-hint-msg  { background: rgba(88,166,255,.1);  color: var(--accent); }

/* Card DB info */
.rt-info-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.rt-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.rt-info-row:last-child { border-bottom: none; }
.rt-info-label { font-size: 12px; color: var(--text2); flex-shrink: 0; }
.rt-info-value { font-size: 13px; text-align: left; }

.rt-usage-block { margin-top: 12px; }
.rt-usage-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}
.rt-usage-header strong { color: var(--text); }
.rt-usage-bar {
  height: 8px;
  background: var(--bg4);
  border-radius: 4px;
  overflow: hidden;
}
.rt-usage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
  min-width: 2px;
}

/* Collapsible cards */
.rt-collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rt-collapsible-header:hover { background: var(--bg3); border-radius: var(--radius) var(--radius) 0 0; }
.rt-chevron { transition: transform .2s; color: var(--text2); }

/* Terminal / Raw output */
.rt-terminal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  direction: ltr;
  text-align: left;
  max-height: 340px;
  overflow-y: auto;
}

.rt-raw-accept { color: var(--success); font-weight: 600; display: block; }
.rt-raw-reject { color: var(--danger);  font-weight: 600; display: block; }
.rt-raw-send   { color: var(--accent);  display: block; }
.rt-raw-recv   { color: var(--purple);  display: block; }
.rt-raw-attr   { color: var(--text2);   display: block; }

.rt-meta-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rt-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--mono);
}

/* Responsive */
@media (max-width: 900px) {
  .rt-result-grid { grid-template-columns: 1fr; }
  .rt-form-grid   { grid-template-columns: 1fr; }
  .rt-span2       { grid-column: span 1; }
  .rt-adv-grid    { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   POLISHED DASHBOARD OVERRIDES
   ══════════════════════════════════════════ */

:root {
  --bg: #0f141b;
  --bg2: #171d25;
  --bg3: #202832;
  --bg4: #2a3440;
  --bg-hover: #26313d;
  --card-bg: var(--bg2);
  --input-bg: #111720;
  --border: #2e3947;
  --border2: #465467;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, .16);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --purple: #a78bfa;
  --orange: #f97316;
  --text: #eef4fb;
  --text2: #a7b4c4;
  --text3: #758499;
  --text-muted: var(--text2);
  --text-dim: var(--text3);
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 18px 50px rgba(2, 6, 23, .38);
}

body {
  background:
    linear-gradient(180deg, rgba(20, 31, 42, .86) 0%, rgba(15, 20, 27, 1) 42%),
    var(--bg);
  color: var(--text);
}

a:hover { color: #7dd3fc; }

.layout::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

.sidebar {
  background: rgba(18, 24, 32, .96);
  border-left: 1px solid rgba(148, 163, 184, .18);
  box-shadow: -12px 0 36px rgba(2, 6, 23, .24);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  min-height: 76px;
  padding: 18px 16px;
}

.brand-icon,
.login-logo-icon {
  background: linear-gradient(135deg, #14b8a6, #38bdf8);
  box-shadow: 0 12px 28px rgba(20, 184, 166, .22);
}

.brand-name { letter-spacing: 0; }
.brand-sub { color: var(--text3); }

.nav-link {
  min-height: 40px;
  border: 1px solid transparent;
  color: #b6c2d1;
}

.nav-link:hover {
  background: rgba(148, 163, 184, .10);
  border-color: rgba(148, 163, 184, .12);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, .18), rgba(20, 184, 166, .10));
  border-color: rgba(56, 189, 248, .28);
  color: #e0f7ff;
  box-shadow: inset -3px 0 0 var(--accent);
}

.sidebar-footer {
  background: rgba(15, 20, 27, .48);
}

.main {
  position: relative;
  z-index: 1;
}

.topbar {
  height: 64px;
  background: rgba(15, 20, 27, .78);
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  backdrop-filter: blur(16px);
}

.page-title {
  font-size: 18px;
  font-weight: 700;
}

.server-chip {
  border-radius: 999px;
  background: rgba(34, 197, 94, .08);
  border-color: rgba(34, 197, 94, .22);
  color: #bbf7d0;
}

.page-body {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.login-body {
  background:
    linear-gradient(145deg, rgba(20, 184, 166, .16), transparent 34%),
    linear-gradient(315deg, rgba(245, 158, 11, .10), transparent 38%),
    var(--bg);
}

.login-card,
.section-card,
.modal-box,
.global-settings,
.backup-card,
.version-card {
  background: rgba(23, 29, 37, .94) !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 14px 38px rgba(2, 6, 23, .25);
}

.section-card {
  overflow: hidden;
}

.card-header,
.modal-header,
.backup-card-header {
  background: rgba(32, 40, 50, .54);
  border-bottom-color: rgba(148, 163, 184, .14);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.card-body {
  padding: 20px 24px 24px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.stat-card {
  align-items: flex-start;
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    rgba(23, 29, 37, .96);
  border-color: rgba(148, 163, 184, .16);
  box-shadow: 0 14px 34px rgba(2, 6, 23, .22);
}

.stat-card:hover {
  border-color: rgba(56, 189, 248, .34);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.stat-label {
  color: var(--text2);
  font-weight: 600;
}

.stat-value {
  margin-top: 8px;
  color: #fff;
}

.icon-blue { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
.icon-green { background: rgba(34, 197, 94, .13); color: #86efac; }
.icon-purple { background: rgba(167, 139, 250, .14); color: #c4b5fd; }
.icon-orange { background: rgba(249, 115, 22, .14); color: #fdba74; }

.btn {
  min-height: 34px;
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #06111a;
}

.btn-primary:hover {
  background: #7dd3fc;
  border-color: #7dd3fc;
}

.btn-danger {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .35);
  color: #fecaca;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, .24);
  border-color: rgba(239, 68, 68, .52);
}

.btn-success,
.btn-backup-now {
  background: rgba(34, 197, 94, .15) !important;
  border-color: rgba(34, 197, 94, .34) !important;
  color: #bbf7d0 !important;
}

.btn-success:hover,
.btn-backup-now:hover {
  background: rgba(34, 197, 94, .24) !important;
}

.btn-blue,
.btn-save {
  background: rgba(56, 189, 248, .14) !important;
  border-color: rgba(56, 189, 248, .32) !important;
  color: #bae6fd !important;
}

.btn-blue:hover,
.btn-save:hover {
  background: rgba(56, 189, 248, .23) !important;
}

.btn-ghost,
.btn-history {
  background: rgba(148, 163, 184, .06) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  color: var(--text2) !important;
}

.btn-ghost:hover,
.btn-history:hover {
  background: rgba(148, 163, 184, .12) !important;
  color: var(--text) !important;
}

.btn-sm-dl,
.btn-sm-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-decoration: none;
}

.btn-sm-dl {
  background: rgba(56, 189, 248, .14) !important;
  color: #bae6fd !important;
  border: 1px solid rgba(56, 189, 248, .26) !important;
}

.btn-sm-danger {
  background: rgba(239, 68, 68, .15) !important;
  color: #fecaca !important;
  border: 1px solid rgba(239, 68, 68, .30) !important;
}

.form-input,
.form-control,
select.form-input,
textarea.form-input {
  background: rgba(17, 23, 32, .96);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 7px;
  color: var(--text);
  min-height: 38px;
}

.form-control {
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: var(--font);
  width: 100%;
  outline: none;
}

.form-input:focus,
.form-control:focus {
  border-color: rgba(56, 189, 248, .72);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}

.table,
.data-table,
.history-table,
.rt-attr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.table th,
.data-table th,
.history-table th,
.rt-attr-table th {
  background: rgba(32, 40, 50, .76);
  color: var(--text2);
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  padding: 11px 16px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.table td,
.data-table td,
.history-table td,
.rt-attr-table td {
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  padding: 12px 16px;
  vertical-align: middle;
}

.table tbody tr:hover,
.data-table tbody tr:hover,
.history-table tbody tr:hover {
  background: rgba(56, 189, 248, .045);
}

.table-wrap {
  border-radius: 0 0 var(--radius) var(--radius);
}

.badge,
.version-chip,
.version-chip-sm,
.op-type,
.rt-meta-chip {
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge-success { background: rgba(34, 197, 94, .13); border-color: rgba(34, 197, 94, .26); color: #86efac; }
.badge-danger,
.badge-failed { background: rgba(239, 68, 68, .13); border-color: rgba(239, 68, 68, .26); color: #fca5a5; }
.badge-warning,
.badge-running { background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .28); color: #fcd34d; }
.badge-neutral,
.badge-ghost { background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .18); color: var(--text2); }
.badge-info { background: rgba(56, 189, 248, .13); border-color: rgba(56, 189, 248, .28); color: #7dd3fc; }

.dot.online,
.online-sm {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.version-chip,
.version-chip-sm,
.op-type {
  background: rgba(148, 163, 184, .07);
  border-color: rgba(148, 163, 184, .16);
  color: #cbd5e1;
}

.info-grid {
  border-top: 1px solid rgba(148, 163, 184, .10);
}

.info-item {
  border-color: rgba(148, 163, 184, .10);
}

.info-label {
  letter-spacing: 0;
  text-transform: none;
}

.two-col-layout {
  grid-template-columns: minmax(330px, 420px) 1fr;
}

.clients-checklist,
.update-summary,
.op-item,
.wg-peer,
.rt-advanced-panel,
.rt-loading,
.rt-terminal,
.terminal {
  background: rgba(17, 23, 32, .86);
  border: 1px solid rgba(148, 163, 184, .15);
}

.terminal,
.rt-terminal {
  color: #dbeafe;
}

.backup-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
}

.backup-card-body .setting-row input,
.backup-card-body .setting-row select,
.global-settings .gs-row input,
.global-settings .gs-row select {
  background: rgba(17, 23, 32, .96) !important;
  border-color: rgba(148, 163, 184, .18) !important;
}

.modal-overlay {
  background: rgba(2, 6, 23, .70);
  backdrop-filter: blur(8px);
}

.modal-close,
.menu-toggle,
.logout-btn {
  border: 1px solid transparent;
}

.modal-close:hover,
.menu-toggle:hover,
.logout-btn:hover {
  border-color: rgba(148, 163, 184, .18);
}

#genericModal .modal-box {
  max-width: min(720px, calc(100vw - 32px));
}

#toastContainer {
  gap: 10px;
}

.toast {
  background: rgba(17, 23, 32, .96);
  border-color: rgba(148, 163, 184, .18);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.toast-success { background: rgba(8, 47, 31, .96); border-color: rgba(34, 197, 94, .38); color: #bbf7d0; }
.toast-danger,
.toast-error { background: rgba(69, 10, 10, .96); border-color: rgba(239, 68, 68, .38); color: #fecaca; }
.toast-warning { background: rgba(69, 39, 4, .96); border-color: rgba(245, 158, 11, .38); color: #fde68a; }
.toast-info { background: rgba(8, 47, 73, .96); border-color: rgba(56, 189, 248, .38); color: #bae6fd; }

.empty-state,
.empty-row {
  color: var(--text3);
}

.text-center { text-align: center; }

@media (max-width: 1100px) {
  .two-col-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar { height: 58px; }
  .page-title { font-size: 16px; }
  .server-chip { display: none; }
  .sidebar { width: 260px; }
  .stats-grid { grid-template-columns: 1fr; }
  .backup-grid { grid-template-columns: 1fr !important; }
  .card-header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .btn-group { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .page-body { padding: 12px; }
  .login-container { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .modal-overlay { padding: 12px; }
  .action-btns { align-items: stretch; width: 100%; }
  .action-btns .btn { justify-content: center; }
  .backup-card-body .setting-row,
  .global-settings .gs-row {
    align-items: stretch;
  }
}

/* ══════════════════════════════════════════
   Operations workspace refresh
   ══════════════════════════════════════════ */

:root {
  --bg: #08111c;
  --bg2: #0d1723;
  --bg3: #13202e;
  --bg4: #1a2a39;
  --border: #203141;
  --border2: #2d4354;
  --accent: #39c2dc;
  --accent-dim: #123747;
  --success: #35c987;
  --danger: #ef6b70;
  --warning: #e6ad56;
  --text: #edf4f8;
  --text2: #9babb9;
  --text3: #718292;
  --sidebar-w: 268px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 18px 44px rgba(2, 8, 15, .24);
}

body {
  background: var(--bg);
}

.sidebar {
  background: #0b1520;
  border-left-color: rgba(126, 151, 171, .16);
}

.sidebar-brand {
  min-height: 82px;
  padding: 19px 20px;
  border-bottom-color: rgba(126, 151, 171, .14);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #06131a;
  border-radius: 10px;
  box-shadow: none;
}

.brand-name {
  font-size: 16px;
  letter-spacing: -.01em;
}

.brand-sub {
  margin-top: 2px;
  color: #6f8596;
  font-size: 11px;
}

.sidebar-state {
  margin: 14px 12px 4px;
  padding: 12px;
  background: #0f1d29;
  border: 1px solid rgba(126, 151, 171, .14);
  border-radius: 10px;
}

.sidebar-state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.state-label {
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-state p {
  margin-top: 8px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.6;
}

.sidebar-nav {
  padding: 12px;
  gap: 3px;
}

.nav-section-label {
  margin: 14px 11px 6px;
  color: #5f7486;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}

.nav-section-label:first-child {
  margin-top: 2px;
}

.nav-link {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #94a6b6;
}

.nav-link:hover {
  background: #111f2c;
  color: var(--text);
}

.nav-link.active {
  background: #123342;
  border-color: rgba(57, 194, 220, .27);
  color: #8ce5f4;
  box-shadow: inset -3px 0 0 var(--accent);
}

.sidebar-footer {
  min-height: 70px;
  padding: 13px 16px;
  border-top-color: rgba(126, 151, 171, .15);
}

.user-info {
  align-items: center;
}

.user-avatar,
.client-avatar {
  background: #1b2d3d;
  border: 1px solid #2a4355;
  color: #cce9f0;
}

.user-role {
  display: block;
  margin-top: 1px;
  color: var(--text3);
  font-size: 10px;
}

.topbar {
  min-height: 82px;
  height: auto;
  padding: 13px 28px;
  background: rgba(9, 18, 28, .96);
  border-bottom-color: rgba(126, 151, 171, .15);
  backdrop-filter: blur(14px);
}

.page-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-eyebrow,
.section-kicker {
  color: #55c9df;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
}

.page-title {
  color: #f4f8fb;
  font-size: 20px;
  line-height: 1.25;
}

.page-description {
  color: var(--text3);
  font-size: 11.5px;
}

.topbar-end {
  margin-right: auto;
}

.server-chip {
  min-height: 30px;
  padding: 6px 10px;
  background: #0e221f;
  border-color: rgba(53, 201, 135, .24);
  color: #a5eccb;
}

.server-chip.safe {
  background: #10241f;
}

.server-chip.warning {
  background: #292315;
  border-color: rgba(230, 173, 86, .28);
  color: #f1ce93;
}

.warning-dot {
  background: var(--warning);
}

.page-body {
  max-width: 1580px;
  padding: 28px;
}

.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 22px 24px;
  background: #0d1925;
  border: 1px solid rgba(126, 151, 171, .16);
  border-radius: var(--radius);
}

.page-intro h2 {
  margin-top: 5px;
  color: #f5f8fa;
  font-size: clamp(18px, 1.7vw, 25px);
  letter-spacing: -.02em;
}

.page-intro p {
  max-width: 780px;
  margin-top: 7px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.75;
}

.compact-intro {
  min-height: 112px;
}

.page-intro-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.section-card,
.stat-card,
.mini-stat {
  background: #0e1925 !important;
  border-color: rgba(126, 151, 171, .16) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow);
}

.section-card {
  overflow: visible;
}

.card-header {
  min-height: 66px;
  padding: 17px 20px;
  background: #101d29;
  border-bottom-color: rgba(126, 151, 171, .14);
}

.card-title {
  margin-top: 3px;
  color: #eef5f8;
  font-size: 15px;
}

.stats-grid {
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 132px;
  padding: 20px;
  align-items: flex-start;
  transition: border-color .16s ease, transform .16s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 194, 220, .28) !important;
}

.stat-card-warning {
  border-color: rgba(230, 173, 86, .25) !important;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.stat-value {
  margin-top: 6px;
  font-size: 26px;
}

.stat-status {
  font-size: 20px;
}

.stat-note {
  display: block;
  margin-top: 6px;
  color: var(--text3);
  font-size: 11px;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  margin-bottom: 16px;
}

.operations-card,
.command-card {
  min-width: 0;
}

.operations-table .operation-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operation-index {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
}

.readiness-list {
  padding: 8px 18px;
}

.readiness-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(126, 151, 171, .11);
}

.readiness-item:last-child {
  border-bottom: 0;
}

.readiness-item div {
  min-width: 0;
}

.readiness-item strong,
.readiness-item span {
  display: block;
}

.readiness-item div span {
  margin-top: 2px;
  color: var(--text3);
  font-size: 10.5px;
}

.readiness-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text3);
}

.readiness-dot.ready {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(53, 201, 135, .10);
}

.readiness-dot.attention {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(230, 173, 86, .10);
}

.command-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 18px 18px;
}

.vpn-card {
  margin-bottom: 8px;
}

.wg-status-box {
  min-height: 82px;
  padding: 17px 20px;
}

.wg-peers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 9px;
}

.wg-peer {
  padding: 12px 14px;
  background: #0b1621;
}

.client-summary-grid,
.release-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-stat {
  min-height: 104px;
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-stat span {
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
}

.mini-stat strong {
  margin-top: 5px;
  color: #f2f7f9;
  font-size: 21px;
}

.mini-stat small {
  margin-top: 4px;
  color: var(--text3);
  font-size: 10.5px;
}

.mini-stat-attention {
  border-color: rgba(230, 173, 86, .28) !important;
}

.clients-directory {
  overflow: visible;
}

.directory-toolbar {
  min-height: 78px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #101d29;
  border-bottom: 1px solid rgba(126, 151, 171, .14);
  border-radius: var(--radius) var(--radius) 0 0;
}

.directory-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.segmented-control {
  min-height: 38px;
  display: flex;
  padding: 3px;
  background: #0a1520;
  border: 1px solid rgba(126, 151, 171, .16);
  border-radius: 8px;
}

.segment {
  min-width: 66px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text3);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.segment:hover {
  color: var(--text);
}

.segment.active {
  background: #18303e;
  color: #9de6f2;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-field span {
  color: var(--text3);
  font-size: 9.5px;
  font-weight: 700;
}

.search-field input {
  width: 240px;
  min-height: 38px;
  padding: 7px 11px;
  background: #0a1520;
  border: 1px solid rgba(126, 151, 171, .17);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.search-field input:focus {
  border-color: rgba(57, 194, 220, .7);
  box-shadow: 0 0 0 3px rgba(57, 194, 220, .1);
}

.directory-table td {
  height: 70px;
}

.client-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.client-identity div,
.deployment-client-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-identity code,
.deployment-client-name code {
  color: var(--text3);
  font-size: 10.5px;
  direction: ltr;
  text-align: right;
}

.amount {
  font-family: var(--mono);
  font-weight: 700;
}

.amount-due { color: #ff8d91; }
.amount-credit { color: #77dfae; }

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-menu {
  position: relative;
}

.action-menu summary {
  list-style: none;
  cursor: pointer;
}

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

.action-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 140;
  width: 190px;
  padding: 6px;
  background: #101d29;
  border: 1px solid #2a3c4b;
  border-radius: 9px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .34);
}

.action-menu-panel button {
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text2);
  font: inherit;
  font-size: 11.5px;
  text-align: right;
  cursor: pointer;
}

.action-menu-panel button:hover {
  background: #162633;
  color: var(--text);
}

.action-menu-panel .danger-action {
  color: #f7a1a4;
}

.table-helper {
  display: block;
  margin-top: 5px;
  color: var(--text3);
  font-size: 10px;
}

.release-version-cell {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: center;
  gap: 6px;
}

.release-version-cell small {
  grid-column: 1 / -1;
  color: var(--text3);
}

.digest-value,
.commit-value {
  direction: ltr;
  display: inline-block;
  color: #bad7df;
  text-align: left;
}

.trusted-release-row {
  background: rgba(53, 201, 135, .018);
}

.legacy-release-row {
  opacity: .72;
}

.trust-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text3);
  font-size: 10.5px;
}

.trust-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text3);
}

.legend-dot.trusted { background: var(--success); }
.legend-dot.legacy { background: #718292; }

.release-empty-state {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.release-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.compact-card .card-header {
  min-height: 60px;
}

.release-facts {
  padding: 7px 20px 17px;
}

.release-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(126, 151, 171, .11);
}

.release-facts > div:last-child {
  border-bottom: 0;
}

.release-facts span {
  color: var(--text2);
  font-size: 11px;
}

.release-facts code {
  max-width: 65%;
  overflow: hidden;
  color: #bad7df;
  direction: ltr;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verification-steps {
  padding: 14px 20px 18px;
  list-style: none;
}

.verification-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
}

.verification-steps li > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: #153040;
  border: 1px solid rgba(57, 194, 220, .22);
  border-radius: 8px;
  color: #80dced;
  font-size: 10px;
  font-weight: 800;
}

.verification-steps strong,
.verification-steps small {
  display: block;
}

.verification-steps small {
  margin-top: 2px;
  color: var(--text3);
}

.manifest-modal-body {
  gap: 16px;
}

.manifest-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.file-drop {
  min-height: 104px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: #0b1621;
  border: 1px solid #293c4b;
  border-radius: 10px;
  cursor: pointer;
}

.file-drop:hover {
  border-color: rgba(57, 194, 220, .48);
}

.file-drop span {
  color: var(--text3);
  font-size: 10px;
}

.file-drop strong {
  color: #d9e9ee;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.file-drop small {
  color: var(--text3);
  font-size: 10px;
}

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

.file-drop:focus-within {
  border-color: rgba(57, 194, 220, .72);
  box-shadow: 0 0 0 3px rgba(57, 194, 220, .1);
}

.modal-close-text {
  width: auto;
  padding: 5px 8px;
  color: var(--text2);
  font-size: 10px;
}

.manifest-preview {
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10202c;
  border: 1px solid rgba(57, 194, 220, .16);
  border-radius: 8px;
}

.manifest-preview span {
  color: var(--text3);
  font-size: 11px;
}

.operation-gate {
  min-width: 270px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: #10211f;
  border: 1px solid rgba(53, 201, 135, .2);
  border-radius: 10px;
}

.operation-gate.open {
  background: #282315;
  border-color: rgba(230, 173, 86, .28);
}

.operation-gate strong,
.operation-gate small {
  display: block;
}

.operation-gate small {
  margin-top: 2px;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 9.5px;
}

.alert-safe {
  background: rgba(53, 201, 135, .08);
  border-color: rgba(53, 201, 135, .22);
  color: #a8e9cc;
}

.operation-lock-banner {
  margin-bottom: 16px;
  line-height: 1.7;
}

.operation-lock-banner strong {
  margin-left: 5px;
}

.deployment-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
  gap: 16px;
  align-items: start;
}

.deployment-flow-card {
  min-width: 0;
}

.deployment-flow {
  padding: 4px 20px 20px;
}

.flow-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(126, 151, 171, .11);
}

.flow-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.flow-step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #142634;
  border: 1px solid #29404f;
  border-radius: 9px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
}

.flow-step.complete .flow-step-index {
  background: #123329;
  border-color: rgba(53, 201, 135, .26);
  color: #9ae8c4;
}

.flow-step-body {
  min-width: 0;
}

.flow-step-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.flow-step-heading strong,
.flow-step-heading small {
  display: block;
}

.flow-step-heading small {
  margin-top: 3px;
  color: var(--text3);
  font-size: 10.5px;
}

.inline-action {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
}

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

.deployment-client-option {
  min-height: 66px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: auto 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: #0b1621;
  border: 1px solid rgba(126, 151, 171, .15);
  border-radius: 10px;
  cursor: pointer;
}

.deployment-client-option:hover {
  border-color: rgba(57, 194, 220, .35);
}

.deployment-client-option:has(input:checked) {
  background: #102b38;
  border-color: rgba(57, 194, 220, .55);
}

.deployment-client-option input {
  accent-color: var(--accent);
}

.deployment-client-version {
  display: flex;
  flex-direction: column;
  color: var(--text3);
  font-size: 9px;
}

.deployment-client-version b {
  margin-top: 2px;
  color: var(--text2);
  font-size: 10px;
}

.deployment-review {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(126, 151, 171, .14);
  border: 1px solid rgba(126, 151, 171, .14);
  border-radius: 9px;
}

.deployment-review > div {
  min-width: 0;
  padding: 12px;
  background: #0b1621;
}

.deployment-review span,
.deployment-review strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-review span {
  color: var(--text3);
  font-size: 9.5px;
}

.deployment-review strong {
  margin-top: 5px;
  color: #dce9ed;
  font-size: 11px;
}

.safe-copy {
  color: #7bdfb1 !important;
}

.confirmation-callout {
  margin-top: 12px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #111f2b;
  border: 1px solid rgba(57, 194, 220, .15);
  border-radius: 9px;
}

.confirmation-callout > span {
  color: var(--text3);
  font-size: 10px;
}

.confirmation-callout code {
  overflow: hidden;
  color: #bfe6ed;
  direction: ltr;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.immutable-safety-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 4px 0 14px;
  color: var(--text3);
  font-size: 10px;
}

.immutable-safety-list i {
  margin-left: 3px;
  color: var(--success);
  font-style: normal;
}

.deployment-activity-card {
  position: sticky;
  top: 98px;
  overflow: hidden;
}

.deployment-activity-list {
  max-height: 510px;
  padding: 8px 14px;
  overflow-y: auto;
}

.activity-loading {
  padding: 28px 10px;
  color: var(--text3);
  text-align: center;
}

.deployment-activity-item {
  width: 100%;
  padding: 13px 4px;
  display: block;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(126, 151, 171, .11);
  color: var(--text);
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.deployment-activity-item:hover {
  padding-right: 8px;
}

.activity-item-top,
.activity-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.activity-item-meta {
  margin-top: 7px;
  color: var(--text3);
  font-size: 9.5px;
}

.activity-item-meta b {
  color: var(--text2);
  font-size: 10.5px;
}

.deployment-policy-note {
  margin: 5px 14px 14px;
  padding: 14px;
  background: #0b1621;
  border: 1px solid rgba(126, 151, 171, .13);
  border-radius: 9px;
}

.deployment-policy-note p {
  margin: 5px 0 9px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.7;
}

.deployment-policy-note a {
  font-size: 10.5px;
}

.compact-empty {
  min-height: 104px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}

.text-warning { color: var(--warning); }

.btn:focus-visible,
.nav-link:focus-visible,
.segment:focus-visible,
.form-input:focus-visible,
.search-field input:focus-visible,
.deployment-client-option:focus-within,
.action-menu summary:focus-visible,
.deployment-activity-item:focus-visible {
  outline: 2px solid rgba(57, 194, 220, .9);
  outline-offset: 2px;
}

.btn:disabled:hover {
  transform: none;
}

@media (max-width: 1260px) {
  .dashboard-workspace,
  .deployment-workspace {
    grid-template-columns: 1fr;
  }

  .deployment-activity-card {
    position: static;
  }

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

@media (max-width: 980px) {
  .page-intro,
  .directory-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-intro-actions,
  .directory-controls {
    justify-content: flex-start;
  }

  .release-info-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .topbar {
    min-height: 66px;
    padding: 10px 14px;
  }

  .page-eyebrow,
  .page-description {
    display: none;
  }

  .page-body {
    padding: 16px;
  }

  .page-intro {
    padding: 18px;
  }

  .page-intro-actions,
  .directory-controls,
  .form-grid-two,
  .manifest-file-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-intro-actions .btn,
  .directory-controls .search-field,
  .search-field input {
    width: 100%;
  }

  .client-summary-grid,
  .release-summary-grid,
  .deployment-review {
    grid-template-columns: 1fr;
  }

  .command-actions,
  .confirmation-callout {
    grid-template-columns: 1fr;
  }

  .confirmation-callout {
    align-items: stretch;
  }

  .flow-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
  }

  .flow-step-index {
    width: 28px;
    height: 28px;
  }

  .trust-legend {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .page-body {
    padding: 11px;
  }

  .page-intro h2 {
    font-size: 18px;
  }

  .segmented-control {
    overflow-x: auto;
  }

  .segment {
    min-width: 72px;
  }

  .operation-gate {
    min-width: 0;
  }
}

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

/* ══════════════════════════════════════════
   Persistent operation center
   ══════════════════════════════════════════ */

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

.operation-dock {
  position: relative;
  width: min(310px, 28vw);
  min-height: 52px;
  padding: 8px 12px 10px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  background: #102532;
  border: 1px solid rgba(57, 194, 220, .32);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  text-align: right;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.operation-dock:hover {
  background: #14303e;
  border-color: rgba(57, 194, 220, .58);
  transform: translateY(-1px);
}

.operation-dock:focus-visible,
.operation-center-close:focus-visible,
.operation-log-details summary:focus-visible,
.client-operation-button:focus-visible {
  outline: 2px solid rgba(57, 194, 220, .9);
  outline-offset: 2px;
}

.operation-dock[data-status="success"],
.operation-dock[data-status="completed"] {
  background: #10271f;
  border-color: rgba(53, 201, 135, .3);
}

.operation-dock[data-status="failed"],
.operation-dock[data-status="error"] {
  background: #2a171b;
  border-color: rgba(239, 107, 112, .36);
}

.operation-dock-pulse,
.operation-live-mark {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(57, 194, 220, .12);
  animation: operationPulse 1.8s ease-in-out infinite;
}

.operation-dock[data-status="success"] .operation-dock-pulse,
.operation-dock[data-status="completed"] .operation-dock-pulse {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(53, 201, 135, .12);
  animation: none;
}

.operation-dock[data-status="failed"] .operation-dock-pulse,
.operation-dock[data-status="error"] .operation-dock-pulse {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 107, 112, .12);
  animation: none;
}

@keyframes operationPulse {
  50% { box-shadow: 0 0 0 7px rgba(57, 194, 220, 0); }
}

.operation-dock-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.operation-dock-copy strong,
.operation-dock-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-dock-copy strong {
  color: #eff8fa;
  font-size: 11.5px;
}

.operation-dock-copy small {
  color: #8eabb8;
  font-size: 9.5px;
}

.operation-dock-percent {
  direction: ltr;
  color: #9de9f5;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.operation-dock-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}

.operation-dock-progress > span {
  height: 100%;
  display: block;
  background: var(--accent);
  transition: width .25s ease;
}

.operation-spotlight {
  margin-bottom: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) auto;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #102532, #0d1c28);
  border: 1px solid rgba(57, 194, 220, .28);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(2, 8, 15, .2);
}

.operation-spotlight[hidden],
.operation-dock[hidden],
.operation-center-content[hidden],
.operation-center-empty[hidden],
.operation-progress-measured[hidden],
.operation-progress-unmeasured[hidden],
.operation-error-card[hidden],
.operation-spotlight-progress[hidden] {
  display: none !important;
}

.operation-spotlight-state {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.operation-spotlight-state strong,
.operation-spotlight-state small {
  display: block;
}

.operation-spotlight-state strong {
  margin-top: 3px;
  overflow: hidden;
  color: #eff8fa;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-spotlight-state small {
  margin-top: 2px;
  color: var(--text3);
  font-size: 10.5px;
}

.operation-spotlight-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.operation-spotlight-progress strong {
  min-width: 42px;
  color: #a3e9f4;
  direction: ltr;
  font-family: var(--mono);
  font-size: 10.5px;
}

.operation-progress-track {
  height: 8px;
  overflow: hidden;
  background: #08131d;
  border: 1px solid rgba(126, 151, 171, .18);
  border-radius: 999px;
}

.operation-progress-track > span {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #278ba0, #53d1e8);
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(57, 194, 220, .28);
  transition: width .28s ease;
}

.operation-center {
  position: fixed;
  top: 96px;
  bottom: 16px;
  left: 16px;
  z-index: 480;
  width: min(540px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #09141f;
  border: 1px solid #294252;
  border-radius: 16px;
  box-shadow: 0 26px 72px rgba(0, 0, 0, .58), 0 0 0 1px rgba(57, 194, 220, .04);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(calc(-100% - 32px));
  transition: transform .24s ease, opacity .2s ease, visibility 0s linear .24s;
}

.operation-center.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.operation-center-header {
  min-height: 94px;
  padding: 17px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #0e1d29;
  border-bottom: 1px solid rgba(126, 151, 171, .16);
}

.operation-center-heading {
  min-width: 0;
}

.operation-center-heading h2 {
  margin-top: 6px;
  overflow: hidden;
  color: #f3f8fa;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-center-heading p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text3);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text3);
  font-size: 9.5px;
  font-weight: 700;
}

.operation-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text3);
}

.operation-connection[data-state="live"] { color: #83e4b9; }
.operation-connection[data-state="live"] i { background: var(--success); box-shadow: 0 0 7px rgba(53, 201, 135, .8); }
.operation-connection[data-state="connecting"],
.operation-connection[data-state="reconnecting"] { color: #f0c77f; }
.operation-connection[data-state="connecting"] i,
.operation-connection[data-state="reconnecting"] i { background: var(--warning); animation: operationPulse 1.8s infinite; }
.operation-connection[data-state="complete"] { color: #83e4b9; }
.operation-connection[data-state="complete"] i { background: var(--success); }
.operation-connection[data-state="failed"] { color: #f6a0a4; }
.operation-connection[data-state="failed"] i { background: var(--danger); }

.operation-center-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #142431;
  border: 1px solid rgba(126, 151, 171, .18);
  border-radius: 9px;
  color: var(--text2);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.operation-center-close:hover {
  background: #1a2d3b;
  color: var(--text);
}

.operation-center-empty {
  padding: 36px 24px;
  align-self: center;
  color: var(--text2);
  text-align: center;
}

.operation-center-empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.operation-center-empty p {
  max-width: 320px;
  margin: 7px auto 0;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.7;
}

.operation-center-content {
  min-height: 0;
  padding: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.operation-overview,
.operation-timeline-section,
.operation-log-section {
  padding: 16px;
  background: #0d1a26;
  border: 1px solid rgba(126, 151, 171, .15);
  border-radius: 12px;
}

.operation-timeline-section,
.operation-log-section,
.operation-error-card {
  margin-top: 12px;
}

.operation-overview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.operation-overview-top > div {
  min-width: 0;
}

.operation-overview h3 {
  margin-top: 4px;
  color: #eef6f8;
  font-size: 16px;
}

.operation-overview p {
  margin-top: 4px;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.6;
}

.operation-progress-measured {
  margin-top: 16px;
}

.operation-progress-labels {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text2);
  font-size: 10px;
}

.operation-progress-labels strong {
  direction: ltr;
  color: #a0e8f4;
  font-family: var(--mono);
  font-size: 11px;
}

.operation-progress-unmeasured {
  margin-top: 14px !important;
  padding: 9px 11px;
  background: #0a1621;
  border: 1px dashed rgba(126, 151, 171, .2);
  border-radius: 8px;
}

.operation-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(126, 151, 171, .14);
  border: 1px solid rgba(126, 151, 171, .14);
  border-radius: 11px;
}

.operation-metrics > div {
  min-width: 0;
  padding: 11px 10px;
  background: #0b1823;
}

.operation-metrics dt {
  color: var(--text3);
  font-size: 8.5px;
  font-weight: 700;
}

.operation-metrics dd {
  margin-top: 4px;
  overflow: hidden;
  color: #dce9ed;
  direction: ltr;
  font-family: var(--mono);
  font-size: 9.5px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-section-title h3 {
  margin-top: 3px;
  color: #eaf3f6;
  font-size: 13px;
}

.operation-timeline {
  margin-top: 15px;
  list-style: none;
}

.operation-timeline li {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  color: var(--text3);
}

.operation-timeline li:not(:last-child)::after {
  position: absolute;
  top: 25px;
  right: 12px;
  bottom: 0;
  width: 1px;
  background: rgba(126, 151, 171, .2);
  content: '';
}

.operation-timeline-marker {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: #111f2c;
  border: 1px solid #2b4050;
  border-radius: 50%;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.operation-timeline strong,
.operation-timeline small {
  display: block;
}

.operation-timeline strong {
  padding-top: 2px;
  color: var(--text2);
  font-size: 11px;
}

.operation-timeline small {
  margin-top: 2px;
  color: var(--text3);
  font-size: 9px;
}

.operation-timeline .is-complete .operation-timeline-marker {
  background: #123027;
  border-color: rgba(53, 201, 135, .36);
  color: #8ee6bf;
}

.operation-timeline .is-complete:not(:last-child)::after {
  background: rgba(53, 201, 135, .3);
}

.operation-timeline .is-current .operation-timeline-marker {
  background: #143543;
  border-color: rgba(57, 194, 220, .55);
  color: #9ce7f3;
  box-shadow: 0 0 0 4px rgba(57, 194, 220, .09);
}

.operation-timeline .is-current strong { color: #bdebf2; }
.operation-timeline .is-failed .operation-timeline-marker {
  background: #341b20;
  border-color: rgba(239, 107, 112, .48);
  color: #f4a1a5;
}
.operation-timeline .is-failed strong { color: #f4a1a5; }

.operation-error-card {
  padding: 15px;
  background: #251419;
  border: 1px solid rgba(239, 107, 112, .32);
  border-radius: 12px;
}

.operation-error-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.operation-error-heading span,
.operation-error-heading strong {
  display: block;
}

.operation-error-heading span {
  color: #c58a8d;
  font-size: 9px;
  font-weight: 700;
}

.operation-error-heading strong {
  margin-top: 3px;
  color: #ffd7d9;
  font-size: 13px;
}

.operation-error-heading code {
  padding: 3px 7px;
  background: #32181e;
  border: 1px solid rgba(239, 107, 112, .28);
  border-radius: 6px;
  color: #f5a1a5;
  direction: ltr;
  font-size: 9px;
}

.operation-error-card > p {
  margin-top: 10px;
  color: #e7b7b9;
  font-size: 11px;
  line-height: 1.7;
}

.operation-recovery {
  margin: 12px 0 10px;
  padding: 11px;
  background: #1b151b;
  border: 1px solid rgba(230, 173, 86, .2);
  border-radius: 8px;
}

.operation-recovery span,
.operation-recovery strong {
  display: block;
}

.operation-recovery span {
  color: #ba9061;
  font-size: 8.5px;
  font-weight: 800;
}

.operation-recovery strong {
  margin-top: 4px;
  color: #efd2a2;
  font-size: 10.5px;
  line-height: 1.7;
}

.operation-retryable {
  margin: 0 0 10px !important;
  color: var(--text3) !important;
  font-size: 9.5px !important;
}

.operation-log-toolbar {
  align-items: flex-end;
}

.operation-log-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.operation-log-details {
  margin-top: 12px;
  overflow: hidden;
  background: #07111a;
  border: 1px solid rgba(126, 151, 171, .16);
  border-radius: 9px;
}

.operation-log-details summary {
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text2);
  font-size: 9.5px;
  cursor: pointer;
  list-style: none;
}

.operation-log-details summary::-webkit-details-marker { display: none; }
.operation-log-details summary::before { color: var(--accent); content: '▾'; }
.operation-log-details:not([open]) summary::before { content: '‹'; }
.operation-log-details summary span { margin-right: auto; color: var(--text3); font-family: var(--mono); }

.operation-log-details .terminal {
  min-height: 180px;
  max-height: 360px;
  margin: 0;
  padding: 13px;
  background: #050d14;
  border: 0;
  border-top: 1px solid rgba(126, 151, 171, .13);
  color: #b9cbd3;
  font-size: 10.5px;
  line-height: 1.65;
}

.operation-center-footer {
  min-height: 58px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0d1b27;
  border-top: 1px solid rgba(126, 151, 171, .16);
}

.operation-center-footer > span {
  overflow: hidden;
  color: var(--text3);
  direction: ltr;
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact per-client operation state, populated by clients.html. */
.client-operation-cell {
  min-width: 148px;
}

.client-operation-button {
  width: 100%;
  max-width: 190px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #0b1924;
  border: 1px solid rgba(126, 151, 171, .16);
  border-radius: 8px;
  color: var(--text2);
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.client-operation-button:hover {
  background: #112431;
  border-color: rgba(57, 194, 220, .34);
}

.client-operation-button.is-running {
  background: #102532;
  border-color: rgba(57, 194, 220, .28);
}

.client-operation-button.is-success {
  background: #10241f;
  border-color: rgba(53, 201, 135, .24);
}

.client-operation-button.is-failed {
  background: #27171b;
  border-color: rgba(239, 107, 112, .28);
}

.client-operation-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-operation-top strong {
  color: #dce9ed;
  font-size: 10.5px;
}

.client-operation-top b {
  color: var(--text3);
  direction: ltr;
  font-family: var(--mono);
  font-size: 9px;
}

.client-operation-button > small {
  width: 100%;
  overflow: hidden;
  color: var(--text3);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-phase-cell { min-width: 170px; }

.operation-phase-cell > strong,
.operation-history-progress > strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: #cfe1e7;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-phase-cell > small {
  display: inline-block;
  margin-top: 4px;
  color: var(--text3);
  direction: ltr;
  font-family: var(--mono);
  font-size: 9px;
}

.table-progress {
  width: 100%;
  max-width: 150px;
  height: 4px;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  background: #07121b;
  border-radius: 999px;
}

.table-progress > i {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: inherit;
}

.mini-stat-operation {
  position: relative;
  padding-left: 95px;
}

.mini-stat-operation.is-running {
  border-color: rgba(57, 194, 220, .36) !important;
  box-shadow: inset 0 -2px 0 rgba(57, 194, 220, .42), var(--shadow);
}
.mini-stat-operation.is-success { border-color: rgba(53, 201, 135, .3) !important; }
.mini-stat-operation.is-failed { border-color: rgba(239, 107, 112, .36) !important; }

.mini-stat-action {
  position: absolute;
  bottom: 15px;
  left: 15px;
  padding: 5px 8px;
  background: transparent;
  border: 1px solid rgba(126, 151, 171, .2);
  border-radius: 7px;
  color: var(--text2);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.mini-stat-action:hover { background: #162633; color: var(--text); }

.activity-item-phase {
  margin-top: 7px;
  display: block;
  overflow: hidden;
  color: #b9d2da;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item-progress {
  position: relative;
  height: 5px;
  margin-top: 8px;
  display: block;
  overflow: visible;
  background: #07121b;
  border-radius: 999px;
}

.activity-item-progress > i {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: inherit;
}

.activity-item-progress > b {
  position: absolute;
  top: -17px;
  left: 0;
  color: var(--text3);
  direction: ltr;
  font-family: var(--mono);
  font-size: 8px;
}

.deployment-activity-item.is-failed .activity-item-phase { color: #f0a3a6; }
.deployment-activity-item.is-success .activity-item-phase { color: #8bdfb9; }

.inline-error-state {
  min-height: 170px;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: var(--text2);
  text-align: center;
}

.inline-error-state strong { color: #f3b1b4; font-size: 12px; }
.inline-error-state p { color: var(--text3); font-size: 10px; }
.inline-error-state .btn { margin-top: 6px; }

.logs-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.logs-summary span {
  padding: 8px 10px;
  background: #0a1721;
  border: 1px solid rgba(126, 151, 171, .15);
  border-radius: 8px;
  color: var(--text3);
  font-size: 9.5px;
  white-space: nowrap;
}

.logs-summary b { margin-left: 3px; color: #dce9ed; font-family: var(--mono); }
.logs-summary .has-failures b { color: #f2a0a4; }

.operation-history-card { overflow: hidden; }

.operation-history-toolbar {
  min-height: 74px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #101d29;
  border-bottom: 1px solid rgba(126, 151, 171, .14);
  border-radius: var(--radius) var(--radius) 0 0;
}

.operation-history-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-search-field input,
.operation-history-filters select {
  min-height: 36px;
  background: #0a1520;
  border: 1px solid rgba(126, 151, 171, .17);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.logs-search-field input { width: 220px; padding: 7px 10px; }
.operation-history-filters select { width: 132px; padding: 6px 9px; }

.logs-search-field input:focus,
.operation-history-filters select:focus {
  border-color: rgba(57, 194, 220, .7);
  box-shadow: 0 0 0 3px rgba(57, 194, 220, .1);
}

.operation-history-target {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: #dfeaed;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-progress-row {
  max-width: 190px;
  margin-top: 7px;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.history-progress-row small {
  color: var(--text3);
  direction: ltr;
  font-family: var(--mono);
  font-size: 8.5px;
}

.history-error-summary {
  max-width: 260px;
  margin-top: 5px;
  display: block;
  overflow: hidden;
  color: #e9a0a3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-history-row[hidden] { display: none; }

@media (max-width: 1320px) {
  .operation-dock { width: min(270px, 25vw); }
  .topbar-end .server-chip:last-child { display: none; }
}

@media (max-width: 1080px) {
  .operation-history-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .operation-history-filters { flex-wrap: wrap; }
  .operation-dock { width: min(250px, 32vw); }
  .topbar-end > .server-chip { display: none; }
  .operation-spotlight { grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto; }
}

@media (max-width: 768px) {
  .topbar-end { margin-right: auto; }
  .operation-dock {
    width: 190px;
    min-height: 44px;
    padding: 6px 9px 8px;
  }
  .operation-dock-copy strong { font-size: 10.5px; }
  .operation-dock-copy small { display: none; }
  .operation-dock-percent { font-size: 9px; }

  .operation-spotlight {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 13px;
  }
  .operation-spotlight-progress { grid-column: 1 / -1; grid-row: 2; }
  .operation-spotlight-state small { white-space: normal; }

  .operation-center {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 92dvh;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
  }
  .operation-center.active { transform: translateY(0); }
  .operation-center-header { min-height: 84px; padding: 14px 15px; }
  .operation-center-content { padding: 12px; }
  .operation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-log-details .terminal { max-height: 300px; }
  .operation-history-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .logs-search-field { grid-column: 1 / -1; }
  .logs-search-field input,
  .operation-history-filters select { width: 100%; }
  .operation-history-table th:nth-child(5),
  .operation-history-table td:nth-child(5) { display: none; }
}

@media (max-width: 520px) {
  .operation-dock {
    width: 46px;
    min-height: 42px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 8px;
  }
  .operation-dock-copy,
  .operation-dock-percent { display: none; }
  .operation-dock-pulse { width: 10px; height: 10px; }

  .operation-spotlight {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }
  .operation-spotlight > .btn { justify-content: center; }
  .operation-overview-top,
  .operation-section-title,
  .operation-error-heading {
    align-items: flex-start;
  }
  .operation-log-toolbar {
    flex-direction: column;
  }
  .operation-log-actions { width: 100%; }
  .operation-log-actions .btn { flex: 1; justify-content: center; }
}

/* Central build/update path */
.release-center-intro { align-items: center; }
.release-center-state {
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
}
.release-center-state div { display: grid; gap: 3px; }
.release-center-state small { color: var(--text-dim); }
.release-center-summary { margin-bottom: 18px; }
.release-center-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg2);
}
.release-center-tab {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  color: var(--text-dim);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.release-center-tab.active {
  color: var(--text);
  background: var(--bg3);
  box-shadow: 0 0 0 1px var(--border);
}
.release-action-panel { margin-bottom: 18px; }
.release-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, .8fr);
  gap: 22px;
}
.release-action-form { min-width: 0; }
.release-action-form > .btn { margin: 4px 0 14px; }
.release-preflight {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 74px;
  margin: 4px 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(148, 163, 184, .05);
}
.release-preflight strong { display: block; margin-bottom: 4px; }
.release-preflight p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.release-preflight.is-ready { border-color: rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .06); }
.release-preflight.is-blocked { border-color: rgba(239, 68, 68, .3); background: rgba(239, 68, 68, .06); }
.release-preflight.is-running { border-color: rgba(59, 130, 246, .3); background: rgba(59, 130, 246, .06); }
.release-preflight-mark { width: 10px; height: 10px; margin-top: 5px; border-radius: 999px; background: #64748b; }
.release-preflight-mark.ready { background: #22c55e; }
.release-preflight-mark.blocked { background: #ef4444; }
.release-preflight-mark.running { background: #3b82f6; animation: operationPulse 1.2s infinite; }
.release-approval {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.release-approval legend { padding: 0 8px; color: var(--text-dim); font-size: 12px; font-weight: 800; }
.release-approval .deployment-review { margin-bottom: 14px; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.release-safety-card {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, .22);
}
.release-safety-steps { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.release-safety-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.release-safety-steps b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(59, 130, 246, .12);
}
.release-safety-steps div { display: grid; gap: 3px; }
.release-safety-steps small { color: var(--text-dim); line-height: 1.6; }
.release-center-lower-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.compact-release-table code { white-space: nowrap; }
.release-recent-list { display: grid; gap: 8px; }
.release-recent-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  text-align: right;
  font: inherit;
  cursor: pointer;
}
.release-recent-item:hover { border-color: var(--accent); background: rgba(59, 130, 246, .05); }
.release-recent-item > span:first-child { display: grid; gap: 3px; }
.release-recent-item small { color: var(--text-dim); }
.operation-error-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 980px) {
  .release-action-grid,
  .release-center-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .release-center-state { min-width: 0; width: 100%; }
  .release-center-tabs { width: 100%; grid-template-columns: 1fr 1fr; }
  .release-action-panel { padding: 14px; }
  .release-action-grid { gap: 14px; }
}
