:root{
  --bg:#ffffff;
  --text:#0b0f14;
  --muted:#5b6775;
  --soft:#f4f6f8;
  --border:#e6eaef;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --green:#1aa15f; /* SEB-ish green accent */
  --green2:#0e7f48;
  --danger:#d64545;
  --radius:18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:var(--bg);
}

.topbar{
  position: sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.9);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--border);
  padding:14px 18px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:240px;
}
.logo-dot{
  width:14px;height:14px;border-radius:999px;
  background:linear-gradient(135deg,var(--green),var(--green2));
  box-shadow:0 0 0 6px rgba(26,161,95,.12);
}
.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:2px;}

.top-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:650;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
}
.btn:hover{ border-color:#d7dde6; transform: translateY(-1px); }
.btn-ghost{ background:var(--soft); }
.btn-danger{
  background:rgba(214,69,69,.08);
  border-color:rgba(214,69,69,.25);
  color:var(--danger);
}

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:18px;
  padding:18px;
  max-width:1200px;
  margin:0 auto;
}

.sidenav{ position: sticky; top:80px; align-self:start; }
.side-card{
  background:var(--soft);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
}

.side-title{ font-weight:800; margin-bottom:10px; }
.side-nav{ display:flex; flex-direction:column; gap:8px; }
.side-link{
  text-align:left;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:10px 10px;
  cursor:pointer;
  font-weight:650;
}
.side-link:hover{ border-color:#d7dde6; }

.side-meta{ display:grid; gap:10px; margin:14px 0 8px; }
.kpi{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
}
.kpi-label{ font-size:12px; color:var(--muted); }
.kpi-value{ font-size:18px; font-weight:850; margin-top:4px; }

.content{ display:flex; flex-direction:column; gap:14px; }

.step{
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:#fff;
  box-shadow:var(--shadow);
}
.step > summary{
  cursor:pointer;
  list-style:none;
  padding:14px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--border);
}
.step > summary::-webkit-details-marker{ display:none; }

.step-num{
  width:30px;height:30px;border-radius:999px;
  display:grid; place-items:center;
  background:rgba(26,161,95,.12);
  color:var(--green2);
  font-weight:900;
}
.step-title{ font-weight:850; }
.step-pill{
  margin-left:auto;
  font-size:12px;
  color:var(--green2);
  border:1px solid rgba(26,161,95,.25);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(26,161,95,.08);
  max-width:45%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.step-body{ padding:14px; }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.row{ display:flex; gap:12px; align-items:flex-start; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.responsive{ grid-template-columns: repeat(3, 1fr); gap:12px; }

/* Make the label area above inputs equal height across the 3-column row */
.row3 .field > span{
  display: block;
  min-height: 34px;     /* adjust: 32–40px depending on your font/spacing */
  line-height: 1.2;
}


.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  background:#fff;
}
.card-soft{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
  background:var(--soft);
}
.card-title{ font-weight:900; margin-bottom:10px; }

.banner{
  background:linear-gradient(0deg, rgba(26,161,95,.06), rgba(26,161,95,.06));
  border:1px solid rgba(26,161,95,.18);
  border-radius:14px;
  padding:10px 12px;
  color:#0b2a1a;
  margin:10px 0 12px;
  font-size:13px;
}
.banner ul{ margin:8px 0 0 18px; padding:0; color:#0b2a1a; }

.field{ display:flex; flex-direction:column; gap:6px; }
.field span{ font-weight:750; font-size:13px; }
.field input, .field select{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 10px;
  font-size:14px;
  outline:none;
}
.field input:focus, .field select:focus{
  border-color: rgba(26,161,95,.5);
  box-shadow: 0 0 0 4px rgba(26,161,95,.12);
}
.field.inline{
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px dashed var(--border);
  border-radius:14px;
  padding:10px;
  margin-bottom:12px;
}
.field.inline span{ font-weight:800; }
.field.inline input{ width:18px; height:18px; }

.hint{ color:var(--muted); font-size:12px; }
.muted{ color:var(--muted); }
.tiny{ font-size:12px; }
.mono{ font-family:var(--mono); }

/* Extra breathing room for “helper text” lines in Main inputs */
.hint-spaced{
  margin-bottom: 10px;  /* tweak to taste: 8–14px */
  display: block;
}


.hr{ height:1px; background:var(--border); margin:12px 0; }

.seg{
  display:flex;
  border:1px solid var(--border);
  border-radius:999px;
  overflow:hidden;
  background:#fff;
}
.seg-btn{
  flex:1;
  padding:10px 10px;
  cursor:pointer;
  border:none;
  background:transparent;
  font-weight:850;
}
.seg-btn.active{
  background:linear-gradient(135deg, rgba(26,161,95,.14), rgba(26,161,95,.08));
  color:var(--green2);
}

.statgrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.stat{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background:var(--soft);
}
.stat-label{ font-size:12px; color:var(--muted); }
.stat-value{ font-size:18px; font-weight:900; margin-top:4px; }

.result{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background:var(--soft);
}
.result-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
}
.result-line b{ font-weight:950; }

.budget-table{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.budget-row{
  display:grid;
  grid-template-columns: 1.2fr 1.6fr 1fr 1fr .9fr;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
.budget-row.head{
  background:var(--soft);
  font-weight:900;
}
.budget-row.foot{
  background:var(--soft);
  font-weight:900;
}

/* Budget table alignment */
.budget-row.head > div:nth-child(3),
.budget-row.head > div:nth-child(4),
.budget-row.head > div:nth-child(5){
  text-align: center;
}

.budget-row:not(.head) > div:nth-child(3),
.budget-row:not(.head) > div:nth-child(4),
.budget-row:not(.head) > div:nth-child(5){
  text-align: right;
}

/* Prettier budget table inputs */
.budget-row input[type="number"]{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  background: var(--soft);
  font-size: 14px;
  outline: none;
}

.budget-row input[type="number"]:focus{
  background: #fff;
  border-color: rgba(26,161,95,.55);
  box-shadow: 0 0 0 4px rgba(26,161,95,.12);
}

/* Keep % number compact */
.pctbox input[type="number"]{
  width: 92px;
}

/* Range slider nicer (simple + consistent) */
.pctbox input[type="range"]{
  accent-color: var(--green);
  height: 6px;
}


.pctbox{
  display:flex;
  gap:8px;
  align-items:center;
}
.pctbox input[type="range"]{ width:100%; }
.pctbox input[type="number"]{ width:86px; }

.pct-warning{
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(214,69,69,.25);
  background: rgba(214,69,69,.08);
  color: #7b1f1f;
  font-size: 13px;
  font-weight: 650;
}

.pct-warning.show{ display: block; }


.alloc-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:10px;
  margin-top:10px;
}
.alloc-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
}
.alloc-name{ font-size:12px; color:var(--muted); font-weight:800; }
.alloc-val{ margin-top:6px; font-size:16px; font-weight:950; }

.footer{
  padding:14px 2px 2px;
  color:var(--muted);
}

.mini-label{ font-size:12px; color:var(--muted); font-weight:800; }
.mini-value{ margin-top:6px; font-size:18px; font-weight:900; }

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidenav{ position:relative; top:auto; }
  .grid2{ grid-template-columns:1fr; }
  .row3{ grid-template-columns:1fr; }
  .responsive{ grid-template-columns:1fr; }
  .alloc-grid{ grid-template-columns:1fr 1fr; }
  .budget-row{ grid-template-columns: 1fr; gap:8px; }
}
