:root {
  --bg: #050b14;
  --bg-top: #07101f;
  --panel: #0a1628;
  --panel-card: #0b172a;
  --panel-head: #0e1d33;
  --line: #1c3354;
  --line-soft: #152946;
  --line-hard: #2a4c7c;
  --text: #f6faff;
  --text-dim: #cad8ee;
  --muted: #8298ba;
  --muted2: #5b7294;
  --blue: #4578ff;
  --blue-hover: #5887ff;
  --violet: #7858ff;
  --violet-hover: #8669ff;
  --green: #2ce1a5;
  --green-bg: #0d4634;
  --green-glow: rgba(44, 225, 165, 0.4);
  --red: #ff4e68;
  --red-bg: #521825;
  --orange: #ff8b42;
  --cyan: #38bdf8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 55% -5%, rgba(55, 85, 255, 0.12), transparent 32%),
              linear-gradient(180deg, #050a13 0%, #07101d 55%, #050a14 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 100%;
}

body {
  overflow: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  color: inherit;
  border: 0;
  background: transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #1e3556;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2d4f7f;
}

/* Shell Layout */
.app-shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  height: 100vh;
  min-width: 1200px;
}

/* Left Sidebar */
.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 20px;
  background: linear-gradient(180deg, rgba(7, 16, 29, 0.98), rgba(5, 11, 22, 0.99));
  border-right: 1px solid var(--line-soft);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -120px;
  top: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 95, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 24px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 14px rgba(65, 120, 255, 0.42));
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #ffffff;
}

.brand-sub {
  margin-top: 3px;
  color: #829bbd;
  font-size: 11.8px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.nav-item {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #a7bbda;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  width: 100%;
  font-size: 13.5px;
  font-weight: 550;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke: #7ea8e6;
  flex-shrink: 0;
  transition: stroke 0.16s ease;
}

.nav-item:hover {
  background: #0d1a31;
  color: #ffffff;
  border-color: #1a3762;
}

.nav-item.active {
  background: linear-gradient(90deg, #15347f, #1b3879 58%, #203b7d);
  border-color: #2d5fbe;
  box-shadow: inset 0 0 0 1px rgba(75, 120, 255, 0.15), 0 0 22px rgba(35, 90, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
}

.nav-item.active svg {
  stroke: #c2ddff;
  filter: drop-shadow(0 0 6px rgba(77, 164, 255, 0.65));
}

.side-illustration {
  margin-top: auto;
  z-index: 1;
  border: 1px solid #233e68;
  border-radius: 14px;
  padding: 12px 14px 15px;
  background: linear-gradient(180deg, rgba(16, 30, 54, 0.92), rgba(9, 18, 34, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.22);
}

.side-illustration img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 14px 22px rgba(45, 65, 255, 0.22));
}

.side-illustration h3 {
  font-size: 14.5px;
  line-height: 1.25;
  margin: 6px 0 6px;
  font-weight: 750;
  color: #ffffff;
}

.side-illustration p {
  font-size: 11px;
  line-height: 1.45;
  color: #8fa6c7;
  margin: 0 0 13px;
}

/* Workspace & Topbar */
.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: 66px 1fr;
  height: 100vh;
}

.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: rgba(6, 13, 25, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 10;
}

.searchbox {
  width: 380px;
  height: 40px;
  border: 1px solid #223a60;
  border-radius: 10px;
  background: #071221;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.16s ease;
}

.searchbox:focus-within {
  border-color: #4872b2;
  box-shadow: 0 0 0 3px rgba(69, 120, 255, 0.12);
}

.searchbox svg {
  width: 17px;
  height: 17px;
  stroke: #7f9ec7;
}

.searchbox input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #dbe7f7;
  font-size: 13.5px;
}

.searchbox input::placeholder {
  color: #5c7497;
}

.searchbox kbd {
  font-size: 10.5px;
  color: #6c83a4;
  border: 1px solid #1c3254;
  border-radius: 6px;
  padding: 2px 6px;
  background: #0c182a;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mode pill switch */
.mode-pill {
  height: 33px;
  padding: 0 12px;
  border: 1px solid #2f4874;
  border-radius: 8px;
  background: #0c182c;
  color: #9eb5d8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mode-pill:hover {
  border-color: #4f74af;
  color: #ffffff;
}

.mode-pill.live {
  border-color: #175442;
  background: #09211c;
  color: #63ecc2;
}

.mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7858ff;
  box-shadow: 0 0 8px rgba(120, 88, 255, 0.8);
}

.mode-pill.live .mode-dot {
  background: var(--green);
  box-shadow: 0 0 8px rgba(44, 225, 165, 0.95);
}

.system-pill {
  height: 34px;
  padding: 0 13px;
  border: 1px solid #173b39;
  border-radius: 9px;
  background: linear-gradient(180deg, #0a2420, #071b15);
  color: #c9f4e7;
  font-size: 11.8px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(29, 223, 155, 0.08);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(41, 227, 162, 0.95);
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s ease;
}

.icon-button:hover {
  background: #0d1a2f;
}

.icon-button svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  stroke: #9cb1cf;
  transition: stroke 0.16s ease;
}

.icon-button:hover svg {
  stroke: #ffffff;
}

.icon-button.active {
  background: #13243d;
}

.icon-button.active svg {
  stroke: #60a5fa;
}

.notif-badge {
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ff4864;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px #07101c;
  pointer-events: none;
}

/* Notification Popover Dropdown */
.notif-wrapper {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #0b172a;
  border: 1px solid #1e3557;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: notifFadeIn 0.16s ease-out;
}

@keyframes notifFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #162a47;
  background: #081222;
}

.notif-dropdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.notif-count-pill {
  background: #1e3a66;
  color: #60a5fa;
  font-size: 10.5px;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 10px;
}

.notif-clear-btn {
  background: transparent;
  border: none;
  color: #7187a7;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.notif-clear-btn:hover {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
}

.notif-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}

.notif-dropdown-body::-webkit-scrollbar {
  width: 5px;
}
.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: #1c3354;
  border-radius: 4px;
}

.notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid #122137;
  transition: background 0.15s;
  cursor: pointer;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #0f1f37;
}

.notif-item.read {
  opacity: 0.65;
}

.notif-item.unread {
  background: rgba(37, 99, 235, 0.06);
}

.notif-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-item-icon svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
}

.notif-item-icon.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.notif-item-icon.error {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.notif-item-icon.info, .notif-item-icon.check, .notif-item-icon.success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.notif-item-title {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 10px;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-item-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-word;
}

.notif-empty {
  padding: 36px 20px;
  text-align: center;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notif-empty svg {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  stroke: #334155;
}

.notif-dropdown-footer {
  padding: 8px 16px;
  border-top: 1px solid #162a47;
  background: #081222;
  text-align: center;
}

.notif-view-all-btn {
  background: transparent;
  border: none;
  color: #826fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}

.notif-view-all-btn:hover {
  color: #a496ff;
  background: rgba(130, 111, 255, 0.1);
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 5px;
  cursor: pointer;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7858ff, #4832db);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 0 18px rgba(94, 70, 255, 0.32);
}

.profile-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.profile-copy strong {
  font-size: 12.8px;
  color: #ffffff;
}

.profile-copy span {
  font-size: 10.5px;
  color: #7d93b3;
  margin-top: 3px;
}

.chev {
  color: #6a7f9e;
  font-size: 11px;
}

/* Main Content Area */
.main {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 24px 24px;
  background: radial-gradient(circle at 50% 0%, rgba(40, 65, 145, 0.07), transparent 26%);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.primary-column {
  min-width: 0;
}

/* Metric Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  height: 96px;
  border: 1px solid #20375e;
  border-radius: 14px;
  background: linear-gradient(180deg, #0b1729, #091423);
  display: flex;
  align-items: center;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-right: 14px;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #1d2f84, #1a2569);
  box-shadow: inset 0 0 0 1px rgba(100, 140, 255, 0.15);
}

.stat-icon.green {
  background: linear-gradient(145deg, #0d543e, #0a3a2d);
  box-shadow: inset 0 0 0 1px rgba(44, 225, 165, 0.2);
}

.stat-icon svg {
  width: 26px;
  height: 26px;
  stroke: #7ea0ff;
}

.stat-icon.green svg {
  stroke: #2fe7ac;
}

.stat-label {
  font-size: 12px;
  color: #bfd0e8;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.stat-sub {
  font-size: 10.8px;
  color: #6e84a4;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-sub.good {
  color: var(--green);
}

.stat-card .mini-bars {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 76px;
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  opacity: 0.6;
}

.mini-bars i {
  width: 8px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #445fff, #232a73);
}

.stat-line {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 118px;
  height: 46px;
}

.stat-line path {
  stroke: #2de7aa;
  stroke-width: 2.8;
  fill: none;
  filter: drop-shadow(0 0 7px rgba(45, 231, 170, 0.45));
}

.stat-progress {
  width: 155px;
  height: 5px;
  background: #142845;
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}

.stat-progress > i {
  display: block;
  height: 100%;
  width: 75%;
  background: linear-gradient(90deg, #8358ff, #6558ff);
  box-shadow: 0 0 10px rgba(125, 88, 255, 0.6);
}

/* Panel Layout */
.panel {
  border: 1px solid #20375e;
  border-radius: 14px;
  background: linear-gradient(180deg, #0a1628, #081321);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.panel-head {
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1a3152;
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  color: #ffffff;
}

.panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.panel-head p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #7d93b3;
}

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

.mini-search {
  width: 38px;
  height: 36px;
  border: 1px solid #294269;
  background: #0b1728;
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mini-search:hover {
  border-color: #476a9c;
  background: #0f2038;
}

.mini-search svg {
  width: 17px;
  height: 17px;
  stroke: #9bb7e2;
}

/* Buttons */
.btn {
  height: 38px;
  border: 1px solid #28446b;
  border-radius: 9px;
  background: #0c1829;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 650;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #e0ecfd;
  transition: all 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #456799;
  background: #102138;
}

.btn-primary {
  border-color: #6d54ff;
  background: linear-gradient(180deg, #7858ff, #5b3fff);
  box-shadow: 0 0 22px rgba(101, 73, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #8668ff, #6449ff);
  box-shadow: 0 0 26px rgba(101, 73, 255, 0.45);
}

.btn-danger {
  border-color: #722736;
  color: #ffb5c1;
  background: #201016;
}

.btn-danger:hover {
  background: #33131c;
  border-color: #923447;
}

.btn-ghost {
  background: #0b1727;
  border-color: #243c61;
}

.btn-ghost:hover {
  border-color: #426394;
}

.btn-wide {
  width: 100%;
}

/* Projects Table */
.project-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
}

.project-table th {
  height: 34px;
  color: #7a92b5;
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #1c3355;
  padding: 0 10px;
  letter-spacing: 0.02em;
}

.project-table td {
  height: 52px;
  border-bottom: 1px solid #162c4a;
  padding: 0 10px;
  font-size: 11.8px;
  vertical-align: middle;
}

.project-table tbody tr:last-child td {
  border-bottom: 0;
}

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

.project-table tbody tr:hover {
  background: #0d1b30;
}

.project-table th:nth-child(1), .project-table td:nth-child(1) { width: 38px; text-align: center; }
.project-table th:nth-child(2) { width: 220px; }
.project-table th:nth-child(3) { width: 190px; }
.project-table th:nth-child(4) { width: 155px; }
.project-table th:nth-child(5) { width: 135px; }
.project-table th:nth-child(6) { width: 95px; }
.project-table th:nth-child(7) { width: 105px; }
.project-table th:nth-child(8) { width: 105px; }
.project-table th:nth-child(9) { width: 140px; text-align: right; }

/* Custom Checkbox */
.custom-check {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #3c567c;
  border-radius: 4px;
  background: #091526;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
  margin: 0;
  vertical-align: middle;
}

.custom-check::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.12s ease;
  background: linear-gradient(135deg, #4ed3ff, #7858ff);
  box-shadow: 0 0 9px rgba(87, 117, 255, 0.85);
}

.custom-check:checked {
  border-color: #58a9ff;
  box-shadow: 0 0 0 2px rgba(64, 113, 255, 0.14), 0 0 12px rgba(64, 113, 255, 0.38);
}

.custom-check:checked::before {
  transform: scale(1);
}

/* Table Cells */
.project-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 215px;
  overflow: hidden;
}

.project-cell > div {
  min-width: 0;
  overflow: hidden;
}

.node-orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #155fc7, #132f69);
  box-shadow: inset 0 0 0 1px rgba(94, 160, 255, 0.22), 0 0 14px rgba(31, 93, 255, 0.16);
  flex-shrink: 0;
}

.node-orb.violet {
  background: linear-gradient(145deg, #7a52ff, #34218d);
  box-shadow: inset 0 0 0 1px rgba(160, 120, 255, 0.25), 0 0 14px rgba(120, 80, 255, 0.2);
}

.node-orb.teal {
  background: linear-gradient(145deg, #19a88f, #134f5d);
  box-shadow: inset 0 0 0 1px rgba(44, 225, 165, 0.25), 0 0 14px rgba(35, 200, 150, 0.2);
}

.node-orb svg {
  width: 15px;
  height: 15px;
  stroke: #cce4ff;
}

.project-title {
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.project-note {
  font-size: 9.8px;
  color: #6d84a6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  color: #e5effd;
}

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

.cert-lock {
  font-size: 14px;
}

.cert strong {
  font-size: 11.2px;
  display: block;
  color: #ffffff;
}

.cert span {
  display: block;
  color: #7187a9;
  font-size: 9.6px;
  margin-top: 2px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.green {
  background: #0e4c36;
  color: #2ee2a4;
  box-shadow: 0 0 12px rgba(46, 226, 164, 0.15);
}

.badge.violet {
  background: #281f69;
  color: #9d85ff;
}

.badge.blue {
  background: #14356e;
  color: #6bb0ff;
}

.badge.red {
  background: #501724;
  color: #ff6f86;
}

.badge.amber {
  background: #4a3212;
  color: #ffad52;
}

/* Yandex Pill */
.yandex-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #28446b;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10px;
  color: #c4d4eb;
  background: #091728;
  white-space: nowrap;
}

.yandex-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff825b;
}

.yandex-pill.reserve .yandex-dot {
  background: #8b6dff;
}

/* MWS CDN Pill */
.mws-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(82, 114, 255, 0.35);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 650;
  color: #cde0ff;
  background: linear-gradient(135deg, rgba(82, 114, 255, 0.14), rgba(120, 80, 255, 0.18));
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(82, 114, 255, 0.1);
}

.mws-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ee2a4;
  box-shadow: 0 0 6px #2ee2a4;
  flex-shrink: 0;
}

/* Blur for Origin IP & Domain */
.blur-secret {
  filter: blur(5px);
  cursor: pointer;
  user-select: none;
  transition: filter 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s ease;
  border-radius: 4px;
  padding: 1px 4px;
  display: inline-block;
  vertical-align: middle;
}

.blur-secret:hover {
  background: rgba(255, 255, 255, 0.09);
}

.blur-secret.revealed,
.domain-wrap.revealed .blur-secret {
  filter: none !important;
  user-select: text;
  background: transparent;
}

.domain-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  padding: 1px 3px;
  transition: background-color 0.15s ease;
}

.domain-wrap:hover {
  background: rgba(255, 255, 255, 0.05);
}

.domain-sub {
  color: #ffffff;
  font-weight: 600;
}

.domain-suffix {
  color: #9bb7e2;
}

.row-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.row-action {
  width: 27px;
  height: 27px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.14s ease;
}

.row-action:hover {
  background: #12243d;
}

.row-action svg {
  width: 14px;
  height: 14px;
  stroke: #7eaaf1;
}

.row-action.danger:hover {
  background: #33131c;
}

.row-action.danger svg {
  stroke: #ff526d;
}

.row-action.toggle-active svg {
  stroke: #2ee2a4;
}

.row-action.toggle-active:hover {
  background: rgba(46, 226, 164, 0.15);
}

.row-action.toggle-active.paused svg {
  stroke: #ffad52;
}

.row-action.toggle-active.paused:hover {
  background: rgba(255, 173, 82, 0.18);
}

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

.traffic strong {
  font-size: 11.5px;
  color: #ffffff;
}

.bars-small {
  height: 18px;
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
}

.bars-small i {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: #2ce1a5;
}

/* Middle Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 14px;
  margin-top: 14px;
}

.chart-panel {
  height: 234px;
  overflow: hidden;
}

.chart-body {
  height: 178px;
  padding: 8px 14px 10px;
}

.line-chart {
  width: 100%;
  height: 100%;
}

.line-chart .grid {
  stroke: #1a3253;
  stroke-width: 1;
}

.line-chart .axis-label {
  fill: #6e84a5;
  font-size: 9.5px;
}

.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: -3px;
  font-size: 9.8px;
  color: #8fa3be;
}

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

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* Real Telemetry & Monitoring Banners */
.chart-banner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 140px;
  padding: 10px 14px;
  text-align: center;
}

.chart-error-banner {
  border: 1px solid rgba(255, 93, 109, 0.35);
  background: rgba(255, 93, 109, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  width: 100%;
  max-width: 540px;
  text-align: center;
}

.chart-error-banner .err-title {
  font-size: 12px;
  font-weight: 750;
  color: #ff8b97;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 5px;
}

.chart-error-banner .err-desc {
  font-size: 11px;
  color: #c8d8ee;
  line-height: 1.45;
}

.chart-error-banner code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 5px;
  border-radius: 4px;
  color: #ffb8c2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
}

.chart-error-banner .err-sub {
  font-size: 10px;
  color: #8da4c4;
  margin-top: 6px;
}

.chart-empty-banner {
  border: 1px dashed #243c61;
  background: rgba(11, 23, 40, 0.6);
  border-radius: 10px;
  padding: 18px 20px;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.chart-empty-banner .empty-title {
  font-size: 12px;
  font-weight: 700;
  color: #9bb7e2;
  margin-bottom: 4px;
}

.chart-empty-banner .empty-desc {
  font-size: 10.8px;
  color: #6d84a6;
}

/* Modal Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.telemetry-card {
  background: #0d1b30;
  border: 1px solid #1c3457;
  border-radius: 8px;
  padding: 10px 12px;
}

.telemetry-card .t-label {
  font-size: 10.5px;
  color: #86a2c9;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.telemetry-card .t-val {
  font-size: 18px;
  font-weight: 750;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.telemetry-card .t-sub {
  font-size: 9.8px;
  color: #5d789e;
  margin-top: 2px;
}

/* Donut Chart */
.donut-wrap {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: center;
  height: 100%;
  gap: 10px;
}

.donut {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(#2ce1a5 0 95.8%, #ff5d6d 95.8% 97.9%, #5272ff 97.9% 100%);
  display: grid;
  place-items: center;
  margin: auto;
  position: relative;
  box-shadow: 0 0 30px rgba(44, 225, 165, 0.08);
}

.donut::after {
  content: "";
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #081523;
  border: 1px solid #172e4c;
  position: absolute;
}

.donut-center {
  position: relative;
  z-index: 2;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.donut-center span {
  font-size: 10px;
  color: #7f95b6;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.status-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px dashed #223c5b;
  font-size: 11.2px;
}

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

.status-item .left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c0d1ea;
}

.status-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-item strong {
  font-size: 11.2px;
  color: #ffffff;
}

/* Bottom Logs Section */
.logs-panel {
  margin-top: 14px;
  height: 180px;
  position: relative;
  overflow: hidden;
}

.logs-panel::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -30px;
  width: 230px;
  height: 160px;
  background: url('assets/rack-mini.svg') no-repeat center/contain;
  opacity: 0.22;
  pointer-events: none;
}

.logs-head {
  height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1b3252;
}

.logs-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logs-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* Custom Styled Select */
.select-lite {
  height: 33px;
  background: #091728;
  border: 1px solid #28446b;
  border-radius: 8px;
  color: #d6e4f7;
  padding: 0 28px 0 11px;
  outline: none;
  font-size: 11.5px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d97be' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.select-lite:focus {
  border-color: #4b73af;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 1;
}

.logs-table td {
  height: 25px;
  border-bottom: 1px solid #142a47;
  font-size: 10px;
  padding: 0 10px;
  color: #b5c7e0;
}

.logs-table td:first-child {
  width: 90px;
  color: #7b92b3;
  font-family: monospace;
}

.log-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 18px;
  border-radius: 999px;
  font-size: 8.8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.log-pill.info {
  background: #15457a;
  color: #b8dcff;
}

.log-pill.success {
  background: #0c6446;
  color: #bffff0;
}

.log-pill.error {
  background: #681a2e;
  color: #ffd0d8;
}

.log-pill.warn {
  background: #6a4a12;
  color: #ffe0a3;
}

/* Right Sidebar */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 270px;
  flex-shrink: 0;
}

.right-panel {
  border: 1px solid #20375e;
  border-radius: 14px;
  background: linear-gradient(180deg, #0a1628, #081321);
  overflow: hidden;
}

.right-title {
  min-height: 48px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1a3151;
  font-size: 13.5px;
  font-weight: 750;
  color: #ffffff;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-actions {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quick-actions .btn {
  width: 100%;
  height: 40px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  justify-content: flex-start;
}

.quick-actions svg {
  width: 17px;
  height: 17px;
  stroke: #c4d6f3;
  flex-shrink: 0;
}

.system-list {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.sys-left {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c2d4ec;
}

.check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #16bf83;
  color: #03130e;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 11px;
  box-shadow: 0 0 13px rgba(29, 224, 157, 0.18);
}

.online {
  color: #2be0a2;
  font-size: 9.6px;
  font-weight: 600;
}

.events {
  padding: 4px 13px 10px;
}

.event {
  display: grid;
  grid-template-columns: 20px 42px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid #162b46;
}

.event:last-child {
  border-bottom: 0;
}

.event-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(36, 223, 160, 0.15);
  color: #24dfa0;
  flex-shrink: 0;
  margin-top: 1px;
}

.event-icon.warn {
  background: rgba(255, 171, 83, 0.18);
  color: #ffab53;
}

.event-icon svg {
  width: 11px !important;
  height: 11px !important;
  max-width: 11px !important;
  max-height: 11px !important;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.event-time {
  font-size: 10px;
  color: #7186a6;
  padding-top: 3px;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-body {
  min-width: 0;
  overflow: hidden;
}

.event-body strong {
  font-size: 11.5px;
  font-weight: 600;
  display: block;
  color: #ffffff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-desc {
  font-size: 10.5px;
  color: #8fa5c4;
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Page Views: Projects, Accounts, Certificates, etc. */
.page {
  max-width: 1440px;
  margin: 0 auto;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #ffffff;
}

.page-title-row p {
  margin: 5px 0 0;
  color: #7f95b7;
  font-size: 12px;
}

.content-card {
  border: 1px solid #20375e;
  border-radius: 14px;
  background: linear-gradient(180deg, #0b1729, #081321);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid #1a3151;
}

.toolbar .spacer {
  flex: 1;
}

.table-wide {
  width: 100%;
  border-collapse: collapse;
}

.table-wide th, .table-wide td {
  padding: 12px 14px;
  border-bottom: 1px solid #162c49;
  text-align: left;
  font-size: 11.8px;
}

.table-wide th {
  color: #7a91b3;
  font-size: 10.6px;
  font-weight: 600;
}

.table-wide tr:last-child td {
  border-bottom: 0;
}

.table-wide tr:hover td {
  background: #0d1b30;
}

/* Account Cards Grid */
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.account-card {
  min-height: 190px;
  padding: 18px;
  border: 1px solid #233e66;
  border-radius: 14px;
  background: linear-gradient(180deg, #0d1a2f, #091524);
  position: relative;
  overflow: hidden;
}

.account-card::after {
  content: "";
  position: absolute;
  right: -25px;
  top: -35px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 78, 255, 0.16), transparent 70%);
}

.account-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.account-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff9a54, #e85c3d);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(255, 111, 68, 0.12);
}

.account-meta h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  color: #ffffff;
}

.account-meta p {
  margin: 3px 0 0;
  color: #7b90b1;
  font-size: 10.8px;
}

.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.account-stat {
  padding: 9px;
  border: 1px solid #1f375a;
  border-radius: 9px;
  background: #091627;
}

.account-stat span {
  display: block;
  font-size: 8.8px;
  color: #7085a3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.account-stat strong {
  font-size: 13.5px;
  margin-top: 3px;
  display: block;
  color: #ffffff;
}

.account-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.account-actions .btn {
  height: 32px;
  font-size: 10.8px;
  padding: 0 10px;
}

.account-card.add {
  display: grid;
  place-items: center;
  text-align: center;
  border-style: dashed;
  border-color: #29446d;
  cursor: pointer;
  transition: all 0.16s ease;
}

.account-card.add:hover {
  border-color: #5d75ff;
  background: #0d1930;
}

.account-card.add .plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #182860;
  color: #9eb1ff;
  font-size: 22px;
  margin: 0 auto 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal {
  width: min(780px, 95vw);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2d4c78;
  border-radius: 18px;
  background: linear-gradient(180deg, #0d1b30, #081423);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 50px rgba(70, 75, 255, 0.1);
}

.modal.small {
  width: min(520px, 95vw);
}

.modal-head {
  flex-shrink: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #1c3558;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 750;
  color: #ffffff;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0a1728;
  color: #8397b7;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: all 0.14s ease;
}

.modal-close:hover {
  background: #13243d;
  color: #ffffff;
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 22px;
  min-height: 0;
}

/* Wizard Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.step {
  height: 42px;
  border: 1px solid #20395f;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #6d84a7;
  font-size: 11px;
  font-weight: 600;
  background: #091628;
}

.step.active {
  border-color: #4b6bff;
  color: #e0e9ff;
  background: #111d47;
  box-shadow: 0 0 14px rgba(75, 107, 255, 0.16);
}

.step.done {
  border-color: #1a6f55;
  color: #a3f7d8;
  background: #0a2620;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
  line-height: 1;
}

.step-num svg {
  display: block;
  width: 10px;
  height: 10px;
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

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

.field label {
  font-size: 11px;
  font-weight: 600;
  color: #9ab0d1;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #26436e;
  border-radius: 9px;
  background: #071322;
  color: #e6effd;
  padding: 0 12px;
  outline: none;
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d97be' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field textarea {
  padding-top: 10px;
  min-height: 90px;
  resize: vertical;
  font-family: monospace;
  font-size: 11.5px;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #5c79ff;
  box-shadow: 0 0 0 3px rgba(92, 121, 255, 0.12);
}

.hint {
  font-size: 9.8px;
  color: #667e9f;
  margin-top: 3px;
}

.modal-foot {
  flex-shrink: 0;
  padding: 14px 22px;
  border-top: 1px solid #1a3458;
  background: #081423;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-bottom-left-radius: 17px;
  border-bottom-right-radius: 17px;
}

.review-box {
  border: 1px solid #223c63;
  border-radius: 12px;
  background: #081628;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.review-item span {
  display: block;
  font-size: 9.6px;
  color: #6e84a6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.review-item strong {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  color: #ffffff;
}

/* Provisioning Progress Rows */
.provision-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.prov-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid #1e3656;
  border-radius: 10px;
  background: #091628;
  transition: all 0.16s ease;
}

.prov-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #13224d;
  color: #89a7ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  text-align: center;
}

.prov-icon svg {
  display: block;
  width: 13px;
  height: 13px;
  margin: 0 auto;
}

.prov-row.active {
  border-color: #3b62b0;
  background: #0d1e38;
}

.prov-row.active .prov-icon {
  background: #2547a0;
  color: #ffffff;
  animation: pulse 1.4s infinite;
}

.prov-row.done {
  border-color: #195e47;
  background: #0a1f1a;
}

.prov-row.done .prov-icon {
  background: #0d543d;
  color: #2fe7ac;
}

.prov-row.error {
  border-color: #6c2333;
  background: #220e14;
}

.prov-row.error .prov-icon {
  background: #5c1b28;
  color: #ff687e;
}

.prov-row strong {
  font-size: 11.5px;
  color: #ffffff;
}

.prov-row span {
  display: block;
  font-size: 9.8px;
  color: #7187a8;
  margin-top: 2px;
}

.prov-state {
  font-size: 10px;
  font-weight: 600;
  color: #8da5c7;
}

/* Node Setup Step in Wizard */
.node-setup-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.node-setup-head {
  background: rgba(13, 30, 52, 0.45);
  border: 1px solid rgba(64, 100, 132, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
}

.node-setup-head h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: #f1f5f9;
  font-weight: 700;
}

.node-setup-head p {
  margin: 0;
  font-size: 11.5px;
  color: #8da5c7;
  line-height: 1.45;
}

.config-step-card {
  background: #06101c;
  border: 1px solid rgba(64, 100, 132, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
}

.config-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

.config-step-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

.config-step-sub {
  font-size: 10.5px;
  color: #7187a8;
  margin-top: 2px;
}

.config-code-pre {
  background: #030810;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #cbd5e1;
  max-height: 170px;
  overflow: auto;
  line-height: 1.45;
  white-space: pre;
}

.config-copy-btn {
  border: 1px solid rgba(64, 100, 132, 0.4);
  background: rgba(18, 36, 60, 0.6);
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.config-copy-btn:hover {
  background: rgba(32, 230, 168, 0.15);
  border-color: rgba(32, 230, 168, 0.45);
  color: #20e6a8;
}

.node-verify-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #09172a;
  border: 1px solid rgba(64, 100, 132, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 4px;
}

.btn-check-node {
  background: linear-gradient(135deg, #18d894, #0fb77f);
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-check-node:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(25, 230, 161, 0.3);
}

.btn-check-node:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.node-status-text {
  font-size: 12px;
  line-height: 1.4;
  color: #94a3b8;
  flex: 1;
}

.node-status-text.ok {
  color: #2fe7ac;
  font-weight: 600;
}

.node-status-text.err {
  color: #ff6b81;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Toast Notifications */
.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toast {
  min-width: 290px;
  padding: 12px 16px;
  border: 1px solid #28446c;
  border-radius: 10px;
  background: #0a172b;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  font-size: 11.5px;
  color: #e5effd;
  animation: toast-in 0.2s ease;
}

.toast.success {
  border-color: #17654d;
  background: #081d17;
  color: #aef8df;
}

.toast.error {
  border-color: #782737;
  background: #230d13;
  color: #ffbcc6;
}

@keyframes toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1380px) {
  .app-shell {
    grid-template-columns: 215px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .stats-row {
    gap: 10px;
  }
  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .right-column {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
}

/* --------------------------------------------------
   Connection Config & VPS Setup Modal Styles
-------------------------------------------------- */
/* Universal SVG constraints to prevent oversized icons */
svg:not(.line-chart):not(.stat-line):not([data-chart]) {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

.modal-head h2 svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  stroke: #7ea0ff;
  display: inline-block;
  vertical-align: -4px;
  flex-shrink: 0;
}

.cfg-sec-title svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  stroke: #8faed9;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn-copy svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  stroke: currentColor;
  flex-shrink: 0;
}

.origin-status-card svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  stroke: currentColor;
  flex-shrink: 0;
}

.vps-setup-block svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  stroke: currentColor;
  flex-shrink: 0;
}

.btn svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  flex-shrink: 0;
}

.row-action svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.arch-flow-box {
  background: linear-gradient(135deg, #0a172a, #071324);
  border: 1px solid #1c3558;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.arch-flow-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7997c2;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arch-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
}

.arch-node {
  background: #0d1e38;
  border: 1px solid #233e66;
  border-radius: 9px;
  padding: 8px 12px;
  min-width: 110px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.arch-node.client {
  border-color: #2b70c9;
  background: linear-gradient(180deg, #102545, #0c1a32);
}

.arch-node.cdn {
  border-color: #6b46c1;
  background: linear-gradient(180deg, #241647, #150d2b);
}

.arch-node.vps {
  border-color: #0e8a70;
  background: linear-gradient(180deg, #0d3029, #081d19);
}

.arch-node.xray {
  border-color: #d97706;
  background: linear-gradient(180deg, #3d240d, #241508);
}

.arch-node .node-role {
  font-size: 9.5px;
  font-weight: 700;
  color: #8bb3e8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arch-node .node-name {
  font-size: 11.5px;
  font-weight: 750;
  color: #ffffff;
  margin: 2px 0 3px;
  white-space: nowrap;
}

.arch-node .node-port {
  display: inline-block;
  font-size: 9.5px;
  font-family: monospace;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #c7dcfb;
}

.arch-arrow {
  color: #4b6b99;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  user-select: none;
}

.cfg-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #1c3558;
  padding-bottom: 10px;
}

.cfg-tab {
  background: #0b172a;
  border: 1px solid #243c61;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #8da4c4;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cfg-tab:hover {
  background: #11233e;
  border-color: #3b5c8c;
  color: #ffffff;
}

.cfg-tab.active {
  background: linear-gradient(135deg, #2b55a8, #4c35b5);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.cfg-sec-title {
  font-size: 12px;
  font-weight: 750;
  color: #ffffff;
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-block-wrap {
  background: #060e1a;
  border: 1px solid #1c3252;
  border-radius: 9px;
  margin: 8px 0;
  position: relative;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: #0a1626;
  border-bottom: 1px solid #182b45;
  font-size: 10.5px;
  color: #7997c2;
  font-family: monospace;
}

.code-body {
  margin: 0;
  padding: 12px;
  font-size: 11px;
  line-height: 1.55;
  color: #d1e2fc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  overflow-x: auto;
  max-height: 240px;
}

.btn-copy {
  height: 26px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 600;
  background: #13243d;
  border: 1px solid #2a4975;
  border-radius: 6px;
  color: #d2e3fc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-copy:hover {
  background: #1c355a;
  border-color: #436ea7;
  color: #ffffff;
}

.btn-copy.copied {
  background: #0f402e;
  border-color: #199468;
  color: #4ef0b5;
}

.origin-status-card {
  background: #091629;
  border: 1px solid #1c365c;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.origin-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.origin-status-item {
  background: #060e1c;
  border: 1px solid #182e4e;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.origin-status-item span {
  font-size: 11px;
  color: #8da4c4;
}

.origin-status-item strong {
  font-size: 11.5px;
}

.origin-alert-redirect {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.12), rgba(180, 20, 20, 0.18));
  border: 1px solid #b91c1c;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  color: #fca5a5;
  font-size: 11.5px;
  line-height: 1.5;
}

.vps-setup-block {
  background: linear-gradient(180deg, #091628, #071222);
  border: 1px solid #1c3558;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}

/* ================================================== */
/* CDN ERA Admin Login Screen                         */
/* ================================================== */
.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 25%, rgba(32, 230, 168, 0.09), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(69, 120, 255, 0.07), transparent 50%),
              linear-gradient(180deg, #040913 0%, #07101f 60%, #040914 100%);
  z-index: 99999;
  padding: 20px;
  overflow: auto;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(10, 22, 40, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(72, 105, 138, 0.4);
  border-radius: 18px;
  padding: 28px 26px 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 45px rgba(32, 230, 168, 0.08);
  position: relative;
  animation: loginFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.login-logo {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(44, 225, 165, 0.5));
}

.login-brand-text h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 40%, #a5c4ec);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header {
  margin-bottom: 16px;
}

.login-header h2 {
  font-size: 16px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #cad8ee;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.login-form .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-form .input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 38px;
  background: rgba(5, 13, 25, 0.9);
  border: 1px solid rgba(72, 105, 138, 0.4);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .input-wrap input:focus {
  border-color: #2ce1a5;
  box-shadow: 0 0 0 3px rgba(44, 225, 165, 0.15);
}

.login-form .input-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #5b7294;
  pointer-events: none;
}

.pwd-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  color: #8298ba;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.16s;
}

.pwd-toggle:hover {
  color: #ffffff;
}

.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 11px;
  color: #5b7294;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 78, 104, 0.1);
  border: 1px solid rgba(255, 78, 104, 0.3);
  color: #ff6b81;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.16s ease;
}

.btn-logout:hover {
  background: rgba(255, 78, 104, 0.2);
  border-color: rgba(255, 78, 104, 0.5);
  color: #ffffff;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ==================================================
   Migration Wizard & Domain Pool Styles
   ================================================== */
.reason-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
  margin-bottom: 8px;
}

.reason-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.4);
}

.reason-card.selected {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.reason-radio {
  margin-top: 3px;
  cursor: pointer;
}

.reason-info strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 3px;
}

.reason-info p {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.variant-banner {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 14px;
}

.variant-banner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.variant-banner-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.migration-stepper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.migration-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.migration-step-item.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}

.migration-step-item.done {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

.migration-step-item.failed {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.migration-step-item.active .step-circle {
  background: #38bdf8;
  color: #041226;
  animation: pulse-border 1.5s infinite;
}

.migration-step-item.done .step-circle {
  background: #10b981;
  color: #ffffff;
}

.migration-step-item.failed .step-circle {
  background: #ef4444;
  color: #ffffff;
}

.step-label {
  font-size: 12.5px;
  color: #e2e8f0;
  flex-grow: 1;
}

.step-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.step-badge.running {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.step-badge.success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.step-badge.pending {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
}

.step-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}


