/**
 * FYSH — Room Itemiser (styles)
 * Page creation: 18/10/2026 13:51
 * Page modified: 19/10/2026 14:50
 */
:root{
  --bg:#0d1017; --surface:#141a24; --surface-2:#1b2330; --surface-3:#222c3b;
  --border:#28303f; --border-soft:#1f2733;
  --text:#e8edf4; --muted:#93a1b5; --faint:#67738a;
  --accent:#d9b25f; --accent-2:#e8c87b; --accent-soft:rgba(217,178,95,.12);
  --ok:#5fb98a; --ok-soft:rgba(95,185,138,.12);
  --danger:#e06c6c; --danger-soft:rgba(224,108,108,.12);
  --radius:14px; --radius-sm:10px;
  --shadow:0 10px 40px -12px rgba(0,0,0,.6);
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--font); background:
    radial-gradient(1200px 600px at 80% -10%, rgba(217,178,95,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(99,120,180,.07), transparent 60%),
    var(--bg);
  color:var(--text); line-height:1.5; -webkit-font-smoothing:antialiased;
  min-height:100%;
}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select{font-family:inherit;font-size:15px}
a{color:var(--accent-2)}

/* layout */
.app{max-width:960px;margin:0 auto;padding:28px 20px 72px}
header.top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:13px}
.brand h1{font-size:18px;font-weight:700;letter-spacing:.2px}
.brand p{font-size:12.5px;color:var(--muted);font-weight:500}
.top-actions{display:flex;gap:9px;flex-wrap:wrap}

/* buttons */
.btn{
  display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:var(--radius-sm);
  font-size:14px;font-weight:600;transition:.18s ease;border:1px solid transparent;white-space:nowrap;
}
.btn:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}
.btn-primary{background:linear-gradient(145deg,var(--accent),#c49d4c);color:#1a1408}
.btn-primary:hover{filter:brightness(1.07);transform:translateY(-1px)}
.btn-ghost{background:var(--surface-2);color:var(--text);border-color:var(--border)}
.btn-ghost:hover{background:var(--surface-3);border-color:#333e52}
.btn-subtle{background:transparent;color:var(--muted);border-color:var(--border-soft)}
.btn-subtle:hover{color:var(--text);border-color:var(--border)}
.btn-danger{background:var(--danger-soft);color:var(--danger);border-color:transparent}
.btn-danger:hover{background:rgba(224,108,108,.2)}
.btn[disabled]{opacity:.4;cursor:not-allowed;transform:none;filter:none}
.btn.sm{padding:7px 12px;font-size:13px}

/* cards */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.card .pad{padding:26px}
@media(max-width:560px){.card .pad{padding:20px 16px}.app{padding:18px 13px 60px}}

/* stepper */
.stepper{display:flex;align-items:center;gap:6px;margin-bottom:22px;overflow-x:auto;padding-bottom:4px}
.step-pill{display:flex;align-items:center;gap:9px;padding:9px 13px;border-radius:999px;background:var(--surface-2);
  border:1px solid var(--border-soft);font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap;transition:.2s}
.step-pill .num{width:21px;height:21px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;
  font-size:11.5px;font-weight:700;color:var(--muted);transition:.2s}
.step-pill.active{color:var(--text);border-color:var(--accent);background:var(--accent-soft)}
.step-pill.active .num{background:var(--accent);color:#1a1408}
.step-pill.done{color:var(--ok)}
.step-pill.done .num{background:var(--ok);color:#06231a}
.step-sep{flex:none;width:14px;height:1px;background:var(--border)}
@media(max-width:620px){.step-pill span.lbl{display:none}.step-sep{width:6px}}

/* forms */
.section-head{margin-bottom:20px}
.section-head h2{font-size:21px;font-weight:700;letter-spacing:.2px}
.section-head p{color:var(--muted);font-size:14px;margin-top:5px}
.intro-copy{color:var(--muted);font-size:13.5px;line-height:1.6;background:var(--surface-2);
  border:1px solid var(--border-soft);border-left:3px solid var(--accent);
  border-radius:var(--radius-sm);padding:14px 16px;margin:0 0 20px}
.field{margin-bottom:18px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:7px}
.field .hint{font-weight:500;color:var(--faint);font-size:12px;margin-left:4px}
.control{
  width:100%;padding:12px 14px;background:var(--surface-2);border:1px solid var(--border);
  border-radius:var(--radius-sm);color:var(--text);transition:.16s;
}
.control:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.control::placeholder{color:var(--faint)}
select.control{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2393a1b5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.row{display:flex;gap:14px;flex-wrap:wrap}
.row .field{flex:1;min-width:150px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:480px){.grid2{grid-template-columns:1fr}}

/* stepper number control */
.counter{display:flex;align-items:center;gap:0;width:fit-content;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;background:var(--surface-2)}
.counter button{width:42px;height:44px;font-size:20px;color:var(--muted);transition:.15s;font-weight:500}
.counter button:hover{background:var(--surface-3);color:var(--text)}
.counter input{width:58px;height:44px;text-align:center;background:transparent;border:none;color:var(--text);font-size:16px;font-weight:700;border-left:1px solid var(--border);border-right:1px solid var(--border)}
.counter input:focus{outline:none}

/* unit toggle */
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:3px}
.seg button{padding:7px 15px;border-radius:7px;font-size:13px;font-weight:600;color:var(--muted);transition:.15s}
.seg button.on{background:var(--accent);color:#1a1408}

/* property type cards */
.type-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.type-opt{padding:16px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);
  text-align:left;transition:.16s;display:flex;flex-direction:column;gap:7px}
.type-opt:hover{border-color:#39455a;transform:translateY(-2px)}
.type-opt.on{border-color:var(--accent);background:var(--accent-soft)}
.type-opt .ic{font-size:22px}
.type-opt .nm{font-size:14px;font-weight:600}

/* floor + room blocks */
.block{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);margin-bottom:14px;overflow:hidden}
.block-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--surface-3)}
.block-head .idx{width:28px;height:28px;border-radius:8px;background:var(--accent-soft);color:var(--accent-2);
  display:grid;place-items:center;font-size:13px;font-weight:700;flex:none}
.block-head .floor-label{flex:1;background:transparent;border:none;color:var(--text);font-size:15px;font-weight:700;padding:4px 6px;border-radius:6px}
.block-head .floor-label:hover,.block-head .floor-label:focus{background:var(--surface-2);outline:none}
.block-head .tag{font-size:11.5px;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.6px}
.block-body{padding:16px}

/* room row */
.room-row{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid var(--border-soft)}
.room-row:last-child{border-bottom:none}
.room-row .rnum{width:24px;height:24px;border-radius:7px;background:var(--surface-3);color:var(--muted);display:grid;place-items:center;font-size:12px;font-weight:700;flex:none}
.room-row input.rname{flex:1;min-width:0}
.room-row .del{flex:none;color:var(--faint);width:34px;height:34px;border-radius:8px;display:grid;place-items:center;transition:.15s}
.room-row .del:hover{background:var(--danger-soft);color:var(--danger)}
.add-room{margin-top:12px;width:100%;justify-content:center;border:1px dashed var(--border);background:transparent;color:var(--muted);padding:11px}
.add-room:hover{border-color:var(--accent);color:var(--accent-2)}

/* dimension editor */
.dim-room{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);margin-bottom:14px}
.dim-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.dim-head .meta{display:flex;align-items:center;gap:11px;min-width:0}
.dim-head .nm{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dim-head .flr{font-size:12px;color:var(--faint);font-weight:600}
.area-badge{font-size:13px;font-weight:700;color:var(--accent-2);background:var(--accent-soft);padding:6px 12px;border-radius:8px;white-space:nowrap}
.dim-body{padding:16px}
.shape-pick{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.shape-opt{display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);font-size:13px;font-weight:600;color:var(--muted);transition:.15s}
.shape-opt svg{width:20px;height:20px}
.shape-opt.on{border-color:var(--accent);background:var(--accent-soft);color:var(--text)}
.shape-opt.on svg path,.shape-opt.on svg polygon{stroke:var(--accent-2)}
.seg-label{font-size:12px;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.6px;margin:4px 0 10px}

/* polygon verts */
.vert-list{display:flex;flex-direction:column;gap:9px}
.vert-row{display:flex;align-items:center;gap:10px}
.vert-row .vn{font-size:12px;color:var(--faint);font-weight:700;width:46px;flex:none}
.unit-suffix{position:relative}
.unit-suffix::after{content:attr(data-u);position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--faint);font-size:12px;font-weight:600;pointer-events:none}
.unit-suffix .control{padding-right:34px}

/* review */
.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-bottom:22px}
.stat{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px}
.stat .v{font-size:26px;font-weight:800;letter-spacing:.3px}
.stat .v small{font-size:14px;font-weight:600;color:var(--muted)}
.stat .l{font-size:12px;color:var(--muted);font-weight:600;margin-top:3px;text-transform:uppercase;letter-spacing:.5px}
table.review{width:100%;border-collapse:collapse;font-size:14px}
table.review th{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);padding:10px 12px;border-bottom:1px solid var(--border)}
table.review td{padding:11px 12px;border-bottom:1px solid var(--border-soft)}
table.review tr:last-child td{border-bottom:none}
table.review .flr-row td{background:var(--surface-2);font-weight:700;color:var(--accent-2)}
table.review .num{text-align:right;font-variant-numeric:tabular-nums}
.shape-chip{font-size:11px;font-weight:700;padding:3px 9px;border-radius:6px;background:var(--surface-3);color:var(--muted)}

/* footer nav */
.nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px}
.nav .right{display:flex;gap:10px}

/* start screen */
.start-hero{text-align:center;padding:40px 20px 30px}
.start-hero .mark-lg{width:72px;height:72px;margin:0 auto 16px;display:grid;place-items:center}
.start-hero .mark-lg svg{width:72px;height:72px;display:block}
.start-hero h2{font-size:25px;font-weight:800;letter-spacing:.3px}
.start-hero p{color:var(--muted);max-width:420px;margin:9px auto 0;font-size:15px}
.saved-head{display:flex;align-items:center;justify-content:space-between;margin:30px 0 14px}
.saved-head h3{font-size:15px;font-weight:700}
.saved-head .count{font-size:12px;color:var(--faint);font-weight:600}
.design-item{display:flex;align-items:center;gap:14px;padding:15px 16px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);margin-bottom:11px;transition:.15s;flex-wrap:wrap}
.design-item:hover{border-color:#39455a}
.design-item .di-main{flex:1;min-width:160px}
.design-item .di-name{font-size:15px;font-weight:700}
.design-item .di-meta{font-size:12.5px;color:var(--muted);margin-top:3px}
.design-item .di-actions{display:flex;gap:8px;flex-wrap:wrap}
.pill-status{font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;text-transform:uppercase;letter-spacing:.5px}
.pill-status.final{background:var(--ok-soft);color:var(--ok)}
.pill-status.draft{background:var(--accent-soft);color:var(--accent-2)}
.empty{text-align:center;padding:36px 20px;color:var(--faint);border:1px dashed var(--border);border-radius:var(--radius-sm)}
.empty svg{width:40px;height:40px;margin-bottom:12px;opacity:.5}

/* toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(120px);background:var(--surface-3);
  border:1px solid var(--border);border-radius:var(--radius-sm);padding:13px 20px;font-size:14px;font-weight:600;
  box-shadow:var(--shadow);transition:.3s cubic-bezier(.2,.8,.2,1);z-index:100;display:flex;align-items:center;gap:10px}
.toast.show{transform:translateX(-50%) translateY(0)}
.toast .dot{width:8px;height:8px;border-radius:50%;background:var(--ok)}
.toast.err .dot{background:var(--danger)}

.err-msg{color:var(--danger);font-size:13px;font-weight:600;margin-top:8px;display:none}
.err-msg.show{display:block}
.hidden{display:none !important}
.autosave{font-size:12px;color:var(--faint);font-weight:600;display:flex;align-items:center;gap:6px}
.autosave .dot{width:7px;height:7px;border-radius:50%;background:var(--ok)}

/* theme toggle */
.theme-toggle{position:relative;width:60px;height:32px;border-radius:999px;background:var(--surface-2);
  border:1px solid var(--border);padding:3px;display:inline-flex;align-items:center;transition:.25s;flex:none}
.theme-toggle:hover{border-color:#39455a}
.theme-toggle .knob{width:24px;height:24px;border-radius:50%;background:linear-gradient(145deg,var(--accent),#b78f3f);
  display:grid;place-items:center;color:#1a1408;transition:transform .3s cubic-bezier(.3,.9,.3,1.3);transform:translateX(0)}
body.light .theme-toggle .knob{transform:translateX(28px)}
.theme-toggle:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}

/* light theme */
body.light{
  --bg:#eef1f6; --surface:#ffffff; --surface-2:#f5f7fb; --surface-3:#e9edf4;
  --border:#d7dde7; --border-soft:#e7ebf2;
  --text:#1b2330; --muted:#5a6880; --faint:#8a96a8;
  --accent:#b7902f; --accent-2:#8f6f20; --accent-soft:rgba(183,144,47,.13);
  --ok:#3f9d6e; --ok-soft:rgba(63,157,110,.12);
  --danger:#cf5a5a; --danger-soft:rgba(207,90,90,.1);
  --shadow:0 12px 40px -16px rgba(30,45,80,.25);
}
body.light .theme-toggle .knob{color:#fff}

/* local data notice */
.notice{display:flex;gap:13px;align-items:flex-start;padding:15px 17px;margin:18px 0 4px;
  border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius-sm);
  background:var(--accent-soft);font-size:13.5px;line-height:1.55}
.notice svg{width:19px;height:19px;flex:none;margin-top:1px;color:var(--accent-2)}
.notice strong{color:var(--text);font-weight:700}
.notice p{color:var(--muted)}

/* CSP-safe utility classes (replace former inline style attributes) */
.muted-cell{color:var(--faint)}
.ic-nudge-l{margin-right:-2px}
.ic-nudge-r{margin-left:-2px}
.mt-12{margin-top:12px}
.mt-16{margin-top:16px}
.mt-20{margin-top:20px}
.mb-0{margin-bottom:0}
.table-flush{box-shadow:none;overflow:hidden}
