/* ── THEME — same palette as AFO / The Home Crowd ─────────── */
:root {
    --shop-black:    #080808;
    --steel-gray:    #121212;
    --tool-teal:     #00a896;
    --safety-orange: #ff6b35;
    --danger-red:    #d90429;
    --go-green:      #2ec4b6;
    --text-main:     #f8f9fa;
    --text-dim:      #8d99ae;
    --border-dim:    #2b2d42;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--shop-black);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 90px;
    overflow-x: hidden;
}

/* ── HEADER ─────────────────────────────────────────────────── */
header {
    background: var(--steel-gray);
    border-bottom: 2px solid var(--border-dim);
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}
header h1 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--safety-orange);
    letter-spacing: -0.5px;
}
header .sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.header-nav {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.header-nav::-webkit-scrollbar { display: none; }
.nav-btn {
    flex: 0 0 auto;
    min-width: 68px;
    padding: 10px 4px;
    background: #1e1e1e;
    color: var(--text-dim);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
@media (min-width: 600px) {
    .nav-btn { flex: 1; min-width: unset; }
}
.nav-btn.active {
    background: #00a896 !important;
    color: #080808 !important;
    border-color: #00a896 !important;
}

/* ── STAGE 13: Sanity Checker ───────────────────────────────── */
#sanityBanner { padding: 10px 15px 0; }
.sanity-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sanity-label  { font-size: 0.7rem; color: var(--text-dim); }
.sanity-count-error {
    background: var(--danger-red); color: #fff;
    font-size: 0.7rem; font-weight: 900; padding: 2px 8px; border-radius: 4px;
}
.sanity-count-warn {
    background: var(--safety-orange); color: var(--shop-black);
    font-size: 0.7rem; font-weight: 900; padding: 2px 8px; border-radius: 4px;
}
.sanity-item {
    padding: 8px 12px; border-radius: 5px; margin-bottom: 6px;
    font-size: 0.8rem; line-height: 1.45;
}
.sanity-error   { background: #250808; border: 1px solid var(--danger-red);    color: #f5a5a5; }
.sanity-warning { background: #261500; border: 1px solid var(--safety-orange); color: #ffd299; }
/* Nav badge — shows count when errors or warnings exist */
.nav-btn { position: relative; }
.nav-btn[data-badge]::after {
    content: attr(data-badge);
    position: absolute; top: 3px; right: 3px;
    background: var(--danger-red); color: #fff;
    font-size: 0.55rem; font-weight: 900;
    padding: 1px 4px; border-radius: 3px;
    line-height: 1.4; pointer-events: none;
}

/* ── STAGE 16: Station View ─────────────────────────────────── */
.station-delivery-bar {
    background: #1a2a1a; border: 1px solid #3a5a3a; border-radius: 6px;
    padding: 8px 12px; margin: 0 0 10px; font-size: 0.8rem; color: #9fd49f;
}
.station-view-block {
    background: #181818; border: 1px solid #2a2a2a; border-radius: 6px;
    padding: 0; margin-bottom: 10px; overflow: hidden;
}
.station-view-header {
    background: #222; padding: 8px 12px; font-size: 0.8rem; font-weight: 900;
    color: var(--tool-teal); display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.station-due-chip {
    font-size: 0.72rem; font-weight: 700; color: #f0c060;
    background: #2a1f00; border: 1px solid #604000;
    padding: 2px 8px; border-radius: 10px; flex-shrink: 0;
}
.station-view-table {
    width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.station-view-table th {
    background: #1e1e1e; color: var(--text-dim); font-size: 0.7rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 5px 10px; border-bottom: 1px solid #2a2a2a;
}
.station-view-table td { padding: 6px 10px; border-bottom: 1px solid #1e1e1e; }
.station-view-table .station-alt td { background: #1c1c1c; }
.station-view-block p { padding: 8px 12px; margin: 0; }

/* ── STAGE 15: Countertop Design ────────────────────────────── */
.ctop-svgwrap {
    width: 100%; margin-bottom: 12px;
    border-radius: 6px; overflow: hidden; background: #fff;
}
.ctop-svgwrap svg { width: 100%; height: auto; display: block; }
.ctop-summary-card {
    background: #1a1a1a; border-radius: 6px;
    padding: 10px 14px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.ctop-run-card {
    background: #181818; border: 1px solid #2a2a2a;
    border-radius: 6px; padding: 12px; margin-bottom: 10px;
}
.ctop-run-header {
    display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.ctop-run-label {
    flex: 1; font-weight: 700; font-size: 0.88rem;
    color: var(--tool-teal); background: transparent;
    border: none; border-bottom: 1px solid #333; padding: 4px 0;
}
.ctop-delete-btn {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 0.9rem; padding: 4px 8px;
    border-radius: 4px; flex-shrink: 0;
}
.ctop-delete-btn:active { background: #300; color: var(--danger-red); }
.ctop-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px;
}
@media (max-width: 400px) { .ctop-grid { grid-template-columns: 1fr; } }
.ctop-check-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; cursor: pointer;
}
.ctop-sink-block {
    background: #1a1a1a; border-radius: 5px; padding: 10px; margin-bottom: 10px;
}
.ctop-run-calc {
    background: #1a1a1a; border-radius: 4px; padding: 8px 12px;
    font-size: 0.8rem; color: var(--tool-teal); font-weight: 700;
    margin-top: 8px; text-align: right;
}
.ctop-room-total {
    text-align: right; font-size: 0.78rem; color: var(--tool-teal);
    margin-top: 8px; padding: 6px 0; border-top: 1px solid #222;
}
.ctop-canvas {
    display: block; width: 100%; border-radius: 6px;
    margin-bottom: 14px; background: #0d0d0d;
}

/* ── BREADCRUMB ─────────────────────────────────────────────── */
#breadcrumb {
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-dim);
    padding: 8px 15px;
    font-size: 0.75rem;
    color: var(--tool-teal);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ── PANELS ─────────────────────────────────────────────────── */
.panel {
    background: var(--steel-gray);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 15px;
    margin: 12px 15px;
}
.panel-label {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* ── INPUTS ─────────────────────────────────────────────────── */
input[type=text], input[type=number], select, textarea {
    background: #0d0d0d;
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.95rem;
    padding: 10px 12px;
    width: 100%;
    margin-bottom: 8px;
}
input:focus, select:focus { border-color: var(--tool-teal); outline: none; }
label { font-size: 0.75rem; color: var(--text-dim); font-weight: 700; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Type chips */
.type-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
    padding: 8px 14px;
    border: 1px solid var(--border-dim);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-dim);
    background: #1e1e1e;
}
.chip.selected { background: var(--safety-orange); color: var(--shop-black); border-color: var(--safety-orange); }

/* BASE / WALL / BOTH quick-select buttons */
.cab-quick {
    flex: 1;
    padding: 11px 4px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    background: #1a1a1a;
    color: var(--text-dim);
    cursor: pointer;
}
.cab-quick.selected {
    background: var(--tool-teal);
    color: var(--shop-black);
    border-color: var(--tool-teal);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
    background: var(--tool-teal);
    color: var(--shop-black);
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
    margin-top: 4px;
}
.btn-secondary {
    background: #1e1e1e;
    color: var(--text-dim);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-danger {
    background: none;
    color: var(--danger-red);
    border: 1px solid var(--danger-red);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
.small-btn { padding: 8px 10px; font-size: 0.8rem; width: auto !important; }

/* ── AUTH / SUBSCRIBE / GUEST-PASS GATE ─────────────────────── */
.hidden { display: none !important; }
.boot-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: var(--text-dim);
    font-size: 1rem;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
}
@media (min-width: 600px) { .modal-overlay { align-items: center; } }
.modal-overlay .modal {
    background: var(--steel-gray);
    border: 1px solid var(--border-dim);
    color: var(--text-main);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
    padding: 22px 18px;
}
@media (min-width: 600px) { .modal-overlay .modal { border-radius: 14px; } }
.modal-overlay .modal h2 { color: var(--safety-orange); font-size: 1.15rem; margin-bottom: 6px; }
.modal-subtitle { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 14px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; margin: 10px 0; }
.modal-actions button, .modal-actions a { flex: 1 1 auto; }
.auth-toggle-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; text-align: center; margin: 12px 0; }
.trial-banner {
    font-size: 0.75rem;
    color: var(--go-green);
    font-weight: 700;
    padding: 4px 0;
}
.trial-strip {
    background: #1a1a0d;
    border-bottom: 2px solid var(--safety-orange);
    color: var(--text-main);
    padding: 10px 15px;
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ── TREE (job builder hierarchy) ────────────────────────────── */
#tree-root { padding: 0 15px; }
.tree-room {
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}
.tree-room-header {
    background: #1a1a1a;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.tree-room-name { font-size: 0.95rem; font-weight: 900; color: var(--tool-teal); }
.tree-room-count { font-size: 0.75rem; color: var(--text-dim); }
.tree-cabinets { padding: 8px; }
.tree-cabinet {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px 12px;
}
.tree-cabinet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.tree-cabinet-label { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.tree-cabinet-type { font-size: 0.7rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.tree-openings { padding-left: 10px; border-left: 2px solid var(--border-dim); margin-top: 6px; }
.tree-opening {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.8rem;
}
.tree-opening .op-dims { color: var(--safety-orange); font-weight: 700; }
.tree-opening .op-type { color: var(--text-dim); }

/* ── CUT LIST ────────────────────────────────────────────────── */
#cutListPanel { padding: 15px; }
.cut-section { margin-bottom: 20px; }
.cut-section-title {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--tool-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-dim);
}
.cut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.85rem;
}
.cut-row .piece-name { color: var(--text-main); font-weight: 700; }
.cut-row .piece-dims { color: var(--safety-orange); font-weight: 700; }
.cut-row .piece-qty { color: var(--text-dim); font-size: 0.75rem; }

/* ── COLLAPSIBLE SETTINGS PANELS ────────────────────────────── */
details.panel { padding: 0; }
details.panel > summary {
    list-style: none;
    padding: 13px 15px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary {
    border-bottom: 1px solid var(--border-dim);
    border-radius: 8px 8px 0 0;
}
details.panel > summary::after {
    content: '›';
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-dim);
    transition: transform 0.2s;
    line-height: 1;
    flex-shrink: 0;
}
details.panel[open] > summary::after { transform: rotate(90deg); }
.panel-body { padding: 4px 15px 15px; }

/* ── SETTINGS PANEL ─────────────────────────────────────────── */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #1a1a1a;
}
.setting-row label { margin: 0; }
.setting-row input[type=number] { width: 80px; margin: 0; text-align: right; }

/* ── FIXED NAV ───────────────────────────────────────────────── */
.bottom-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--safety-orange);
    color: var(--shop-black);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,107,53,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty-state .big { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ── STAGE 2: Material groups + cost summary ─────────────── */
.material-group { margin-bottom: 14px; }
.material-group-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: #1a1a1a;
    border-radius: 6px 6px 0 0; border: 1px solid var(--border-dim);
}
.material-group-title { font-size: 0.7rem; font-weight: 900; color: var(--tool-teal); text-transform: uppercase; letter-spacing: 1px; }
.material-group-cost  { font-size: 0.8rem; font-weight: 700; color: var(--safety-orange); }
.material-group-body  { border: 1px solid var(--border-dim); border-top: none; border-radius: 0 0 6px 6px; }
.sub-group-label { font-size: 0.68rem; font-weight: 700; color: var(--text-dim); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: 0.5px; background: #0d0d0d; }
.cost-summary { background: #0d0d0d; border: 1px solid var(--border-dim); border-radius: 8px; padding: 12px 15px; margin: 14px 0; }
.cost-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.85rem; border-bottom: 1px solid #1a1a1a; }
.cost-line:last-child { border-bottom: none; }
.cost-grand { font-size: 1.05rem; font-weight: 900; color: var(--go-green); padding-top: 8px; border-top: 2px solid var(--tool-teal) !important; margin-top: 4px; }

/* ── STAGE 3: Floor plan ──────────────────────────────────── */
#floorCanvas { border-radius: 6px; background: #0d0d0d; }
.wall-block { background: var(--steel-gray); border: 1px solid var(--border-dim); border-radius: 8px; margin: 0 15px 12px; overflow: hidden; }
.wall-block-header { background: #1a1a1a; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.wall-name { font-size: 0.8rem; font-weight: 900; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }
.wall-avail { font-size: 0.9rem; font-weight: 900; color: var(--tool-teal); }
.wall-avail-label { font-size: 0.65rem; color: var(--text-dim); text-align: right; }
.wall-body { padding: 10px 14px; }
.obs-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #1a1a1a; font-size: 0.82rem; }
.obs-row:last-child { border-bottom: none; }
.obs-type { flex: 1; color: var(--text-main); font-weight: 700; }
.obs-width { color: var(--safety-orange); font-weight: 700; min-width: 42px; text-align: right; }
.obs-tbd-badge { color: #f0c040; font-size: 0.72rem; font-weight: 700; margin-left: 2px; }
.add-obs-form { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.add-obs-form select, .add-obs-form input { margin: 0; padding: 8px; font-size: 0.82rem; }
.add-obs-form select { flex: 1; min-width: 130px; }
.add-obs-form input  { width: 72px; text-align: center; }
.obs-pos-input { width: 54px; margin: 0; padding: 4px 6px; font-size: 0.78rem; text-align: center; background: #0d0d0d; border: 1px solid var(--border-dim); border-radius: 4px; color: var(--text-dim); }
.avail-banner { background: rgba(0,168,150,0.12); border: 1px solid rgba(0,168,150,0.3); border-radius: 6px; padding: 8px 12px; margin: 10px 15px 0; text-align: center; font-size: 0.8rem; color: var(--tool-teal); font-weight: 700; }

/* ── TOGGLE SWITCH ──────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #333; border: 1px solid #444; border-radius: 26px; transition: .25s; }
.toggle-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 2px; bottom: 2px; background: #666; border-radius: 50%; transition: .25s; }
input:checked + .toggle-slider { background: var(--tool-teal); border-color: var(--tool-teal); }
input:checked + .toggle-slider:before { transform: translateX(20px); background: var(--shop-black); }

/* ── PRINT PREVIEW OVERLAY ──────────────────────────────────── */
#printView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: #e8e8e8;
}
#printViewToolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#printPages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.print-page {
    background: #fff;
    color: #111;
    padding: 28px 32px;
    margin: 0 auto 24px;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── JOB PICKER (Stage 9 — multi-job management) ────────────── */
#jobsView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: #e8e8e8;
}
#jobsToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#jobsBody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.job-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    padding: 14px 16px;
    margin-bottom: 14px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.job-card-current { border-left: 4px solid var(--tool-teal); }
.job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.job-card-name {
    font-size: 1rem;
    font-weight: 900;
    color: #111;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.job-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}
.job-card-meta { font-size: 0.75rem; color: #777; margin-bottom: 10px; }
.job-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.job-action-btn {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #333;
}
.job-load-btn { background: #00766c; color: #fff; border-color: #00766c; }
.job-delete-btn { background: #fff; color: #c0531b; border-color: #c0531b; }
.job-current-label { font-size: 0.75rem; color: #00766c; font-weight: 700; }

/* ── ROOM TEMPLATES (Stage 9b) ─────────────────────────────────── */
#templatesView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 950;
    flex-direction: column;
    background: #e8e8e8;
}
#templatesToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#templatesBody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.tmpl-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    padding: 14px 16px;
    margin-bottom: 14px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.tmpl-card-name {
    font-size: 1rem;
    font-weight: 900;
    color: #111;
    margin-bottom: 4px;
}
.tmpl-card-meta { font-size: 0.75rem; color: #777; margin-bottom: 10px; }
.tmpl-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tmpl-use-btn { background: #00766c; color: #fff; border-color: #00766c; }
.tmpl-del-btn { background: #fff; color: #c0531b; border-color: #c0531b; }

/* ── SHEET LAYOUT (Stage 12 — plywood guillotine cut optimizer) ── */
#sheetLayoutView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: #e8e8e8;
}
#sheetLayoutToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#sheetLayoutBody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.sheet-summary {
    background: #fff; border: 1px solid #ccc; border-radius: 6px;
    padding: 10px 16px; margin-bottom: 14px; font-size: 0.85rem; color: #333;
    max-width: 720px; margin-left: auto; margin-right: auto;
}
.sheet-oversized-warning {
    background: #fff3e0; border: 1px solid #e0a040; border-radius: 6px;
    padding: 10px 16px; margin-bottom: 14px; font-size: 0.78rem; color: #7a4a10;
    max-width: 720px; margin-left: auto; margin-right: auto;
}
.sheet-card {
    background: #fff; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    max-width: 720px; margin: 0 auto 22px; padding: 16px; overflow: hidden;
}
.sheet-card-title {
    font-size: 0.75rem; font-weight: 900; letter-spacing: 0.5px;
    color: #555; text-transform: uppercase; margin-bottom: 8px;
}
.sheet-canvas { display: block; border-radius: 4px; }
.sheet-cut-sequence { margin-top: 12px; }
.sheet-cut-step {
    font-size: 0.8rem; color: #333; line-height: 1.5;
    padding: 4px 0; border-top: 1px solid #eee;
}
.sheet-cut-step:first-child { border-top: none; }
.step-num { font-weight: 900; color: #00766c; }

/* ── BOARD MAPPER (Stage 20 — knot tracking, adapted from BirdhousePro Knot Hopper) ── */
#lumberMapView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: var(--shop-black);
}
#lumberMapToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#lumberMapBody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}
.lm-cat-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.lm-cat-tab {
    flex: 1; padding: 10px; text-align: center; cursor: pointer;
    background: #1e1e1e; color: var(--text-dim); border: 1px solid var(--border-dim);
    border-radius: 6px; font-size: 0.82rem; font-weight: 700;
}
.lm-cat-tab.active { background: var(--tool-teal); color: #000; border-color: var(--tool-teal); }
.lm-progress { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 10px; }
.lm-progress strong { color: var(--tool-teal); }
.lm-mark-display {
    font-size: 1.3rem; font-weight: 900; color: var(--safety-orange);
    background: #111; padding: 10px; border-radius: 6px; margin-bottom: 12px;
    border: 1px solid var(--border-dim); text-align: center;
}
.lm-scroll-box {
    position: relative; width: 100%; height: 110px; background: #111;
    border: 2px solid var(--border-dim); border-radius: 6px; overflow: hidden; cursor: grab;
}
.lm-scroll-box:active { cursor: grabbing; }
.lm-board-wrap { position: absolute; height: 74px; top: 8px; background: #e0bc8a;
    background-image: repeating-linear-gradient(45deg, rgba(140,103,71,0.2) 0px, rgba(140,103,71,0.2) 2px, transparent 2px, transparent 10px);
    border: 2px solid #8c6747; border-radius: 4px; }
.lm-tick { position: absolute; bottom: 0; width: 1px; background: #fff; }
.lm-tick-label { position: absolute; bottom: 28px; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: #fff; text-shadow: 1px 1px 2px #000; }
.lm-redline { position: absolute; left: 50%; top: -8px; width: 3px; height: 126px; background: var(--danger-red); z-index: 10; transform: translateX(-50%); }
.lm-placed-knot { position: absolute; height: 100%; background: var(--danger-red); opacity: 0.82; top: 0; }
.lm-nudge-row { display: flex; gap: 10px; margin: 12px 0; }
.lm-nudge-btn { background: #1e1e1e; color: var(--safety-orange); border: 2px solid var(--safety-orange);
    padding: 10px; font-size: 0.9rem; font-weight: 700; border-radius: 6px; cursor: pointer; flex: 1; }
.lm-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.lm-btn { padding: 12px; font-size: 0.85rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; text-align: center; }
.lm-btn-orange { background: var(--safety-orange); color: #fff; }
.lm-btn-blue   { background: #3498db; color: #fff; }
.lm-btn-green  { background: var(--go-green); color: #000; }
.lm-btn-red    { background: var(--danger-red); color: #fff; }
.lm-saved-list { background: #1a1a1a; padding: 10px; border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 12px; }
.lm-boardnum-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.lm-boardnum { font-size: 1rem; font-weight: 900; color: var(--text-main); }
.lm-toggle-cal-btn { background: #7f8c8d; color: #fff; border: none; padding: 6px 12px; font-size: 0.72rem; font-weight: 700; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.lm-toggle-cal-btn.active { background: var(--safety-orange); border: 1px solid #fff; }
.lm-cal-drawer { display: flex; align-items: center; justify-content: center; gap: 10px; background: #111; padding: 10px; border-radius: 6px; margin-bottom: 12px; border: 2px dashed var(--safety-orange); }
.lm-cal-btn { background: var(--safety-orange); color: #fff; border: none; padding: 6px 15px; font-size: 0.85rem; font-weight: 700; border-radius: 4px; cursor: pointer; }
.lm-cal-value { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--safety-orange); font-size: 0.85rem; }

/* ── BOARD OPTIMIZER (Stage 20 — adapted from BirdhousePro Picket Wizard) ── */
#boardOptimizerView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: #e8e8e8;
}
#boardOptimizerToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#boardOptimizerBody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.bo-summary {
    background: #fff; border: 1px solid #ccc; border-radius: 6px;
    padding: 10px 16px; margin-bottom: 14px; font-size: 0.85rem; color: #333;
    max-width: 760px; margin-left: auto; margin-right: auto;
}
.bo-plank-label { font-weight: 900; color: #555; font-size: 0.78rem; text-transform: uppercase;
    display: block; margin: 14px auto 5px; max-width: 760px; }
.bo-plank-container {
    width: 100%; max-width: 760px; margin: 0 auto; height: 56px; background: #34495e;
    border-radius: 6px; position: relative; display: flex; border: 2px solid #2c3e50;
}
.bo-span-zone { height: 100%; display: flex; align-items: center; background: #2c3e50; }
.bo-knot-zone { height: 100%; background: #e63946; border-left: 3px solid #ff4d4d; border-right: 3px solid #ff4d4d;
    display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; font-family: ui-monospace, monospace; }
.bo-cut-piece { height: 78%; color: #fff; display: flex; align-items: center; justify-content: center;
    font-family: ui-monospace, monospace; border-radius: 3px; cursor: default;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3); text-align: center; overflow: hidden; }
.bo-cut-piece span { font-size: 14px; font-weight: 900; white-space: nowrap; }
.bo-kerf-piece { height: 78%; background: #e67e22; border-radius: 1px; min-width: 2px; }
.bo-ruler { width: 100%; max-width: 760px; margin: 0 auto 24px; height: 26px; background: #0d1117;
    position: relative; border-radius: 0 0 4px 4px; border-bottom: 1px solid #34495e; }
.bo-ruler-tick { position: absolute; bottom: 0; width: 1px; background: #7f8c8d; }
.bo-ruler-tick.major { height: 13px; background: #ffcc00; width: 2px; }
.bo-ruler-label { position: absolute; top: 2px; font-size: 9px; color: #ffcc00; font-family: ui-monospace, monospace; transform: translateX(-50%); }
.bo-color-stile  { background: #1d3557 !important; }
.bo-color-rail   { background: #457b9d !important; }
.bo-color-corner { background: #6c757d !important; }
.bo-color-panel  { background: #2b9348 !important; }
.bo-cut-seq { background: #fff; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    max-width: 760px; margin: 0 auto 22px; padding: 16px; }
.bo-cut-step { font-size: 0.8rem; color: #333; line-height: 1.5; padding: 4px 0; border-top: 1px solid #eee; }
.bo-cut-step:first-child { border-top: none; }

/* ── SHARE QUOTE (Stage 11 — phone-friendly text quote) ───────── */
#shareQuoteView {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    flex-direction: column;
    background: #e8e8e8;
}
#shareQuoteToolbar {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 2px solid #2b2d42;
    flex-shrink: 0;
}
#shareQuoteBody {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
#shareQuoteText {
    background: #fff;
    color: #111;
    padding: 24px;
    margin: 0 auto;
    max-width: 700px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── DESKTOP RESPONSIVE (≥ 768px) ──────────────────────────── */
@media (min-width: 768px) {
    body {
        max-width: 1100px;
        margin: 0 auto;
        padding-bottom: 40px;
    }
    header {
        padding: 14px 28px;
    }
    header h1 {
        font-size: 1.3rem;
    }
    .header-nav {
        gap: 10px;
    }
    .nav-btn {
        padding: 11px 10px;
        font-size: 0.76rem;
    }
    .panel {
        margin: 14px 28px;
        padding: 18px 22px;
    }
    #breadcrumb {
        padding: 8px 28px;
    }
    /* Canvas grab cursor — only meaningful on desktop */
    #floorCanvas {
        cursor: grab;
    }
    #elevCanvas,
    #elevFsCanvas {
        cursor: grab;
    }
}

/* ── WIDER MONITORS: fill viewport minus breathing room ─────── */
/* max-width adapts down automatically — smaller screens are unaffected */
@media (min-width: 1200px) {
    body { max-width: min(calc(100vw - 48px), 2200px); }
    .layout-side-col   { flex: 0 0 320px; }
    .elev-controls-col { flex: 0 0 200px; }
}

/* ── MOBILE: wall inputs above canvas so they're reachable ─── */
@media (max-width: 899px) {
    #layoutColumns {
        display: flex;
        flex-direction: column;
    }
    .layout-canvas-col { order: 2; }
    .layout-side-col   { order: 1; }
}

/* ── DESKTOP TWO-COLUMN LAYOUTS (≥ 900px) ──────────────────── */
@media (min-width: 900px) {

    /* Layout panel: canvas left, wall inputs + obstacles right */
    #layoutColumns {
        display: flex;
        align-items: flex-start;
    }
    .layout-canvas-col {
        flex: 3;
        min-width: 0;
    }
    .layout-side-col {
        flex: 0 0 290px;
        min-width: 0;
    }
    .layout-side-col .panel {
        margin: 8px 14px 8px 4px;
    }

    /* Elevation panel: room/chips sidebar left, canvas right */
    .elev-two-col {
        display: flex;
        align-items: flex-start;
    }
    .elev-controls-col {
        flex: 0 0 180px;
        min-width: 0;
    }
    .elev-controls-col .panel {
        margin: 8px 4px 8px 14px;
    }
    .elev-controls-col #elevTypeChips {
        flex-direction: column;
    }
    .elev-canvas-col {
        flex: 1;
        min-width: 0;
    }
}

/* ── PRINT (sent to printer) ────────────────────────────────── */
@media print {
    @page { margin: 0.5in; size: letter portrait; }
    body > * { display: none !important; }
    #printView { display: block !important; position: static !important; overflow: visible !important; background: white !important; }
    #printViewToolbar { display: none !important; }
    #printPages { overflow: visible !important; padding: 0 !important; }
    .print-page {
        display: block !important;
        page-break-after: always;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }
    .print-page:last-child { page-break-after: avoid; }
}

/* ── MEASURING TOOL ──────────────────────────────────────────────── */
.measure-btn {
    padding: 5px 11px; font-size: 0.72rem; font-weight: 700;
    background: #1e1e1e; color: #888; border: 1px solid #555;
    border-radius: 5px; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.measure-btn:hover { color: #ffcc00; border-color: #ffcc00; }
.measure-btn.active {
    background: #2a2200; color: #ffcc00; border-color: #ffcc00;
    box-shadow: 0 0 6px rgba(255,204,0,0.35);
}
@media (pointer: coarse) { #measureKeyHint { display: none; } }

/* ── STAGE 14B: TBD TOGGLES & PENDING DECISIONS ─────────────────── */
.tbd-btn {
    padding: 4px 8px; font-size: 0.72rem; font-weight: 700;
    background: #2a2400; color: #c8a000; border: 1px solid #5a4800;
    border-radius: 4px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.tbd-btn.tbd-active {
    background: #3a3000; color: #f0c040; border-color: #c8a000;
}
.tbd-input-active {
    border-color: #c8a000 !important;
    background: #1e1a00 !important;
}
.pending-panel {
    background: #1a1600; border: 1px solid #4a3800; border-radius: 8px;
    margin-bottom: 12px; overflow: hidden;
}
.pending-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; cursor: pointer; user-select: none;
}
.pending-panel-title {
    font-size: 0.8rem; font-weight: 900; color: #f0c040;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.pending-panel-actions { display: flex; gap: 8px; align-items: center; }
.pending-print-btn {
    padding: 5px 10px; font-size: 0.72rem; font-weight: 700;
    background: #1a1600; color: #f0c040; border: 1px solid #5a4800;
    border-radius: 4px; cursor: pointer;
}
.pending-panel-body { padding: 0 14px 10px; }
.pending-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid #2a2000;
}
.pending-row:last-child { border-bottom: none; }
.pending-info { flex: 1; min-width: 0; }
.pending-label { font-size: 0.82rem; font-weight: 700; color: #f0c040; }
.pending-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 1px; }
.pending-placeholder { font-size: 0.72rem; color: #888; margin-top: 1px; }
.pending-resolve-btn {
    padding: 6px 12px; font-size: 0.75rem; font-weight: 700;
    background: #1a3a1a; color: var(--go-green); border: 1px solid var(--go-green);
    border-radius: 5px; cursor: pointer; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}

/* ── OUTPUT PANEL CARDS ─────────────────────────────────────────── */
.output-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: #1e1e1e;
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 16px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    transition: border-color 0.15s;
}
.output-card:active { border-color: var(--tool-teal); }
.output-card-icon { font-size: 1.7rem; flex-shrink: 0; line-height: 1; }
.output-card-body { display: flex; flex-direction: column; gap: 3px; }
.output-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.output-card-desc  { font-size: 0.72rem; color: var(--text-dim); line-height: 1.4; }

/* ── STAGE 17: GANTT SCHEDULE VIEW ──────────────────────────────────────── */
#ganttView {
    display: none; position: fixed; inset: 0; z-index: 200;
    flex-direction: column; background: #111;
}
#ganttToolbar {
    padding: 12px 16px; border-bottom: 1px solid #222;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-shrink: 0; flex-wrap: wrap;
}
#ganttBody {
    flex: 1; overflow-y: auto; padding: 12px 16px;
}
.gantt-alert-strip {
    background: #3a1a1a; border: 1px solid #e63946; border-radius: 6px;
    padding: 10px 14px; margin-bottom: 12px; font-size: 0.8rem; color: #e63946;
}
.gantt-alert-row { margin-top: 6px; color: #ddd; font-size: 0.78rem; }
.gantt-slots-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px;
    padding: 8px 12px; margin-bottom: 10px;
}
.gantt-slots-label { font-size: 0.72rem; color: #888; font-weight: 700; white-space: nowrap; }
.gantt-slot-label  {
    font-size: 0.72rem; color: #aaa; white-space: nowrap;
    text-transform: none; letter-spacing: 0;
    display: inline-flex; align-items: center; gap: 4px;
    margin-bottom: 0; font-weight: 600;
}
.gantt-slot-input  {
    width: 38px; background: #1e1e1e; color: #ddd; border: 1px solid #444;
    border-radius: 4px; padding: 1px 4px; font-size: 0.72rem; margin-left: 3px;
}
.gantt-legend {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.gantt-badge {
    display: inline-block; font-size: 0.71rem; font-weight: 700;
    padding: 2px 7px; border-radius: 4px; white-space: nowrap; cursor: default;
}
.gantt-badge-done { text-decoration: line-through; opacity: 0.5; }
.gantt-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid #222; border-radius: 6px;
}
.gantt-table {
    border-collapse: collapse; width: max-content; min-width: 100%;
}
.gantt-table th, .gantt-table td {
    border: 1px solid #222;
}
.gantt-station-col {
    position: sticky; left: 0; background: #161616; z-index: 1;
    font-size: 0.72rem; color: #aaa; font-weight: 700;
    padding: 6px 10px; white-space: nowrap; min-width: 138px;
    vertical-align: middle;
}
.gantt-corner-th  { z-index: 3 !important; }
.gantt-day-hdr {
    background: #1a1a1a; font-size: 0.65rem; color: #888;
    text-align: center; padding: 4px 5px; min-width: 72px;
    position: sticky; top: 0; z-index: 2; white-space: nowrap;
    line-height: 1.3;
}
.gantt-today-hdr { background: #0a2a20 !important; color: var(--tool-teal) !important; }
.gantt-wknd-hdr  { color: #555 !important; }
.gantt-cell {
    padding: 3px 4px; vertical-align: top; min-width: 72px;
    background: #111; min-height: 32px;
}
.gantt-conflict { background: #3a0a0a !important; }
.gantt-full     { background: #0f2008 !important; }
.gantt-deliv-label { color: #5fb85f !important; }
.gantt-unscheduled {
    margin-top: 14px; padding: 12px 14px;
    background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px;
    font-size: 0.78rem;
}
.gantt-unsched-title { color: #888; font-weight: 700; margin-bottom: 8px; font-size: 0.72rem; }
.gantt-empty {
    padding: 30px; text-align: center; color: #666; font-size: 0.85rem;
}

/* ── Help Overlay ─────────────────────────────────────────────────────────── */

#helpOverlay {
    display: none;
    position: fixed; inset: 0; z-index: 10000;
    background: #0e0e0e;
    flex-direction: column;
    overflow: hidden;
}

#helpHeader {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: #131313;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
    min-height: 50px;
}

#helpBackBtn {
    padding: 6px 12px; background: #1e1e1e; color: #aaa;
    border: 1px solid #333; border-radius: 6px;
    font-size: 0.78rem; font-weight: 700; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
}

#helpTitle {
    flex: 1; font-size: 0.88rem; font-weight: 900;
    color: #f8f9fa; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

#helpCloseBtn {
    padding: 6px 12px; background: #1e1e1e; color: #888;
    border: 1px solid #333; border-radius: 6px;
    font-size: 0.78rem; font-weight: 700; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
}

#helpBody {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0;
}

/* Index list */
.help-index { display: flex; flex-direction: column; }

.help-index-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: none; border: none; border-bottom: 1px solid #1a1a1a;
    color: inherit; text-align: left; cursor: pointer; width: 100%;
}
.help-index-row:active { background: #1a1a1a; }

.help-index-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; text-align: center; }

.help-index-text { flex: 1; min-width: 0; }

.help-index-title {
    font-size: 0.88rem; font-weight: 700; color: #f8f9fa;
    margin-bottom: 2px;
}
.help-index-summary { font-size: 0.75rem; color: #888; }

.help-index-arrow { color: #555; font-size: 1.2rem; flex-shrink: 0; }

/* Section content */
.help-content {
    padding: 20px 18px 10px;
    font-size: 0.84rem; color: #ccc; line-height: 1.7;
}

.help-content h3 {
    font-size: 1rem; color: #f8f9fa; font-weight: 900;
    margin: 0 0 14px; padding-bottom: 10px;
    border-bottom: 1px solid #222;
    text-transform: none; letter-spacing: 0;
}

.help-content h4 {
    font-size: 0.82rem; color: #00a896; font-weight: 700;
    margin: 18px 0 6px;
    text-transform: none; letter-spacing: 0;
}

.help-content p { margin: 0 0 10px; }

.help-content em { color: #a8dadc; font-style: normal; font-weight: 600; }

.help-content strong { color: #f8f9fa; }

.help-list {
    margin: 6px 0 10px 0; padding-left: 18px;
    list-style: disc;
}
.help-list li { margin-bottom: 5px; }

.help-tip {
    background: #0d2020; border-left: 3px solid #00a896;
    padding: 10px 14px; border-radius: 4px;
    margin: 12px 0; font-size: 0.8rem; color: #a8dadc;
}

.help-warning {
    background: #201010; border-left: 3px solid #e76f51;
    padding: 10px 14px; border-radius: 4px;
    margin: 12px 0; font-size: 0.8rem; color: #f4a261;
}

/* Step layout for Quick Start */
.help-step {
    display: flex; gap: 12px; align-items: flex-start;
    margin-bottom: 14px;
}
.help-step-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: #00a896; color: #000;
    font-size: 0.78rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}

/* Prev/Next nav at bottom of sections */
.help-section-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px 24px;
    border-top: 1px solid #1a1a1a;
    gap: 10px;
}

.help-nav-btn {
    padding: 9px 14px; background: #1a1a1a;
    border: 1px solid #2a2a2a; border-radius: 8px;
    color: #aaa; font-size: 0.75rem; font-weight: 700;
    cursor: pointer; line-height: 1.3; text-align: left;
    max-width: 48%;
}
.help-nav-next { text-align: right; }
.help-nav-btn:active { background: #252525; }
