:root {
  --bg: #070b10;
  --panel: #0d141c;
  --panel2: #111a24;
  --ink: #eaf2f7;
  --muted: #93a6b8;
  --dim: #6f8396;
  --line: #1b2632;
  --line2: #243342;
  --accent: #45c4a0;
  --accent-ink: #06120e;
  --good: #45c4a0;
  --bad: #ff5d6c;
  --blue: #5aa9ff;
  --yellow: #ffd54f;
  --soft: #131d28;
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { background: var(--soft); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
input, select { background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; }
#shell { height: 100vh; display: flex; flex-direction: column; }
#top { height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-bottom: 1px solid var(--line); background: #0a1017; }
#top .top-row { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 34px; }
#top .top-row-status { min-height: 36px; }
#top .top-row-actions { min-height: 40px; padding: 4px 16px; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); }
#top .top-row-actions #tabs { margin-right: auto; }
.brand { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.brand em { color: var(--accent); font-style: normal; }
#tabs { display: flex; gap: 4px; }
#tabs button { background: transparent; }
#tabs button.on { color: var(--accent); border-color: var(--accent); }
#issue { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--yellow); font-size: 13px; }
#issue.bad { color: var(--bad); }
#recovery { display: flex; gap: 6px; flex: none; }
#recovery button { white-space: nowrap; }
#status { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
#top .top-row-status #calc-bar {
  position: relative;
  height: 22px;
  flex: 1 1 140px;
  min-width: 110px;
  max-width: 280px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  background: #0d1a16;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}
#calc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 28%; background: var(--accent); opacity: 0.35; animation: calc-slide 1.1s linear infinite; }
#calc-bar span { position: relative; }
@keyframes calc-slide { from { transform: translateX(-120%); } to { transform: translateX(360%); } }
body.report #table-tools .tools { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; row-gap: 2px; align-items: start; position: static; background: transparent; padding: 0 0 4px; }
body.report #table-tools .tool-view { grid-column: 1; grid-row: 1; }
body.report #table-tools .tool-lot { grid-column: 1; grid-row: 2; }
body.report #table-tools .tool-side { grid-column: 1; grid-row: 3; }
body.report #table-tools .tool-symbol { grid-column: 2; grid-row: 1; }
body.report #table-tools .tool-mae { grid-column: 2; grid-row: 2; }
body.report #table-tools .tool-mult { grid-column: 2; grid-row: 3; }
body.report #table-tools .tool-check { grid-column: 2; grid-row: 4; }
body.report #table-tools .tool-actions { grid-column: 1 / -1; grid-row: 5; max-width: 480px; margin: 4px 0 0; }
body.report #table-tools .tool-note { grid-column: 1 / -1; }
body.report #table-tools .tool-row { margin-bottom: 0; gap: 4px 12px; }
body.report #table-tools .dd-line { flex: 0 1 auto; }
body.report #table-tools .tool-label { min-width: 118px; }
#main { flex: 1; min-height: 0; display: flex; }
#left { width: 332px; min-width: 180px; max-width: 720px; flex: none; overflow: auto; border-right: 1px solid var(--line); padding: 10px 12px 24px; background: #0a1017; }
#top .top-row-actions #hide-left,
#top .top-row-actions #recovery button {
  padding: 7px 10px;
  font-size: 13px;
  min-height: 34px;
  line-height: 1.2;
  border-radius: 8px;
  letter-spacing: 0;
  text-transform: none;
}
#main.left-hidden #left, #main.left-hidden #split-x { display: none; }
.split-x, .split-y { flex: none; background: transparent; touch-action: none; }
.split-x { width: 8px; cursor: col-resize; }
.split-y { height: 8px; cursor: row-resize; }
.split-x:hover, .split-y:hover, .split-x.drag, .split-y.drag { background: var(--accent); }
#right { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#page1 { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#panel-top { flex: 1.05; min-height: 80px; overflow: hidden; padding: 12px 14px 8px; display: flex; flex-direction: column; }
#panel-top #kpis { flex: none; }
#panel-top #chart { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#panel-top .chart-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#panel-top .chart-head, #panel-top .chart-note { flex: none; }
#panel-top .chart-plot { flex: 1 1 auto; min-height: 0; }
#panel-top .chart-plot svg { width: 100%; height: 100%; }
body.report #page1, body.report #panel-top, body.report #panel-bot { display: block; height: auto; overflow: visible; }
body.report #panel-top #chart, body.report #panel-top .chart-card, body.report #panel-top .chart-plot { display: block; height: auto; flex: none; min-height: 0; }
body.report #chart svg { width: 100%; height: auto; }
#panel-bot { flex: 1; min-height: 80px; overflow: auto; padding: 8px 12px 16px; }
#page2 { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px 28px; }
#page2[hidden], #page1[hidden] { display: none !important; }
details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--panel); }
summary { cursor: pointer; padding: 9px 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.block { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.block label.field { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
#log, #m1-status { overflow: auto; background: var(--bg); border-radius: 8px; padding: 8px; color: var(--muted); font: 12px/1.4 Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; }
#log { height: 120px; }
#m1-status { max-height: 140px; min-height: 64px; margin: 0; }
#kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: 100%; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kl { color: var(--dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.kv { font: 700 18px/1.2 Consolas, "Cascadia Mono", monospace; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kv.period { font-size: 15px; }
.kh { color: var(--dim); font-size: 12px; margin-top: 4px; }
.kh b { font-weight: 700; color: var(--ink); }
.pos { color: var(--good); }
.neg, .dd { color: var(--bad); }
.chart-card { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 8px; }
.chart-head, .legend { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.legend { letter-spacing: 0; text-transform: none; }
.sw { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin: 0 4px 0 10px; }
.sw.y { background: var(--yellow); }
.sw.b { background: var(--blue); }
.sw.g { background: rgba(69, 196, 160, 0.7); }
.sw.r { background: rgba(255, 93, 108, 0.55); }
svg { width: 100%; height: auto; display: block; }
.line-eq { fill: none; stroke: #ffd54f; stroke-width: 2.4; stroke-dasharray: 7 5; }
.line-bal { fill: none; stroke: #5aa9ff; stroke-width: 2; }
.bar-profit { fill: rgba(69, 196, 160, 0.45); }
.bar-dd { fill: rgba(255, 93, 108, 0.4); }
.grid { stroke: #1b2632; }
.axis { stroke: #243342; }
.axis-tick { fill: #6f8396; font-family: "Segoe UI", system-ui, sans-serif; }
.chart-note, .tool-hint, .meta { color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.tools { position: sticky; top: 0; z-index: 3; background: rgba(7, 11, 16, 0.94); padding-bottom: 6px; }
#left .tools { position: static; background: transparent; padding-bottom: 0; }
#left .tools .tool-row {
  padding: 10px 0 12px;
  margin-bottom: 0;
  border-top: 1px solid var(--line2);
}
#left .tools .tool-row:first-child { border-top: 0; padding-top: 0; }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 6px; }
#left .tool-row { gap: 8px 10px; }
.tool-label { color: var(--accent); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; min-width: 128px; }
#left .tool-label { flex: 1 0 100%; min-width: 0; }
#left #ea-wrap { flex: 1 0 100%; max-width: 100%; flex-direction: column; align-items: stretch; }
#left #ea-select { width: 100%; max-width: 100%; }
#left #r-dd-pct, #left #r-swap-pts, #left #r-pct { width: 64px; }
.dd-line { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.tool-actions { margin-top: 4px; }
#apply-skips.dirty { box-shadow: 0 0 0 2px var(--accent); }
.pref-group {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line2);
}
.pref-group:first-child { border-top: 0; padding-top: 0; }
.pref-head, details.pref-clock > summary {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pref-head { padding: 0; }
details.pref-clock {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
details.pref-clock > summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 0;
  min-height: 32px;
  display: flex;
  align-items: center;
}
details.pref-clock > summary::-webkit-details-marker { display: none; }
details.pref-clock > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 8px;
  flex: none;
}
details.pref-clock[open] > summary::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  border-bottom: 0;
  margin-right: 7px;
}
details.pref-clock .meta { margin: 0 0 4px; }
.pref-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pref-save { padding-bottom: 0; }
.pref-save button { width: 100%; min-height: 44px; }
.tick { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); font-size: 13.5px; }
#r-pct, #r-dd-pct { width: 72px; }
.chart-plot { position: relative; touch-action: none; cursor: crosshair; }
.chart-select { position: absolute; z-index: 2; background: rgba(90, 169, 255, 0.2); border-left: 1px solid #5aa9ff; border-right: 1px solid #5aa9ff; pointer-events: none; }
.chart-tip { position: absolute; z-index: 4; box-sizing: border-box; width: max-content; min-width: 200px; max-width: min(280px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: hidden; background: #101820; border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; color: var(--ink); font-size: 12px; line-height: 1.45; pointer-events: none; white-space: normal; overflow-wrap: anywhere; }
.chart-tip b { display: block; margin-bottom: 4px; }
.chart-detail {
  position: absolute; z-index: 5;
  width: min(340px, calc(100% - 16px));
  max-height: min(280px, 62%);
  overflow: auto;
  background: #101820;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px 10px 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.chart-detail[hidden] { display: none !important; }
.chart-detail-head {
  display: flex; justify-content: space-between; gap: 8px;
  align-items: flex-start; margin-bottom: 6px;
  position: sticky; top: 0; background: #101820; z-index: 1;
  padding-top: 2px;
}
.chart-detail-head b { display: block; }
.chart-detail-close {
  flex: none; padding: 4px 8px; font-size: 12px; min-height: 32px;
}
.chart-detail-trade {
  border-top: 1px solid var(--line);
  padding: 6px 0 2px;
}
.chart-detail-trade .sub { color: var(--muted); font-size: 11px; }
.cross { stroke: #93a6b8; stroke-dasharray: 3 3; }
#chart-reset { margin-left: 12px; padding: 3px 8px; font-size: 12px; letter-spacing: 0; text-transform: none; }
#apply-note { color: var(--accent); font-size: 12.5px; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; align-items: start; overflow-x: auto; min-width: 0; }
.pair { min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.pair-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; }
.set-name { color: var(--dim); font-size: 10px; font-weight: 400; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; word-break: break-word; margin: 0 0 3px; }
.skip-under, .mae-tick, .skip-bs, .lot-star, .pair-cr { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--dim); font-size: 12px; }
.mae-points, .skip-bs b, .lot-star b, .pair-cr b { color: var(--ink); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.skip-under select { max-width: 108px; }
.pair-table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.pair-table th, .pair-table td { border-bottom: 1px solid var(--line); padding: 3px 4px; text-align: right; white-space: nowrap; }
.pair-table th:first-child, .pair-table td:first-child { text-align: left; }
.sym-head { position: relative; cursor: pointer; letter-spacing: 0.04em; }
.set-pop { display: none; position: absolute; z-index: 6; left: 0; top: 100%; width: max-content; max-width: 280px; max-height: 180px; overflow: auto; background: #141c26; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; color: var(--ink); font-size: 11px; font-weight: 500; letter-spacing: 0; text-align: left; white-space: normal; }
.sym-head:hover .set-pop, .sym-head.open .set-pop { display: block; }
.pair-table tr.grand th, .pair-table tr.grand td { font-weight: 700; }
.pair-table tr.skipped { color: #546272; }
table.book th, table.book td { border-bottom: 1px solid var(--line); padding: 5px 7px; text-align: right; white-space: nowrap; }
table.book th { background: #15202b; color: var(--muted); font-weight: 650; }
table.book th.lot, table.book td.lot { text-align: left; position: sticky; left: 0; background: #111a24; z-index: 1; }
table.book thead th.lot { z-index: 4; }
table.book th.sub { font-size: 11px; color: var(--dim); }
table.book tr.grand th, table.book tr.grand td { border-top: 2px solid rgba(90, 169, 255, 0.45); font-weight: 700; background: rgba(90, 169, 255, 0.06); }
table.book tr.skipped td, table.book tr.skipped th, table.book th.skipped { color: #546272; }
.empty, .empty-chart { color: #3a4a5a; padding: 18px; }
.analysis { display: flex; flex-direction: column; gap: 12px; }
.analysis-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}
.analysis-top > .panel-card {
  flex: 1 1 260px;
  min-width: min(260px, 100%);
  max-width: 100%;
  font-size: 16px;
  line-height: 1.35;
  padding: 12px 14px;
}
.analysis-top > .panel-card h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.analysis-top .stat-rows { gap: 2px 18px; }
.analysis-top .stat-row {
  gap: 12px;
  padding: 4px 0;
}
.analysis-top .stat-row span {
  color: var(--dim);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.analysis-top .stat-row b {
  text-align: left;
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.analysis-top table.slice {
  width: 100%;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.analysis-top table.slice th,
.analysis-top table.slice td {
  padding: 4px 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.analysis-top table.slice th {
  color: var(--dim);
  font-weight: 650;
  background: transparent;
}
.analysis-top table.slice tr.grand th,
.analysis-top table.slice tr.grand td { font-weight: 650; }
.analysis-top .chart-note {
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 8px 0 0;
  text-transform: none;
}
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.panel-card h2, .cards-3 h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cards-3, .two { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.swap-skip-note { color: #fff; font-size: 12px; font-weight: 650; margin: 0 0 4px; }
.data-dl-col { display: flex; flex-direction: column; gap: 4px; flex: 1 1 100px; min-width: 0; }
.data-dl-col button { width: 100%; min-height: 44px; }
.data-dl-col .meta { margin: 0; }
.stat-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.stat-row { display: grid; grid-template-columns: max-content minmax(0, 1fr); justify-content: start; gap: 12px; padding: 4px 0; border-bottom: 1px solid rgba(27, 38, 50, 0.8); }
.stat-row span { color: var(--dim); }
.stat-row b { text-align: left; font-weight: 650; font-variant-numeric: tabular-nums; }
table.slice, table.cal { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
table.slice th, table.slice td, table.cal th, table.cal td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: center; }
table.slice th, table.cal th { color: var(--muted); font-weight: 650; text-align: center; background: var(--panel2); }
table.slice td.sym, table.slice th:first-child, table.cal th:first-child,
table.slice td:first-child, table.cal td:first-child { text-align: left; }
table.slice td.lots, table.slice td.setting { text-align: center; white-space: normal; max-width: 280px; }
table.slice.sym th, table.slice.sym td { text-align: center; }
table.slice.sym th:first-child, table.slice.sym td.sym { text-align: left; }
table.slice tr.skipped th, table.slice tr.skipped td,
table.slice tr.skipped td.pos, table.slice tr.skipped td.neg, table.slice tr.skipped td.dd { color: #546272; }
.pair-table tr.skipped th, .pair-table tr.skipped td,
.pair-table tr.skipped td.pos, .pair-table tr.skipped td.neg, .pair-table tr.skipped td.dd { color: #546272; }
table.cal td:empty::after { content: ""; }

/* t200u: year-month tables share layout — fixed Year column, equal month/Total columns */
table.cal {
  table-layout: fixed;
  width: 100%;
}
table.cal col.cal-year { width: 64px; }
table.cal th:first-child,
table.cal td:first-child {
  width: 64px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* t203u: saved HTML keeps Optimization, then the 7 KPI boxes */
body.report #report-opt { margin: 12px 14px 8px; }
body.report #report-opt h2 { margin: 0 0 8px; }

/* t201u: Symbol settings header sort */
table.slice.sym thead th.sym-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
table.slice.sym thead th.sym-sort:hover,
table.slice.sym thead th.sym-sort:focus-visible {
  color: #e8edf2;
  outline: none;
}
table.slice.sym thead th.sort-asc::after,
table.slice.sym thead th.sort-desc::after {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  content: "\25B2";
}
table.slice.sym thead th.sort-desc::after { content: "\25BC"; }
.isoos { border-color: rgba(90, 169, 255, 0.45); }
#map-dialog { position: fixed; inset: 0; background: rgba(7, 11, 16, 0.72); display: flex; align-items: center; justify-content: center; z-index: 30; }
#map-dialog[hidden] { display: none; }
#map-card { width: min(680px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 18px 20px; }
#map-card h2 { margin: 0 0 8px; font-size: 18px; }
#map-rows { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
#map-rows label { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; align-items: center; }
#busy { position: fixed; inset: 0; background: rgba(7, 11, 16, 0.72); display: flex; align-items: center; justify-content: center; z-index: 20; }
#busy[hidden] { display: none; }
#busy-card { width: min(460px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 18px 22px; }
#busy-text { font-size: 16px; }
#busy-track { height: 8px; margin-top: 14px; background: #1b2632; border-radius: 99px; overflow: hidden; }
#busy-fill { height: 100%; width: 0; background: var(--accent); }
#busy-detail { margin-top: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* TRADEOP_WEB_MODE_t119u */
#sign-out { color: inherit; margin-right: 12px; font-size: 13px; }
#folder-dialog {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 40;
  padding: 12px;
}
#folder-dialog[hidden] { display: none; }
#folder-card {
  width: min(640px, 96vw); max-height: 90vh; overflow: auto;
  background: #1b222c; color: #e8edf2; padding: 20px; border-radius: 12px;
}
#folder-card h2 { margin: 0 0 8px; font-size: 18px; }
.folder-search-label {
  display: flex; flex-direction: column; gap: 6px;
  color: #93a6b8; font-size: 13px; margin-top: 8px;
}
#folder-search {
  width: 100%; min-height: 44px; font-size: 16px;
  padding: 10px 12px; border-radius: 8px;
}
#folder-list { border: 1px solid #3a4654; border-radius: 8px; max-height: min(420px, 46vh); overflow: auto; margin: 12px 0; }
#folder-list button {
  display: block; width: 100%; text-align: left; background: transparent;
  color: inherit; border: 0; padding: 12px; min-height: 44px;
}
#folder-list button:hover, #folder-list button.on { background: #2a3440; }
#folder-list .folder-hint {
  display: block; color: #93a6b8; font-size: 12px; font-weight: 400;
  margin-top: 2px; word-break: break-all;
}
#folder-card .row button { min-height: 44px; }
.xfer-label {
  margin: 8px 0 0;
  color: #6f8396;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.xfer-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: stretch; }
#left .block > button { min-height: 44px; width: 100%; }
.xfer-actions button { min-height: 44px; flex: 1 1 100px; width: auto; }

/* PRODUCT_SHELL_t131u */
#site-nav {
  min-height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 6px 16px;
  background: #141c26;
  border-bottom: 1px solid #2a3a4a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 rgba(69, 196, 160, 0.4), 0 8px 18px rgba(0, 0, 0, 0.4);
  z-index: 30;
}
#site-nav .brand { text-decoration: none; color: inherit; }
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  min-width: 0;
  flex: none;
}
.site-brand .site-logo {
  display: block;
  height: 52px;
  width: auto;
  flex: none;
}
@media (max-width: 640px) {
  .site-brand .site-logo { height: 44px; }
}
.site-brand .site-mark {
  width: 24px;
  height: 24px;
  flex: none;
  display: block;
}
.site-brand .site-wordmark {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.site-brand .site-wordmark span {
  color: var(--accent);
  font-style: normal;
}
#login-card h1.site-brand {
  margin: 0 0 12px;
  font-size: 16px;
}
#site-nav-links { display: flex; gap: 4px; flex: 1; min-width: 0; flex-wrap: wrap; }
#site-nav-links a {
  color: #c5d2de;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
#site-nav-links a:hover { color: var(--ink); border-color: #3a4b5c; background: rgba(255, 255, 255, 0.04); }
#site-nav-links a.on { color: var(--accent); border-color: rgba(69, 196, 160, 0.45); background: rgba(69, 196, 160, 0.1); }
#site-nav-user { color: #93a6b8; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
#site-nav .sign-out { color: #93a6b8; text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
#site-nav .sign-out:hover { color: var(--ink); }
body.has-site-nav { display: flex; flex-direction: column; }
body.has-site-nav #shell { height: auto; flex: 1; min-height: 0; }
body.page-shell { min-height: 100%; }
#page-wrap { max-width: none; width: 100%; margin: 28px 0 0; padding: 0 16px 48px; box-sizing: border-box; }
#page-wrap h1 { margin: 0 0 6px; font-size: 1.4rem; }
#page-wrap .meta, .page-shell .meta { color: var(--muted); }
#page-wrap a, .page-shell a { color: var(--blue); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.product-card, .stat, .admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card h2, .admin-card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.product-card:hover, .admin-card:hover { border-color: var(--accent); }
.stat .label { color: var(--muted); font-size: 0.85rem; margin: 0 0 4px; }
.stat .value { margin: 0; word-break: break-all; }
.ok { color: var(--good); }
#admin-subnav, .admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  margin: 10px 0 20px;
  padding: 0;
}
#admin-subnav a, .admin-tabs a {
  color: #c5d2de;
  text-decoration: none;
  background: transparent;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
#admin-subnav a:hover, .admin-tabs a:hover {
  color: var(--ink);
  border-color: #3a4b5c;
  background: rgba(255, 255, 255, 0.04);
}
#admin-subnav a.on, .admin-tabs a.on {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}
.admin-section h2.info-heading {
  margin: 24px 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.info-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.info-toolbar .meta { margin: 0; flex: 1; min-width: 200px; }
.info-warn {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--yellow);
  background: var(--panel);
  color: var(--ink);
}
.info-warn.error { border-color: var(--bad); }
.info-warn.ok { border-color: var(--line2); color: var(--muted); }
.info-warn.info { border-color: var(--line2); color: var(--muted); }
.folder-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 14px;
  overflow: auto;
}
.folder-tree { list-style: none; margin: 0; padding: 0; }
.folder-tree .folder-tree { margin: 4px 0 4px 18px; }
.folder-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.folder-row code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink);
}
.folder-role, .folder-meta, .folder-note { color: var(--muted); font-size: 12px; }
.folder-node.missing .folder-row code { color: var(--yellow); }
.folder-node.secret .folder-meta { color: var(--dim); }
#admin-result { margin: 0 0 16px; padding: 14px 16px; border-radius: 10px; background: var(--panel); display: none; }
#admin-result.show { display: block; }
#admin-result .password { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; margin: 8px 0; word-break: break-all; }
.admin-section table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 12px; overflow: hidden; }
.admin-section th, .admin-section td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.admin-section th { color: var(--muted); font-weight: 600; }
.admin-section button { margin: 0 6px 6px 0; }
.status { text-transform: capitalize; }
.empty { padding: 20px; color: var(--muted); }
.row-actions { white-space: nowrap; }
.admin-form .field { display: block; margin: 0 0 14px; max-width: 420px; }
.admin-form .field input { width: 100%; margin-top: 6px; }
#speed-recent { overflow: auto; }

#drive-dialog {
  position: fixed; inset: 0; background: rgba(7, 11, 16, 0.72);
  display: flex; align-items: center; justify-content: center; z-index: 40;
  padding: 12px;
}
#drive-dialog[hidden] { display: none; }
#drive-card {
  width: min(640px, 96vw); max-height: 90vh; overflow: auto;
  background: var(--panel); color: inherit; padding: 20px; border-radius: 12px;
  border: 1px solid var(--line2);
}
#drive-card h2 { margin: 0 0 8px; font-size: 18px; }
.drive-crumbs {
  display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center;
  margin: 0 0 10px; color: var(--muted); font-size: 13px;
}
.drive-crumbs button {
  min-height: 36px; width: auto; padding: 6px 8px;
  background: transparent; border: 0; color: inherit;
}
.drive-crumbs button:hover { text-decoration: underline; }
.drive-crumbs .crumb-sep { color: var(--muted); padding: 0 2px; }
.drive-toolbar { margin: 8px 0; gap: 8px; flex-wrap: wrap; }
.drive-toolbar button { min-height: 44px; width: auto; flex: 1 1 120px; }
#drive-list {
  border: 1px solid var(--line2); border-radius: 8px;
  max-height: min(420px, 46vh); overflow: auto; margin: 12px 0;
}
#drive-list button, #drive-list label.drive-file {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: transparent;
  color: inherit; border: 0; padding: 12px; min-height: 44px;
  box-sizing: border-box;
}
#drive-list button:hover, #drive-list label.drive-file:hover { background: #2a3440; }
#drive-list .drive-kind {
  flex: none; width: 3.2em; color: var(--muted); font-size: 12px;
}
#drive-list .drive-name { flex: 1; word-break: break-word; }
#drive-list input[type="checkbox"] { flex: none; width: 18px; height: 18px; }
#drive-status { margin: 0; }
