:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #0f172a;
  --bg-input: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --border: #334155;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── Login ── */
#login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
.login-box {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-box .logo { margin-bottom: 2rem; }
.login-box .logo h1 { color: var(--text); font-size: 1.5rem; margin-top: 0.5rem; }
.login-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.login-box input:focus { border-color: var(--primary); }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2rem; }

/* ── Layout ── */
#main-panel { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  color: var(--primary-light);
}
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.nav-item:hover { background: rgba(99,102,241,0.1); color: var(--text); }
.nav-item.active { background: rgba(99,102,241,0.15); color: var(--primary-light); border-right: 3px solid var(--primary); }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }

.main-content { flex: 1; padding: 2rem; overflow-y: auto; }

/* ── Page ── */
.page { display: none; }
.page.active { display: block; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.page-header h2 { font-size: 1.5rem; font-weight: 700; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
}
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }

/* ── Card ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1.1rem; }
.card-body { padding: 1.25rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563eb; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-input); color: var(--text); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td { color: var(--text); }
tr:hover td { background: rgba(99,102,241,0.05); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-disabled { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-error { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }

/* ── Forms ── */
.form-section { margin-bottom: 1.5rem; }
.form-section h4 { margin-bottom: 0.75rem; color: var(--primary-light); font-size: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group small { color: var(--text-dark); font-size: 0.8rem; margin-top: 0.25rem; display: block; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }

/* ── Modal ── */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4vh;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-content.large { max-width: 800px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.2rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Progress ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.fill-green { background: var(--success); }
.fill-yellow { background: var(--warning); }
.fill-red { background: var(--danger); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--info);
  min-width: 300px;
  animation: slideIn 0.3s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Action buttons ── */
.action-btns { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dark); }

/* ── Details/Summary ── */
details { margin-bottom: 0.5rem; }
details summary { cursor: pointer; padding: 0.5rem; background: var(--bg-input); border-radius: var(--radius); }
details[open] summary { background: rgba(99,102,241,0.15); }
pre { margin: 0; overflow: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-header span, .nav-item span { display: none; }
  .nav-item { justify-content: center; padding: 0.75rem; }
  .main-content { padding: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Domain terminal (xterm.js, local vendored asset) ── */
.modal-content.terminal-modal {
  width: min(96vw, 1400px);
  max-width: 1400px;
  height: min(90vh, 920px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-content.terminal-modal .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.9rem;
  gap: 0.65rem;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.terminal-status {
  margin-left: auto;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}
.terminal-status.connected { color: var(--success); }
.terminal-status.error { color: var(--danger); }
.terminal-shell-wrap {
  flex: 1;
  min-height: 360px;
  background: #05070b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0.5rem;
}
.terminal-shell {
  width: 100%;
  height: 100%;
  min-height: 340px;
}
.terminal-hint {
  color: var(--text-dark);
  font-size: 0.78rem;
}
.terminal-hint code { color: var(--text-muted); }
.terminal-transport-warning { color: var(--warning); font-size: 0.78rem; border: 1px solid rgba(234,179,8,.35); border-radius: var(--radius); padding: .45rem .6rem; }
@media (max-width: 768px) {
  .modal-content.terminal-modal { width: 100vw; height: 96vh; max-height: 96vh; border-radius: 0; }
  .terminal-shell-wrap { min-height: 280px; }
  .terminal-status { width: 100%; margin-left: 0; }
}

/* Domain overview v2.5.2 */
.domain-name-cell { cursor: pointer; min-width: 210px; }
.domain-name-cell:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.domain-origin { margin-top: 0.2rem; color: var(--text-dark); font-size: 0.72rem; font-family: monospace; }
.usage-cell { min-width: 130px; }
.usage-value { font-size: 0.78rem; white-space: nowrap; }
.usage-mini { width: 100%; min-width: 95px; height: 5px; margin-top: 0.35rem; overflow: hidden; border-radius: 999px; background: var(--bg-input); }
.usage-mini .fill { height: 100%; border-radius: 999px; }
.domain-info-status { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 1.25rem; }
.domain-info-status > div { display: flex; align-items: center; gap: 0.6rem; }
.info-label { display: block; color: var(--text-muted); font-size: 0.78rem; margin-bottom: 0.25rem; }
.domain-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.domain-usage-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; background: rgba(255,255,255,0.015); }
.domain-usage-card > span { display: block; color: var(--text-muted); font-size: 0.78rem; margin-bottom: 0.35rem; }
.domain-usage-card > strong { display: block; font-size: 1rem; }
.domain-usage-card small { color: var(--text-dark); font-size: 0.7rem; display: block; margin-top: 0.35rem; }
.domain-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.domain-info-grid > div { border-bottom: 1px solid var(--border); padding-bottom: 0.65rem; min-width: 0; overflow-wrap: anywhere; }
.domain-info-grid.compact { margin-bottom: 1rem; }
.info-callout { padding: 0.9rem 1rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); line-height: 1.55; }
.info-error { margin-top: 1rem; padding: 0.8rem; border-left: 3px solid var(--danger); background: rgba(239,68,68,0.08); border-radius: var(--radius); }
.domains-table th:nth-child(5), .domains-table th:nth-child(6), .domains-table th:nth-child(7) { min-width: 130px; }
@media (max-width: 900px) {
  .domain-usage-grid, .domain-info-grid { grid-template-columns: 1fr; }
}

/* Domains live view v2.5.2 */
.domains-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.domains-search-wrap { flex: 1 1 320px; max-width: 560px; }
.domains-search-wrap input { width: 100%; }
.domains-count, .domains-live-status {
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}
.domains-live-status { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.domains-live-status::before, .domain-live-inline .live-dot {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.4rem;
  background: var(--success);
  vertical-align: 1px;
}
.domains-live-status.error { color: var(--danger); }
.domains-live-status.error::before { background: var(--danger); }
.domain-live-inline { color: var(--text-muted); font-size: 0.74rem; display: flex; align-items: center; }
.usage-error { color: var(--danger); font-size: 0.74rem; cursor: help; }
@media (max-width: 900px) {
  .domains-live-status { margin-left: 0; }
  .domains-search-wrap { flex-basis: 100%; max-width: none; }
}

/* ── Public domain / aliases manager ── */
.public-hosts-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0.5rem 0 1.25rem;
}
.public-host-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.public-host-row:last-child { border-bottom: 0; }
.public-host-primary { background: rgba(34,197,94,0.05); }
.public-host-technical { background: rgba(59,130,246,0.04); }
.public-host-name { min-width: 0; overflow-wrap: anywhere; }
.public-host-name strong { display: block; }
.public-host-name small, .public-domain-section > small {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-dark);
  font-size: 0.78rem;
}
.public-host-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.public-host-empty { padding: 0.9rem 1rem; color: var(--text-muted); }
.public-domain-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}
.public-domain-inline { display: flex; gap: 0.65rem; align-items: center; }
.public-domain-inline input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
}
.public-domain-inline input:focus { border-color: var(--primary); outline: none; }
@media (max-width: 760px) {
  .public-host-row, .public-domain-inline { align-items: stretch; flex-direction: column; }
  .public-host-actions { justify-content: flex-start; }
}

/* ── HTTP jobs / scheduler v2.5.4 ── */
.jobs-card-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.jobs-card-header small { display:block; margin-top:.2rem; }
.jobs-live-status { color:var(--text-muted); font-size:.76rem; }
.jobs-live-status::before { content:''; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--success); margin-right:.4rem; vertical-align:1px; }
.jobs-empty { text-align:center; color:var(--text-muted); padding:1.5rem; }
.jobs-table th:nth-child(1) { min-width:280px; }
.jobs-table th:nth-child(6) { min-width:220px; }
.jobs-table th:last-child { min-width:280px; }
.job-main strong { display:block; margin-bottom:.15rem; }
.job-main code { display:block; max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-muted); font-size:.75rem; }
.job-domain { color:var(--primary-light); font-size:.72rem; margin-bottom:.15rem; }
.job-result { max-width:360px; color:var(--text-muted); font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jobs-table td small { display:block; color:var(--text-dark); margin-top:.2rem; font-size:.7rem; }
.job-result-summary { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1rem; margin-bottom:1rem; }
.job-response-label { display:block; font-weight:600; margin:1rem 0 .4rem; }
.job-response-pre { max-height:52vh; overflow:auto; white-space:pre-wrap; word-break:break-word; padding:1rem; background:#0b1220; border:1px solid var(--border); border-radius:var(--radius); color:#dbeafe; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:.82rem; }
.modal-content.job-log-modal { width:min(96vw,1200px); max-width:1200px; }
.job-log-response { max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-muted); font-size:.78rem; }
.btn:disabled { opacity:.55; cursor:not-allowed; }
@media (max-width:900px) {
  .jobs-table th:nth-child(1) { min-width:220px; }
  .job-main code { max-width:300px; }
  .jobs-table th:last-child { min-width:220px; }
}

/* WebPanel 2.8.41: egress status and responsive modal */
.egress-indicator{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;margin-left:9px;padding:4px 8px;border-radius:7px;font-size:10px;font-weight:800;line-height:1.2;letter-spacing:.35px;white-space:nowrap;border:1px solid transparent}
.egress-indicator--open{background:#123d32;color:#73efb8;border-color:#26825d}
.egress-indicator--limited{background:#4a310b;color:#ffd086;border-color:#bd7a1d}
.egress-indicator--blocked{background:#4d2028;color:#ff9c9f;border-color:#d84955}
.egress-modal .modal-content{max-width:min(980px,calc(100vw - 32px));width:100%;box-sizing:border-box}
.egress-modal .modal-body{overflow-x:hidden}
.egress-modal .egress-group{margin-top:22px;min-width:0}
.egress-modal .egress-group h3{margin:0 0 12px;font-size:1.02rem;font-weight:650}
.egress-modal .egress-existing{margin-bottom:10px;min-width:0;overflow-wrap:anywhere}
.egress-modal .egress-fields{display:grid;gap:12px;align-items:end;width:100%;min-width:0}
.egress-modal .egress-fields--rules{grid-template-columns:minmax(0,1fr) minmax(95px,130px) minmax(90px,115px) 50px}
.egress-modal .egress-fields--hosts{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(95px,125px) minmax(90px,105px) 50px}
.egress-modal .egress-field{min-width:0;display:flex;flex-direction:column;gap:5px}
.egress-modal .egress-field label{margin:0;white-space:nowrap;font-size:.89rem}
.egress-modal .egress-field .form-control{box-sizing:border-box;display:block;min-width:0;width:100%;max-width:100%;height:42px}
.egress-modal .egress-add-btn{height:42px;width:50px;min-width:50px;max-width:50px;margin:0;font-size:20px}
.egress-modal .egress-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
@media(max-width:760px){
  .egress-modal .egress-fields--rules,.egress-modal .egress-fields--hosts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .egress-modal .egress-add-btn{grid-column:1/-1;width:100%;max-width:none}
}
@media(max-width:450px){.egress-modal .egress-fields--rules,.egress-modal .egress-fields--hosts{grid-template-columns:minmax(0,1fr)}}

/* v2.8.42 independent desktop terminal windows */
.terminal-window{position:fixed;width:min(780px,92vw);height:min(560px,72vh);min-width:340px;min-height:240px;resize:both;display:flex;flex-direction:column;background:var(--bg-card,#1e293b);color:var(--text-primary,#fff);border:1px solid var(--border);border-radius:12px;box-shadow:0 16px 55px #0009;overflow:hidden;z-index:13000}
.terminal-window[hidden]{display:none!important}
.terminal-window.maximized{left:12px!important;top:12px!important;width:calc(100vw - 24px)!important;height:calc(100vh - 74px)!important;resize:none}
.terminal-window-header{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:#304158;cursor:move;user-select:none;touch-action:none}
.terminal-window-header strong{max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.terminal-window-actions{display:flex;gap:6px}
.terminal-window-actions button{width:32px;height:30px;border:1px solid #63748b;border-radius:6px;background:#23344a;color:white;cursor:pointer;font-size:19px}
.terminal-window-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:10px}
.terminal-window .terminal-shell-wrap{flex:1;min-height:0}
.terminal-window .terminal-shell{min-height:0;height:100%}
.terminal-taskbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:12999;display:flex;gap:6px;padding:6px 10px;background:#152033;border:1px solid #435168;border-radius:10px 10px 0 0;max-width:95vw;overflow-x:auto}
.terminal-taskbar[hidden]{display:none}
.terminal-task{white-space:nowrap;border:1px solid #48566e;background:#263750;color:white;border-radius:7px;padding:7px 12px;cursor:pointer}
.egress-fields--hosts{grid-template-columns:minmax(160px,1fr) minmax(230px,2fr) 68px!important}
@media(max-width:700px){.terminal-window{width:95vw;min-width:0;height:60vh;left:2vw!important;top:12vh!important}.egress-fields--hosts{grid-template-columns:1fr!important}}

/* WebPanel 2.8.44: stable component inventory tables */
.components-table-wrap { width:100%; overflow-x:auto; margin:0 0 1rem; }
.components-table { width:100%; table-layout:fixed; border-collapse:collapse; min-width:860px; }
.components-table th, .components-table td { text-align:left; padding:0.7rem 0.75rem; vertical-align:middle; overflow-wrap:anywhere; }
.components-table th { white-space:nowrap; }
.components-table tbody tr:hover { background:rgba(125,145,190,.07); }
.components-table th:nth-child(1) { width:18%; }
.components-table th:nth-child(2) { width:19%; }
.components-table th:nth-child(3) { width:12%; }
.components-table th:nth-child(4), .components-table th:nth-child(5) { width:19%; }
.components-table th:nth-child(6) { width:13%; }
.components-subheading { margin:1.5rem 0 0.75rem; }
.components-status-update { color:#f4b36c; font-weight:600; }
.components-status-neutral { opacity:0.83; }

/* Components maintenance: keep all columns stable, actions wrap inside their own cell. */
.components-table {table-layout:auto;min-width:1120px;}
.components-table th:nth-child(n) {width:auto;}
.components-actions {min-width:245px;max-width:340px;}
.components-actions button {margin:2px 4px 2px 0;white-space:nowrap;}
.components-table tbody tr[hidden] {display:none!important;}
#components-action-status {white-space:pre-wrap;overflow-wrap:anywhere;font-size:.86rem;margin:.35rem 0 .6rem;max-height:190px;overflow-y:auto;}
.components-runtime-table {min-width:680px;}

/* Component detail dialog, v2.8.46 */
.component-clickable-row {cursor:pointer;}
.component-clickable-row:focus-visible {outline:2px solid #8495ff;outline-offset:-2px;}
.component-detail-dialog {max-width:960px;width:min(94vw,960px);max-height:90vh;overflow-y:auto;}
.component-detail-meta {display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.75rem;margin-bottom:1.2rem;}
.component-detail-meta > div {padding:.7rem;border:1px solid rgba(150,160,190,.22);border-radius:8px;overflow-wrap:anywhere;}
.component-detail-actions {display:flex;flex-wrap:wrap;gap:.55rem;margin-bottom:1rem;}
#component-modal-status {min-height:1.5rem;margin:.8rem 0;}
.component-detail-log {white-space:pre-wrap;overflow-wrap:anywhere;max-height:310px;overflow-y:auto;padding:1rem;border:1px solid rgba(150,160,190,.2);border-radius:8px;background:rgba(0,0,0,.22);font-size:.85rem;}
.component-detail-history {display:flex;flex-direction:column;gap:.3rem;max-height:160px;overflow-y:auto;margin-bottom:1rem;}
.component-history-entry {text-align:left;background:transparent;border:1px solid rgba(150,160,190,.18);border-radius:5px;padding:.45rem;color:inherit;cursor:pointer;}
.component-history-entry:hover {background:rgba(125,145,190,.12);}
