:root{
  --bg:#0b0c10;
  --card:#11131a;
  --muted:#7d8590;
  --text:#e6edf3;
  --line:#222637;
  --accent:#3b82f6;
  --accent2:#94a3b8;
  --warn:#f59e0b;
  --danger:#ef4444;

  /* New: consistent radii + shadow + spacing */
  --radius-lg:18px;
  --radius-md:14px;
  --radius-sm:12px;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.28);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 600px at 30% -10%, rgba(59,130,246,.20), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(245,158,11,.10), transparent 60%),
    var(--bg);
  color:var(--text);
}

/* Layout helpers */
.container{max-width:1100px;margin:0 auto;padding:18px}

/* New: page wrapper used by the new HTML */
.page{max-width:1100px;margin:0 auto;padding:18px}

/* --------------------------------
   Topbar (cleaner + less busy)
--------------------------------- */
.topbar{
  position:sticky; top:0; z-index:5;
  background: rgba(11,12,16,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(34,38,55,.8);
}

/* Support both old and new markup */
.topbar .container{
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.topbarLeft, .topbarRight{
  display:flex;align-items:center;gap:12px
}

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

/* Old logo class */
.logo{
  width:40px;height:40px;border-radius:12px;
  background: linear-gradient(135deg, rgba(59,130,246,.9), rgba(59,130,246,.35));
  display:grid;place-items:center;font-weight:800;
  border:1px solid rgba(255,255,255,.08);
}

/* New brand icon class (ND) */
.brandIcon{
  width:40px;height:40px;border-radius:12px;
  background: linear-gradient(135deg, rgba(59,130,246,.9), rgba(59,130,246,.35));
  display:grid;place-items:center;font-weight:900;
  border:1px solid rgba(255,255,255,.08);
}
.brandText{display:flex;flex-direction:column;line-height:1.15}
.brandName, .title{font-weight:900;letter-spacing:.2px}
.brandTag, .subtitle{font-size:12px;color:var(--muted)}

.pill{
  border:1px solid rgba(34,38,55,.9);
  padding:7px 10px;
  border-radius:999px;
  color:var(--accent2);
  background:rgba(255,255,255,.02);
  text-decoration:none;
  display:inline-flex;
  gap:8px;
  align-items:center;
}
.pillLabel{color:var(--muted);font-weight:800;font-size:12px}
.pillValue{color:var(--accent2);font-weight:900;font-size:12px}

/* --------------------------------
   Typography (better hierarchy)
--------------------------------- */
h1,h2,h3{letter-spacing:-0.2px}
h1{margin:0 0 6px 0;font-size:22px}
h2{margin:14px 0 10px 0;font-size:18px}
h3{margin:8px 0 10px 0;font-size:15px}
.hint{color:var(--muted);font-size:13px;margin:6px 0;line-height:1.45}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .95em;
  padding:2px 6px;
  border-radius:8px;
  border:1px solid rgba(34,38,55,.9);
  background: rgba(255,255,255,.03);
  color: var(--text);
}

/* --------------------------------
   Cards
--------------------------------- */
.card{
  border:1px solid rgba(34,38,55,.9);
  background:rgba(17,19,26,.82);
  border-radius:var(--radius-lg);
  padding:18px;
  box-shadow: var(--shadow);
}
.cardHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cardTitle{margin:0 0 4px 0;font-size:18px;font-weight:900}
.cardFoot{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(34,38,55,.8);
  color:var(--muted);
  font-size:12px;
}

/* --------------------------------
   Step bubbles
--------------------------------- */
.steps{display:flex;gap:8px;align-items:center}
.step{
  width:30px;height:30px;border-radius:999px;
  border:1px solid rgba(34,38,55,.95);
  display:grid;place-items:center;
  color:var(--muted);
  background: rgba(255,255,255,.02);
  font-weight:900;
  font-size:12px;
}
.step.active{
  border-color:rgba(59,130,246,.6);
  color:var(--text);
  background:rgba(59,130,246,.12)
}

/* Old grid2 still supported */
.grid2{display:grid;grid-template-columns:1.1fr .9fr;gap:14px}
@media (max-width:900px){.grid2{grid-template-columns:1fr}}

/* New: generic form grid used by the updated HTML */
.formGrid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;margin-top:10px}
@media (max-width:900px){.formGrid{grid-template-columns:1fr}}
.formField{min-width:0}
.fieldHint{color:var(--muted);font-size:12px;margin-top:8px;line-height:1.4}

/* Concept box (replaces infoBox visually, but doesn’t break it) */
.conceptBox{
  border:1px solid rgba(34,38,55,.9);
  border-radius:var(--radius-md);
  padding:12px;
  background:rgba(255,255,255,.015);
}
.conceptTitle{font-weight:900;margin-bottom:8px;letter-spacing:.2px}
.conceptBox ul{margin:0;padding-left:18px;color:var(--muted);font-size:13px}
.conceptBox li{margin:6px 0}

/* --------------------------------
   Inputs
--------------------------------- */
label{display:block;margin-bottom:6px;color:var(--accent2);font-size:13px}

input[type="number"], input[type="text"], select{
  width:100%;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(34,38,55,.95);
  background:rgba(255,255,255,.02);
  color:var(--text);
  outline:none;
}

input:focus, select:focus{border-color:rgba(59,130,246,.65)}
textarea{outline:none}
textarea:focus{border-color:rgba(59,130,246,.65)}

/* --------------------------------
   Buttons (less loud)
--------------------------------- */
.btn{
  padding:10px 14px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(59,130,246,.55);
  background:rgba(59,130,246,.14);
  color:var(--text);
  cursor:pointer;
  font-weight:900;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn.secondary{
  border-color:rgba(34,38,55,.95);
  background:rgba(255,255,255,.02);
  color:var(--accent2);
}
.btn.primary{
  border-color: rgba(59,130,246,.65);
  background: rgba(59,130,246,.18);
}
.btn:hover{filter:brightness(1.06)}
.btn:disabled{opacity:.45;cursor:not-allowed}

/* Old actions row still works */
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:16px}

/* New panel actions (used by updated HTML) */
.panelActions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:16px;
  gap:10px;
  flex-wrap:wrap;
}

/* --------------------------------
   Info box / list styles
--------------------------------- */
.infoBox{
  border:1px solid rgba(34,38,55,.9);
  border-radius:var(--radius-md);
  padding:12px;
  background:rgba(255,255,255,.015);
}
.infoTitle{font-weight:900;margin-bottom:8px}
.infoList{margin:0;padding-left:18px;color:var(--muted);font-size:13px;line-height:1.45}
.infoList li{margin:6px 0}

/* --------------------------------
   Checkbox cards
--------------------------------- */
.checkGrid{display:grid;gap:10px}
.check{
  display:flex;gap:10px;align-items:flex-start;
  padding:10px 12px;border-radius:var(--radius-sm);
  border:1px solid rgba(34,38,55,.9);
  background:rgba(255,255,255,.015);
  cursor:pointer;
}
.check input{margin-top:3px}

/* Sub cards */
.cardSub{
  margin-top:12px;
  border:1px solid rgba(34,38,55,.9);
  border-radius:var(--radius-md);
  padding:12px;
  background:rgba(255,255,255,.015);
}

/* Custom VLAN rows */
.customList{display:grid;gap:10px;margin-top:10px}
.customRow{
  display:grid;
  grid-template-columns:120px 1fr 120px 48px;
  gap:10px;
}
@media (max-width:900px){
  .customRow{grid-template-columns:1fr 1fr}
  .customRow .delBtn{grid-column:2}
}
.delBtn{
  width:48px;height:42px;border-radius:var(--radius-sm);
  border:1px solid rgba(34,38,55,.95);
  background:rgba(239,68,68,.10);
  color:var(--text);
  cursor:pointer;
}

/* Sizing list */
.sizingList{display:grid;gap:10px;margin-top:10px}
.sizingRow{
  display:grid;
  grid-template-columns:120px 1.3fr 1fr;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(34,38,55,.9);
  border-radius:var(--radius-sm);
  background:rgba(255,255,255,.015);
}
@media (max-width:900px){.sizingRow{grid-template-columns:1fr}}
.sizingRow.alert {
  border-color: rgba(245,158,11,.40);
  background: rgba(245,158,11,.05);
}

/* --------------------------------
   Badges
--------------------------------- */
.badges{display:flex;gap:8px;flex-wrap:wrap}
.badge{
  border:1px solid rgba(34,38,55,.9);
  background:rgba(255,255,255,.02);
  padding:6px 10px;border-radius:999px;
  color:var(--accent2);font-size:12px;font-weight:900;
  text-decoration:none;
}
.badge.warn{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.08);color:#fbbf24}
.badge.danger{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.08);color:#fca5a5}

.inlineBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(34,38,55,.9);
  background: rgba(255,255,255,.02);
  color: var(--accent2);
  margin-top:8px;
}
.inlineBadge.warn{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.08);
  color: #fbbf24;
}
.inlineBadge.blue{
  border-color: rgba(59,130,246,.40);
  background: rgba(59,130,246,.10);
  color: #93c5fd;
}

/* --------------------------------
   Tables
--------------------------------- */
.split{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px}
@media (max-width:900px){.split{grid-template-columns:1fr}}

.tableWrap{
  border:1px solid rgba(34,38,55,.9);
  border-radius:var(--radius-md);
  overflow:hidden;
  background:rgba(255,255,255,.015);
}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{
  padding:10px;
  border-bottom:1px solid rgba(34,38,55,.8);
  vertical-align:top;
}
.table th{
  color:var(--accent2);
  text-align:left;
  background:rgba(255,255,255,.015)
}
.table tr:last-child td{border-bottom:none}

/* Warnings */
.warnings{
  margin-top:12px;
  padding:12px;
  border-radius:var(--radius-md);
  border:1px solid rgba(245,158,11,.30);
  background:rgba(245,158,11,.08);
  color:#fde68a;
  font-size:13px;
  line-height:1.45;
}

.hidden{display:none !important}

/* Footer */
.footer{
  margin-top:18px;
  border-top:1px solid rgba(34,38,55,.8);
  color:var(--muted);
  font-size:12px;
  padding:14px 18px;
}
.footerInner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.footerSep{opacity:.5}

/* -------------------------------------------------
   Feature badges (Preview / Beta / Pro)
-------------------------------------------------- */
.fbadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(34,38,55,.9);
  background:rgba(255,255,255,.02);
  color:var(--accent2);
  font-size:12px;
  font-weight:900;
  letter-spacing:.2px;
  white-space:nowrap;
  text-decoration:none;
}
.fbadge.preview{
  border-color: rgba(59,130,246,.40);
  background: rgba(59,130,246,.10);
  color: #93c5fd;
}
.fbadge.beta{
  border-color: rgba(245,158,11,.40);
  background: rgba(245,158,11,.08);
  color: #fbbf24;
}
.fbadge.pro{
  border-color: rgba(168,85,247,.40);
  background: rgba(168,85,247,.10);
  color: #d8b4fe;
}
.fbadge.muted{
  border-color: rgba(148,163,184,.30);
  background: rgba(148,163,184,.06);
  color: var(--accent2);
}
.fbadge .dot{
  width:8px;height:8px;border-radius:999px;
  background: currentColor;
  opacity:.9;
}

/* tooltips (pure CSS) */
.hasTip{position:relative;cursor:help}
.hasTip::after{
  content: attr(data-tip);
  position:absolute;
  left:0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: 340px;
  padding:10px 12px;
  border-radius:var(--radius-md);
  border:1px solid rgba(34,38,55,.95);
  background: rgba(17,19,26,.98);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font-size:12px;
  line-height:1.35;
  opacity:0;
  pointer-events:none;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  z-index:50;
}
.hasTip:hover::after{opacity:1;transform: translateY(0)}

/* -----------------------------
   Landing Hero
------------------------------ */
.hero{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  margin: 14px 0 16px 0;
}
@media (max-width: 900px){ .hero{grid-template-columns:1fr} }

.heroKicker{
  display:inline-block;
  padding:6px 10px;
  border:1px solid rgba(34,38,55,.9);
  background: rgba(255,255,255,.02);
  color: var(--accent2);
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.2px;
  margin-bottom:10px;
}

.heroTitle{
  margin:0 0 10px 0;
  font-size:34px;
  line-height:1.08;
  letter-spacing:-0.4px;
}
@media (max-width:900px){ .heroTitle{font-size:28px} }

.heroAccent{color:#93c5fd}

.heroLead{
  margin:0 0 12px 0;
  color: var(--text);
  opacity:.92;
  font-size:14px;
  line-height:1.6;
}

.heroBadges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 10px 0 12px 0;
}

.heroCtas{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:6px;
}

.heroNote{
  margin-top:10px;
  padding:10px 12px;
  border-radius:var(--radius-md);
  border:1px solid rgba(148,163,184,.22);
  background: rgba(148,163,184,.05);
  color: var(--accent2);
  font-size:13px;
  line-height:1.45;
}

/* Right card */
.heroCard{
  border:1px solid rgba(34,38,55,.9);
  background: rgba(255,255,255,.015);
  border-radius:var(--radius-lg);
  padding:16px;
}

.heroCardTitle{
  font-weight:950;
  margin-bottom:10px;
  letter-spacing:.2px;
}

.heroMini{
  margin-top:14px;
  border-top:1px solid rgba(34,38,55,.8);
  padding-top:12px;
  display:grid;
  gap:8px;
}
.heroMiniRow{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}
.heroMiniLabel{color:var(--muted)}
.heroMiniValue{color:var(--text)}

.heroLinks{
  margin-top:12px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.heroLinks a{
  color:#93c5fd;
  text-decoration:none;
  font-size:13px;
  opacity:.95;
}
.heroLinks a:hover{opacity:1;text-decoration:underline}

/* -----------------------------
   Wizard panels (new helper)
------------------------------ */
.stepPanel{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(34,38,55,.75);
}
.panelTitle{
  font-weight:950;
  margin:0 0 6px 0;
  letter-spacing:-0.2px;
}
.panelDesc{
  margin:0 0 10px 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

/* -----------------------------
   Modal system
------------------------------ */
.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:60;
}
.modalInner{
  width:min(1100px, 100%);
  max-height: calc(100vh - 36px);
  overflow:auto;
}

/* subtle scrollbar polish (optional) */
.modalInner::-webkit-scrollbar{height:10px;width:10px}
.modalInner::-webkit-scrollbar-thumb{background:rgba(255,255,255,.08);border-radius:999px}
.modalInner::-webkit-scrollbar-track{background:rgba(0,0,0,.15);border-radius:999px}

/* disabled/locked feature cards/buttons */
.isLocked{
  opacity:.55;
  filter:saturate(.8);
  position:relative;
}
.lockOverlay{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px dashed rgba(168,85,247,.40);
  border-radius:var(--radius-md);
  background: rgba(168,85,247,.05);
  color:#e9d5ff;
  margin-top:10px;
}
.lockOverlay .msg{font-size:13px;color:#e9d5ff}
.lockOverlay .cta{
  border:1px solid rgba(168,85,247,.50);
  background: rgba(168,85,247,.12);
  color:#f5d0fe;
  padding:8px 10px;
  border-radius:var(--radius-sm);
  font-weight:900;
  cursor:pointer;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;          /* keeps rounded corners */
  background: transparent;   /* icon already has bg */
}

.logoImg {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* fills the square nicely */
  display: block;
}