/* =========================================================
   Commonshub Mock — Base Design Tokens
   ========================================================= */

:root{
  --bg:#f4f7f5;
  --card:#ffffff;
  --card2:#fbfcfb;

  --text:#102018;
  --muted:#50665a;

  --line:#d8e1db;
  --border:var(--line);

  --accent:#215f43;
  --accent2:#0f5132;

  --btn:var(--accent);
  --btnText:#ffffff;

  --pill:#eef4f0;

  --shadow:0 18px 50px rgba(16,32,24,.12);
  --radius:18px;
  --radius2:14px;

  --font:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:var(--font);
  line-height:1.35;
  color:var(--text);
  background:
    radial-gradient(1000px 520px at 20% 0%, rgba(31,111,74,.14) 0%, rgba(31,111,74,0) 62%),
    radial-gradient(900px 520px at 80% 10%, rgba(15,81,50,.10) 0%, rgba(15,81,50,0) 62%),
    var(--bg);
}

/* =========================================================
   Layout
   ========================================================= */

.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:22px 16px;
  display:grid;
  grid-template-columns:300px 1fr;
  gap:16px;
  min-height:100vh;
  align-items:start;
}

.sidebar{
  position:sticky;
  top:16px;
  align-self:start;
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
  backdrop-filter:blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px 12px;
  border-bottom:1px solid var(--line);
  margin-bottom:12px;
}

.dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 4px rgba(31,111,74,.14);
}

.brand b{ font-size:15px; }

.brand span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

.nav .navItem{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  width:100%;
  text-decoration:none;
  background:rgba(255,255,255,.85);
  border:1px solid var(--line);
  color:var(--text);
  padding:10px;
  border-radius:12px;
}

.nav .navItem.active{
  border-color:rgba(31,111,74,.55);
  box-shadow:0 0 0 3px rgba(31,111,74,.10) inset;
}

.nav .navItem small{ color:var(--muted); }

.hint{
  margin-top:14px;
  padding:10px;
  border-radius:12px;
  background:rgba(31,111,74,.06);
  border:1px dashed rgba(31,111,74,.25);
  color:var(--muted);
  font-size:12px;
}

.hint b{ color:var(--text); }

.stage{
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  backdrop-filter:blur(10px);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.75);
}

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

.logoMark{
  width:28px;
  height:28px;
  border-radius:10px;
  background:linear-gradient(135deg, rgba(31,111,74,1), rgba(31,111,74,.20));
  border:1px solid rgba(31,111,74,.25);
  flex:0 0 auto;
}

.topbar .meta b{
  display:block;
  font-size:14px;
}

.topbar .meta span{
  display:block;
  font-size:12px;
  color:var(--muted);
}

.content{ padding:14px 18px 18px; }
.center{ max-width:860px; margin:0 auto; width:100%; }

/* =========================================================
   Shared components
   ========================================================= */

.chip{
  font-size:12px;
  color:var(--muted);
  background:var(--pill);
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.header h1,
.header h2{
  margin:0;
  font-size:18px;
}

.header p{
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius2);
  padding:14px;
}

.card h3{
  margin:0 0 8px;
  font-size:14px;
}

.muted{
  color:var(--muted);
  font-size:12px;
}

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.item{
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--card2);
}

.item b{ font-size:13px; }
.item div{ margin-top:4px; }

.note{
  margin-top:12px;
  padding:10px;
  border-radius:12px;
  background:rgba(31,111,74,.06);
  border:1px solid rgba(31,111,74,.18);
  color:var(--muted);
  font-size:12px;
}

.note b{ color:var(--text); }

.footerBar{
  display:flex;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}

.primary{
  flex:1;
  min-width:220px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  text-decoration:none;
  background:var(--btn);
  color:var(--btnText);
  border:none;
  border-radius:14px;
  padding:12px 14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(31,111,74,.35);
}

.secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  text-decoration:none;
  background:#ffffff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  font-weight:900;
  cursor:pointer;
  width:160px;
}

.editBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  border:1px solid var(--line);
  background:rgba(255,255,255,.6);
  padding:3px 8px;
  border-radius:999px;
  margin-left:8px;
  white-space:nowrap;
}

.editBadge b{
  color:var(--text);
  font-weight:800;
}

.field{ margin-top:12px; }

label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

input[type="text"],
input[type="email"],
textarea,
select{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  padding:12px;
  font-size:14px;
  outline:none;
}

textarea{
  min-height:110px;
  resize:vertical;
}

/* =========================================================
   Progress
   ========================================================= */

.progress{
  display:flex;
  gap:8px;
  margin-top:12px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}

.bar{
  flex:1;
  height:8px;
  border-radius:999px;
  background:rgba(31,111,74,.08);
  border:1px solid rgba(31,111,74,.12);
  overflow:hidden;
}

.bar > div{
  height:100%;
  background:rgba(31,111,74,.70);
}

/* =========================================================
   Flow mode
   ========================================================= */

body.flow .flowRoot .sidebar{ display:none; }
body.flow .flowRoot .wrap{ grid-template-columns:1fr; }
body.flow .flowRoot .stage{ width:100%; }
body.flow .flowRoot #navToggle{ display:none !important; }

.flowRoot{
  min-height:100vh;
  padding:22px 0;
  background:
    radial-gradient(1200px 700px at 20% 0%, rgba(31,111,74,.10), transparent 60%),
    radial-gradient(900px 600px at 85% 15%, rgba(31,111,74,.07), transparent 55%),
    linear-gradient(to bottom, rgba(31,111,74,.05) 0%, rgba(245,247,245,1) 70%);
}

.flowRoot .stage{
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 18px 70px rgba(0,0,0,.08);
}

.flowRoot .flowBanner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(31,111,74,.18);
  background:rgba(31,111,74,.06);
  margin-bottom:14px;
}

.flowRoot .flowBanner b{ font-weight:900; }

.flowRoot .stepChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(31,111,74,.22);
  background:rgba(31,111,74,.08);
  font-weight:900;
  font-size:13px;
}

.flowRoot .exitLink,
.flowRoot a[data-reset]{
  opacity:.82;
}

.flowRoot .exitLink:hover,
.flowRoot a[data-reset]:hover{
  opacity:1;
}

.flowRoot .progress .bar > div{
  background:linear-gradient(90deg, var(--accent), rgba(31,111,74,.65), var(--accent));
  background-size:200% 100%;
  animation:flowPulse 3s ease-in-out infinite;
}

@keyframes flowPulse{
  0%{ background-position:0% 50%; }
  50%{ background-position:100% 50%; }
  100%{ background-position:0% 50%; }
}

.flowRoot .primary.forward::after{
  content:" →";
  font-weight:900;
}

/* =========================================================
   Funding helper
   ========================================================= */

.fundingCard .list{ gap:0 !important; }

.fundingCard .list .item{
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  padding:12px 0 !important;
}

.fundingCard .list .item + .item{
  border-top:1px solid rgba(16,32,24,.08) !important;
}

/* =========================================================
   Dashboard theme
   ========================================================= */

body.dashboard{
  --bg:#46524d;
  --dashText:#e9f2ec;
  --dashMuted:rgba(233,242,236,.72);
  --dashBorder:rgba(233,242,236,.14);

  --card:rgba(255,255,255,.94);
  --card2:rgba(255,255,255,.88);
  --cardText:#0f1713;
  --cardMuted:rgba(15,23,19,.70);
  --line:rgba(15,23,19,.10);

  color:var(--dashText);
  background:
    radial-gradient(1200px 600px at 30% 0%, rgba(31,111,74,.05), transparent 70%),
    radial-gradient(1000px 600px at 80% 10%, rgba(31,111,74,.04), transparent 70%),
    var(--bg);
}

body.dashboard .wrap{
  grid-template-columns:1fr;
  max-width:900px;
}

body.dashboard .stage{
  background:rgba(255,255,255,.10);
  border:1px solid var(--dashBorder);
  box-shadow:0 22px 60px rgba(0,0,0,.28);
  backdrop-filter:blur(14px);
}

body.dashboard .topbar{
  background:rgba(255,255,255,.12);
  border-bottom:1px solid var(--dashBorder);
}

body.dashboard .topbar .meta b,
body.dashboard .topbar .meta span{
  color:var(--dashText);
}

body.dashboard .topbar .meta span{
  color:var(--dashMuted);
}

body.dashboard .chip{
  background:rgba(255,255,255,.10);
  border:1px solid var(--dashBorder);
  color:var(--dashText);
  font-weight:700;
}

body.dashboard .header{
  padding-bottom:14px;
  margin-bottom:18px;
  border-bottom:1px solid var(--dashBorder);
}

body.dashboard .header h2{
  font-size:20px;
  font-weight:900;
  letter-spacing:-.01em;
}

body.dashboard .card{
  background:var(--card);
  color:var(--cardText);
  border:1px solid rgba(255,255,255,.18);
}

body.dashboard .card .muted{
  color:var(--cardMuted);
}

body.dashboard .card .secondary,
body.dashboard #fundingLiveActions .secondary,
body.dashboard #fundingLiveActions button.secondary{
  background:#ffffff;
  color:var(--cardText);
  border:1px solid var(--line);
  box-shadow:none;
}

body.dashboard .sidebar{
  background:rgba(0,0,0,.28);
  border:1px solid var(--dashBorder);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(12px);
}

body.dashboard .brand{
  border-bottom:1px solid var(--dashBorder);
}

body.dashboard .brand b{
  color:var(--dashText);
}

body.dashboard .brand span{
  color:var(--dashMuted);
}

body.dashboard .hint{
  background:rgba(255,255,255,.06);
  border:1px dashed var(--dashBorder);
  color:var(--dashMuted);
}

body.dashboard .sidebar a{
  color:var(--dashText);
}

/* =========================================================
   Dashboard header meta row
   ========================================================= */

body.dashboard #headerSubcopy{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  font-size:14px;
  line-height:1;
  color:var(--dashMuted);
}

#headerDomain{
  color:var(--dashText);
  font-weight:600;
  opacity:1;
}

.dnsMeta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.status{
  display:inline-flex;
  align-items:center;
  font-weight:700;
  line-height:1;
}

body.dashboard .dnsCheckBtn{
  margin-left:6px;
  padding:6px 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#ffffff;
  color:var(--cardText);
  border:1px solid rgba(0,0,0,.15);
  box-shadow:none;
}

body.dashboard .status.running{
  color:#3cc37a;
}

body.dashboard .status.pending{
   color:#f4a623;
}

body.dashboard .status.verified{
  color:#3cc37a;
}



/* =========================================================
   Dashboard tabs
   ========================================================= */

.serviceTabs{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.serviceTab{
  appearance:none;
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--cardText);
  border-radius:999px;
  padding:10px 18px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.serviceTab.active{
  background:rgba(31,111,74,.10);
  color:var(--accent);
  border-color:rgba(31,111,74,.35);
}

.servicePanel{ display:none; }
.servicePanel.active{ display:block; }

/* =========================================================
   Metrics
   ========================================================= */

.metricsRow{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.metersRow{
  align-items:stretch;
}

.metricCard{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:14px 12px;
  background:rgba(255,255,255,.35);
  text-align:center;
}

.metricLabel{
  font-size:13px;
  font-weight:700;
  margin-bottom:10px;
  color:rgba(0,0,0,.7);
}

.metricSub{
  font-size:12px;
  color:rgba(0,0,0,.58);
}

.fillMeter{
  position:relative;
  width:84px;
  height:130px;
  margin:0 auto 10px;
  border-radius:18px;
  border:3px solid rgba(0,0,0,.14);
  background:rgba(255,255,255,.55);
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.fillTicks{
  position:absolute;
  inset:10px;
  pointer-events:none;
}

.fillTicks span{
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background:rgba(0,0,0,.14);
}

.fillTicks span:nth-child(1){ bottom:25%; }
.fillTicks span:nth-child(2){ bottom:50%; }
.fillTicks span:nth-child(3){ bottom:75%; }

.fillWater{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  background:rgba(31,111,74,.24);
}

.uptimeWater{
  background:rgba(31,111,74,.18);
}

.fillValue{
  position:relative;
  z-index:2;
  font-size:14px;
  font-weight:800;
  line-height:1;
  margin-bottom:10px;
}

/* =========================================================
   Funding live actions
   ========================================================= */

body.dashboard #fundingLiveActions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

/* =========================================================
   Responsive
   ========================================================= */

.planGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:start;
}

@media (max-width:1020px){
  .wrap{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:relative;
    top:auto;
  }
}

@media (max-width:860px){
  .planGrid{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   Launch setup page
   ========================================================= */

.setupCard{
  padding:18px;
}

.setupSteps{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.setupStep{
  border-radius:18px;
  border:1px solid rgba(15,23,19,.10);
  background:rgba(255,255,255,.55);
  padding:14px;
  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.setupStep.locked{
  opacity:.72;
}

.setupStep.open{
  background: #f6f8f7;
  border-color:rgba(15,23,19,.12);
  border: 1px solid #d9e3dd;
  box-shadow:0 8px 24px rgba(16,32,24,.06);
}

.setupStep.done{
  background:rgba(31,111,74,.08);
  border-color:rgba(31,111,74,.22);
}

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

.setupStepTitle{
  font-size:17px;
  font-weight:900;
  line-height:1.2;
  margin:0;
}

.setupStepStatus{
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid rgba(15,23,19,.10);
  background:rgba(255,255,255,.65);
  color:rgba(15,23,19,.58);
}

.setupStep.open .setupStepStatus{
  color:var(--accent);
  border-color:rgba(31,111,74,.25);
  background:rgba(31,111,74,.08);
}

.setupStep.done .setupStepStatus{
  display:none;
}

.setupStepSummary{
  margin-top:6px;
  color:rgba(15,23,19,.68);
  font-size:14px;
}

.setupStepDetails{
  margin-top:12px;
  display:none;
}

.setupStep.open .setupStepDetails{
  display:block;
}

.setupActions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}

.setupActions .secondary,
.setupActions .primary{
  width:auto;
}

.setupActions .primary{
  flex:1;
  min-width:220px;
}

.stepTextWrap{
  margin-top:12px;
}

.stepTextWrap textarea{
  min-height:140px;
}

.stepTextWrap.is-hidden{
  display:none;
}

.progressMeta{
  text-align:right;
}

.progressMeta b{
  display:block;
  font-size:16px;
}

/* done state */
.setupStepDoneBar{
  display:none;
  margin-top:10px;
}

.setupStep.done .setupStepDoneBar{
  display:block;
}

.setupStep.done.open .setupStepDoneBar{
  display:none;
}

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

.setupStepDoneRow + .setupStepDoneRow{
  margin-top:4px;
}

.doneTitle{
  font-size:15px;
  font-weight:800;
  color:#215f43;
}

.doneSummary{
  font-size:14px;
  color:rgba(15,23,19,.68);
  min-width:0;
}

.doneOpenLink,
.doneTextLink{
  appearance:none;
  border:none;
  background:none;
  padding:0;
  margin:0;
  font-size:13px;
  font-weight:700;
  color:var(--accent);
  text-decoration:none;
  cursor:pointer;
}

.doneOpenLink:hover,
.doneTextLink:hover{
  text-decoration:underline;
}

.setupStep.done .stepTextWrap{
  margin-top:8px;
}

@media (max-width:760px){
  .setupStepHeader{
    flex-direction:column;
    align-items:flex-start;
  }

  .progressMeta{
    text-align:left;
  }

  .setupActions{
    flex-direction:column;
  }

  .setupActions .primary,
  .setupActions .secondary{
    width:100%;
  }

  .setupStepDoneRow{
    flex-direction:column;
    align-items:flex-start;
  }

  .doneLinks{
    justify-content:flex-start;
  }

  .fieldHeader{
    align-items:flex-start;
    flex-direction:column;
  }

  .fieldHeader .secondary,
  .fieldHeader .copyBtn{
    width:auto;
  }
}

.stepToggleLink,
.doneOpenLink,
.doneTextLink{
  appearance:none;
  border:none;
  background:none;
  padding:0;
  margin:0;
  font-size:14px;
  font-weight:700;
  color:var(--accent);
  text-decoration:none;
  cursor:pointer;
}

.stepToggleLink:hover,
.doneOpenLink:hover,
.doneTextLink:hover{
  text-decoration:underline;
}

.fieldHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}

.fieldHeader label{
  margin-bottom:0;
  font-size:12px;
  font-weight:700;
  color:rgba(15,23,19,.68);
}

.fieldHeader .secondary,
.fieldHeader .copyBtn{
  width:auto;
  min-width:auto;
  padding:8px 12px;
  font-size:12px;
  line-height:1;
  flex:0 0 auto;
}

.setupActions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}

.setupActions .primary{
  flex:1;
  min-width:220px;
}

.setupActions .secondary{
  width:auto;
}

.setupStep.done .setupStepHeader .setupStepSummary{
  display:none;
}

.setupStep.open .setupStepDoneBar{
  display:none;
}

.stepPasteGroup{
  margin-top:14px;
}

.stepPasteGroup label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:rgba(15,23,19,.68);
}

.stepTextWrap textarea {
  width: 100%;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  resize: vertical;
}

/* Compact single-line fields */
.stepPasteGroup.compact textarea {
  min-height: 38px;
  height: 38px;
  overflow: hidden;
}

/* Multi-line content */
.stepPasteGroup.large textarea {
  min-height: 120px;
}
