/* CHARM — COA, Hierarchies, Accounts, Redesign & Mapping. A 7Dimensions product.
   POLAR SHIFT palette. Roboto (headings), Barlow (body), Roboto Mono (codes). */
:root {
  --ocean: #243C4C; --steel: #5289AD; --slate: #698696; --silver: #ACBCBF; --cloud: #D4DDE2; --action: #2962FF; --white: #FFFFFF; --black: #000000;
  --bg: #F3F6F8; --line: #D4DDE2; --line-strong: #ACBCBF; --text: #243C4C; --muted: #5F7685; --hover: #EAF0F4; --sel: #E3EEFF;
  --ok: #2E7D5B; --warn: #B7791F; --err: #B3412F; --ok-bg: #E7F3ED; --warn-bg: #FBF1DE; --err-bg: #F8E6E2; --info-bg: #E6EFF6;
  --r: 10px; --r-sm: 6px; --shadow: 0 1px 2px rgba(36,60,76,.08), 0 4px 14px rgba(36,60,76,.06);
  --head: Roboto, 'Segoe UI', Arial, sans-serif; --body: Barlow, 'Segoe UI', Arial, sans-serif; --mono: 'Roboto Mono', ui-monospace, Consolas, monospace;
  --side: 164px; --dock: 310px; --top: 36px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 400 12.5px/1.25 var(--body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ocean); margin: 0 0 .4em; line-height: 1.2; }
h1 { font-weight: 800; font-size: 19px; letter-spacing: -.01em; } h2 { font-weight: 700; font-size: 15px; } h3 { font-weight: 700; font-size: 13.5px; } h4 { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); margin: 5px 0 3px; }
p { margin: 0 0 .3em; } a { color: var(--action); } kbd { font: 500 12px var(--mono); background: var(--cloud); border-radius: 4px; padding: 2px 6px; }
button { font: inherit; color: inherit; cursor: pointer; } button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; vertical-align: middle; user-select: none; }
.ms.big { font-size: 44px; color: var(--steel); } .ms.tile-ic, .ms.mod-ic { font-size: 28px; color: var(--steel); }
.grow { flex: 1 1 auto; } .muted { color: var(--muted); } .small { font-size: 13px; } .pad { padding: 10px; } .mono, .cd { font-family: var(--mono); }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
#app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) 0; grid-template-rows: var(--top) minmax(0, 1fr); grid-template-areas: 'top top top' 'side main dock'; height: 100vh; }
#app.no-sidebar { grid-template-columns: 0 minmax(0, 1fr) 0; } #app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) var(--dock); } #app.no-sidebar.dock-open { grid-template-columns: 0 minmax(0, 1fr) var(--dock); }
#topbar { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--white); border-bottom: 1px solid var(--line); min-width: 0; }
#sidebar { grid-area: side; background: var(--ocean); color: var(--cloud); display: flex; flex-direction: column; padding: 5px 6px; overflow: hidden auto; }
#app.no-sidebar #sidebar { display: none; }
#main { grid-area: main; overflow: auto; outline: none; min-width: 0; }
#dock { grid-area: dock; background: var(--white); border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
#app:not(.dock-open) #dock { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 4px 6px; text-decoration: none; color: var(--white); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; } .brand-text b { font: 800 19px var(--head); letter-spacing: .04em; } .brand-text small { font-size: 11px; color: var(--silver); }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--r-sm); color: var(--cloud); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: rgba(255,255,255,.08); } .nav-item.active { background: var(--steel); color: var(--white); } .nav-item .ms { font-size: 17px; }
.nav-count { margin-left: auto; background: var(--action); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; font-weight: 700; }
.nav-foot { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--silver); padding: 6px 6px 0; border-top: 1px solid rgba(255,255,255,.14); }
.eng-switch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--white); border-radius: var(--r-sm); padding: 1px 6px; text-align: left; min-width: 0; max-width: 280px; }
.eng-switch:hover { background: var(--hover); } .eng-name { display: block; font: 700 14px var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .eng-sub { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-switch > span:not(.ms) { min-width: 0; }
.save-state { font-size: 12px; color: var(--muted); white-space: nowrap; } .save-state.saving { color: var(--warn); } .save-state.error { color: var(--err); font-weight: 700; }
.icon-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--ocean); padding: 0; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--cloud); } .icon-btn.dim { opacity: .35; } .icon-btn.primary { background: var(--action); color: #fff; } .icon-btn.primary:hover { background: #1f4fd0; }
.health { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 1px 8px 1px 5px; font-weight: 600; font-size: 12px; }
.health.ok { color: var(--ok); border-color: #bddccb; background: var(--ok-bg); } .health.warn { color: var(--warn); border-color: #ecd6a6; background: var(--warn-bg); } .health.bad { color: var(--err); border-color: #e5bdb5; background: var(--err-bg); }
.health .count { background: currentColor; border-radius: 10px; padding: 0 7px; font-size: 12px; } .health .count { color: #fff; } .health.ok .count { display: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.seg button { border: 0; background: transparent; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--slate); display: inline-flex; align-items: center; gap: 5px; } .seg button .ms { font-size: 17px; }
.seg button + button { border-left: 1px solid var(--line); } .seg button.on { background: var(--ocean); color: #fff; } .seg button:hover:not(.on) { background: var(--hover); }
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--white); color: var(--ocean); padding: 2px 8px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--hover); } .btn.primary { background: var(--action); border-color: var(--action); color: #fff; } .btn.primary:hover:not(:disabled) { background: #1f4fd0; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; } .btn.danger:hover:not(:disabled) { background: #96352a; }
.btn.sm { padding: 1px 7px; font-size: 12px; } .btn .ms { font-size: 15px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 8px; border-radius: 999px; background: var(--cloud); color: var(--ocean); margin-right: 3px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--err-bg); color: var(--err); } .badge.info { background: var(--info-bg); color: #2a6290; }

/* ---------- Page and cards ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 6px 10px 12px; } .page.wide { max-width: 1480px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.eyebrow { font: 700 10.5px var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--steel); margin-bottom: 0; }
.lead { color: var(--muted); max-width: 70ch; margin: 1px 0 0; font-size: 12px; }
.page-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.title-input { width: 100%; font: 800 19px var(--head); color: var(--ocean); border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; padding: 0 6px; margin-left: -6px; } .title-input:hover { border-color: var(--line); } .title-input:focus { border-color: var(--action); background: #fff; outline: none; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 9px; margin-bottom: 6px; box-shadow: var(--shadow); } .card.flush { padding: 0; overflow: hidden; }
.card.hero { background: linear-gradient(135deg, var(--ocean), #31566e); color: #fff; border: 0; } .card.hero h2, .card.hero p { color: #fff; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 5px; margin-bottom: 5px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 3px 8px; border-left: 3px solid var(--silver); text-align: left; }
.stat.ok { border-left-color: var(--ok); } .stat.warn { border-left-color: var(--warn); } .stat.bad { border-left-color: var(--err); } .btn-stat { cursor: pointer; } .btn-stat:hover, .btn-stat.sel { border-color: var(--action); border-left-color: var(--action); background: var(--sel); }
.stat-v { font: 800 17px var(--head); color: var(--ocean); line-height: 1.1; } .stat-l { font-weight: 600; font-size: 11.5px; color: var(--slate); } .stat-s { font-size: 12px; color: var(--muted); }
.meter { height: 8px; background: var(--cloud); border-radius: 6px; overflow: hidden; flex: 1; min-width: 60px; } .meter-fill { height: 100%; background: var(--steel); border-radius: 6px; transition: width .25s; } .meter-fill.ok, .meter-fill.high { background: var(--ok); } .meter-fill.mid { background: var(--warn); } .meter-fill.low { background: var(--err); }
.meter-row { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; }
.tiles, .mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 5px; margin-top: 5px; }
.tile { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: var(--r); padding: 6px 8px; } .tile:hover:not(:disabled) { background: rgba(255,255,255,.16); } .tile .ms { color: var(--cloud); } .tile span:last-child { font-size: 13px; color: var(--cloud); }
.mods { margin: 0 0 10px; } .mod { display: flex; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 5px 8px; text-decoration: none; color: inherit; } .mod:hover { border-color: var(--steel); box-shadow: var(--shadow); } .mod p { color: var(--muted); font-size: 13px; margin: 2px 0 6px; } .mod-stat { font-size: 12px; font-weight: 700; color: var(--steel); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; align-items: start; } .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.row { display: flex; align-items: center; } .row.gap { gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.end { align-items: flex-end; } .row.center { justify-content: center; } .row.between { justify-content: space-between; } .row.nowrap { flex-wrap: nowrap; }
.empty { text-align: center; padding: 12px 10px; color: var(--muted); } .empty h3 { margin-top: 8px; } .empty p { max-width: 52ch; margin: 0 auto 14px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: var(--r-sm); margin-bottom: 5px; font-weight: 500; } .banner.bad { background: var(--err-bg); color: var(--err); } .banner.warn { background: var(--warn-bg); color: #7d5513; }
.foot-note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 28px; } .ok-note { color: var(--ok); font-weight: 600; display: flex; gap: 6px; align-items: center; }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; } ul.plain li { padding: 1px 0; } ul.plain.cols { columns: 2; } ul.activity, .activity { list-style: none; padding: 0; margin: 8px 0 0; } .activity li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border-bottom: 1px solid var(--line); font-size: 12px; } .activity time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.day { margin-top: 5px; } .day-h { font: 700 12px var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--slate); margin-bottom: 4px; } .task { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 4px; } .task:hover { background: var(--hover); } .task.done span { text-decoration: line-through; color: var(--muted); } .task .go { margin-left: auto; color: var(--steel); }

/* ---------- Forms ---------- */
input[type=text], input[type=search], input[type=number], select, textarea { font: inherit; color: var(--ocean); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; padding: 2px 6px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--action); outline-offset: -1px; border-color: var(--action); } input:disabled, select:disabled, textarea:disabled { background: #F3F6F8; color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 14px; height: 14px; accent-color: var(--action); flex: none; } input[type=range] { accent-color: var(--action); width: 120px; }
.field { display: flex; flex-direction: column; gap: 1px; margin-bottom: 3px; } .lbl { font-weight: 600; font-size: 11.5px; color: var(--slate); } .hint { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; } .inline-lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--slate); } .inline-lbl select, .inline-lbl input:not([type=range]) { width: auto; }
input.num, .num { width: 76px; text-align: right; } td.num { font-family: var(--mono); font-size: 13px; } textarea.mono { font-family: var(--mono); font-size: 13px; }
.form { margin-bottom: 8px; } .row.end .grow { flex: 1; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 2px 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 5px; } .tb-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; } .search .ms { position: absolute; left: 8px; color: var(--slate); font-size: 18px; pointer-events: none; } .search input { padding-left: 32px; width: 230px; }
.hsel { width: auto; min-width: 220px; font-weight: 600; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow: auto; max-height: calc(100vh - 175px); min-height: 160px; } .tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--ocean); color: #fff; font: 600 12px var(--head); text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 3px 6px; white-space: nowrap; } .tbl th.r { text-align: right; }
.tbl td { padding: 1px 6px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tbody tr:hover { background: #F7FAFC; } .tbl td.r { text-align: right; white-space: nowrap; } .tbl td.act, .tbl th.act { width: 1%; white-space: nowrap; } .tbl .chk { width: 34px; }
.tbl.acc td { padding: 0 2px; } .tbl.acc tr.summary td { background: #F7FAFC; font-weight: 600; } .tbl.acc tr.picked { background: var(--sel); }
input.cell, select.cell { border-color: transparent; background: transparent; padding: 1px 4px; font-size: 12px; min-width: 70px; } input.cell:hover, select.cell:hover:not(:disabled) { border-color: var(--line-strong); background: #fff; } input.cell:focus { background: #fff; }
.tbl.acc td:nth-child(3) input.cell { min-width: 200px; } .bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--sel); border: 1px solid #b8cdf7; border-radius: var(--r); padding: 2px 6px; margin-bottom: 5px; } .bulk select { width: auto; }
.more { padding: 10px 14px; display: flex; gap: 12px; align-items: center; } .more:empty { display: none; }
.iss { display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; font-weight: 700; font-size: 12px; } .iss.error { color: var(--err); } .iss.warn { color: var(--warn); } .iss .ms { font-size: 17px; }

/* ---------- Hierarchies ---------- */
.hier { display: flex; flex-direction: column; height: 100%; padding: 5px 8px 6px; gap: 4px; } .hier .toolbar { margin: 0; }
.hier-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 5px; min-height: 0; } .hier-main { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.props { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; min-height: 0; } .props-sec { padding: 5px 8px; border-bottom: 1px solid var(--line); } .props-sec:last-child { border: 0; } .props-title { margin-bottom: 3px; } .props-title h3 { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 2px 0; font-size: 12px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; } .tips { padding-left: 18px; margin: 0; color: var(--muted); font-size: 13px; } .tips li { margin-bottom: 5px; }
.tree { flex: 1; overflow: auto; padding: 0; outline: none; } .trow { display: flex; align-items: center; gap: 4px; min-height: 20px; padding-right: 4px; border-left: 3px solid transparent; position: relative; cursor: default; }
.trow:hover { background: var(--hover); } .trow.sel { background: var(--sel); border-left-color: var(--action); } .trow.inactive .nm { color: var(--muted); text-decoration: line-through; } .trow.dragging { opacity: .4; }
.trow.drop-in { background: #D6E4FF; outline: 2px dashed var(--action); outline-offset: -2px; } .trow.drop-before::before, .trow.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: var(--action); } .trow.drop-before::before { top: -1px; } .trow.drop-after::after { bottom: -1px; }
.chev { width: 16px; height: 16px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; border-radius: 4px; color: var(--slate); } .chev:hover { background: var(--cloud); } .chev .ms { font-size: 16px; transition: transform .12s; } .chev.open .ms { transform: rotate(90deg); } .chev-sp { width: 16px; flex: none; }
.ficon { font-size: 14px; color: var(--steel); } .cd { font-size: 13px; color: var(--steel); font-weight: 500; min-width: 42px; } .cd.blank { color: var(--silver); } .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cnt { font-size: 12px; color: var(--muted); background: var(--cloud); border-radius: 10px; padding: 0 6px; }
.rename { width: 260px; padding: 0 5px; }
.tchip { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--cloud); color: var(--ocean); } .t-root { background: var(--ocean); color: #fff; } .lvl, .gen { font: 500 10.5px var(--mono); border-radius: 999px; padding: 0 6px; line-height: 15px; } .lvl { background: var(--info-bg); color: #2a6290; } .gen { background: var(--cloud); color: var(--ocean); } .pill-toggle { font: 600 11.5px var(--mono); border: 1px solid var(--line-strong); background: var(--white); color: var(--slate); border-radius: 999px; padding: 1px 9px; } .pill-toggle.on { background: var(--ocean); border-color: var(--ocean); color: #fff; } .t-asset { background: #DCE9F3; color: #28506f; } .t-liability { background: #E4EAED; color: #44606f; } .t-equity { background: #E9EEEF; color: #4d6068; } .t-revenue { background: #DCE6FF; color: #1d46b8; } .t-expense { background: #D9E1E6; color: var(--ocean); } .t-statistical { background: #F0F3F5; color: var(--muted); }
.mapc { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--steel); } .mapc .ms { font-size: 15px; }
.ract { margin-left: auto; display: none; gap: 0; } .trow:hover .ract, .trow.sel .ract { display: inline-flex; } .ract .icon-btn { width: 18px; height: 18px; } .trow .iss { margin-left: 4px; }
.canvas-host { position: relative; flex: 1; background: radial-gradient(circle, #D4DDE2 1px, transparent 1px) 0 0 / 22px 22px, #FAFCFD; min-height: 320px; } svg.canvas { display: block; touch-action: none; cursor: grab; } svg.canvas.panning { cursor: grabbing; } .cnode:hover rect:first-child { stroke: var(--steel); } .cnode.drop rect:first-child { stroke: var(--action); stroke-width: 3; fill: #E8F0FF; }
.canvas-ctl { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; box-shadow: var(--shadow); }
.ghost { position: fixed; z-index: 100; background: var(--ocean); color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 13px; pointer-events: none; box-shadow: var(--shadow); }
.cmt { border-left: 3px solid var(--silver); padding: 4px 10px; margin: 8px 0; background: #F7FAFC; border-radius: 0 6px 6px 0; } .cmt.client { border-left-color: var(--action); } .cmt p { margin: 2px 0 6px; } .cmt-line { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 4px; } .cmt-line .ms { font-size: 15px; }
.issue-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; } .issue-list.sm { max-height: 220px; }
.issue { display: flex; align-items: flex-start; gap: 8px; text-align: left; border: 0; border-left: 4px solid var(--silver); background: #F7FAFC; border-radius: 0 6px 6px 0; padding: 2px 6px; width: 100%; } button.issue:hover { background: var(--hover); } .issue.error { border-left-color: var(--err); } .issue.error .ms { color: var(--err); } .issue.warn { border-left-color: var(--warn); } .issue.warn .ms { color: var(--warn); } .issue.info { border-left-color: var(--steel); }
.issue .msg { flex: 1; font-size: 14px; } .issue .where { font-size: 12px; color: var(--muted); white-space: nowrap; }
.diff-sec { margin: 10px 0; padding: 8px 12px; border-left: 4px solid var(--silver); background: #F7FAFC; } .diff-sec.add { border-left-color: var(--ok); } .diff-sec.del { border-left-color: var(--err); } .diff-sec.chg { border-left-color: var(--warn); } .diff-sec ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; } .diff-sec h4 { margin-top: 0; }
.warnbox { background: var(--warn-bg); border-radius: 6px; padding: 8px 12px; margin: 8px 0; font-size: 14px; } .warnbox ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Wizard ---------- */
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; } .step { flex: 1; min-width: 150px; } .step button { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--white); border-radius: var(--r); padding: 4px 8px; text-align: left; }
.step .dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cloud); color: var(--ocean); font-weight: 700; flex: none; } .step .dot .ms { font-size: 18px; } .step.cur button { border-color: var(--action); box-shadow: 0 0 0 2px #cfdcff; } .step.cur .dot { background: var(--action); color: #fff; } .step.done .dot { background: var(--ok); color: #fff; } .sl { font-weight: 600; font-size: 14px; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 4px; }
.prop { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px; margin-bottom: 4px; } .prop.off { opacity: .55; } .prop-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 2px 25px; } .why { margin: 4px 0 0 25px; color: var(--muted); font-size: 14px; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; } .checks li { display: flex; align-items: center; gap: 6px; padding: 1px 0; } .checks .ok .ms { color: var(--ok); } .checks .bad .ms { color: var(--err); } .checks .soft .ms { color: var(--silver); }
.rules { display: grid; gap: 2px; margin-bottom: 14px; } .tbl input[type=text] { border-color: transparent; background: transparent; } .tbl input[type=text]:hover { border-color: var(--line-strong); background: #fff; }

/* ---------- Mapping and review ---------- */
.targets { display: flex; flex-direction: column; gap: 4px; } .tg { display: flex; align-items: flex-start; gap: 4px; justify-content: space-between; } .tg-main { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .tg.gone { color: var(--err); } .tg .pct { width: 62px; padding: 2px 6px; } .path { font-size: 12px; color: var(--muted); }
.sugg { border: 1px dashed var(--steel); background: #F2F7FB; color: var(--steel); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; text-align: left; } .sugg:hover { background: var(--info-bg); } .none { color: var(--muted); font-style: italic; }
.conf { display: flex; align-items: center; gap: 8px; min-width: 110px; } .conf span { font: 600 12px var(--mono); width: 38px; text-align: right; } .tbl tr.rej td { opacity: .6; } .tbl tr.row-unmapped td:first-child { box-shadow: inset 4px 0 var(--err); } .tbl tr.focus { background: #FFF6D6 !important; }
.pick-list { max-height: 50vh; overflow: auto; margin-top: 10px; } .pick { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 7px 8px; } .pick:hover { background: var(--hover); } .pick .path { grid-column: 2 / 4; } .sc { font: 700 12px var(--mono); } .sc.high { color: var(--ok); } .sc.mid { color: var(--warn); } .sc.low { color: var(--err); }
.rev-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; } .rev-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.2fr) auto; gap: 8px; align-items: center; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--silver); border-radius: var(--r); padding: 6px 10px; } .rev-row.approved { border-left-color: var(--ok); } .rev-row.rejected { border-left-color: var(--err); } .rev-row .cmt-line { grid-column: 1 / -1; } .arrow { color: var(--silver); } .decide { display: flex; gap: 6px; }
.flow { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 0; margin: 0; } .flow li { counter-increment: s; position: relative; padding-left: 40px; } .flow li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ocean); color: #fff; display: grid; place-items: center; font-weight: 700; } .flow li b, .flow li span { display: block; } .flow li span { color: var(--muted); font-size: 14px; }
.file-list { display: flex; flex-direction: column; } .file-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .file-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; } .file-row .info b { word-break: break-all; } .ext { font: 700 11px var(--mono); background: var(--cloud); border-radius: 4px; padding: 3px 7px; min-width: 46px; text-align: center; }
.eng-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .eng-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; } .eng-row.cur { border-color: var(--action); background: var(--sel); } .eng-row .info { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---------- Dialogs, toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(36,60,76,.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--white); border-radius: 12px; width: min(520px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); } .modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; } .modal-head h3 { margin: 0; } .modal-body { padding: 4px 18px 14px; overflow: auto; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; } .toast { background: var(--ocean); color: #fff; border-radius: 8px; padding: 10px 16px; box-shadow: var(--shadow); max-width: min(560px, 92vw); transition: opacity .3s; } .toast.ok { background: var(--ok); } .toast.error { background: var(--err); } .toast.out { opacity: 0; }

/* ---------- Assistant dock ---------- */
.dock-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--ocean); color: #fff; } .dock-head small { display: block; color: var(--silver); font-size: 12px; }
.dock-ctx { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--info-bg); font-size: 13px; color: #2a6290; }
.dock-log { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .msg { max-width: 92%; border-radius: 12px; padding: 8px 12px; font-size: 14px; white-space: pre-wrap; } .msg.bot { background: #EEF3F6; align-self: flex-start; } .msg.user { background: var(--action); color: #fff; align-self: flex-end; } .msg.pending { opacity: .7; }
.proposal { margin: 6px 0; padding-left: 18px; font-size: 13px; } .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; } .chip { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 3px 11px; font-size: 13px; } .chip:hover { background: var(--hover); }
.dock-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px 14px; border-top: 1px solid var(--line); } .dock-input textarea { resize: none; }

@media (max-width: 900px) { #app, #app.dock-open { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'top' 'main'; } #sidebar { position: fixed; z-index: 30; top: var(--top); bottom: 0; width: var(--side); } #dock { position: fixed; z-index: 40; right: 0; top: var(--top); bottom: 0; width: min(var(--dock), 100%); } .hier-body { grid-template-columns: 1fr; } .props { max-height: 45vh; } .rev-row { grid-template-columns: 1fr; } .arrow { display: none; } .page { padding: 18px 14px 50px; } #topbar { overflow-x: auto; } }
@media print { #topbar, #sidebar, #dock, .toolbar, .btn, .icon-btn { display: none !important; } #app { display: block; height: auto; } #main { overflow: visible; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Fallback when the icon font cannot load (offline, blocked CDN): hide icon text, keep labels. */
html.no-icons .ms { display: none; }
html.no-icons .icon-btn { width: auto; min-width: 30px; max-width: 120px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; line-height: 30px; }
html.no-icons .icon-btn::before { content: attr(aria-label); }
html.no-icons .chev { width: 22px; } html.no-icons .chev::before { content: '\25B8'; font-size: 14px; } html.no-icons .chev.open::before { content: '\25BE'; }
html.no-icons .step .dot .ms { display: none; } html.no-icons .stat .ms { display: none; }
html.no-icons .canvas-ctl .icon-btn { max-width: 70px; }
html.no-icons .step.done .dot::after { content: '\2713'; } html.no-icons .checks li::before { content: '\2022'; margin-right: 4px; } html.no-icons .checks .ok::before { content: '\2713'; color: var(--ok); } html.no-icons .checks .bad::before { content: '!'; color: var(--err); font-weight: 700; }
.tbl.acc { min-width: 1280px; }

.page-head p, .page-head .lede, .page > p, .page-head > div > .muted { font-size: 12px !important; line-height: 1.25; margin: 0 0 2px; }
.page-head h1, .page-head .muted { margin-bottom: 0; }
.day-h { margin-bottom: 1px; }

.hier-body { gap: 0 !important; } .splitter { cursor: col-resize; position: relative; touch-action: none; } .splitter::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: var(--line); border-radius: 2px; } .splitter:hover::after, .splitter.drag::after, .splitter:focus-visible::after { background: var(--action); width: 3px; left: 2px; }

/* Sidebar: larger and easier to read */
:root { --side: 224px; }
#sidebar { padding: 10px 10px; }
.brand { gap: 12px; padding: 2px 6px 14px; }
.brand-text b { font-size: 24px; letter-spacing: .05em; } .brand-text small { font-size: 12.5px; color: var(--cloud); }
.nav-item { gap: 12px; padding: 9px 12px; font-size: 16px; font-weight: 500; line-height: 1.2; }
.nav-item .ms { font-size: 24px; }
.nav-count { font-size: 13px; padding: 1px 8px; }
.nav-foot { font-size: 13px; color: var(--cloud); padding: 8px 8px 0; }

/* ---- sign-in, account, sharing ---- */
.auth-wrap { grid-column: 1 / -1; grid-row: 1 / -1; width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, var(--ocean) 0%, #2f4f63 60%, var(--steel) 140%); }
.auth-wrap.overlay { position: fixed; inset: 0; z-index: 2000; min-height: 0; background: rgba(36,60,76,.78); }
.auth-card { width: 100%; max-width: 380px; background: #fff; border-radius: 12px; padding: 22px 24px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.28); }
.auth-card h1 { margin: 6px 0 2px; font-size: 20px; } .auth-card p { margin: 0 0 12px; }
.auth-logo { height: 40px; width: auto; display: block; margin-bottom: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; } .auth-form .btn.lg { padding: 9px 14px; font-size: 14px; margin-top: 4px; }
.auth-msg { min-height: 0; color: var(--err); font-size: 12.5px; } .auth-msg:empty { display: none; }
.auth-foot { margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--muted); }
.acct-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; color: var(--ocean); border-radius: 999px; padding: 2px 10px 2px 4px; font: 500 12.5px var(--body); cursor: pointer; } .acct-btn:hover { background: var(--hover); } .acct-btn .ms { font-size: 20px; }
.acct { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .acct .muted { flex: 1; }
.share-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }

.auth-brand { display: flex; align-items: center; gap: 10px; } .auth-brand b { font: 800 24px var(--head); letter-spacing: .06em; color: var(--ocean); }
.auth-form input, .auth-form select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 400 14px var(--body); color: var(--text); background: #fff; }
.auth-form input:focus { outline: 2px solid var(--action); outline-offset: 0; }
