/* =====================================================================
   FLORA new app structure — shared design system (plain CSS)
   Flora look: dark gray shell · gold accents · warm paper content
   ===================================================================== */

:root{
  --gold:#E9A820; --gold-soft:#F6E7C2; --gold-ink:#8a6410;
  --dark:#33312E; --darker:#282623; --dark-line:#454238;
  --paper:#F5F4EF; --card:#FFFFFF; --ink:#26241F; --muted:#7C786E;
  --line:#E4E1D8; --line-soft:#EDEAE2;
  --good:#3AA455; --warn:#D9A412; --risk:#D9534F; --bad:#C62828;
  --blue:#3E7CB1; --teal:#2E8B8B; --plum:#8E5BA6; --rust:#B0713A; --green:#5B8C5A;
  --shadow:0 1px 3px rgba(40,38,35,.08), 0 8px 24px rgba(40,38,35,.07);
  --font:"Segoe UI","Bahnschrift",system-ui,-apple-system,sans-serif;
  --mono:"Consolas","IBM Plex Mono",ui-monospace,monospace;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }
body{ font-family:var(--font); color:var(--ink); background:var(--paper); font-size:14px; overflow:hidden; }
button{ font-family:inherit; font-size:inherit; border:none; background:none; cursor:pointer; color:inherit; }
[data-act]{ cursor:pointer; }
[data-act].disabled{ cursor:not-allowed; }
input,select,textarea{ font-family:inherit; font-size:inherit; color:inherit; }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#c9c5ba; border-radius:6px; border:2px solid transparent; background-clip:content-box; }
::-webkit-scrollbar-track{ background:transparent; }

.app{ display:grid; grid-template-columns:auto 1fr; height:100vh; }
.main{ display:flex; flex-direction:column; min-width:0; }
#content{ flex:1; overflow:auto; position:relative; }

.mono{ font-family:var(--mono); }
.hlabel{ font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; color:var(--muted); text-transform:uppercase; }

/* ================= SHELLS ================= */
.shell{ background:var(--dark); color:#EDEBE4; height:100vh; display:flex; flex-direction:column; position:relative; z-index:30; }
.shell .brand{ display:flex; align-items:center; gap:10px; padding:14px 14px 10px; }
.shell .brand .logo{ font-family:var(--mono); font-weight:700; letter-spacing:.22em; font-size:13px; color:var(--gold); }
.shell .brand .logoSub{ font-family:var(--mono); font-size:9px; letter-spacing:.18em; color:#9b968b; }

/* --- S1/S3 rail --- */
.shell--rail, .shell--mega{ width:64px; min-width:64px; align-items:center; }
.railItem{ width:100%; padding:9px 4px 7px; display:flex; flex-direction:column; align-items:center; gap:3px; color:#B9B4A8; position:relative; }
.railItem svg{ width:21px; height:21px; }
.railItem .rl{ font-family:var(--mono); font-size:8px; letter-spacing:.08em; text-transform:uppercase; text-align:center; }
.railItem:hover{ color:#fff; background:#3d3a35; }
.railItem.active{ color:var(--gold); background:#3d3a35; }
.railItem.active::before{ content:""; position:absolute; left:0; top:6px; bottom:6px; width:3px; background:var(--gold); border-radius:0 2px 2px 0; }
.railSpacer{ flex:1; }
/* flyout submenu for S1 */
.railFly{ position:absolute; left:64px; top:0; bottom:0; width:264px; background:var(--darker); border-right:1px solid var(--dark-line);
  box-shadow:12px 0 30px rgba(0,0,0,.35); overflow:auto; z-index:5; }
/* S3 mega flyout */
.mega{ position:absolute; left:64px; top:0; bottom:0; width:600px; background:var(--darker); border-right:1px solid var(--dark-line);
  box-shadow:12px 0 30px rgba(0,0,0,.35); display:flex; flex-direction:column; z-index:5; }
.megaHead{ padding:16px 18px 12px; border-bottom:1px solid var(--dark-line); display:flex; align-items:center; gap:12px; }
.megaHead .mi{ width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; }
.megaHead .mi svg{ width:18px; height:18px; }
.megaBody{ flex:1; display:grid; grid-template-columns:200px 1fr 168px; overflow:hidden; }
.megaCol{ overflow:auto; padding:12px 8px; border-right:1px solid #38352f; }
.megaCol:last-child{ border-right:none; }
.megaColTitle{ padding:4px 10px 8px; }

/* --- S2 persistent tree --- */
.shell--tree{ width:292px; min-width:292px; }
.treeScroll{ flex:1; overflow:auto; padding:4px 8px 12px; }
.treeHome, .treeUtil{ display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:8px; color:#EDEBE4; font-weight:600; font-size:13px; letter-spacing:.04em; }
.treeHome svg, .treeUtil svg{ width:18px; height:18px; }
.treeHome:hover, .treeUtil:hover{ background:#3d3a35; }
.treeHome.active{ background:var(--gold); color:var(--darker); }
.treeHome.active svg{ color:var(--darker); }
.treeSec{ padding:12px 10px 4px; }
.treeGroup{ margin-top:2px; }
.tgRow{ display:flex; align-items:center; gap:8px; width:100%; padding:8px 8px; border-radius:8px; color:#E6E3DA; font-weight:600; font-size:13px; }
.tgRow:hover{ background:#3d3a35; }
.tgRow.active{ background:#46433c; color:#fff; }
.tgRow.active .tgIcon{ color:var(--gold); }
.tgRow .chev{ width:14px; height:14px; flex:none; transition:transform .12s; color:#8f8a7d; }
.tgRow .chev.open{ transform:rotate(90deg); }
.tgIcon{ width:18px; height:18px; flex:none; color:#B9B4A8; }
.tgRow.active .tgIcon{ color:var(--gold); }
.tgLabel{ flex:1; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tgStar{ opacity:0; width:22px; height:22px; display:flex; align-items:center; justify-content:center; border-radius:6px; color:#9b968b; flex:none; }
.tgRow:hover .tgStar{ opacity:1; }
.tgStar:hover{ background:#55524a; color:#fff; }
.tgStar.on{ opacity:1; color:var(--gold); }
.badge{ font-family:var(--mono); font-size:9.5px; background:var(--risk); color:#fff; border-radius:9px; padding:1px 6px; }
.badge.gold{ background:var(--gold); color:var(--darker); }
.badge.new{ background:var(--plum); color:#fff; letter-spacing:.08em; }
.tgPages{ margin:2px 0 4px 15px; padding-left:10px; border-left:1px solid #4a463e; }
.treeSub{ display:flex; align-items:center; gap:8px; padding:6px 8px; color:#B9B4A8; font-size:12px; font-weight:600; letter-spacing:.03em; }
.treeSub .dot{ width:5px; height:5px; border-radius:50%; background:var(--gold); flex:none; }
.treePage{ display:flex; align-items:center; gap:8px; width:100%; padding:5.5px 8px 5.5px 20px; color:#CFCBC0; font-size:12.5px; border-radius:6px; text-align:left; }
.treePage:hover{ background:#3d3a35; color:#fff; }
.treePage.active{ background:var(--gold); color:var(--darker); font-weight:600; }
.treePage.disabled{ opacity:.42; cursor:not-allowed; }
.treePage.locked{ color:#A9A497; }
.treePage.locked .tpDot{ background:var(--warn); }
.treePage .tpDot{ width:4px; height:4px; border-radius:50%; background:#8f8a7d; flex:none; }
.treePage.active .tpDot{ background:var(--darker); }
.favBlock{ border-top:1px solid #454238; margin-top:8px; padding-top:6px; }
.favHint{ padding:6px 10px; color:#7f7a6e; font-size:11px; }

/* ================= TOPBAR ================= */
.topbar{ height:58px; background:var(--card); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:0 16px; position:sticky; top:0; z-index:20; }
.crumbs{ display:flex; align-items:center; gap:8px; min-width:0; }
.crumb{ font-size:12.5px; color:var(--muted); white-space:nowrap; }
.crumb.here{ color:var(--ink); font-weight:600; }
.crumbSep{ color:#c9c5ba; font-size:11px; }
.ctxSel{ border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:6px 8px; font-size:12.5px; font-weight:600; max-width:230px; }
.ctxLabel{ font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:8px 11px; white-space:nowrap; }
.searchBtn{ flex:0 1 360px; display:flex; align-items:center; gap:9px; border:1px solid var(--line); background:var(--paper);
  border-radius:9px; padding:7.5px 12px; color:var(--muted); font-size:12.5px; min-width:200px; }
.searchBtn:hover{ border-color:#c9c5ba; }
.searchBtn svg{ width:15px; height:15px; }
.searchBtn kbd{ margin-left:auto; font-family:var(--mono); font-size:10px; border:1px solid var(--line); border-radius:5px; padding:1px 6px; background:#fff; color:var(--muted); }
.topRight{ margin-left:auto; display:flex; align-items:center; gap:14px; }
.roleChip{ font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; padding:5.5px 11px; border-radius:999px; border:1px solid var(--line); color:var(--muted); background:#fff; }
.roleChip:hover{ border-color:#c9c5ba; color:var(--ink); }
.roleChip.active{ background:var(--dark); border-color:var(--dark); color:var(--gold); }
.iconBtn{ width:34px; height:34px; border-radius:9px; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--ink); background:#fff; }
.iconBtn:hover{ background:var(--paper); }
.iconBtn svg{ width:17px; height:17px; }
.iconBtn.gold{ background:var(--gold); border-color:var(--gold); color:var(--darker); }
.avatar{ width:34px; height:34px; border-radius:50%; background:var(--dark); color:var(--gold); display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:12px; font-weight:700; }

/* ================= STATUS BAR ================= */
.statusbar{ height:40px; background:var(--darker); color:#B9B4A8; display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:0 10px 0 14px; font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; flex:none; }
.statusbar .right{ display:flex; gap:12px; align-items:center; }

/* ================= SHARED HOME PARTS ================= */
.pad{ padding:20px 24px 30px; }
.favRow{ display:flex; align-items:center; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.favRow .hlabel{ margin-right:2px; }
.favChip{ display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:#fff; font-size:12.5px; font-weight:600; }
.favChip svg{ width:13px; height:13px; color:var(--gold); }
.favChip:hover{ border-color:var(--gold); box-shadow:var(--shadow); }
.favChip .fcdot{ width:8px; height:8px; border-radius:2px; }
.favHintChip{ font-size:11.5px; color:var(--muted); border:1px dashed var(--line); padding:6px 12px; border-radius:999px; }
.card{ background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
.cardHead{ display:flex; align-items:center; justify-content:space-between; padding:13px 16px 0; }

/* ---- H1 function grid: project status (left) · functions (right) ---- */
.h1wrap{ display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:18px; align-items:start; }
.h1left, .h1right{ min-width:0; }
.h1right{ display:flex; flex-direction:column; }
.pageHead{ margin:2px 2px 14px; }
.pageTitle{ font-size:22px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.pageTitle span{ color:var(--muted); font-weight:600; }
.perfTable{ font-size:12px; padding-bottom:6px; }
.perfTable .pHead, .perfTable .pRow{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,.6fr) minmax(0,.95fr) minmax(0,.5fr) minmax(0,.85fr); padding:9px 15px; align-items:center; gap:6px; }
.perfTable .pHead{ color:var(--muted); font-family:var(--mono); font-size:10px; letter-spacing:.13em; text-transform:uppercase; padding-bottom:7px; }
.perfTable .pRow{ border-top:1px solid var(--line-soft); }
.perfTable .pRow:hover{ background:var(--paper); }
.perfTable .pRow.sel{ background:var(--gold-soft); box-shadow:inset 3px 0 0 var(--gold); }
.perfTable .pName{ font-weight:700; display:flex; align-items:center; gap:8px; white-space:nowrap; overflow:hidden; }
.perfTable .pName .jOpen{ margin-left:auto; font-size:11px; flex:none; }
.perfTable .pStatus{ display:flex; align-items:center; gap:7px; font-size:12px; white-space:nowrap; overflow:hidden; }
.num{ font-family:var(--mono); font-size:12px; }
.delta{ font-family:var(--mono); font-size:10.5px; margin-left:5px; }
.delta.up{ color:var(--good); } .delta.down{ color:var(--risk); }
.chartHero{ padding-bottom:18px; }
.chartHero .miniChart{ margin:14px 18px 4px; }
.miniChart{ display:flex; align-items:flex-end; gap:7px; height:74px; padding-top:6px; }
.bigChart{ height:210px; gap:11px; padding-top:12px; }
.bigChart .bar .bv{ font-size:11.5px; top:-19px; color:var(--ink); font-weight:600; }
.miniChart .bar{ flex:1; background:var(--gold-soft); border-radius:4px 4px 0 0; position:relative; min-height:6px; }
.miniChart .bar.hot{ background:var(--gold); }
.miniChart .bar.warn{ background:#EAD9A0; }
.miniChart .bar .bv{ position:absolute; top:-15px; left:0; right:0; text-align:center; font-family:var(--mono); font-size:9px; color:var(--muted); }
.fnList{ display:flex; flex-direction:column; gap:10px; }
.fnCard{ display:grid; grid-template-columns:44px 1fr auto; gap:13px; align-items:center; padding:12px 14px; background:#fff; border:1px solid var(--line); border-radius:13px; text-align:left; transition:border-color .12s, box-shadow .12s; position:relative; }
.fnCard:hover{ border-color:var(--gold); box-shadow:var(--shadow); }
.fnCard.disabled{ opacity:.45; }
.fnCard .fnIcon{ width:42px; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; }
.fnCard .fnIcon svg{ width:20px; height:20px; }
.fnCard .fnTitle{ font-weight:700; font-size:13.5px; letter-spacing:.03em; text-transform:uppercase; display:flex; gap:8px; align-items:center; }
.fnCard .fnSub{ font-size:12px; color:var(--muted); margin-top:2px; }
.fnCard .fnRight{ display:flex; align-items:center; gap:8px; }
.fnCard .fnArrow{ color:#c9c5ba; }
.fnCard .fnStar{ width:26px; height:26px; border-radius:7px; display:flex; align-items:center; justify-content:center; color:#cfc9ba; }
.fnCard .fnStar:hover{ background:var(--paper); color:var(--gold); }
.fnCard .fnStar.on{ color:var(--gold); }
.fnCard .fnStar svg{ width:15px; height:15px; }
.statusDot{ width:9px; height:9px; border-radius:50%; }
.statusDot.good{ background:var(--good); } .statusDot.warning{ background:var(--warn); }
.statusDot.risk{ background:var(--risk); } .statusDot.bad{ background:var(--bad); } .statusDot.off{ background:#c9c5ba; }
.roleNote{ font-size:11.5px; color:var(--muted); margin:8px 2px 0; }

/* ---- H2 matrix ---- */
.mToolbar{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.mSearch{ flex:0 1 340px; display:flex; align-items:center; gap:9px; border:1px solid var(--line); background:#fff; border-radius:9px; padding:8px 12px; }
.mSearch svg{ width:15px; height:15px; color:var(--muted); }
.mSearch input{ border:none; outline:none; background:transparent; flex:1; font-size:13px; }
.btnGhost{ border:1px solid var(--line); background:#fff; border-radius:9px; padding:8px 13px; font-size:12px; font-weight:600; }
.btnGhost:hover{ border-color:#c9c5ba; background:var(--paper); }
.mMeta{ margin-left:auto; font-family:var(--mono); font-size:10.5px; color:var(--muted); letter-spacing:.05em; }
.mMeta b{ color:var(--ink); }
.matrix{ overflow:hidden; }
.mJobsite{ display:flex; align-items:center; gap:10px; padding:11px 16px; background:var(--paper); border-bottom:1px solid var(--line); }
.mJobsite .chev{ width:14px; height:14px; color:var(--muted); transition:transform .12s; }
.mJobsite .chev.open{ transform:rotate(90deg); }
.mJobsite .jName{ font-weight:700; font-size:13px; letter-spacing:.03em; }
.mJobsite .jMeta{ font-family:var(--mono); font-size:10px; color:var(--muted); letter-spacing:.06em; }
.mJobsite .jOpen{ margin-left:auto; font-size:11.5px; color:var(--blue); font-weight:600; }
.mMachine{ display:grid; grid-template-columns:285px 1fr; border-bottom:1px solid var(--line-soft); }
.mMachine:last-child{ border-bottom:none; }
.mMachine.hidden{ display:none; }
.mmLeft{ padding:13px 16px; border-right:1px solid var(--line-soft); }
.mmName{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:8px; }
.mmType{ font-family:var(--mono); font-size:10px; color:var(--muted); letter-spacing:.05em; margin:2px 0 8px; }
.mmChips{ display:flex; flex-wrap:wrap; gap:5px; margin-bottom:9px; }
.mchip{ font-family:var(--mono); font-size:9px; letter-spacing:.07em; padding:2.5px 7px; border-radius:4px; text-transform:uppercase; }
.mchip.ok{ background:#DFF0E4; color:#2B7A44; } .mchip.info{ background:#E3EEF7; color:#2C5E8A; }
.mchip.warn{ background:#F7EBC8; color:#8a6410; } .mchip.bad{ background:#F8DCDA; color:#B03A34; }
.ringBar{ height:6px; border-radius:4px; background:#EDEAE2; position:relative; margin:7px 0 4px; }
.ringBar i{ position:absolute; inset:0 auto 0 0; border-radius:4px; }
.ringLbl{ display:flex; justify-content:space-between; font-family:var(--mono); font-size:9.5px; color:var(--muted); letter-spacing:.04em; }
.mmRight{ padding:12px 16px; }
.featChips{ display:flex; flex-wrap:wrap; gap:7px; }
.featChip{ display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); background:#fff; border-radius:9px; padding:7px 12px; font-size:12.5px; font-weight:600; }
.featChip .fdot{ width:9px; height:9px; border-radius:3px; flex:none; }
.featChip .badge{ margin-left:1px; }
.featChip:hover{ border-color:var(--gold); background:var(--gold-soft); }
.featChip.disabled{ opacity:.42; cursor:not-allowed; }
.featChip.disabled:hover{ border-color:var(--line); background:#fff; }
.mLegend{ display:flex; align-items:center; gap:14px; padding:10px 16px; background:var(--paper); border-top:1px solid var(--line); font-family:var(--mono); font-size:9.5px; letter-spacing:.05em; color:var(--muted); }
.mLegend .lg{ display:flex; align-items:center; gap:6px; }
.mLegend .sw{ width:10px; height:10px; border-radius:3px; }
.mLegend .right{ margin-left:auto; }

/* ---- H3 process lanes ---- */
.lanes{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; align-items:start; }
.laneHead{ display:flex; align-items:center; gap:9px; margin:0 2px 10px; }
.phaseChip{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; padding:4px 10px; border-radius:6px; color:#fff; }
.phaseChip.past{ background:var(--blue); } .phaseChip.now{ background:var(--gold); color:var(--darker); }
.phaseChip.future{ background:var(--teal); }
.laneHead .lhSub{ font-size:11px; color:var(--muted); }
.laneCard{ padding:13px 15px; margin-bottom:12px; }
.laneCard .lcTitle{ font-weight:700; font-size:12px; letter-spacing:.05em; text-transform:uppercase; display:flex; align-items:center; gap:8px; }
.laneCard .lcTitle .hlabel{ margin-left:auto; }
.kv{ display:flex; justify-content:space-between; padding:6px 0; border-top:1px solid var(--line-soft); font-size:12.5px; }
.kv:first-of-type{ border-top:none; }
.kv .k{ color:var(--muted); }
.kv .v{ font-family:var(--mono); font-weight:600; font-size:12px; }
.planRow{ display:flex; align-items:center; gap:10px; padding:7px 0; border-top:1px solid var(--line-soft); font-size:12.5px; }
.planRow:first-of-type{ border-top:none; }
.planRow .pd{ font-family:var(--mono); font-size:10px; color:var(--muted); width:38px; flex:none; }
.planRow .pm2{ font-family:var(--mono); font-size:10px; background:var(--paper); border:1px solid var(--line); padding:2px 6px; border-radius:5px; flex:none; }
.planRow .pw{ flex:1; font-weight:600; }
.due{ font-family:var(--mono); font-size:9px; letter-spacing:.06em; padding:2px 7px; border-radius:4px; text-transform:uppercase; flex:none; }
.due.today{ background:#F8DCDA; color:#B03A34; } .due.soon{ background:#F7EBC8; color:#8a6410; } .due.week{ background:#E3EEF7; color:#2C5E8A; }
.riskRow{ display:flex; align-items:center; gap:10px; padding:7px 0; border-top:1px solid var(--line-soft); font-size:12.5px; }
.riskRow:first-of-type{ border-top:none; }
.riskBar{ flex:1; height:6px; border-radius:4px; background:#EDEAE2; position:relative; }
.riskBar i{ position:absolute; inset:0 auto 0 0; border-radius:4px; }
.riskPct{ font-family:var(--mono); font-size:10.5px; width:34px; text-align:right; }
.laneLink{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--blue); margin-top:4px; }
.laneLink svg{ width:13px; height:13px; }
.nowCard{ display:grid; grid-template-columns:44px 1fr auto; gap:12px; align-items:center; }
.nowCard .ncIcon{ width:42px; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; }
.nowCard .ncIcon svg{ width:20px; height:20px; }
.nowCard .ncName{ font-weight:700; font-size:13px; display:flex; align-items:center; gap:7px; }
.nowCard .ncMeta{ font-family:var(--mono); font-size:10px; color:var(--muted); letter-spacing:.04em; margin-top:2px; }
.nowBtns{ display:flex; gap:6px; margin-top:8px; }
.btnGold{ background:var(--gold); color:var(--darker); font-weight:700; font-size:11.5px; padding:7px 12px; border-radius:8px; letter-spacing:.03em; }
.btnGold:hover{ filter:brightness(1.05); }
.btnLine{ border:1px solid var(--line); background:#fff; font-weight:600; font-size:11.5px; padding:7px 12px; border-radius:8px; }
.btnLine:hover{ border-color:#c9c5ba; }

/* ================= MODULE PAGE STUBS ================= */
.mod{ padding:18px 24px 34px; }
.modTitle{ display:flex; align-items:center; gap:12px; margin:10px 0 4px; }
.modTitle h1{ font-size:19px; letter-spacing:.04em; text-transform:uppercase; }
.modSub{ color:var(--muted); font-size:12.5px; margin-bottom:16px; }
.modStar{ width:30px; height:30px; border-radius:8px; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:#cfc9ba; background:#fff; }
.modStar:hover{ color:var(--gold); border-color:var(--gold); }
.modStar.on{ color:var(--gold); }
.modStar svg{ width:15px; height:15px; }
.stubNote{ margin-top:16px; font-size:11px; color:var(--muted); font-family:var(--mono); letter-spacing:.04em; }
/* live stub */
.stubLive{ background:var(--darker); border-radius:14px; padding:16px; color:#EDEBE4; }
.stubLive .slHead{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.gauges{ display:grid; grid-template-columns:repeat(6,1fr); gap:12px; }
.gauge{ background:#38352f; border-radius:12px; padding:13px 10px; text-align:center; }
.gauge .gring{ width:74px; height:74px; border-radius:50%; margin:0 auto 8px; display:flex; align-items:center; justify-content:center; }
.gauge .gring i{ width:56px; height:56px; border-radius:50%; background:var(--darker); display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:12px; font-weight:700; color:#fff; font-style:normal; }
.gauge .gl{ font-family:var(--mono); font-size:8.5px; letter-spacing:.09em; color:#9b968b; text-transform:uppercase; }
.alarmStrip{ margin-top:12px; display:flex; gap:8px; }
.alarmTag{ font-family:var(--mono); font-size:9.5px; letter-spacing:.06em; padding:4px 9px; border-radius:5px; }
.alarmTag.ok{ background:#2B4A34; color:#8FD6A4; } .alarmTag.warn{ background:#4A3F22; color:#EBC96A; }
.alarmTag.bad{ background:#4A2725; color:#F1A19B; }
/* charts stub */
.chartGrid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.chartCard{ padding:14px 16px; }
.chartCard .ccTitle{ font-weight:700; font-size:12px; letter-spacing:.04em; text-transform:uppercase; display:flex; justify-content:space-between; align-items:center; }
.chartCard .ccMeta{ font-family:var(--mono); font-size:9.5px; color:var(--muted); }
.chartCard .miniChart{ height:110px; margin-top:14px; }
/* list stub */
.lstTable{ width:100%; font-size:12.5px; border-collapse:collapse; }
.lstTable th{ font-family:var(--mono); font-size:9.5px; letter-spacing:.1em; color:var(--muted); text-align:left; text-transform:uppercase; padding:8px 12px; border-bottom:1px solid var(--line); }
.lstTable td{ padding:9px 12px; border-bottom:1px solid var(--line-soft); }
.lstTable tr:hover td{ background:var(--paper); }
.tag{ font-family:var(--mono); font-size:9px; letter-spacing:.07em; padding:2.5px 7px; border-radius:4px; text-transform:uppercase; }
/* doc stub */
.docPaper{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:26px 30px; max-width:860px; }
.docHead{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; padding-bottom:14px; border-bottom:2px solid var(--dark); margin-bottom:16px; }
.docHead .dh{ font-size:12px; }
.docHead .dh b{ display:block; font-family:var(--mono); font-size:9px; letter-spacing:.12em; color:var(--muted); text-transform:uppercase; margin-bottom:3px; }
.hline{ height:8px; border-radius:4px; background:var(--line-soft); margin:9px 0; }
.hline.w80{ width:80%; } .hline.w60{ width:60%; } .hline.w40{ width:40%; }
.docSec{ font-weight:700; font-size:12px; letter-spacing:.06em; text-transform:uppercase; margin:16px 0 4px; }
/* plan stub */
.planGrid{ display:grid; grid-template-columns:1.4fr 1fr; gap:14px; }

/* ================= PALETTE (search & jump) ================= */
.overlay{ position:fixed; inset:0; background:rgba(20,19,17,.42); z-index:80; display:none; }
.overlay.open{ display:block; }
.palette{ position:fixed; top:11vh; left:50%; transform:translateX(-50%); width:580px; max-width:92vw; background:#fff; border-radius:14px; box-shadow:0 24px 70px rgba(0,0,0,.4); z-index:90; overflow:hidden; display:none; }
.palette.open{ display:block; }
.palInput{ display:flex; align-items:center; gap:11px; padding:14px 16px; border-bottom:1px solid var(--line); }
.palInput svg{ width:17px; height:17px; color:var(--muted); }
.palInput input{ flex:1; border:none; outline:none; font-size:15px; background:transparent; }
.palInput kbd{ font-family:var(--mono); font-size:9.5px; border:1px solid var(--line); border-radius:5px; padding:2px 7px; color:var(--muted); }
.palList{ max-height:420px; overflow:auto; padding:7px; }
.palSec{ padding:8px 10px 3px; }
.palItem{ display:flex; align-items:center; gap:11px; width:100%; padding:8.5px 11px; border-radius:9px; text-align:left; }
.palItem:hover, .palItem.sel{ background:var(--gold-soft); }
.palItem svg{ width:15px; height:15px; color:var(--muted); flex:none; }
.palItem .pl{ font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.palItem .pp{ font-family:var(--mono); font-size:9.5px; color:var(--muted); margin-left:auto; white-space:nowrap; }
.palEmpty{ padding:22px; text-align:center; color:var(--muted); font-size:13px; }

/* ================= COMM CENTER ================= */
.comm{ position:fixed; top:0; right:0; bottom:0; width:420px; max-width:94vw; background:var(--paper); z-index:95; box-shadow:-18px 0 44px rgba(0,0,0,.28); display:none; flex-direction:column; }
.comm.open{ display:flex; }
.commHead{ background:var(--dark); color:#EDEBE4; padding:14px 16px; display:flex; align-items:center; gap:10px; }
.commHead .ct{ font-weight:700; letter-spacing:.08em; font-size:13px; }
.commHead .cx{ margin-left:auto; width:28px; height:28px; border-radius:7px; display:flex; align-items:center; justify-content:center; color:#B9B4A8; }
.commHead .cx:hover{ background:#454238; color:#fff; }
.commHead svg{ width:16px; height:16px; }
.commTabs{ display:flex; gap:6px; padding:10px 14px 0; background:var(--dark); }
.commTab{ font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; padding:7px 11px; border-radius:8px 8px 0 0; color:#B9B4A8; }
.commTab.active{ background:var(--paper); color:var(--ink); font-weight:700; }
.commBody{ flex:1; overflow:auto; padding:14px; }
.commSec{ margin-bottom:14px; }
.tipItem{ display:flex; gap:10px; padding:10px 12px; background:#fff; border:1px solid var(--line); border-radius:11px; margin-bottom:8px; }
.tipItem .ti{ width:30px; height:30px; flex:none; border-radius:8px; background:var(--gold-soft); color:var(--gold-ink); display:flex; align-items:center; justify-content:center; }
.tipItem .ti svg{ width:15px; height:15px; }
.tipItem .tt{ font-weight:700; font-size:12.5px; }
.tipItem .tx{ font-size:12px; color:var(--muted); margin-top:1px; }
.healthMini{ display:flex; align-items:center; gap:9px; padding:8px 12px; background:#fff; border:1px solid var(--line); border-radius:11px; margin-bottom:7px; font-size:12.5px; }
.healthMini .hm{ font-weight:600; flex:1; }
.healthMini .hs{ font-family:var(--mono); font-size:9.5px; letter-spacing:.07em; text-transform:uppercase; }
.bubbleRow{ display:flex; margin-bottom:9px; }
.bubbleRow.me{ justify-content:flex-end; }
.bubble{ max-width:78%; background:#fff; border:1px solid var(--line); border-radius:12px; padding:9px 12px; font-size:12.5px; }
.bubbleRow.me .bubble{ background:var(--gold-soft); border-color:var(--gold-soft); }
.bubble .bm{ font-family:var(--mono); font-size:8.5px; color:var(--muted); margin-top:4px; letter-spacing:.05em; }
.chatInput{ display:flex; gap:8px; padding:10px 14px; background:#fff; border-top:1px solid var(--line); }
.chatInput input{ flex:1; border:1px solid var(--line); border-radius:9px; padding:8px 11px; outline:none; }
.chatInput .btnGold{ padding:8px 14px; }
.commCard{ background:#fff; border:1px solid var(--line); border-radius:11px; padding:12px 14px; margin-bottom:8px; display:flex; align-items:center; gap:11px; }
.commCard svg{ width:16px; height:16px; color:var(--dark); }
.commCard .ccT{ font-weight:700; font-size:12.5px; }
.commCard .ccS{ font-size:11.5px; color:var(--muted); }
.commCard .go{ margin-left:auto; font-family:var(--mono); font-size:10px; letter-spacing:.07em; color:var(--blue); font-weight:700; }

/* ================= MOCKUP CONTROL PANEL ================= */
.designCtl{ position:fixed; left:14px; bottom:44px; z-index:70; background:rgba(24,23,21,.92); color:#EDEBE4; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.35); backdrop-filter:blur(4px); width:238px; }
.designCtl.folded{ width:auto; }
.dzHead{ display:flex; align-items:center; gap:8px; padding:9px 12px; cursor:pointer; }
.dzHead .hlabel{ color:#B9B4A8; }
.dzHead .dzChev{ margin-left:auto; width:14px; height:14px; color:#B9B4A8; transition:transform .12s; }
.dzHead .dzChev.fold{ transform:rotate(180deg); }
.dzBody{ padding:2px 12px 12px; display:none; flex-direction:column; gap:9px; }
.designCtl:not(.folded) .dzBody{ display:flex; }
.dzGroup .hlabel{ margin-bottom:5px; display:block; }
.dzRow{ display:flex; gap:5px; flex-wrap:wrap; }
.dzBtn{ font-family:var(--mono); font-size:9.5px; letter-spacing:.05em; text-transform:uppercase; padding:5px 9px; border-radius:7px; border:1px solid #4a463e; color:#B9B4A8; }
.dzBtn:hover{ color:#fff; border-color:#6b665b; }
.dzBtn.active{ background:var(--gold); border-color:var(--gold); color:var(--darker); font-weight:700; }
.dzNote{ font-size:10px; color:#8f8a7d; line-height:1.45; }

/* ================= TOAST ================= */
.toast{ position:fixed; bottom:46px; left:50%; transform:translateX(-50%) translateY(8px); background:var(--dark); color:#fff;
  padding:9px 16px; border-radius:9px; font-size:12.5px; z-index:99; opacity:0; pointer-events:none; transition:all .18s; box-shadow:0 8px 24px rgba(0,0,0,.3); }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast svg{ width:13px; height:13px; color:var(--gold); vertical-align:-2px; margin-right:6px; }

/* ================= PHASE HERO — H3 main buttons ================= */
.pHero{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:22px; }
.pTile{ background:var(--card); border:1px solid var(--line); border-radius:16px; padding:22px 20px 16px;
  display:flex; flex-direction:column; gap:10px; box-shadow:var(--shadow); text-align:left; transition:border-color .12s, box-shadow .12s, transform .12s; }
.pTile:hover{ border-color:var(--gold); box-shadow:var(--shadow); transform:translateY(-1px); }
.pIcon{ width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center; color:#fff; }
.pIcon svg{ width:24px; height:24px; }
.pLabel{ font-weight:800; font-size:19px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink); }
.pSub{ color:var(--muted); font-size:12.5px; line-height:1.5; flex:1; }
.pFoot{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.pMeta{ font-family:var(--mono); font-size:10px; color:var(--muted); letter-spacing:.06em; margin-left:auto; display:flex; align-items:center; gap:7px; }
.phaseHead{ display:flex; align-items:center; gap:14px; margin:4px 2px 18px; }
.phaseHead .modTitle{ margin:0; }

/* ---- H4 project startpage (current-style) ---- */
.clLogo{ display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.logoMark{ font-family:var(--mono); font-weight:700; letter-spacing:.22em; color:var(--gold); background:var(--dark); padding:11px 15px; border-radius:10px; font-size:14px; }
.clDiv{ width:1px; height:34px; background:var(--line); }
.projLogo{ width:44px; height:44px; border-radius:10px; background:var(--dark); color:var(--gold); display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-weight:700; font-size:15px; flex:none; }
.projName{ font-weight:800; font-size:16px; letter-spacing:.02em; display:block; }
.clStack{ display:flex; flex-direction:column; gap:14px; }
.infoC{ padding:14px 16px 16px; }
.infoC .ctxSel{ background:var(--paper); width:100%; }
.progCard{ padding:16px 20px 14px; margin-bottom:18px; }
.progTop{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:10px; }
.progVal{ font-family:var(--mono); font-size:20px; font-weight:700; margin-top:3px; }
.bigBar{ height:14px; border-radius:8px; }
.bigBar i{ border-radius:8px; }

.projPick{ display:flex; align-items:center; gap:9px; width:100%; padding:8px 0; border-top:1px solid var(--line-soft); text-align:left; font-size:12.5px; }
.projPick:first-of-type{ border-top:none; }
.projPick:hover .pn{ color:var(--gold-ink); }
.projPick .pn{ font-weight:600; flex:1; }
.projPick .pm{ font-family:var(--mono); font-size:9.5px; color:var(--muted); letter-spacing:.04em; flex:none; }

/* ================= STATUS BAR UTILITIES (bottom right) ================= */
.sbUtils{ display:flex; align-items:center; gap:4px; margin-left:auto; margin-right:2px; }
.sbBtn{ width:28px; height:28px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; color:#B9B4A8; }
.sbBtn:hover{ background:#454238; color:#fff; }
.sbBtn.gold{ color:var(--gold); }
.sbBtn.gold:hover{ background:#4a3f22; }
.sbBtn svg{ width:16px; height:16px; }
.sbSep{ width:1px; height:18px; background:#4a463e; margin:0 4px; }

/* ================= RESPONSIVE ================= */
@media (max-width:1280px){
  .h1wrap{ grid-template-columns:1fr; }
  .lanes{ grid-template-columns:1fr 1fr; }
  .gauges{ grid-template-columns:repeat(3,1fr); }
  .megaBody{ grid-template-columns:180px 1fr; }
  .megaCol.quick{ display:none; }
}
@media (max-width:980px){
  .lanes{ grid-template-columns:1fr; }
  .mMachine{ grid-template-columns:1fr; }
  .mmLeft{ border-right:none; border-bottom:1px solid var(--line-soft); }
  .chartGrid{ grid-template-columns:1fr; }
  .planGrid{ grid-template-columns:1fr; }
  .roleChip{ display:none; }
}
