/* CDN ERA — Canonical Dark + White Design System
   Source of truth: CDN-ERA-dark-white-mockup
*/

:root {
  --bg: #0b0c0e;
  --panel: #111316;
  --panel2: #15181c;
  --border: #262a2f;
  --border-focus: #4b525d;
  --text: #f6f7f8;
  --muted: #8e949b;
  --muted2: #666c73;
  --ok: #62d995;
  --ok-bg: #142119;
  --ok-text: #70df9d;
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --r: 18px;
  --r-sm: 11px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #2b313a #0b0c0e;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0b0c0e;
}

::-webkit-scrollbar-thumb {
  background: #262a2f;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3e4652;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

/* Shell & Layout */
.shell {
  width: min(1420px, calc(100% - 32px));
  margin: auto;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 800;
  user-select: none;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #0b0c0e;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand small, .brand-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: #fff;
  border-radius: var(--r-sm);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--panel2);
  border-color: #3b414a;
}

.btn.white, .btn-primary {
  background: #fff;
  color: #111;
  border-color: #fff;
  font-weight: 700;
}

.btn.white:hover, .btn-primary:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
  color: #000;
}

.btn.ghost, .btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.ghost:hover, .btn-ghost:hover {
  background: var(--panel2);
  color: #fff;
  border-color: var(--border);
}

.btn.danger, .btn-danger {
  background: var(--danger-bg);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--danger);
}

.btn.danger:hover, .btn-danger:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--danger);
}

.btn-wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Indicators and Status Pills */
.mode-pill {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 600;
}

.mode-pill.live .mode-dot {
  background: var(--ok);
}

.mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.system-pill {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #7ee4a7;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge.green, .pill {
  display: inline-block;
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1px solid rgba(98, 217, 149, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}

.badge.red, .pill.red {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}

.badge.amber, .pill.amber {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}

.badge.blue, .badge.violet {
  background: #121620;
  color: #9cb2ff;
  border: 1px solid rgba(156, 178, 255, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}

.badge.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
  line-height: 1.2;
}
.badge-mini.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.badge-mini.green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.badge-mini.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.badge-mini.red {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

/* User Profile & Logout */
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.profile-copy {
  display: flex;
  flex-direction: column;
}

.profile-copy strong {
  font-size: 12px;
  color: #fff;
  line-height: 1.2;
}

.profile-copy span {
  font-size: 10px;
  color: var(--muted);
}

.btn-logout {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
  margin-left: 4px;
  transition: all 0.15s;
}

.btn-logout:hover {
  color: var(--danger);
  background: var(--panel2);
}

/* Notifications Dropdown */
.notif-wrapper {
  position: relative;
}

.notif-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}

.notif-btn:hover {
  color: #fff;
  border-color: #3b414a;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 9px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  font-weight: 700;
  padding: 0 3px;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
  z-index: 999;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.notif-count-pill {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--muted);
  margin-left: 6px;
}

.notif-clear-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.notif-clear-btn:hover {
  color: #fff;
}

.notif-dropdown-body {
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.notif-dropdown-body::-webkit-scrollbar {
  width: 5px;
}
.notif-dropdown-body::-webkit-scrollbar-track {
  background: var(--panel);
}
.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: #2b313a;
  border-radius: 3px;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.notif-item-text {
  color: var(--text);
  line-height: 1.4;
}

.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--panel2);
}

.notif-view-all-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.notif-view-all-btn:hover {
  color: #fff;
}

/* Layout & Sidebar */
.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 72px);
}

.side {
  border-right: 1px solid var(--border);
  padding: 24px 18px 24px 0;
}

.side h4 {
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 18px 10px 8px;
  font-weight: 700;
}

.side h4:first-child {
  margin-top: 0;
}

.side a, .side .nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.side a.active, .side a:hover,
.side .nav-link.active, .side .nav-link:hover {
  background: #15171a;
  color: #fff;
}

.main {
  padding: 30px 0 60px 30px;
}

/* Headings */
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.head h1 {
  margin: 0;
  font-size: 31px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.head p {
  color: var(--muted);
  font-size: 14px;
  margin: 7px 0 0;
}

.ok {
  color: #7ee4a7;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Metric Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.card, .panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #121417, #0f1113);
  border-radius: var(--r);
  padding: 14px;
}

.label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.value {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-top: 9px;
}

.foot {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 6px;
  font-weight: 500;
}

/* Grid & Panels */
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
}

.panel h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-head-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

/* Minimalist White Traffic Chart */
.chart {
  height: 185px;
  margin-top: 12px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 53px, rgba(255, 255, 255, 0.035) 54px);
}

.chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chart-y-axis {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 24px);
  pointer-events: none;
  z-index: 2;
  font-size: 10px;
  color: var(--muted2);
  font-family: var(--font-mono);
}

.chart-labels-x {
  position: absolute;
  bottom: 8px;
  left: 50px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 10px;
  color: var(--muted2);
  font-family: var(--font-mono);
}

/* Periods Selector */
.periods {
  display: inline-flex;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.periods button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.periods button:hover {
  color: #fff;
}

.periods button.active {
  background: var(--panel);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* List Group */
.list {
  margin-top: 14px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.item:first-child {
  border-top: 0;
}

.item span {
  color: var(--muted);
}

.item b {
  color: #fff;
  font-weight: 600;
}

/* Tables & Rows */
.table {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  width: 100%;
}

.row {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 0.9fr 0.75fr 0.8fr 150px;
  gap: 10px;
  padding: 14px 15px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}

.row:first-child {
  border-top: 0;
}

.row.headrow {
  background: #0d0f11;
  color: var(--muted2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.row-action {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.row-action:hover {
  background: #1d2127;
  color: #fff;
  border-color: #3e454f;
}

.row-action.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}

.row-action.toggle-active.paused {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Custom Table for other views */
.table-wide {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wide th {
  background: #0d0f11;
  color: var(--muted2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-wide td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table-wide tr:last-child td {
  border-bottom: 0;
}

.table-wide tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Secret domain / IP blur */
.domain-wrap {
  cursor: pointer;
}

.blur-secret {
  filter: blur(4.5px);
  user-select: none;
  transition: filter 0.2s ease;
  cursor: pointer;
}

.blur-secret.revealed,
.blur-secret:hover {
  filter: none;
  user-select: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: min(720px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: modalScaleIn 0.18s ease-out;
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: #0f1114;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-head .hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.modal-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: -4px 0 0 0;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #0f1114;
}

/* Forms & Inputs */
.field, .form-group {
  margin-top: 16px;
}

.field:first-child, .form-group:first-child {
  margin-top: 0;
}

.field label, .form-group label {
  display: block;
  font-size: 12px;
  color: #c7cbd0;
  margin-bottom: 7px;
  font-weight: 600;
}

.field input, .field select, .field textarea,
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #0f1012;
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.field textarea, .form-group textarea {
  height: 90px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus, .field select:focus, .field textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

/* Wizard Steps */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.step {
  font-size: 12px;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.step.active {
  color: #fff;
  font-weight: 700;
}

.step.done {
  color: var(--ok);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.step.active .step-num {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.step.done .step-num {
  background: var(--ok);
  color: #0b0c0e;
  border-color: var(--ok);
}

/* Code Boxes */
.code-box {
  background: #0a0b0d;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d1d5db;
  position: relative;
  overflow-x: auto;
}

.code-box pre {
  margin: 0;
}

/* Login Screen (Split View 1:1 with mockup) */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-left {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  background: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.05), transparent 30%), #0b0c0e;
}

.login-copy h1 {
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin: 0;
  max-width: 640px;
  font-weight: 800;
}

.login-copy p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
  margin-top: 18px;
  font-size: 16px;
}

.login-right {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(420px, 100%);
}

.login-card h2 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.login-submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-weight: 800;
  margin-top: 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease;
}

.login-submit:hover {
  background: #e5e7eb;
}

.login-error {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--danger-bg);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer {
  color: var(--muted2);
  font-size: 11px;
  margin-top: 16px;
}

/* Node Public View (Hero, Grid, Ops, Masked) */
.node {
  padding: 30px 0 60px;
}

.hero {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #121417, #0e1012);
  border-radius: 22px;
  padding: 24px;
}

.node-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.node-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
}

.node-title h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.node-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #0f1012;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.metric strong {
  display: block;
  font-size: 23px;
  margin-top: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nodegrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
}

.ops {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.op {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0e0f11;
  font-size: 12.5px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.op:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #121418;
}

.op-brand,
.op > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.op-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.op-name {
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.op b {
  color: #6fe19b;
  font-weight: 600;
  font-size: 12px;
}

.op.down b,
.op b.unavailable {
  color: var(--danger, #ff6b6b);
}

.op b.nodata {
  color: var(--muted, #64748b);
}

.masked {
  filter: blur(4px);
  user-select: none;
}

/* Toast Notifications */
.toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--danger);
  background: #191012;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .side {
    display: none;
  }
  .main {
    padding-left: 0;
  }
  .cards, .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid2, .nodegrid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-left {
    display: none;
  }
}

@media (max-width: 650px) {
  .cards, .metrics, .ops {
    grid-template-columns: 1fr;
  }
  .shell {
    width: min(100% - 20px, 1420px);
  }
  .row {
    grid-template-columns: 1fr 1fr;
  }
  .row > :nth-child(3), .row > :nth-child(4) {
    display: none;
  }
  .node-top {
    flex-direction: column;
  }
  .head {
    flex-direction: column;
  }
}
/* Additional Page Components in Canonical Dark + White Style */

/* Project details: readable technical data and responsive actions. */
.project-details-modal { width: min(1040px, 100%); max-height: min(92vh, 980px); }
.project-details-modal .modal-head { padding: 22px 28px; }
.project-details-modal .modal-head h2 { font-size: 23px; letter-spacing: -.035em; }
.project-details-modal .modal-body { padding: 24px 28px 30px; }
.project-details-modal .modal-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 8px; padding: 14px 28px;
}

/* All admin modals use the same dark/white surface. Keep the public-link
   modal on this system so it cannot resurrect the former blue variant. */
.public-link-modal {
  width: min(580px, 100%);
}

.public-link-modal .modal-head,
.public-link-modal .modal-foot {
  background: #0f1114;
}

.public-link-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
}

.public-link-icon {
  display: inline-flex;
  padding: 6px;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  color: #fff;
  background: #1b1b1b;
}

.public-link-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}

.public-link-status-row .badge { padding: 4px 12px; }

.public-link-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.public-link-label {
  display: block;
  margin-bottom: 8px;
  color: #c7cbd0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-link-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.public-link-url-row input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 12px;
  color: #fff;
  background: #151515;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.public-link-url-row .btn { flex: 0 0 auto; }

.public-link-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-link-actions .btn {
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  font-size: 12px;
  text-decoration: none;
}

.public-link-modal .modal-foot .btn { min-width: 100px; }

@media (max-width: 560px) {
  .public-link-url-row { flex-direction: column; }
  .public-link-url-row .btn { width: 100%; }
  .public-link-actions { grid-template-columns: 1fr; }
}

/* Connection config modal. These classes restore the layout lost when the
   previous blue modal styles were replaced by the dark/white admin theme. */
.config-modal { width: min(760px, 95vw); max-height: 92vh; }
.config-modal .modal-body { padding: 18px 20px; }
.config-modal-title { display: flex; align-items: center; gap: 8px; }
.config-modal-backdrop { padding: 18px; }
.arch-flow-box {
  margin-bottom: 16px; padding: 14px 15px;
  background: #151515; border: 1px solid #343434; border-radius: 10px;
}
.arch-flow-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 13px; color: #f1f1f1; font-size: 12px; font-weight: 700;
}
.arch-flow-title > span:last-child { color: #d9d9d9 !important; font-size: 10px !important; }
.arch-flow { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr); align-items: stretch; gap: 7px; }
.arch-node { min-width: 0; padding: 10px 9px; background: #101010; border: 1px solid #3a3a3a; border-radius: 8px; }
.arch-node .node-role { color: #aeb4bb; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.arch-node .node-name { margin-top: 6px; color: #fff; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.arch-node .node-port { margin-top: 5px; color: #c7c7c7; font-family: var(--font-mono); font-size: 10px; }
.arch-node.client, .arch-node.cdn, .arch-node.vps, .arch-node.xray { border-color: #454545; }
.arch-arrow { display: grid; place-items: center; color: #bdbdbd; font-size: 18px; }
.arch-flow-note { margin-top: 10px; color: #aeb4bb; font-size: 10.5px; line-height: 1.5; }
.config-params-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.config-params-grid .field { min-width: 0; margin-top: 0; }
.origin-status-card { margin-bottom: 17px; padding: 12px 14px; background: #151515; border: 1px solid #343434; border-radius: 10px; }
.origin-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.origin-status-title { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 11.5px; font-weight: 700; }
.btn-compact { min-height: 26px !important; height: 26px; padding: 0 10px !important; font-size: 10.5px !important; }
.cfg-sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 7px; color: #f4f4f4; font-size: 12px; font-weight: 700; }
.cfg-sec-title.compact { margin: 0 0 6px; }
.cfg-sec-title.inbound-title { margin-top: 16px; }
.btn-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; color: #eee; background: #1a1a1a; border: 1px solid #414141; border-radius: 6px; font-size: 10px; }
.btn-copy:hover { background: #242424; border-color: #666; }
.code-block-wrap { overflow: hidden; margin-bottom: 12px; border: 1px solid #363636; border-radius: 8px; background: #0d0d0d; }
.code-block-wrap.compact { margin: 0; }
.code-head { padding: 7px 10px; color: #aeb4bb; background: #161616; border-bottom: 1px solid #2d2d2d; font-family: var(--font-mono); font-size: 10px; overflow-wrap: anywhere; }
.code-body { display: block; max-height: 190px; margin: 0; padding: 11px 12px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #e5e5e5; background: #0b0b0b; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5; }
.config-command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 16px; }
.cfg-tabs { display: flex; gap: 6px; margin-bottom: 8px; padding: 4px; background: #151515; border: 1px solid #343434; border-radius: 8px; }
.cfg-tab { flex: 1; min-height: 30px; color: #aeb4bb; background: transparent; border: 0; border-radius: 5px; font-size: 11px; cursor: pointer; }
.cfg-tab.active { color: #111; background: #fff; font-weight: 700; }
.config-help-text { margin-top: 5px; color: #aeb4bb; font-size: 10.5px; line-height: 1.45; }
.cfg-title-actions, .config-footer-actions { display: flex; align-items: center; gap: 8px; }
.config-modal-foot { justify-content: space-between; }
.remna-matrix { margin-top: 10px; padding: 11px 14px; background: #171717; border: 1px solid #363636; border-radius: 8px; }
.remna-matrix-title { margin-bottom: 7px; color: #fff; font-size: 11px; font-weight: 700; }
.remna-matrix-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; color: #ddd; font-size: 10.5px; }
.remna-matrix-grid span { color: #aeb4bb !important; }
.remna-matrix-grid b { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .arch-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-arrow { display: none; }
  .config-params-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-modal-foot { align-items: stretch; flex-direction: column; }
  .config-footer-actions { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .config-modal .modal-body { padding: 15px; }
  .config-command-grid, .config-params-grid, .remna-matrix-grid { grid-template-columns: 1fr; }
  .arch-flow { grid-template-columns: 1fr; }
  .config-footer-actions .btn { flex: 1 1 100%; }
}

.project-ip-cell { min-width: 145px; }
.user-admin-panel, .user-projects-panel { margin-top: 16px; }
.user-create-form { display:grid; grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) auto; align-items:end; gap:10px; margin-top:16px; }
.user-create-form label, .creditClientForm label, .user-project-row label { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:11px; }
.user-create-form input, .creditClientForm input, .user-project-row input, .user-project-row select { height:36px; padding:0 10px; color:#fff; background:#101214; border:1px solid var(--border); border-radius:8px; }
.user-admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.user-admin-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.user-admin-card-head h2 { font-size:15px; overflow-wrap:anywhere; }
.user-admin-card-head > strong { color:#fff; white-space:nowrap; }
.client-credentials { display:grid; gap:9px; margin-top:16px; padding:13px; border:1px solid #343434; border-radius:10px; background:#101010; }
.client-credential-line { display:flex; justify-content:space-between; align-items:center; gap:12px; min-width:0; font-size:11px; color:var(--muted); }
.client-credential-line code { display:block; max-width:70%; overflow-wrap:anywhere; text-align:right; color:#f5f5f5; font-size:12px; }
.credential-obscured { filter:blur(5px); user-select:none; pointer-events:none; }
.client-credentials .btn { justify-self:start; min-height:36px; }
.client-credentials small { color:var(--muted2); font-size:11px; line-height:1.5; }
.resetClientPasswordForm { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; margin-top:12px; }
.resetClientPasswordForm label { display:flex; flex-direction:column; gap:6px; min-width:0; color:var(--muted); font-size:11px; }
.resetClientPasswordForm input { width:100%; min-width:0; height:36px; padding:0 10px; color:#fff; background:#101214; border:1px solid var(--border); border-radius:8px; }
.resetClientPasswordForm button { min-height:36px; }
.creditClientForm { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; margin-top:18px; }
.user-project-list { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.user-project-row { display:grid; grid-template-columns:minmax(150px,1.2fr) minmax(120px,.8fr) minmax(140px,1fr) minmax(180px,1fr); gap:12px; align-items:end; padding:12px; background:#111316; border:1px solid var(--border); border-radius:10px; }
.user-project-name { display:flex; flex-direction:column; gap:5px; min-width:0; }
.user-project-name strong { overflow-wrap:anywhere; }
.user-project-name small, .user-project-quota small, .billing-row small { color:var(--muted2); font-size:10px; }
.user-project-quota { display:flex; flex-direction:column; gap:5px; }
.grantQuotaForm { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
.traffic-purchase { display:grid; grid-template-columns:minmax(190px,1.2fr) minmax(160px,1fr) 130px 130px auto; gap:12px; align-items:end; margin-top:18px; padding:16px; border:1px solid var(--border); background:#111316; border-radius:12px; }
.traffic-purchase h3 { margin:0; font-size:14px; }
.traffic-purchase p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.traffic-purchase label { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:11px; }
.traffic-purchase input, .traffic-purchase select { height:36px; padding:0 10px; color:#fff; background:#0d0f11; border:1px solid var(--border); border-radius:8px; }
.traffic-purchase-total { color:var(--muted); font-size:11px; white-space:nowrap; }
.traffic-purchase-total strong { display:block; color:#fff; font-size:17px; margin-top:5px; }
.billing-history { margin-top:18px; }
.billing-history h3 { margin:0 0 10px; font-size:14px; }
.billing-history > p { color:var(--muted); font-size:12px; }
.billing-row { display:flex; justify-content:space-between; padding:10px 0; border-top:1px solid var(--border); color:#ddd; font-size:12px; }
.billing-row span { display:flex; flex-direction:column; gap:4px; }
@media (max-width:900px) { .user-create-form, .traffic-purchase { grid-template-columns:1fr 1fr; } .traffic-purchase > :first-child { grid-column:1/-1; } .user-admin-grid { grid-template-columns:1fr 1fr; } .user-project-row { grid-template-columns:1fr 1fr; } }
@media (max-width:600px) { .user-create-form, .traffic-purchase, .user-admin-grid, .user-project-row { grid-template-columns:1fr; } .traffic-purchase > :first-child { grid-column:auto; } }
@media (max-width:600px) { .resetClientPasswordForm { grid-template-columns:1fr; } .resetClientPasswordForm button { min-height:44px; } }
.project-details-modal .modal-foot .btn { min-height: 36px; padding: 8px 11px; font-size: 11px; }
.project-details-modal .modal-foot .btn[data-close] { margin-left: auto; }
.project-details-modal .modal-foot .btn[data-action="migrate-from-details"] {
  background: #242424 !important; border-color: #515151 !important; color: #fff;
}
.project-details-modal .content-access-box {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 17px 19px; margin-bottom: 23px; background: #1b1b1b;
  border: 1px solid #3c3c3c; border-radius: 12px;
}
.project-details-modal .content-access-box.is-paused { border-color: #7d6130; }
.project-details-modal .content-access-box > div { min-width: 0; }
.project-details-modal .content-access-box > div > div:first-child { flex-wrap: wrap; }
.project-details-modal .content-access-box .btn { flex: 0 0 auto; }
.project-details-modal .detail-description { margin-top: 6px; color: #aeb4bb; font-size: 11.5px; line-height: 1.5; }
.project-details-modal .detail-description code { color: #e8e8e8 !important; }
.project-details-modal .detail-section-heading {
  margin: 0 0 12px; color: #f7f7f7; font-size: 14px; letter-spacing: -.01em;
}
.project-details-modal .review-box {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px; margin-bottom: 23px;
}
.project-details-modal .review-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  min-width: 0; min-height: 75px; padding: 12px 14px;
  background: #1b1b1b; border: 1px solid #353535; border-radius: 9px;
}
.project-details-modal .review-item > span { color: #9da2a8; font-size: 11px; line-height: 1.25; }
.project-details-modal .review-item > strong {
  color: #f4f4f4; font-size: 12.5px; font-weight: 600; line-height: 1.45;
  overflow-wrap: anywhere; min-width: 0;
}
.project-details-modal .review-item > strong.mono { font-size: 11px; color: #ececec !important; }
.project-details-modal .review-item .badge { vertical-align: middle; }
.project-details-modal .vps-setup-block,
.project-details-modal .latency-lab-block {
  margin: 0 0 15px; padding: 18px 19px; background: #181818;
  border: 1px solid #353535; border-radius: 12px;
}
.project-details-modal .detail-section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 15px;
}
.project-details-modal .detail-section-head h3 { line-height: 1.4; }
.project-details-modal .detail-section-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.project-details-modal .detail-endpoints { margin-bottom: 13px; }
.project-details-modal .detail-endpoints .review-item { min-height: 70px; background: #131313; }
.project-details-modal .detail-note {
  margin-bottom: 14px; padding: 11px 13px; border: 1px solid #464646;
  border-radius: 9px; background: #242424; color: #d2d2d2;
  font-size: 11.5px; line-height: 1.5;
}
.project-details-modal .origin-status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.project-details-modal .origin-status-item {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 12px 14px; background: #111; border: 1px solid #343434; border-radius: 9px;
}
.project-details-modal .origin-status-item > span { color: #aeb4bb; font-size: 11px; }
.project-details-modal .origin-status-item > strong { font-size: 12px; overflow-wrap: anywhere; }
.project-details-modal .origin-alert-redirect {
  margin-top: 12px; padding: 12px 14px; border: 1px solid #7b6335;
  background: #2b2519; color: #f3d795; border-radius: 9px;
  font-size: 11.5px; line-height: 1.55;
}
.project-details-modal .origin-alert-redirect code { overflow-wrap: anywhere; }
.project-details-modal .latency-lab-block .live-dot { background: #e0e0e0 !important; }
.project-details-modal .telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 14px;
}
.project-details-modal .telemetry-card { min-width: 0; padding: 11px 12px; border: 1px solid #343434; border-radius: 9px; background: #151515; }
.project-details-modal .telemetry-card .t-label { color: #aeb4bb; font-size: 10.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-details-modal .telemetry-card .t-val { margin-top: 7px; color: #f4f4f4; font-size: 17px; font-weight: 700; line-height: 1.1; }
.project-details-modal .telemetry-card .t-sub { margin-top: 4px; color: #777d85; font-size: 10px; }
.project-details-modal .line-chart {
  display: block;
  width: 100%;
  height: 125px;
  background: #0d0f12;
  border: 1px solid #282c34;
  border-radius: 9px;
  padding: 6px 10px;
}
.line-chart line.grid {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-dasharray: 4 4;
}
.line-chart .axis-label {
  fill: #64748b;
  font-size: 10.5px;
  font-family: var(--font-mono);
}

/* Provision List & Timeline in Project Details */
.provision-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.prov-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #14161a;
  border: 1px solid #262a32;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.15s;
}
.prov-row:hover {
  background: #191c22;
  border-color: rgba(255, 255, 255, 0.12);
}
.prov-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 10px;
  font-weight: 700;
}
.prov-row.error .prov-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.prov-row.active .prov-icon {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}
.prov-row > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
}
.prov-row strong {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prov-row span {
  color: #717d8e;
  font-family: var(--font-mono);
  font-size: 11px;
  flex-shrink: 0;
}
.prov-row.done {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.06);
}
.prov-row.done .prov-icon {
  background: rgba(34, 197, 94, 0.22);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
}
.prov-row.deleting {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
}
.prov-row.deleting .prov-icon {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
  animation: provSpin 0.9s linear infinite;
}
.prov-row.error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}
.prov-row.error .prov-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}
@keyframes provSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.delete-progress-wrap {
  margin: 14px 0 10px;
  padding: 12px;
  background: #101216;
  border: 1px solid #232730;
  border-radius: 10px;
}
.delete-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.delete-progress-header strong {
  color: #f1f5f9;
}
.delete-progress-bar {
  width: 100%;
  height: 6px;
  background: #1a1d24;
  border-radius: 999px;
  overflow: hidden;
}
.delete-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}
.delete-progress-fill.error {
  background: linear-gradient(90deg, #f97316, #ef4444);
}
.delete-progress-fill.is-running {
  background: linear-gradient(90deg, #303841, #7a8793, #303841);
  background-size: 200% 100%;
  animation: deleteProgressBusy 1.5s linear infinite;
}
@keyframes deleteProgressBusy { to { background-position: -200% 0; } }
.project-delete-modal .prov-row > div { min-width:0; }
.project-delete-modal .prov-row > div > span { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:right; }
.project-delete-modal .prov-row.preserved { border-color:#6d603c; background:#27241b; }
.project-delete-modal .prov-row.preserved .prov-icon { color:#e6c671; border-color:#8a7440; background:#413721; }
.project-delete-modal .prov-row.skipped .prov-icon { color:#aaa; border-color:#555; background:#242424; }
.delete-preserved-card { margin-top:12px; padding:12px; border:1px solid #6d603c; border-radius:8px; background:#27241b; color:#e9dbb5; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.delete-preserved-card strong { display:block; color:#f4e3af; margin-bottom:5px; }
.delete-error-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #722736;
  border-radius: 8px;
  background: #200d14;
  font-size: 12px;
  color: #ffb5c1;
  line-height: 1.5;
}
.delete-error-card strong {
  display: block;
  color: #ff6f86;
  margin-bottom: 4px;
}
@media (max-width: 760px) {
  .project-details-modal .modal-head { padding: 18px; }
  .project-details-modal .modal-body { padding: 18px; }
  .project-details-modal .modal-foot { padding: 12px 18px; }
  .project-details-modal .review-box { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-details-modal .detail-section-head { flex-direction: column; }
  .project-details-modal .detail-section-actions { justify-content: flex-start; }
  .project-details-modal .telemetry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .modal-backdrop:has(.project-details-modal) { padding: 8px; }
  .project-details-modal { max-height: 96vh; }
  .project-details-modal .review-box { grid-template-columns: 1fr; }
  .project-details-modal .origin-status-grid { grid-template-columns: 1fr; }
  .project-details-modal .content-access-box { flex-direction: column; align-items: stretch; }
  .project-details-modal .content-access-box .btn { align-self: flex-start; }
  .project-details-modal .telemetry-grid { grid-template-columns: 1fr; }
  .project-details-modal .modal-foot .btn { flex: 1 1 auto; }
  .project-details-modal .modal-foot .btn[data-close] { margin-left: 0; }
}

.page {
  margin-bottom: 40px;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 31px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.page-title-row p {
  color: var(--muted);
  font-size: 14px;
  margin: 7px 0 0;
}

.content-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #121417, #0f1113);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head h2, .panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.panel-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
  gap: 12px;
}

.spacer {
  flex: 1;
}

.select-lite {
  height: 36px;
  border-radius: 9px;
  background: #0f1012;
  border: 1px solid var(--border);
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.select-lite:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Account Cards Grid */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.account-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #121417, #0f1113);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.account-card:hover {
  border-color: #3b414a;
}

.account-card.add {
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.015);
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.account-card.add:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: #525a66;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.account-meta h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.account-meta p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
}

.account-stat {
  display: flex;
  flex-direction: column;
}

.account-stat span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-stat strong {
  font-size: 14px;
  margin-top: 4px;
  color: #fff;
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-section {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #121417, #0f1113);
  border-radius: var(--r);
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

/* Project Cell in Tables */
.project-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.node-orb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.project-title {
  font-weight: 600;
  color: #fff;
  font-size: 13px;
}

.project-note {
  font-size: 11px;
  color: var(--muted);
}

.cert {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.mws-pill {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mws-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
}

.yandex-pill {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.yandex-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fc3f1d;
}

.badge-lite {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.badge-lite.success {
  color: var(--ok);
  border-color: rgba(98, 217, 149, 0.3);
  background: var(--ok-bg);
}

.log-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.log-pill.info {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
}

.log-pill.success {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.log-pill.warn, .log-pill.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.log-pill.error {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Custom Checkbox */
.custom-check {
  accent-color: #fff;
  cursor: pointer;
}
/* Migration Stepper */
.migration-stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.migration-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1012;
  font-size: 13px;
}

.migration-step-item.active {
  border-color: #fff;
  background: var(--panel2);
}

.migration-step-item.done {
  border-color: rgba(98, 217, 149, 0.3);
}

.migration-step-item.failed {
  border-color: rgba(255, 107, 107, 0.4);
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.migration-step-item.active .step-circle {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.migration-step-item.done .step-circle {
  background: var(--ok);
  color: #0b0c0e;
  border-color: var(--ok);
}

.migration-step-item.failed .step-circle {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.step-label {
  flex: 1;
  font-weight: 600;
}

.step-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.step-badge.pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.step-badge.running {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.step-badge.success {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.step-badge.error {
  background: var(--danger-bg);
  color: var(--danger);
}

/* --------------------------------------------------
   Circular Donut Chart (Operations & Infrastructure Status)
   -------------------------------------------------- */
.donut-wrap {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.donut {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  position: relative;
  box-shadow: 0 0 24px rgba(98, 217, 149, 0.08);
}

.donut::after {
  content: "";
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  position: absolute;
}

.donut-center {
  position: relative;
  z-index: 2;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.donut-center span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}

.status-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-item .left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.status-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-item strong {
  color: var(--text);
  font-family: var(--font-mono);
}

/* --------------------------------------------------
   Account-Grouped Projects & Filter Bar
   -------------------------------------------------- */
.account-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.filter-pill-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill-btn:hover {
  border-color: var(--border-focus);
  color: var(--text);
}

.filter-pill-btn.active {
  background: #ffffff;
  color: #0b0c0e;
  border-color: #ffffff;
  font-weight: 600;
}

.account-group-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 20px;
  overflow: hidden;
}

.account-group-card:last-child {
  margin-bottom: 0;
}

.account-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------
   Domain Pool: Attached Nodes & Subdomains Under Domain
   -------------------------------------------------- */
.domain-card-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 20px;
  overflow: hidden;
}

.domain-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.domain-subnodes-box {
  padding: 16px 20px;
}

.domain-subnodes-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.domain-subnode-row {
  display: grid;
  grid-template-columns: 180px 220px 140px 120px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  background: #0e1013;
  font-size: 12px;
}

.domain-subnode-row:last-child {
  margin-bottom: 0;
}

.domain-empty-hint {
  padding: 16px 20px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------
   Domain-Grouped Certificates
   -------------------------------------------------- */
.domain-cert-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 20px;
  overflow: hidden;
}

.domain-cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.account-offer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.country-flag-img { width: 34px; height: 25px; object-fit: cover; border: 1px solid #454a50; border-radius: 4px; flex: none; vertical-align: middle; }
.country-flag-img.country-flag-inline { width: 20px; height: 15px; margin-right: 3px; }
.account-offer-flag { font-size: 24px; line-height: 1; flex: none; }
.account-offer strong { display: block; color: #fff; font-size: 13px; }
.account-offer small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.account-offer-placeholder { line-height: 1.45; color: #aab1ba; }
.account-domain-summary { min-width: 0; margin: -5px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.account-domain-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.account-domain-options label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 10px; color: #e7e7e7; background: #16181a; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 12px; overflow-wrap: anywhere; }
.account-domain-options input { width: 16px; height: 16px; margin: 0; accent-color: #fff; flex: none; }
.slot-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.slot-controls > div { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #111315; }
.slot-controls strong { display: block; font-size: 13px; color: #fff; }
.slot-controls p { margin: 6px 0 12px; line-height: 1.4; }
.slot-form { display: flex; gap: 8px; }
.slot-form input, .slot-form select { min-width: 0; flex: 1; height: 38px; padding: 0 10px; color: #fff; background: #181a1c; border: 1px solid var(--border); border-radius: 8px; }
.slot-form .btn { min-height: 38px; white-space: nowrap; }
@media (max-width: 700px) { .slot-controls { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .slot-form { flex-direction: column; } }
.slot-inventory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 10px; margin-bottom: 16px; }
.slot-inventory-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 14px; background: #111315; border: 1px solid var(--border); border-radius: 11px; }
.slot-inventory-card > div { min-width: 0; flex: 1; }
.slot-inventory-card strong { display: block; color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.slot-inventory-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

/* --------------------------------------------------
   CDN Migration Module 2.0 Styles
   -------------------------------------------------- */
.migration-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.migration-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.migration-stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.migration-stat-card .label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.migration-stat-card .value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.migration-stat-card .sub {
  font-size: 11px;
  color: var(--muted);
}

.migration-job-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.migration-job-card.needs-confirmation {
  border-color: #ff9a45;
  background: linear-gradient(180deg, rgba(255, 154, 69, 0.05) 0%, var(--panel) 100%);
}

.migration-job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.migration-job-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.migration-route-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.migration-progress-wrap {
  margin: 14px 0 10px 0;
}

.migration-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.migration-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.migration-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.migration-progress-fill.needs-confirmation {
  background: linear-gradient(90deg, #ff9a45, #f59e0b);
}

.migration-actions-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.migration-logs-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: #0b0d10;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.6;
}

.migration-logs-box .log-row {
  display: flex;
  gap: 10px;
}

.migration-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 14px;
}

.migration-diff-table th,
.migration-diff-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.migration-diff-table th {
  background: var(--panel2);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-mini.cyan {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-mini.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-mini.green {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-mini.red {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Custom Checkbox for Migration Wizard */
.wizard-project-check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  vertical-align: middle;
  outline: none;
}

.wizard-project-check:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.wizard-project-check:checked {
  background: #22c55e;
  border-color: #22c55e;
}

.wizard-project-check:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4.5px;
  height: 8.5px;
  border: solid #0b0c0e;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.wizard-project-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.wizard-project-row.selected {
  background: rgba(34, 197, 94, 0.04);
}

/* --------------------------------------------------
   Logs Module 2.0 Styles (Filtering, Sorting, Pagination)
   -------------------------------------------------- */
.logs-toolbar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
}

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

.logs-search-input {
  background: #090b0e;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 260px;
  transition: border-color 0.15s;
}

.logs-search-input:focus-within {
  border-color: #38bdf8;
}

.logs-search-input input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12px;
  width: 100%;
  font-family: inherit;
}

.logs-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-table-container {
  max-height: 600px;
  overflow-y: auto;
  position: relative;
  background: #090b0e;
}

.logs-table-modern {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.logs-table-modern th {
  position: sticky;
  top: 0;
  background: #0e1116;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}

.logs-table-modern td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.logs-table-modern tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.logs-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--panel2);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.logs-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.logs-live-badge.paused {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.logs-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 1.8s infinite;
}

.logs-live-badge.paused .logs-live-dot {
  background: #f59e0b;
  animation: none;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Mobile shell and dense data views */
.admin-menu-toggle,.admin-nav-scrim { display:none; }
@media (max-width:1000px) {
  .admin-menu-toggle { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; color:#fff; background:#191919; border:1px solid #414141; border-radius:10px; cursor:pointer; }
  .layout { display:block; }
  .side { display:none; }
  .side.is-open { display:block; position:fixed; z-index:82; top:0; bottom:0; left:0; width:min(280px,calc(100vw - 48px)); overflow-y:auto; padding:26px 16px; background:#131313; border-right:1px solid #444; box-shadow:18px 0 50px rgba(0,0,0,.5); }
  .side.is-open + .admin-nav-scrim { display:block; position:fixed; z-index:81; inset:0; width:100%; height:100%; background:rgba(0,0,0,.65); border:0; }
  .main { min-width:0; padding:22px 0 60px; }
  .topbar { height:auto; min-height:64px; gap:10px; }
  .top-actions { min-width:0; margin-left:auto; gap:7px; }
  .top-actions > a.btn,.top-actions .profile-copy,.top-actions .mode-pill,.top-actions .system-pill { display:none; }
  .head { flex-wrap:wrap; }
  .head h1 { font-size:clamp(23px,4vw,31px); }
  .row:not(.headrow) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; margin:8px; padding:14px; border:1px solid #393939; border-radius:12px; }
  .row.headrow { display:none; }
  .row:not(.headrow) > * { min-width:0; overflow-wrap:anywhere; }
  .row:not(.headrow) > :first-child { grid-column:1/-1; font-size:15px; }
  .row:not(.headrow) > :nth-child(3),.row:not(.headrow) > :nth-child(4) { display:block; }
  .row:not(.headrow) > .row-actions { grid-column:1/-1; justify-content:flex-start; flex-wrap:wrap; border-top:1px solid #343434; padding-top:10px; }
  .row-action { width:44px; height:44px; }
  .table { overflow:visible; }
  .table-wide { display:block; }
  .table-wide thead { display:none; }
  .table-wide tbody { display:grid; gap:9px; }
  .table-wide tr { display:grid; min-width:0; padding:10px; background:#171717; border:1px solid #393939; border-radius:11px; }
  .table-wide td { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; min-width:0; padding:7px 5px; font-size:12px; overflow-wrap:anywhere; }
  .table-wide td:before { content:attr(data-label); flex:0 0 38%; color:#a4a4a4; font-size:11px; }
  .table-wide td[colspan]:before { display:none; }
  .table-wide td > * { min-width:0; max-width:100%; }
  .modal-backdrop { padding:8px; }
  .modal,.project-details-modal,.config-modal { width:100%; max-width:100%; max-height:calc(100dvh - 16px); }
  .modal-head,.project-details-modal .modal-head { padding:15px 17px; gap:10px; }
  .modal-body,.project-details-modal .modal-body { min-width:0; padding:16px; overscroll-behavior:contain; }
  .modal-foot,.project-details-modal .modal-foot { padding:12px 16px calc(12px + env(safe-area-inset-bottom)); flex-wrap:wrap; }
  .modal-foot .btn { min-height:44px; white-space:normal; }
  .modal-close { flex:0 0 44px; width:44px; height:44px; margin:-8px; }
  .code-body,.node-terminal-box,pre,code { max-width:100%; overflow-wrap:anywhere; }
}
@media (max-width:650px) {
  .shell { width:calc(100% - 20px); }
  .topbar .brand-text small { display:none; }
  .topbar .brand-text { font-size:13px; }
  .top-actions > .btn.white,.top-actions > [data-action="open-create"] { display:none; }
  .head { gap:10px; }
  .head > * { min-width:0; }
  .cards,.metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid2,.nodegrid,.user-admin-grid { grid-template-columns:1fr; }
  .project-details-modal .review-box,.project-details-modal .origin-status-grid { grid-template-columns:1fr; }
  .project-details-modal .content-access-box { flex-wrap:wrap; padding:14px; }
  .project-details-modal .detail-section-head { flex-wrap:wrap; }
  .project-details-modal .detail-section-actions { justify-content:flex-start; }
  .public-link-actions,.config-command-grid,.remna-matrix-grid { grid-template-columns:1fr; }
  .modal-foot .btn { flex:1 1 auto; }
  .modal-body input,.modal-body select,.modal-body textarea { max-width:100%; }
  .notif-dropdown { max-width:calc(100vw - 20px); right:0; }
}
@media (max-width:390px) {
  .top-actions .profile { min-width:0; width:44px; padding:0; border:0; background:transparent; }
  .top-actions .profile .avatar,.top-actions .btn-logout span { display:none; }
  .top-actions .btn-logout { width:44px; height:44px; padding:0; display:grid; place-items:center; }
  .cards,.metrics { grid-template-columns:1fr; }
  .row:not(.headrow) { grid-template-columns:1fr; }
  .row:not(.headrow) > * { grid-column:1/-1; }
}
@media (prefers-reduced-motion:reduce) { .modal,.row-action,.btn { animation:none !important; transition:none !important; } }

/* --------------------------------------------------
   Dedicated Node Console 1.0 Styles
   -------------------------------------------------- */
.node-console-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.node-console-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.node-console-tab-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s;
}

.node-console-tab-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.node-console-tab-btn.active {
  background: #fff;
  color: #0b0c0e;
  border-color: #fff;
  font-weight: 600;
}

.node-console-tab-btn.active .live-dot {
  background: #0b0c0e;
}

.node-terminal-box {
  background: #07090c;
  border: 1px solid #1f242c;
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.node-terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #0f1217;
  border-bottom: 1px solid #1f242c;
  flex-wrap: wrap;
  gap: 10px;
}

.node-terminal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.node-terminal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.node-terminal-screen {
  padding: 16px 20px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #cbd5e1;
  min-height: 400px;
  max-height: 520px;
  overflow-y: auto;
  background: #07090c;
}

.node-terminal-screen::-webkit-scrollbar {
  width: 6px;
}
.node-terminal-screen::-webkit-scrollbar-thumb {
  background: #252a34;
  border-radius: 3px;
}

.console-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.console-entry .c-time {
  color: #64748b;
  font-size: 11px;
  flex-shrink: 0;
}

.console-entry .c-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.console-entry .c-tag.xhttp { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.console-entry .c-tag.tls { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.console-entry .c-tag.dns { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.console-entry .c-tag.edge { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.console-entry .c-tag.net { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.console-entry .c-tag.admin { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.console-entry .c-tag.err { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.console-entry .c-tag.cmd { background: rgba(255, 255, 255, 0.12); color: #f1f5f9; border: 1px solid rgba(255, 255, 255, 0.2); }

.console-entry .c-msg {
  color: #e2e8f0;
  word-break: break-all;
}

.node-terminal-inputbar {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  background: #0c0f14;
  border-top: 1px solid #1f242c;
  gap: 10px;
}

.node-terminal-prompt {
  font-family: monospace;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 700;
  flex-shrink: 0;
}

.node-terminal-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-family: monospace;
  font-size: 12px;
  color: #fff;
}

@media (max-width:650px) {
  #main .page-title-row,#main .head { flex-wrap:wrap; }
  #main .page-title-row > *,#main .head > * { min-width:0; max-width:100%; }
  #main .page-title-row .btn,#main .head .btn { min-height:44px; white-space:normal; }
  #main .account-grid { grid-template-columns:minmax(0,1fr); }
  #main .account-card { min-width:0; padding:15px; }
  #main .migration-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #main .migration-stat-card { min-width:0; padding:12px; overflow-wrap:anywhere; }
  #main .migration-header-actions { flex-wrap:wrap; }
  #main .logs-toolbar-wrap,#main .logs-filters-group { min-width:0; flex-wrap:wrap; }
  #main .logs-search-input { width:100%; min-width:0; }
  #main .logs-toolbar-wrap > div { min-width:0; max-width:100%; flex-wrap:wrap; }
  #main .logs-toolbar-wrap .btn { min-height:44px; }
  #main .cards,#main .metrics { grid-template-columns:minmax(0,1fr) !important; }
  #main .logs-pagination-bar { flex-wrap:wrap; gap:10px; padding:12px; }
  #main .logs-pagination-bar > * { min-width:0; max-width:100%; }
  #main .page > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns:minmax(0,1fr) !important; }
  #main .content-card { min-width:0; padding:15px; }
  #main .content-card .panel-head { flex-wrap:wrap; gap:10px; }
  #main .content-card .panel-head > div { min-width:0; max-width:100%; flex-wrap:wrap; }
  #main .content-card .modal-body { padding:0; }
  #main .content-card .form-grid { grid-template-columns:minmax(0,1fr) !important; }
  #main .content-card input,#main .content-card select { min-width:0; max-width:100%; }
  #main .content-card .field > div { min-width:0; max-width:100%; flex-wrap:wrap; }
  .node-terminal-screen { min-height:220px; padding:12px; }
  .node-terminal-inputbar { padding:10px; }
  .node-terminal-input { min-width:0; }
}
@media (max-width:390px) {
  #main .migration-stats-grid { grid-template-columns:1fr; }
}

/* Terminal content may contain long, unbroken hostnames; keep it inside the page. */
@media (min-width:901px) {
  .layout { grid-template-columns:230px minmax(0,1fr); }
}
.layout,.main,#main .page,.node-console-wrap,.node-terminal-box,.node-terminal-header,.node-terminal-screen,.node-terminal-inputbar { min-width:0; }
.node-console-wrap,.node-terminal-box,.node-console-tabs-bar { max-width:100%; width:100%; }
.node-terminal-screen { overflow-x:auto; }
.node-terminal-title { min-width:0; flex-wrap:wrap; overflow-wrap:anywhere; }
.node-terminal-input { min-width:0; }

/* Dashboard Monitoring chart and per-node legend. */
.dashboard-traffic { min-width:0; }
.dashboard-traffic .chart { height:190px; margin-top:12px; }
.dashboard-traffic .line-chart { display:block; width:100%; height:100%; }
.dashboard-traffic-legend { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:12px; }
.dashboard-traffic-legend span { min-width:0; display:inline-flex; align-items:center; gap:6px; color:#ddd; font-size:11px; }
.dashboard-traffic-legend i { width:8px; height:8px; flex:0 0 8px; border-radius:50%; }
.dashboard-traffic-legend b { font-weight:600; overflow-wrap:anywhere; }
.dashboard-traffic-legend small { color:#999; white-space:nowrap; }
.dashboard-chart-empty { display:grid; place-items:center; min-height:100%; padding:14px; text-align:center; color:#aaa; font-size:12px; }
@media (max-width:650px) { .dashboard-traffic-legend span { width:calc(50% - 8px); flex-wrap:wrap; } }

/* Modular Top Header Menu for Node Modal */
.node-modal-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background: #14171d;
  border: 1px solid #2b303b;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.node-modal-nav::-webkit-scrollbar {
  display: none;
}
.node-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #8e96a4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.node-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}
.node-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}
.node-pane {
  display: none;
}
.node-pane.active {
  display: block;
  animation: nodePaneIn 0.18s ease forwards;
}
@keyframes nodePaneIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Node Holders (Collapsible Sections) & Quick Quota Editor */
.node-holder {
  margin-bottom: 10px;
  border: 1px solid #2d3139;
  border-radius: 10px;
  background: #15171b;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.node-holder[open] {
  border-color: #3b82f6;
}
.node-holder-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  cursor: pointer;
  user-select: none;
  background: #1c1f26;
  list-style: none;
  transition: background 0.15s ease;
}
.node-holder-summary::-webkit-details-marker {
  display: none;
}
.node-holder-summary:hover {
  background: #232832;
}
.node-holder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
}
.node-holder-badge {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  font-weight: 500;
}
.node-holder-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  transition: transform 0.2s ease;
}
.node-holder[open] .node-holder-chevron {
  transform: rotate(90deg);
  color: #38bdf8;
}
.node-holder-content {
  padding: 16px;
  background: #131518;
  border-top: 1px solid #252932;
}

/* Primary compact summary row */
.node-primary-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.node-primary-pill {
  padding: 9px 12px;
  background: #181a1f;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.node-primary-pill span {
  font-size: 10.5px;
  color: #8e95a2;
}
.node-primary-pill strong {
  font-size: 12px;
  color: #f1f5f9;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .node-primary-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Quick Quota Card inside Node Modal */
.node-quota-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #1e222b 0%, #171920 100%);
  border: 1px solid #363c48;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.node-quota-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}
.node-quota-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
}
.node-quota-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}
.node-quota-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.node-quota-input-wrap {
  display: flex;
  align-items: center;
  background: #0d0f13;
  border: 1px solid #3c4352;
  border-radius: 8px;
  padding: 0 8px;
  height: 32px;
}
.node-quota-input {
  width: 70px;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #38bdf8;
  font-weight: 700;
  font-size: 13.5px;
  text-align: right;
  padding-right: 4px;
}
.node-quota-input-wrap span {
  color: #8e95a2;
  font-size: 11.5px;
  font-weight: 600;
}
.node-rem-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.node-rem-pill.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.node-rem-pill.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.node-rem-pill.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.quota-mini-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.quota-mini-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Compact project rows: status and actions stay in their own columns. */
.project-summary-table { overflow:visible; container:project-summary / inline-size; }
.project-summary-table .row > * { min-width:0; }
.project-summary-table .row > :nth-child(2),
.project-summary-table .row > :nth-child(3) { overflow:hidden; text-overflow:ellipsis; }
.project-summary-table .row > :nth-child(5) .pill {
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.25;
  vertical-align:middle;
}
.project-summary-table .row-actions { gap:5px; }
.project-summary-table .row-more { position:relative; flex:0 0 auto; }
.project-summary-table .row-more summary { list-style:none; }
.project-summary-table .row-more summary::-webkit-details-marker { display:none; }
.project-summary-table .row-more[open] summary { color:#fff; border-color:#777; }
.project-summary-table .row-more-menu {
  position:absolute;
  z-index:30;
  right:0;
  top:calc(100% + 7px);
  width:220px;
  padding:5px;
  background:#202124;
  border:1px solid #43454a;
  border-radius:10px;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}
.project-summary-table .row-more-menu button {
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-height:36px;
  padding:7px 9px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#ddd;
  text-align:left;
  font:inherit;
  font-size:11px;
  cursor:pointer;
}
.project-summary-table .row-more-menu button:hover,
.project-summary-table .row-more-menu button:focus-visible { background:#35363a; color:#fff; }
.project-summary-table .row-more-menu button.danger { color:#ff8d92; border-top:1px solid #3d3d3d; border-radius:0; margin-top:3px; }

@media (min-width:1001px) {
  .project-summary-table .row {
    grid-template-columns:minmax(90px,1fr) minmax(125px,1.2fr) minmax(85px,.85fr) minmax(82px,.72fr) minmax(112px,.9fr) 106px;
    gap:8px;
    padding:12px 13px;
  }
  .project-summary-table .row-action { width:30px; height:30px; }
}
@container project-summary (max-width:710px) {
  .project-summary-table .row.headrow { display:none; }
  .project-summary-table .row:not(.headrow) {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px 14px;
    margin:8px;
    padding:13px;
    border:1px solid #393939;
    border-radius:11px;
  }
  .project-summary-table .row:not(.headrow) > :first-child,
  .project-summary-table .row:not(.headrow) > :nth-child(2),
  .project-summary-table .row:not(.headrow) > .row-actions { grid-column:1/-1; }
  .project-summary-table .row:not(.headrow) > .row-actions {
    justify-content:flex-start;
    border-top:1px solid #393939;
    padding-top:9px;
  }
}

/* Project creation: keep technical configuration available without letting it
   dominate the VPS step or stretch the provisioning status column. */
.project-create-wizard { width:min(760px,100%); }
.project-create-wizard .modal-body { min-height:0; }
.project-create-wizard .steps { margin-bottom:18px; gap:16px; }
.project-create-wizard .step { min-width:0; }
.project-create-wizard .step-num { flex:0 0 22px; }
.node-setup-box { display:grid; gap:12px; min-width:0; }
.node-setup-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; min-width:0; }
.node-setup-kicker { display:block; color:#aaa; font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.node-setup-head h4 { margin:4px 0 5px; color:#fff; font-size:18px; line-height:1.25; }
.node-setup-head p { margin:0; color:#aeb4bb; font-size:12px; line-height:1.5; }
.node-setup-port { flex:0 0 auto; padding:7px 9px; border:1px solid #3b3b3b; border-radius:8px; color:#cdd2d8; font:11px var(--font-mono); }
.node-setup-checkline { display:grid; grid-template-columns:1.2fr 1fr .85fr; border:1px solid #383838; border-radius:10px; background:#1b1b1b; }
.node-setup-checkline > div { min-width:0; padding:12px; border-right:1px solid #383838; }
.node-setup-checkline > div:last-child { border-right:0; }
.node-setup-checkline span { display:block; margin-bottom:6px; color:#aeb4bb; font-size:10px; }
.node-setup-checkline strong { display:block; color:#f3f3f3; font:600 11px/1.45 var(--font-mono); overflow-wrap:anywhere; }
.node-panel-switch { display:flex; align-items:center; gap:5px; padding:4px; border:1px solid #3a3a3a; border-radius:9px; background:#191919; width:max-content; max-width:100%; }
.node-panel-switch > span { padding:0 9px; color:#aaa; font-size:11px; }
.node-panel-switch button { min-height:32px; padding:5px 12px; border:0; border-radius:6px; background:transparent; color:#bfc3c9; font-family:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.node-panel-switch button.active { color:#fff; background:#393939; }
.config-step-card { min-width:0; border:1px solid #393939; border-radius:10px; background:#1b1b1b; overflow:hidden; }
.config-step-header { display:flex; align-items:center; gap:12px; min-width:0; padding:12px 13px; }
.config-step-number { flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center; border:1px solid #4b4b4b; border-radius:8px; color:#e9e9e9; font:600 11px var(--font-mono); }
.config-step-description { min-width:0; flex:1; }
.config-step-title { color:#f4f4f4; font-size:12px; font-weight:700; }
.config-step-sub { margin-top:3px; color:#9ca3aa; font-size:10.5px; line-height:1.35; overflow-wrap:anywhere; }
.config-copy-btn { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:32px; padding:6px 10px; border:1px solid #555; border-radius:7px; background:#2c2c2c; color:#fff; font-family:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.config-copy-btn:hover { background:#393939; }
.config-step-details { border-top:1px solid #333; }
.config-step-details summary { padding:9px 13px; color:#b9c0c8; font-size:11px; cursor:pointer; }
.config-step-details summary:hover { color:#fff; }
.config-code-pre { box-sizing:border-box; max-height:260px; margin:0; padding:13px; overflow:auto; background:#111; border-top:1px solid #333; color:#d7e0e9; font:11px/1.5 var(--font-mono); white-space:pre; overflow-wrap:normal; }
.config-code-pre code { white-space:inherit; overflow-wrap:inherit; }
.node-verify-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; margin-top:4px; padding:13px; border:1px solid #3f4b46; border-radius:10px; background:#1c2420; }
.node-status-text { min-width:0; color:#c5cec8; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.node-status-text .ok { color:#7be2ac; }
.btn-check-node { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:8px 13px; border:1px solid #9fa8a1; border-radius:8px; background:#e8f3eb; color:#101511; font-weight:700; font-size:11px; cursor:pointer; }
.btn-check-node:disabled { opacity:.55; cursor:wait; }
.project-create-wizard .provision-list { gap:6px; }
.project-create-wizard .prov-row { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:10px 12px; align-items:start; padding:11px 13px; }
.project-create-wizard .prov-row:not(.done):not(.active):not(.error) .prov-icon { background:#242424; border-color:#444; color:#a5abb0; }
.project-create-wizard .prov-main { display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-width:0; }
.project-create-wizard .prov-main strong { max-width:100%; color:#f2f2f2; font-size:12px; font-weight:700; white-space:normal; }
.project-create-wizard .prov-main span { color:#aeb4bb; font:10.5px/1.4 var(--font-mono); white-space:normal; overflow-wrap:anywhere; }
.project-create-wizard .prov-state { display:block; min-width:0; flex:none; justify-self:end; color:#dce2e0; font-family:inherit; font-size:11px; font-weight:600; line-height:1.4; white-space:normal; text-align:right; }
.project-create-wizard .prov-row.error .prov-state { color:#ff9d9d; }
.project-create-wizard .prov-error-detail { grid-column:2/-1; min-width:0; margin:0; padding-top:6px; border-top:1px solid rgba(255,120,120,.2); color:#ffc4c4; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.project-create-wizard .prov-error-detail[hidden] { display:none; }
@media(max-width:650px) {
  .project-create-wizard .steps { gap:8px; flex-wrap:wrap; }
  .project-create-wizard .step { font-size:10px; }
  .node-setup-head { flex-direction:column; gap:9px; }
  .node-setup-checkline { grid-template-columns:1fr; }
  .node-setup-checkline > div { border-right:0; border-bottom:1px solid #383838; padding:10px 12px; }
  .node-setup-checkline > div:last-child { border-bottom:0; }
  .config-step-header { flex-wrap:wrap; gap:8px; }
  .config-copy-btn { margin-left:auto; min-height:40px; }
  .node-verify-bar { flex-direction:column; align-items:stretch; }
  .btn-check-node { min-height:44px; }
  .project-create-wizard .prov-row { grid-template-columns:22px minmax(0,1fr); }
  .project-create-wizard .prov-state { grid-column:2; justify-self:start; text-align:left; }
  .project-create-wizard .prov-error-detail { grid-column:2; }
}
.origin-mode-filter{align-items:center}.origin-mode-filter .filter-caption{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-right:4px}

/* Isolated DIRECT_XHTTP test preparation */
.direct-test-head { align-items:flex-end; }
.direct-test-kicker { display:block; margin-bottom:8px; color:#6ca8ff; font-size:10px; font-weight:800; letter-spacing:.14em; }
.direct-test-head .btn:disabled { opacity:.58; cursor:default; }
.direct-test-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-top:22px; padding:22px; border:1px solid #303640; border-radius:16px; background:linear-gradient(120deg,#13171d,#101215 72%); box-shadow:0 18px 45px rgba(0,0,0,.22); }
.direct-test-hero.is-ready { border-color:#315647; }
.direct-test-hero-main { display:flex; align-items:center; gap:15px; min-width:0; }
.direct-test-icon { display:grid; place-items:center; flex:0 0 48px; width:48px; height:48px; border:1px solid #3d5878; border-radius:13px; color:#8abfff; background:#162131; }
.direct-test-label,.direct-card-title span { display:block; color:#858e99; font-size:9px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.direct-test-hero h2 { margin:4px 0 7px; font-size:22px; letter-spacing:-.03em; }
.direct-test-meta { display:flex; flex-wrap:wrap; gap:6px; }
.direct-test-meta span { padding:4px 7px; border:1px solid #30363e; border-radius:6px; color:#aab2bd; background:#171a1e; font:10px var(--font-mono); }
.direct-lock { display:flex; align-items:center; gap:10px; min-width:168px; padding:11px 13px; border:1px solid #584722; border-radius:11px; color:#f5c66f; background:#211c12; }
.direct-lock.unlocked { border-color:#663838; color:#ff8d8d; background:#251515; }
.direct-lock span { color:#a9a29a; font-size:10px; }
.direct-lock strong { display:block; margin-top:3px; color:currentColor; font-size:12px; letter-spacing:.08em; }
.direct-test-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.direct-test-card { min-width:0; padding:18px; border:1px solid var(--border); border-radius:14px; background:#111316; }
.direct-card-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.direct-card-title h3 { margin:4px 0 0; font-size:15px; }
.direct-port-block { display:grid; grid-template-columns:1fr auto; align-items:end; gap:2px 12px; padding:14px; border:1px solid #303b49; border-radius:11px; background:#121923; }
.direct-port-block span,.direct-target-list span,.manifest-owner span,.manifest-grid span { color:#808995; font-size:10px; }
.direct-port-block strong { grid-row:1/3; grid-column:2; color:#fff; font:700 25px var(--font-mono); }
.direct-port-block small { color:#637084; font-size:9px; }
.direct-target-list { margin-top:10px; border:1px solid #272b30; border-radius:10px; overflow:hidden; }
.direct-target-list>div { display:flex; align-items:center; justify-content:space-between; gap:15px; min-height:40px; padding:9px 12px; border-bottom:1px solid #25292e; }
.direct-target-list>div:last-child { border-bottom:0; }
.direct-target-list strong { color:#e5e8eb; font-size:11px; }
.direct-target-list strong.muted { color:#707780; font-weight:600; }
.manifest-owner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; padding:10px 12px; border:1px solid #2d3238; border-radius:9px; }
.manifest-owner code { max-width:68%; color:#c8d2df; font:10px var(--font-mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.manifest-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.manifest-grid>div { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; border:1px solid #252a2f; border-radius:8px; background:#0e1012; }
.manifest-grid strong { color:#6c7580; font:700 9px var(--font-mono); letter-spacing:.07em; }
.direct-state-card { margin-top:14px; }
.direct-state-flow { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.direct-state-step { position:relative; display:flex; align-items:center; gap:8px; min-width:0; padding:11px; border:1px solid #282d33; border-radius:9px; color:#676e77; background:#0e1012; }
.direct-state-step i { display:grid; place-items:center; flex:0 0 21px; width:21px; height:21px; border:1px solid #343a42; border-radius:50%; font:700 9px var(--font-mono); font-style:normal; }
.direct-state-step span { min-width:0; font:700 9px var(--font-mono); overflow:hidden; text-overflow:ellipsis; }
.direct-state-step.active { border-color:#4d759e; color:#c8e1ff; background:#14202d; }
.direct-state-step.done i { border-color:#347455; color:#79dda2; background:#14251c; }
.direct-state-note { margin:12px 0 0; color:#77808b; font-size:11px; line-height:1.5; }
.direct-orphan-card { margin-top:14px; padding:16px 18px; border:1px solid #624b24; border-radius:14px; background:#1d1911; }
.direct-orphan-card>div { display:flex; gap:10px; color:#e9b957; }
.direct-orphan-card strong { display:block; color:#f1d49b; font-size:12px; }
.direct-orphan-card span { display:block; margin-top:3px; color:#a89a7e; font-size:10px; }
.direct-orphan-card ul { display:grid; gap:6px; margin:13px 0 0; padding:0; list-style:none; }
.direct-orphan-card li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:9px 10px; border:1px solid #40351f; border-radius:8px; background:#15130f; }
.direct-orphan-card li code { color:#c9b98f; font:10px var(--font-mono); overflow:hidden; text-overflow:ellipsis; }
.direct-orphan-card li span { margin:0; }
.direct-orphan-card li b { color:#f0b957; font-size:9px; letter-spacing:.06em; }
@media(max-width:760px) {
  .direct-test-head,.direct-test-hero { align-items:stretch; flex-direction:column; }
  .direct-test-head .btn { width:100%; min-height:44px; }
  .direct-lock { width:100%; }
  .direct-test-grid { grid-template-columns:1fr; }
  .direct-state-flow { grid-template-columns:1fr 1fr; }
}
@media(max-width:430px) {
  .direct-test-hero,.direct-test-card,.direct-orphan-card { padding:14px; border-radius:12px; }
  .direct-test-hero-main { align-items:flex-start; }
  .direct-test-icon { flex-basis:40px; width:40px; height:40px; border-radius:10px; }
  .direct-test-hero h2 { font-size:18px; }
  .manifest-grid,.direct-state-flow { grid-template-columns:1fr; }
  .direct-orphan-card li { grid-template-columns:1fr; gap:4px; }
}
