.tracker-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.tracker-timer-box, .tracker-history-box { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border-dim); padding: 25px; }

.tracker-modes { display: flex; gap: 20px; font-size: 0.875rem; }
.tracker-modes label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.timer-display { text-align: center; padding: 25px 0; border-top: 1px dashed var(--border-section); border-bottom: 1px dashed var(--border-section); margin: 20px 0; }
.timer-phase { color: var(--neon-cyan); font-size: 0.875rem; margin-bottom: 8px; min-height: 1.2em; }
.timer-clock { font-size: 2.5rem; font-weight: bold; color: var(--text-white); letter-spacing: 2px; }
.timer-clock.break { color: var(--neon-cyan); }
.timer-clock.paused { color: var(--text-muted); }
.timer-clock.awaiting { animation: blink 1s step-end infinite; color: var(--neon-cyan); }
.timer-money { font-size: 1.125rem; color: var(--neon-cyan); margin-top: 8px; min-height: 1.4em; }
.timer-sub { font-size: 0.75rem; color: var(--text-faint); margin-top: 6px; min-height: 1.2em; }

.timer-controls { display: flex; gap: 10px; margin-bottom: 20px; }
.timer-controls .terminal-btn { flex: 1; }

.timer-view-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.timer-view-row .term-prompt { flex: none; margin: 0; }
.timer-view-row .timer-view-pick { flex: 1 1 auto; }
.home-card-head .timer-view-pick { flex: 0 1 auto; max-width: 60%; font-size: 0.8125rem; padding: 4px 8px; }
.timer-dial { display: block; width: 112px; height: 112px; flex: none; }
.timer-dial[hidden] { display: none; }
.timer-art { display: none; width: 100%; height: 100%; }
.timer-dial.view-face .timer-art-face,
.timer-dial.view-ring .timer-art-ring,
.timer-dial.view-porthole .timer-art-port { display: block; }
.timer-display .timer-dial { width: 176px; height: 176px; margin: 0 auto 14px; }
.timer-display .timer-clock { font-size: 2rem; }
.timer-dial-face { fill: var(--surface-quiet); stroke: var(--border-dim); stroke-width: 1; }
.timer-dial-tick { stroke: var(--text-faint); stroke-width: 1.5; }
.timer-dial-hub { fill: var(--text-faint); }
.timer-dial-hand { stroke: var(--text-white); stroke-width: 2; }
.timer-dial-luz { stroke: var(--surface); stroke-width: 2.5; }
.timer-ring-luz { stroke: var(--surface); stroke-width: 3.5; }
.timer-ring-track { fill: none; stroke: var(--surface-quiet); stroke-width: 13; }
.timer-ring-tick { stroke: var(--text-faint); stroke-width: 1.6; }
.timer-ring-tick.is-hour { stroke: var(--text-muted); stroke-width: 2.4; }
.timer-port-glass { fill: var(--surface-quiet); stroke: var(--border-dim); stroke-width: 1.2; }
.timer-port-bezel { fill: none; stroke: var(--border-dim); stroke-width: 10; }
.timer-port-edge { fill: none; stroke: var(--surface-quiet); stroke-width: 1.2; }
.timer-port-rivet { fill: var(--text-faint); }
.timer-port-gauge { stroke: var(--text-muted); stroke-width: 1.4; }
.timer-port-swell { animation: snug-swell 9s linear infinite; animation-play-state: paused; }
.timer-port-swell-back { animation-duration: 13s; }
.timer-dial.is-run .timer-port-swell,
.timer-dial.is-break .timer-port-swell { animation-play-state: running; }
@keyframes snug-swell { from { transform: translateX(0); } to { transform: translateX(-26px); } }
.timer-dial-slice, .timer-dial-luz, .timer-ring-luz, .timer-port-front, .timer-port-luz { fill: var(--neon-cyan); }
.timer-port-back { fill: var(--neon-cyan); opacity: 0.28; }
.timer-ring-prog { fill: none; stroke: var(--neon-cyan); stroke-width: 13; stroke-linecap: round; }
.timer-dial.is-idle .timer-dial-slice,
.timer-dial.is-idle .timer-dial-luz,
.timer-dial.is-idle .timer-ring-luz,
.timer-dial.is-idle .timer-port-front,
.timer-dial.is-idle .timer-port-luz,
.timer-dial.is-idle .timer-port-back { fill: var(--text-faint); }
.timer-dial.is-idle .timer-ring-prog { stroke: var(--text-faint); }
.timer-dial.is-paused .timer-dial-slice,
.timer-dial.is-paused .timer-dial-luz,
.timer-dial.is-paused .timer-ring-luz,
.timer-dial.is-paused .timer-port-front,
.timer-dial.is-paused .timer-port-luz,
.timer-dial.is-paused .timer-port-back { fill: var(--warn); }
.timer-dial.is-paused .timer-ring-prog { stroke: var(--warn); }
.timer-dial.is-break .timer-dial-slice,
.timer-dial.is-break .timer-dial-luz,
.timer-dial.is-break .timer-ring-luz,
.timer-dial.is-break .timer-port-front,
.timer-dial.is-break .timer-port-luz,
.timer-dial.is-break .timer-port-back { fill: var(--ok); }
.timer-dial.is-break .timer-ring-prog { stroke: var(--ok); }

.terminal-btn-sm {
  background: transparent; border: 1px solid var(--neon-cyan); color: var(--neon-cyan);
  font-family: inherit; font-size: 0.75rem; font-weight: bold; text-transform: uppercase;
  padding: 8px 12px; cursor: pointer; transition: 0.2s;
}
.terminal-btn-sm:hover { background: var(--neon-cyan); color: var(--btn-text); box-shadow: 0 0 10px var(--neon-glow); }
.terminal-btn-sm svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 6px; }
.terminal-btn.ghost { background: transparent; color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }
.terminal-btn.ghost:hover { background: var(--neon-cyan); color: var(--btn-text); }
.terminal-btn.danger { background: var(--danger); color: var(--btn-text); }

.terminal-btn.quiet, .terminal-btn-sm.quiet {
  background: var(--surface-quiet);
  color: var(--text-white);
  border: 1px solid transparent;
}
.terminal-btn.quiet:hover, .terminal-btn-sm.quiet:hover {
  background: var(--surface-quiet);
  border-color: var(--border-dim);
  color: var(--text-white);
  box-shadow: none;
}
.terminal-btn.danger:hover { filter: brightness(1.12); box-shadow: 0 0 15px color-mix(in srgb, var(--danger) 60%, transparent); }
.danger-link { border-color: var(--danger) !important; color: var(--danger) !important; }
.danger-link:hover { background: var(--danger) !important; color: var(--btn-text) !important; }

.settings-details { margin-bottom: 20px; border: 1px solid var(--border-dim); padding: 12px 15px; }
.settings-details summary { cursor: pointer; color: var(--neon-cyan); font-size: 0.875rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-top: 15px; font-size: 0.75rem; }
.settings-grid[hidden] { display: none; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; }
.settings-grid label[hidden] { display: none; }
.fx-unit { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.fx-manual { font-size: 0.75rem; color: var(--text-faint); }
.fx-input[readonly] { border-left-color: var(--input-border); cursor: default; }
.settings-grid input[type="number"], .settings-grid select { width: 100%; }
.cfg-check { flex-direction: row !important; align-items: center; gap: 8px !important; min-height: 24px; }
.hint { font-size: 0.875rem; color: var(--text-muted); margin: 10px 0 20px; }
.inline-icon { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }
.hint::before { content: "// "; }
.cozy .hint::before { content: ""; }

.term-prompt::before { content: "> "; }
.empty-hint { color: var(--text-faint); list-style: none; }
.empty-hint::before { content: "// "; }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px; padding: 34px 20px;
  white-space: normal; list-style: none;
  grid-column: 1 / -1;
}
.empty-state-icon { color: var(--text-faint); line-height: 0; }
.empty-state-icon .lz { fill: var(--neon-cyan); stroke: none; }
.empty-state-title { margin: 0; font-weight: 600; font-size: 1rem; color: var(--text-light); }
.empty-state-cta { margin: 0; font-size: 0.875rem; color: var(--text-muted); max-width: 360px; line-height: 1.5; }
.empty-cell { white-space: normal; overflow: visible; text-overflow: clip; }
.empty-state-li { list-style: none; padding: 0; }
.schedule-empty::before { content: "// "; }

.cozy .term-prompt::before,
.cozy .empty-hint::before,
.cozy .schedule-empty::before,
.cozy .subtitle::before { content: ""; }
.cozy h1,
.cozy .nav-tab,
.cozy .terminal-btn,
.cozy .terminal-btn-sm { text-transform: none; }
.cozy .nav-tab { letter-spacing: 0; }
.cozy .cursor { display: none; }
.cozy .timer-clock { font-family: "Cascadia Mono", Consolas, Menlo, monospace; }

.cozy h1 { font-weight: 600; letter-spacing: -0.02em; }
.cozy h2 { font-weight: 600; letter-spacing: -0.01em; }
.cozy h3 { font-weight: 600; }
.cozy .terminal-btn,
.cozy .terminal-btn-sm,
.cozy .nav-tab { font-weight: 600; }
.cozy .form-group label { font-weight: 600; }

.tracker-timer-box, .tracker-history-box, .checklist-card,
.finance-chart-box, .idea-item, .link-card, .schedule-day {
  box-shadow: var(--shadow-card);
}

.onboard-modal {
  position: fixed; inset: 0; z-index: 1100;
  background: var(--bg-dark);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.onboard-modal[hidden] { display: none; }
#key-modal { z-index: 1175; }
.onboard-card {
  border-radius: var(--radius-card);
  max-width: 500px; width: 100%;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan), var(--shadow-pop);
  padding: 34px;
}
.onboard-brand {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border-dim);
}
.onboard-logo { width: clamp(110px, 55%, 220px); height: auto; }
.onboard-logo .lw-symbol { color: var(--neon-cyan); }
.onboard-tagline { margin: 0; font-size: 0.875rem; color: var(--text-muted); text-align: center; }
.onboard-step { display: flex; flex-direction: column; gap: 12px; }
.onboard-step[hidden] { display: none; }
#recover-pass2-wrap > input, #recover-code-wrap > input,
#key-pass2-wrap > input, #key-code-wrap > input { width: 100%; }
.onboard-title { margin: 0; color: var(--neon-cyan); font-size: 1.75rem; }
.onboard-sub { margin: 0 0 10px; color: var(--text-muted); font-size: 0.875rem; }
.onboard-q { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.onboard-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.onboard-kind {
  background: transparent; border: 1px solid var(--border-dim);
  color: var(--text-light); font-family: inherit; font-size: 0.875rem;
  padding: 12px 10px; cursor: pointer; transition: 0.2s;
}
.onboard-kind:hover { border-color: var(--neon-cyan); }
.onboard-kind { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.onboard-kind.is-wide { grid-column: 1 / -1; }
.onboard-kind-hint { font-size: 0.75rem; color: var(--text-muted); }
.onboard-kind.selected {
  border-color: var(--neon-cyan); color: var(--neon-cyan);
  background: var(--bg-card); box-shadow: 0 0 8px var(--neon-glow);
}
.onboard-btns { display: flex; gap: 10px; margin-top: 8px; }
.onboard-btns .terminal-btn { flex: 1; }
.onboard-btns .terminal-btn:disabled { background: var(--surface-quiet); color: var(--text-faint); box-shadow: none; cursor: not-allowed; }
.onboard-status { margin: 0; font-size: 0.75rem; color: var(--text-muted); min-height: 1em; }
.key-code {
  margin: 4px 0 0; padding: 12px 10px;
  border: 1px solid var(--input-border); border-radius: var(--radius);
  background: var(--surface-quiet); color: var(--text-white);
  font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.6;
  letter-spacing: 0.06em; word-break: break-all; user-select: all;
}
.onboard-link {
  background: none; border: none; color: var(--text-muted);
  font-family: inherit; font-size: 0.875rem;
  cursor: pointer; text-decoration: underline; padding: 4px 0;
  align-self: flex-start;
}
.onboard-link:hover { color: var(--text-light); }
#ob-have-account {
  align-self: stretch; text-align: center;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border-dim);
  color: var(--text-muted); text-decoration: none;
}
#ob-have-account:hover { color: var(--neon-cyan); text-decoration: underline; }

.onboard-start-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.onboard-start-opt {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: transparent; border: 1px solid var(--border-dim);
  color: var(--text-light); font-family: inherit;
  padding: 14px 16px; cursor: pointer; transition: 0.2s;
}
.onboard-start-opt:hover {
  border-color: var(--neon-cyan);
  background: var(--bg-card); box-shadow: 0 0 8px var(--neon-glow);
}
.onboard-start-title { font-weight: 600; font-size: 1rem; color: var(--neon-cyan); }
.onboard-start-desc { font-size: 0.75rem; color: var(--text-muted); }
.onboard-start-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.onboard-start-opt.is-rec { border-color: var(--neon-cyan); }
.onboard-start-badge {
  font-size: 0.75rem; font-weight: 400; color: var(--neon-cyan);
  border: 1px solid currentColor; border-radius: var(--radius-chip);
  padding: 1px 8px;
}
.onboard-start-opt.is-quiet .onboard-start-title { color: var(--text-light); }

#ob-goal-row { display: flex; flex-direction: column; gap: 12px; }
#ob-goal-row[hidden] { display: none; }

.onboard-rate {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0; padding: 10px 12px;
  background: var(--surface); border-left: var(--accent-width) solid var(--neon-cyan);
  font-size: 0.875rem;
}
.onboard-rate[hidden] { display: none; }
.onboard-rate-sub { font-size: 0.75rem; color: var(--text-muted); line-height: 1.45; }

.income-goal-box { margin-bottom: 15px; }
.income-goal-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.income-goal-text { font-size: 0.875rem; font-weight: bold; }
.income-goal-edit { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-faint); }
.income-goal-edit input { width: 70px; padding: 4px 6px !important; }
.income-goal-bar { height: 8px; background: var(--surface-quiet); border: 1px solid var(--border-dim); overflow: hidden; }
.income-goal-fill { height: 100%; background: var(--neon-cyan); transition: width 0.3s; }
.income-goal-fill.goal-met { background: var(--ok); }

.quick-totals { font-size: 0.875rem; color: var(--neon-cyan); margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-section); }

.money-status { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; margin-bottom: 15px; }
.money-status:empty { display: none; }
.money-cell { display: flex; flex-direction: column; gap: 2px; }
.money-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.money-value { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.money-cell.is-invoiced .money-value { color: var(--warn); }
.money-cell.is-paid .money-value { color: var(--ok); }
.money-stale { font-size: 0.75rem; color: var(--danger); }
.money-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.money-pend { font-size: 0.75rem; color: var(--warn); }

.bill-chip {
  width: 13px; height: 13px; padding: 0; flex: none;
  display: inline-block; vertical-align: -1px; margin-left: 4px;
  background: transparent; border: 1px solid var(--text-faint); border-radius: 50%;
  cursor: pointer; font: inherit;
  position: relative;
}

.bill-chip::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 24px; height: 24px; transform: translate(-50%, -50%);
  border-radius: 0;
}
.bill-chip:hover { border-color: var(--neon-cyan); }
.bill-chip.is-invoiced { border: 3px solid var(--warn); }
.bill-chip.is-paid { border-color: var(--ok); background: var(--ok); }

.bill-dot {
  width: 11px; height: 11px; display: inline-block; vertical-align: -1px;
  border: 1px solid var(--text-faint); border-radius: 50%; margin-right: 3px;
}
.bill-dot.is-invoiced { border: 3px solid var(--warn); }
.bill-dot.is-paid { border-color: var(--ok); background: var(--ok); }
.bill-part { display: block; font-size: 0.75rem; }

.history-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.history-filters select, .history-filters input { flex: 1; min-width: min(130px, 100%); }
.history-totals { font-size: 0.875rem; color: var(--neon-cyan); margin-bottom: 15px; }

.manual-grid { display: grid; grid-template-columns: 1.3fr 1fr 72px 72px 1fr 1.4fr auto; gap: 10px; margin-top: 15px; align-items: end; }
.manual-grid input, .manual-grid select { width: 100%; }
.manual-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.manual-label { font-size: 0.75rem; color: var(--text-muted); }
.grid-wide { grid-column: 1 / -2; }

.history-more, .list-more { display: block; margin: 12px auto 0; }
.history-more[hidden], .list-more[hidden] { display: none; }
.manual-actions { display: flex; gap: 6px; align-items: center; }

.table-wrap { overflow-x: auto; }
.panel-table td, .quick-totals, .history-totals, .timer-money,
.finance-summary-line, .deadline-days, .checklist-progress {
  font-variant-numeric: tabular-nums;
}
.panel-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.875rem; margin-top: 10px; }
.panel-table th { text-align: left; color: var(--text-muted); border-bottom: 1px solid var(--border-dim); padding: 8px 10px; font-size: 0.75rem; text-transform: uppercase; overflow-wrap: break-word; }
.panel-table td { padding: 8px 10px; border-bottom: 1px dashed var(--border-section); overflow: hidden; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; }
.panel-table tr:hover td { background: var(--bg-card); }
.is-found { outline: 2px solid var(--neon-cyan); outline-offset: -2px; }

#history-table th:nth-child(1), #history-table td:nth-child(1) { width: 15%; white-space: normal; }
#history-table th:nth-child(2), #history-table td:nth-child(2) { width: 14%; white-space: normal; overflow-wrap: anywhere; }
#history-table th:nth-child(3), #history-table td:nth-child(3) { width: 14%; white-space: normal; overflow-wrap: anywhere; }
#history-table th:nth-child(4), #history-table td:nth-child(4) { width: 14%; white-space: normal; }
#history-table th:nth-child(5), #history-table td:nth-child(5) { width: 16%; white-space: normal; overflow-wrap: anywhere; }
#history-table th:nth-child(6), #history-table td:nth-child(6) { width: auto; white-space: normal; overflow-wrap: anywhere; }
#history-table th:nth-child(7), #history-table td:nth-child(7) { width: 96px; overflow: visible; text-overflow: clip; white-space: nowrap; }

#breakdown-table th:nth-child(1), #breakdown-table td:nth-child(1) { width: 20%; white-space: normal; overflow-wrap: anywhere; }
#breakdown-table th:nth-child(2), #breakdown-table td:nth-child(2) { width: 23%; white-space: normal; overflow-wrap: anywhere; }
#breakdown-table th:nth-child(3), #breakdown-table td:nth-child(3) { width: 16%; white-space: normal; }
#breakdown-table th:nth-child(4), #breakdown-table td:nth-child(4) { width: 22%; white-space: normal; }
#breakdown-table th:nth-child(5), #breakdown-table td:nth-child(5) { width: 19%; white-space: normal; }
.del-btn { background: transparent; border: 1px solid var(--danger); color: var(--danger); cursor: pointer; padding: 4px 8px; font-size: 0.75rem; font-family: inherit; }
.del-btn:hover { background: var(--danger); color: var(--btn-text); }

.proj-layout { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 30px; align-items: start; }
#tab-proyectos .terminal-form { margin-top: 0; }
#tab-proyectos.is-empty .proj-layout { grid-template-columns: 1fr; }
#tab-proyectos.is-empty .proj-detail { display: none; }
.proj-toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.proj-count { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.proj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.proj-row {
  border-radius: var(--radius-card);
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; text-align: left; cursor: pointer;
  font-family: inherit; font-size: 1rem; color: var(--text-light);
  border: 1px solid var(--border-dim); background: var(--surface);
  border-radius: var(--radius); transition: 0.2s;
}
.proj-row:hover { border-color: var(--neon-cyan); }
.proj-row.is-active { border-color: var(--neon-cyan); background: var(--hover-tint); box-shadow: inset 3px 0 0 var(--neon-cyan); }
.proj-row.is-closed { color: var(--text-faint); }
.proj-row.is-closed .proj-row-name { color: var(--text-muted); }
.proj-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.proj-row-name { color: var(--text-white); font-size: 0.875rem; }
.proj-row-client { font-size: 0.75rem; color: var(--text-muted); }
.proj-row-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.proj-row-side { flex: 0 0 auto; max-width: 45%; }

.proj-row-name, .proj-row-client, .proj-badge {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-row-name, .proj-badge { -webkit-line-clamp: 2; }
.proj-row-client { -webkit-line-clamp: 1; }
.proj-meta-part { display: inline-block; max-width: 100%; }

.proj-avatar {
  flex: 0 0 auto; width: 34px; height: 34px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 0.75rem; font-weight: bold; line-height: 1;
  color: var(--text-white); text-transform: uppercase;
  overflow: hidden;
}
.proj-avatar-lg { width: 70px; height: 70px; font-size: 1.75rem; }

.proj-badge { font-size: 0.75rem; padding: 2px 7px; border: 1px solid; border-radius: var(--radius-chip); }
.proj-activo { color: var(--ok); border-color: var(--ok); }
.proj-pausado { color: var(--warn); border-color: var(--warn); }
.proj-cerrado { color: var(--text-muted); border-color: var(--border-dim); }
.proj-custom { color: var(--text-light); border-color: var(--border-dim); }

.proj-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; flex-wrap: wrap; }
.proj-icon-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.proj-icon-fields label { display: block; color: var(--neon-cyan); font-size: 0.875rem; }
.proj-icon-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#proj-icon { width: 4.5em; flex: 0 0 auto; text-align: center; }
.proj-hues { display: flex; gap: 6px; flex-wrap: wrap; }
.proj-hue {
  width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 2px solid var(--input-border); border-radius: var(--radius);
  font-family: inherit; font-size: 0.75rem; color: var(--text-light);
}
.proj-hue.is-on { border-color: var(--text-white); }
.proj-hue-auto { width: auto; padding: 0 8px; background: transparent; border-color: var(--input-border); }
.proj-hue-auto.is-on { border-color: var(--text-white); }

.proj-back { display: none; }
.proj-filter { width: 100%; margin-bottom: 12px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px 25px; }
.proj-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.proj-time { font-size: 0.75rem; color: var(--text-muted); }
#proj-delete { margin-left: auto; }

.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin-bottom: 25px; }
.link-card { border-radius: var(--radius-card); display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border-dim); background: var(--surface); padding: 12px 15px; }
.link-card-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-card a { color: var(--text-white); text-decoration: none; font-size: 0.875rem; }
.link-card a:hover { color: var(--neon-cyan); }
.link-card-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.link-card-actions .edit-btn { margin: 0; }
.link-card-dead { font-size: 0.875rem; min-width: 0; overflow-wrap: anywhere; }
.link-card-url { display: block; font-size: 0.75rem; color: var(--text-muted); overflow-wrap: anywhere; }
.links-add { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.links-add input { flex: 1; min-width: min(160px, 100%); }

.todo-item::before,
.deadline-item::before,
.brief-item::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--row-mark, var(--border-dim));
}
.brief-item::before { align-self: center; }

.todo-add { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.todo-add input { flex: 2; min-width: min(200px, 100%); }
.todo-add select { flex: 1; min-width: 100px; }
.todo-add input[type="date"] { flex: 1; min-width: min(150px, 100%); }
.todo-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-left: var(--accent-width) solid var(--row-mark, var(--border-dim)); background: var(--surface); }
.todo-item.prio-alta { --row-mark: var(--danger); }
.todo-item.prio-media { --row-mark: var(--neon-cyan); }
.todo-item.prio-baja { --row-mark: var(--border-section); }
.todo-item.done { color: var(--text-faint); }
.todo-item.done .todo-text { text-decoration: line-through; }
.todo-text { flex: 1; }
.todo-prio { font-size: 0.75rem; text-transform: uppercase; color: var(--text-faint); }
.todo-project-tag { font-size: 0.75rem; color: var(--text-muted); padding: 2px 8px; border: 1px solid var(--border-dim); border-radius: var(--radius-chip); }
.todo-due {
  font-family: inherit; font-size: 0.75rem; white-space: nowrap;
  color: var(--text-muted); background: transparent; cursor: pointer;
  padding: 2px 8px; border: 1px solid var(--border-dim); border-radius: var(--radius-chip);
  display: inline-flex; align-items: center;
}
.todo-due:hover { border-color: var(--neon-cyan); }
.todo-due svg { width: 1.15em; height: 1.15em; }
.todo-due.is-empty { color: var(--text-faint); border-color: transparent; }
.todo-due.is-empty:hover { color: var(--neon-cyan); }
.todo-due.is-late { color: var(--danger); }
.todo-due.is-soon { color: var(--warn); }
.todo-due.is-done { color: inherit; cursor: default; }
.todo-due-input { font-size: 0.8125rem; padding: 2px 6px; }

.lead-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; gap: 10px; align-items: end; margin-bottom: 15px; }
.lead-grid input, .lead-grid select { width: 100%; }
.lead-grid .lead-note { grid-column: 3 / 5; }
.lead-grid .manual-actions { grid-column: 5; grid-row: 1 / 3; }
.lead-contact { display: flex; flex-direction: column; gap: 2px; }
.lead-contact a { color: var(--text-light); }
.lead-contact a:hover { color: var(--neon-cyan); }

.lead-badge { font-size: 0.75rem; padding: 3px 8px; border: 1px solid; border-radius: var(--radius-chip); }
.lead-contactar { color: var(--text-light); border-color: var(--border-dim); }
.lead-auditado { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.lead-propuesta { color: var(--warn); border-color: var(--warn); }
.lead-frio { color: var(--text-muted); border-color: var(--text-muted); }
.lead-cliente { color: var(--ok); border-color: var(--ok); }
.lead-cliente { color: var(--ok); border-color: var(--ok); }
.lead-custom { color: var(--text-light); border-color: var(--border-dim); }

#leads-table th:nth-child(1), #leads-table td:nth-child(1) { width: 16%; }
#leads-table th:nth-child(2), #leads-table td:nth-child(2) { width: 26%; }
#leads-table th:nth-child(3), #leads-table td:nth-child(3) { width: 17.5%; white-space: normal; }
#leads-table th:nth-child(4), #leads-table td:nth-child(4) { width: max(7%, 96px); white-space: normal; }
#leads-table th:nth-child(5), #leads-table td:nth-child(5) { width: auto; white-space: normal; }
#leads-table th:nth-child(6), #leads-table td:nth-child(6) { width: 196px; overflow: visible; text-overflow: clip; white-space: nowrap; }

.edit-btn { background: transparent; border: 1px solid var(--neon-cyan); color: var(--neon-cyan); cursor: pointer; padding: 4px 8px; font-size: 0.75rem; font-family: inherit; margin-right: 4px; }
.edit-btn:hover { background: var(--neon-cyan); color: var(--btn-text); }
.convert-btn { background: transparent; border: 1px solid var(--ok); color: var(--ok); cursor: pointer; padding: 4px 8px; font-size: 0.75rem; font-family: inherit; font-weight: bold; margin-right: 4px; }
.convert-btn:hover { background: var(--ok); color: var(--btn-text); }

.deadline-grid { display: grid; grid-template-columns: 1.6fr 1fr 160px auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.deadline-grid input, .deadline-grid select { width: 100%; }

.deadlines-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 6px; }
.deadlines-list[hidden] { display: none; }
.deadline-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 14px; border-left: var(--accent-width) solid var(--row-mark, var(--border-dim));
  background: var(--surface); font-size: 0.875rem;
}
.deadline-item[data-jump] { cursor: pointer; }
.deadline-item[data-jump]:hover { background: var(--hover-tint); }
.deadline-date { color: var(--text-muted); font-size: 0.75rem; min-width: 65px; }
.deadline-label { flex: 1; }
.deadline-type { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); }
.deadline-days { font-size: 0.75rem; font-weight: bold; min-width: 60px; text-align: right; }
.deadline-goto { color: var(--neon-cyan); }
.deadlines-past { margin-top: 16px; }
.deadlines-past > summary { cursor: pointer; }

.due-critical { --row-mark: var(--danger); color: var(--danger); }
.due-critical .deadline-days { color: var(--danger); }
.due-soon { --row-mark: var(--warn); }
.due-soon .deadline-days { color: var(--warn); }
.due-past { --row-mark: var(--danger); color: var(--text-muted); }
.due-past .deadline-days { color: var(--danger); }
.due-future { --row-mark: var(--border-dim); }
td.due-critical { color: var(--danger); font-weight: bold; }
td.due-soon { color: var(--warn); }

.domain-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 150px 1.3fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.domain-grid input { width: 100%; }

#domains-table th:nth-child(1), #domains-table td:nth-child(1) { width: 27%; }
#domains-table th:nth-child(2), #domains-table td:nth-child(2) { width: 15%; }
#domains-table th:nth-child(3), #domains-table td:nth-child(3) { width: auto; }
#domains-table th:nth-child(4), #domains-table td:nth-child(4) { width: 12%; white-space: normal; }
#domains-table th:nth-child(5), #domains-table td:nth-child(5) { width: 8%; white-space: normal; }
#domains-table th:nth-child(6), #domains-table td:nth-child(6) { width: 236px; overflow: visible; text-overflow: clip; white-space: nowrap; }

.orden-btn {
  background: transparent; border: 1px solid var(--text-faint); color: var(--text-muted);
  font-family: inherit; font-size: 0.75rem; line-height: 1; padding: 5px 8px; cursor: pointer;
}
.orden-btn:hover:not(:disabled) { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.orden-btn:disabled { border-color: var(--border-dim); color: var(--text-faint); cursor: default; }
.ideas-review-box[hidden] { display: none; }

.ideas-review-box { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.ideas-review-text { font-size: 0.875rem; }
.stale-text { font-size: 0.875rem; }
.idea-add-box { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; align-items: flex-start; }
.idea-add-box textarea { flex: 1; min-width: min(240px, 100%); font-family: inherit; resize: vertical; }
.idea-add-actions { display: flex; flex-direction: column; gap: 8px; }
.ideas-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.idea-item { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border-dim); box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan), var(--shadow-card); padding: 14px 16px; }
.idea-item.is-editing, .link-card.is-editing { border-color: var(--neon-cyan); }
.idea-text { margin-bottom: 10px; white-space: pre-line; }
.idea-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.75rem; }
.idea-date { color: var(--text-faint); min-width: min(120px, 100%); }

.checklist-project-box { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.checklist-project-box label { white-space: nowrap; }
.checklist-project-box select { min-width: min(260px, 100%); }
.checklist-template-group { margin-bottom: 35px; }
.checklist-template-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; border-bottom: 1px dashed var(--border-section); padding-bottom: 10px; }
.checklist-template-header h3 { margin: 0; flex: 1; color: var(--neon-cyan); }
.checklist-instances { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.checklist-card { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border-dim); padding: 20px; }
.checklist-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.checklist-project-move { flex: 1; min-width: min(140px, 100%); font-weight: bold; }
.checklist-progress { font-size: 0.75rem; color: var(--neon-cyan); white-space: nowrap; }
.checklist-num { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.checklist-items { list-style: none; padding: 0; margin: 0 0 15px; display: flex; flex-direction: column; gap: 6px; }
.checklist-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-section); }
.checklist-item.is-editing { border-bottom: 1px solid var(--neon-cyan); }
.checklist-item label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.875rem; min-width: 0; }
.checklist-item label > span { min-width: 0; overflow-wrap: anywhere; }
.checklist-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.checklist-item-actions .edit-btn { margin: 0; }
.checklist-item.checklist-done label span { text-decoration: line-through; color: var(--text-faint); }
.checklist-add { display: flex; gap: 10px; flex-wrap: wrap; }
.checklist-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.checklist-add input { flex: 1; min-width: min(160px, 100%); }

.finance-subheading { margin-top: 40px; }
.finance-chart-box { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border-dim); padding: 20px 25px; margin-bottom: 30px; }
.finance-chart-row { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; margin-top: 15px; }
.money-chart { width: 180px; height: 180px; flex-shrink: 0; }
.money-chart-side { flex: 1; min-width: min(220px, 100%); }
.money-chart-total { font-size: 1.75rem; color: var(--neon-cyan); margin-bottom: 14px; font-weight: bold; }
.money-chart-legend { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 7px 12px; align-items: center; font-size: 0.875rem; }
.legend-item { display: contents; }
.legend-name { min-width: 0; overflow-wrap: anywhere; }
.legend-value, .legend-pct { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.legend-pct { color: var(--text-muted); }
.legend-item.is-others .legend-name { color: var(--text-muted); }
.legend-swatch, .table-swatch { width: 12px; height: 12px; display: inline-block; flex-shrink: 0; border: 1px solid var(--border-dim); }

.networth-chart { width: 100%; height: auto; display: block; }
.chart-tick { font-family: var(--font-mono); font-size: 13px; fill: var(--text-faint); }
.networth-chart-info { font-size: 0.875rem; color: var(--neon-cyan); margin-top: 10px; }

.account-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 90px 70px auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.account-grid input, .account-grid select { width: 100%; }
#accounts-table th:nth-child(1), #accounts-table td:nth-child(1) { width: auto; }
#accounts-table th:nth-child(2), #accounts-table td:nth-child(2) { width: 18%; }
#accounts-table th:nth-child(3), #accounts-table td:nth-child(3) { width: 16%; }
#accounts-table th:nth-child(4), #accounts-table td:nth-child(4) { width: 20%; white-space: normal; }
#accounts-table th:nth-child(5), #accounts-table td:nth-child(5) { width: 72px; }
#accounts-table th:nth-child(6), #accounts-table td:nth-child(6) { width: 96px; overflow: visible; text-overflow: clip; white-space: nowrap; }

.holding-grid { display: grid; grid-template-columns: 0.9fr 1.2fr 0.8fr 0.9fr 0.9fr 90px 70px auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.holding-grid input, .holding-grid select { width: 100%; }
#holdings-table th:nth-child(1), #holdings-table td:nth-child(1) { width: 8.5%; }
#holdings-table th:nth-child(2), #holdings-table td:nth-child(2) { width: auto; }
#holdings-table th:nth-child(3), #holdings-table td:nth-child(3) { width: 9%; white-space: normal; }
#holdings-table th:nth-child(4), #holdings-table td:nth-child(4) { width: 12%; white-space: normal; }
#holdings-table th:nth-child(5), #holdings-table td:nth-child(5) { width: 12%; white-space: normal; }
#holdings-table th:nth-child(6), #holdings-table td:nth-child(6) { width: 14%; white-space: normal; }
#holdings-table th:nth-child(7), #holdings-table td:nth-child(7) { width: 13.5%; white-space: normal; }
#holdings-table th:nth-child(8), #holdings-table td:nth-child(8) { width: 72px; }
#holdings-table th:nth-child(9), #holdings-table td:nth-child(9) { width: 96px; overflow: visible; text-overflow: clip; white-space: nowrap; }
.gain-positive { color: var(--neon-cyan); }
.gain-negative { color: var(--danger); }
.price-stale { text-decoration: underline dotted var(--warn); text-underline-offset: 3px; cursor: help; }
.price-stale-note { color: var(--text-muted); font-size: 0.75rem; font-weight: normal; }
.finance-summary-line { font-size: 0.875rem; margin: 12px 0 25px; font-weight: bold; }

.expense-grid { display: grid; grid-template-columns: 1.4fr 100px 90px 120px 150px auto; gap: 10px; align-items: end; margin-bottom: 15px; }
.expense-grid input, .expense-grid select { width: 100%; }
#expenses-table th:nth-child(1), #expenses-table td:nth-child(1) { width: 22%; }
#expenses-table th:nth-child(2), #expenses-table td:nth-child(2) { width: 14%; white-space: normal; }
#expenses-table th:nth-child(3), #expenses-table td:nth-child(3) { width: 15.5%; }
#expenses-table th:nth-child(4), #expenses-table td:nth-child(4) { width: 10%; white-space: normal; }
#expenses-table th:nth-child(5), #expenses-table td:nth-child(5) { width: auto; }
#expenses-table th:nth-child(6), #expenses-table td:nth-child(6) { width: 196px; overflow: visible; text-overflow: clip; white-space: nowrap; }

.search-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-modal[hidden] {
  display: none;
}
.search-box {
  border-radius: var(--radius-card);
  width: 92%; max-width: 640px;
  background: var(--chrome-bg); border: 1px solid var(--border-dim);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  box-shadow: var(--shadow-modal);
  padding: 4px;
}
.search-box input {
  width: 100%; font-size: 1rem; padding: 14px 16px;
  border: none; border-bottom: 1px solid var(--border-dim);
  background: transparent;
}
.search-box input:focus { background: transparent; }
.search-results { list-style: none; margin: 0; padding: 4px; max-height: 50vh; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; border-radius: var(--radius); }
.search-result:hover { background: var(--bg-card); }
.search-result.is-active {
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--border-dim);
}
.search-result-tag { font-size: 0.875rem; color: var(--neon-cyan); flex: none; display: flex; }
.search-result-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.search-result-ctx {
  flex: none; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap;
}
.search-result-off {
  flex: none; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px;
  background: var(--hover-tint); color: var(--text-muted); white-space: nowrap;
}
.search-result.is-hidden-sec .search-result-text { color: var(--text-muted); }

.app-dialog {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.app-dialog[hidden] { display: none; }
.app-dialog-box {
  border-radius: var(--radius-card);
  width: 92%; max-width: 440px;
  margin: auto;
  background: var(--chrome-bg);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  border: 1px solid var(--border-dim);
  box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan), var(--shadow-modal);
  padding: 26px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.app-dialog-title { margin: 0; color: var(--neon-cyan); font-size: 1.125rem; }
.app-dialog-title[hidden] { display: none; }
.app-dialog-msg { margin: 0; font-size: 0.875rem; line-height: 1.5; white-space: pre-line; }
.app-dialog-input { width: 100%; }
.app-dialog-input[hidden] { display: none; }
.app-dialog-btns { display: flex; gap: 10px; margin-top: 4px; }
.app-dialog-btns .terminal-btn { flex: 1; padding: 12px 20px; }
.app-dialog-btns .terminal-btn[hidden] { display: none; }

.brief-list {
  list-style: none; margin: 0; padding: 0;
  overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.brief-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 10px; font-size: 0.875rem; line-height: 1.4;
  border-left: var(--accent-width) solid var(--row-mark, var(--border-dim));
}
.brief-item-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.brief-item-go { flex: 0 0 auto; color: var(--text-muted); }
button.brief-item {
  width: 100%; border: 0; border-left: var(--accent-width) solid var(--row-mark, var(--border-dim));
  background: transparent; color: inherit; font-family: inherit; text-align: left;
  letter-spacing: inherit;
}
.brief-item.is-jump { cursor: pointer; }
.brief-item.is-jump:hover { background: var(--hover-tint); --row-mark: var(--neon-cyan); }
.brief-item.is-jump:hover .brief-item-go { color: var(--neon-cyan); }

.vista-body {
  overflow-y: auto; min-height: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  align-content: start;
}

.vista-block {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  min-width: 0;
}
.vista-block:hover { background: var(--hover-tint); border-color: var(--neon-cyan); }
.vista-block:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 2px; }
.vista-block-title {
  margin: 0; font-size: 0.75rem; font-weight: bold;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.vista-go { flex: 0 0 auto; color: var(--text-faint); }
.vista-block:hover .vista-go { color: var(--neon-cyan); }

.vista-big {
  margin: 0; font-size: 1.375rem; line-height: 1.2;
  color: var(--neon-cyan); font-family: var(--font-display);
  overflow-wrap: anywhere;
}
.vista-sub { margin: 0; font-size: 0.8125rem; color: var(--text-light); overflow-wrap: anywhere; }

.vista-bar {
  height: 6px; border-radius: var(--radius-chip);
  background: var(--border-dim); overflow: hidden;
}
.vista-bar > span { display: block; height: 100%; background: var(--neon-cyan); }

.vista-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
.vista-stat { min-width: 0; }
.vista-stat dt { font-size: 0.75rem; color: var(--text-muted); }
.vista-stat dd { margin: 0; font-size: 0.875rem; color: var(--text-light); overflow-wrap: anywhere; }

.vista-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.vista-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 0.8125rem; line-height: 1.35;
}
.vista-item-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.vista-item-when { flex: 0 0 auto; color: var(--text-muted); white-space: nowrap; }
.vista-item.is-overdue .vista-item-text,
.vista-item.is-overdue .vista-item-when { color: var(--danger); }

.vista-more { margin: 0; font-size: 0.75rem; color: var(--text-faint); }
.vista-note { margin: 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.vista-note.is-warn { color: var(--warn); }

.home-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 16px; margin-bottom: 24px;
}
.home-head h2 { margin-bottom: 0; }
.home-date { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.home-greeting { flex-basis: 100%; margin: 0; font-size: 0.875rem; color: var(--text-light); }
.home-grid {
  display: grid; gap: 16px; align-items: start; margin-bottom: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.home-card[hidden] { display: none; }
.home-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-card-title {
  margin: 0; font-size: 0.75rem; font-weight: bold;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-muted);
}
.home-link {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: inherit; font-size: 0.875rem; color: var(--neon-cyan);
}
.home-link:hover { text-decoration: underline; }
.home-phase, .home-empty { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.home-foot, .home-more { margin: 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.home-more[hidden], .home-empty[hidden] { display: none; }
.home-controls { margin-bottom: 0; }
.home-controls .terminal-btn { padding: 12px 20px; }
.home-controls .terminal-btn[hidden] { display: none; }
.home-now-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.home-now-main { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.home-now-hero.is-dial .timer-clock { font-size: 1.75rem; letter-spacing: 0; }
.home-form {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px;
  padding-top: 12px; border-top: 1px solid var(--border-dim);
}
.home-k { font-size: 0.875rem; color: var(--text-muted); }
.home-options { flex-wrap: wrap; gap: 6px 16px; }
.home-pomo[hidden] { display: none; }
.home-card > input[type="text"] { width: 100%; }
.home-capture-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.home-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 4px; border-top: 1px solid var(--border-dim);
  font-size: 0.875rem; min-width: 0;
}
.home-row:first-child { border-top: 0; }
.jump-li { display: flex; min-width: 0; }
.jump-li + .jump-li > .home-row { border-top: 1px solid var(--border-dim); }
button.home-row {
  width: 100%; border: 0;
  background: transparent; color: inherit; font-family: inherit; text-align: left;
  line-height: inherit; letter-spacing: inherit;
}
.home-row.is-jump { cursor: pointer; }
.home-row.is-jump:hover { background: var(--hover-tint); }
.home-row input[type="checkbox"] { flex: none; margin-top: 3px; }
.home-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-row-text { color: var(--text-light); overflow-wrap: anywhere; }
.home-row-meta { font-size: 0.75rem; color: var(--text-muted); overflow-wrap: anywhere; }
.home-when.is-late { color: var(--danger); }
.home-when.is-soon { color: var(--warn); }
.home-row-go { flex: none; color: var(--text-muted); }
.home-row-time { flex: none; font-size: 0.75rem; color: var(--text-muted); }
.home-done-sum { margin: 0; font-size: 0.875rem; color: var(--text-light); }
.home-month > .vista-body { margin-top: 4px; }
.home-energy { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.home-next { display: flex; flex-direction: column; gap: 4px; }
.home-next[hidden] { display: none; }
.home-next > p { margin: 0; }
.home-next-text { font-size: 1.125rem; font-weight: 600; line-height: 1.3; color: var(--text-light); overflow-wrap: anywhere; }
.home-next .home-controls { margin-top: 6px; }
.home-toggle {
  align-self: flex-start; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-family: inherit; font-size: 0.75rem; color: var(--text-muted); text-align: left;
}
.home-toggle:hover { color: var(--neon-cyan); text-decoration: underline; }
.home-toggle[hidden] { display: none; }
.home-row.is-over .home-row-text { color: var(--text-muted); }
.home-levels { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.home-lv { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); }
.home-pips { display: inline-flex; gap: 2px; }
.home-pips i { display: block; width: 6px; height: 10px; border-radius: 2px; background: var(--border-section); }
.home-pips i.on { background: var(--text-muted); }
.home-lv-urgency .home-pips i.on { background: var(--neon-cyan); }

.home-tool { height: 300px; position: relative; }
.home-tool.is-menu-open { z-index: 30; }
.home-tool-head { align-items: center; min-height: 32px; }
.home-tool-head .home-card-title { min-width: 0; line-height: 1.2; }
.home-tool-more {
  flex: none; width: 32px; height: 32px; margin-right: -8px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
}
.home-tool-more svg { width: 18px; height: 18px; fill: currentColor; }
.home-tool-more:hover, .home-tool-more[aria-expanded="true"] { color: var(--neon-cyan); border-color: var(--border-dim); }
.home-tool-menu {
  position: absolute; top: 52px; right: 10px; z-index: 30;
  min-width: 214px; max-width: calc(100% - 20px);
  background: var(--bg-dark); border: 1px solid var(--border-section); border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); padding: 6px;
}
.home-tool-menu[hidden], .home-tool-menu-main[hidden], .home-tool-menu-pick[hidden] { display: none; }
.home-tool-menu-main, .home-tool-menu-list { display: flex; flex-direction: column; }
.home-tool-menu-list { max-height: 196px; overflow-y: auto; }
.home-tool-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: transparent; border: 0; padding: 8px 10px; text-align: left; cursor: pointer;
  font-family: inherit; font-size: 0.9375rem; color: var(--text-light);
}
.home-tool-menu button:hover, .home-tool-menu button:focus-visible { background: var(--hover-tint); color: var(--text-white); }
.home-tool-menu button.is-danger { color: var(--danger); margin-top: 6px; position: relative; }
.home-tool-menu button.is-danger::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: -4px; height: 1px;
  border-radius: 0; background: var(--border-dim);
}
.home-tool-menu button[aria-checked="true"] { color: var(--neon-cyan); font-weight: bold; }
.home-tool-menu button[aria-checked="true"]::after { content: "✓"; }
.home-tool-menu-k {
  margin: 2px 10px 4px; font-size: 0.6875rem; font-weight: bold;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted);
}
.home-tool-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.home-tool-body:has(.color-pop:not([hidden])) { overflow: visible; }
.home-tool-body :is(input[type="text"], input[type="number"], input[type="password"], select, textarea) {
  min-width: 0; padding: 6px 10px; font-size: 0.9375rem;
}
.home-tool-body > input[type="text"], .home-tool-body > textarea, .ht-diff textarea { width: 100%; }
.home-tool-body textarea { resize: none; font-size: 0.875rem; line-height: 1.4; }
.ht-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ht-grow { flex: 1 1 auto; min-width: 0; }
.ht-amount { flex: 0 0 5.5rem; width: 5.5rem; }
.ht-square { flex: none; width: 38px; align-self: stretch; padding: 0; font-size: 1rem; }
.ht-icon {
  flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--input-border); color: var(--text-muted);
}
.ht-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.ht-icon:hover, .ht-icon[aria-pressed="true"] { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.ht-k { font-size: 0.8125rem; color: var(--text-muted); }
.ht-unit { margin-left: 6px; font-size: 0.875rem; font-weight: normal; color: var(--text-muted); }
.ht-big {
  margin: 0; font-size: 1.75rem; font-weight: bold; line-height: 1.15; color: var(--text-white);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.ht-rows { display: flex; flex-direction: column; }
.ht-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 5px 0; border-top: 1px solid var(--border-dim); font-size: 0.875rem; min-width: 0;
}
.ht-row-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.ht-row .num { flex: none; color: var(--text-light); }
.ht-row.is-total .num { font-weight: bold; }
.ht-hint { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--text-muted); }
.ht-push { margin-top: auto; }
.ht-err { margin: 0; font-size: 0.8125rem; color: var(--danger); }
.ht-options { flex-wrap: wrap; gap: 4px 14px; }
.ht-start { align-self: flex-start; }
.ht-wide { width: 100%; padding: 12px 16px; }
.ht-mono { font-family: var(--font-mono); letter-spacing: 0.5px; }
.ht-strong { font-weight: bold; color: var(--text-light); }
.ht-plus { font-weight: bold; color: var(--ok); }
.ht-minus { font-weight: bold; color: var(--danger); }

.ht-calc-value { overflow-wrap: anywhere; }
.ht-calc-expr {
  display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.8125rem; font-weight: normal; color: var(--text-muted);
}
.ht-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ht-hist-row {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  background: transparent; border: 0; border-top: 1px solid var(--border-dim); border-radius: 0;
  padding: 6px 2px; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 0.875rem; color: var(--text-light);
}
.ht-hist-row:hover { background: var(--hover-tint); }
.ht-hist-expr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.ht-hist-value { flex: none; }

.ht-zones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ht-zone { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border-dim); }
.ht-zone:first-child { border-top: 0; padding-top: 0; }
.ht-zone-main { min-width: 0; display: flex; flex-direction: column; }
.ht-zone-city { font-weight: bold; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-zone-meta { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-zone-now { color: var(--ok); font-weight: bold; }
.ht-zone-none { color: var(--warn); }
.ht-zone-time { flex: none; font-size: 1.375rem; color: var(--text-white); }

.ht-drop {
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  padding: 14px 12px; border: 2px dashed var(--input-border); text-align: center;
  font-size: 0.8125rem; color: var(--text-muted);
}
.ht-drop svg { width: 24px; height: 24px; fill: none; stroke: var(--neon-cyan); stroke-width: 2; }
.ht-drop-main { font-size: 0.9375rem; font-weight: bold; color: var(--text-light); }
.ht-drop:hover, .ht-drop.is-over { border-color: var(--neon-cyan); background: var(--hover-tint); }
.ht-img { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ht-thumb { flex: none; width: 40px; height: 40px; object-fit: cover; }
.ht-img-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 0.8125rem; }
.ht-img-name { color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-img-size { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ht-saved { font-weight: bold; color: var(--ok); }

.ht-colors { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.ht-color { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-tool-body .color-pair { gap: 4px; }
.home-tool-body .color-pair .color-field { flex: 0 0 36px; width: 36px; }
.home-tool-body .color-swatch { height: 36px; min-width: 36px; }
.home-tool-body .color-pair input[type="text"] { width: 100%; padding: 6px 8px; font-size: 0.875rem; }
.ht-sample {
  display: flex; align-items: baseline; gap: 10px; min-width: 0; overflow: hidden;
  padding: 10px 14px; border: 1px solid var(--border-dim); font-size: 0.875rem; white-space: nowrap;
}
.ht-sample-big { font-size: 1.5rem; font-weight: bold; line-height: 1; }
.ht-verdict-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ht-verdict { font-size: 1.125rem; font-weight: bold; }
.ht-verdict.is-pass { color: var(--ok); }
.ht-verdict.is-warn { color: var(--warn); }
.ht-verdict.is-fail { color: var(--danger); }

.ht-fam { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 6px 8px; font-size: 0.8125rem; }
.ht-fam-name { color: var(--text-muted); }
.ht-swatches { display: flex; gap: 4px; min-width: 0; }
.ht-swatch {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  background: transparent; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.ht-swatch-chip { display: block; height: 22px; border: 1px solid var(--border-dim); }
.ht-swatch-hex { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); text-align: center; overflow: hidden; }
.ht-swatch:hover .ht-swatch-hex { color: var(--neon-cyan); }
.ht-codes { display: flex; flex-wrap: wrap; gap: 4px; }
.ht-code {
  background: var(--surface-quiet); border: 1px solid transparent; padding: 2px 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-white);
}
.ht-code:hover { border-color: var(--neon-cyan); }

.ht-meter { height: 5px; border-radius: 99px; background: var(--surface-quiet); overflow: hidden; }
.ht-meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--ok); }
.ht-meter span.is-weak { background: var(--warn); }

.ht-qr { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: start; }
.ht-qr-box { width: 132px; height: 132px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-dim); background: var(--surface-quiet); }
.ht-qr-box svg { display: block; width: 100%; height: auto; }
.ht-qr-side { min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.ht-diff { display: flex; flex-direction: column; gap: 4px; }
.ht-chip {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; cursor: pointer;
  background: var(--surface-quiet); border: 1px solid transparent; text-align: left;
  font-family: inherit; font-size: 0.8125rem; color: var(--text-white);
}
.ht-chip[hidden] { display: none; }
.ht-chip:hover { border-color: var(--neon-cyan); }
.ht-chip-k { flex: none; width: 4.2rem; font-weight: bold; }
.ht-chip-v { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-chip-edit { flex: none; font-weight: bold; }
.ht-dlines { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden; }
.ht-dlines .diff-line { padding: 2px 8px; }
.ht-dlines .diff-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-dlines .home-toggle { padding: 4px 0 0; }

.tool-pin { margin: 0 0 12px; }
.tool-pin[aria-pressed="true"] { border-color: var(--neon-cyan); }

.tour-overlay { position: fixed; inset: 0; z-index: 1150; }
.tour-overlay[hidden] { display: none; }
.tour-overlay.is-center { background: rgba(0,0,0,0.6); }
.tour-overlay.is-center .tour-hole { display: none; }
.tour-hole {
  position: fixed;
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 200vmax rgba(0,0,0,0.6);
  outline: 2px solid var(--neon-cyan);
  transition: top 0.25s, left 0.25s, width 0.25s, height 0.25s;
}
body.reduce-motion .tour-hole { transition: none; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }
.tour-card {
  position: fixed;
  background: var(--chrome-bg);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-card);
  box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan), var(--shadow-modal);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.tour-overlay.is-center .tour-card {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 24px));
}
.tour-count { margin: 0; font-size: 0.75rem; color: var(--text-muted); }
.tour-title { margin: 0; color: var(--neon-cyan); font-size: 1.125rem; }
.tour-text { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.tour-btns {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.tour-btns-nav { display: flex; gap: 8px; margin-left: auto; }

.deadlines-view-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 10px; }
.deadlines-view-toggle .dl-ics { margin-left: auto; }
.dl-ics-hint { margin-top: 0; }
.deadlines-view-toggle .view-active { background: var(--neon-cyan); color: var(--bg-dark); }
.deadlines-month { margin-top: 15px; }
.month-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 15px; }
.month-label { color: var(--neon-cyan); font-weight: bold; min-width: min(160px, 100%); text-align: center; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-dow { text-align: center; font-size: 0.75rem; color: var(--text-faint); padding-bottom: 6px; }
.month-cell {
  min-height: 104px; border: 1px solid var(--border-dim);
  padding: 6px; display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
button.month-cell {
  font: inherit; color: inherit; background: transparent; text-align: left;
  cursor: pointer; width: 100%;
}
button.month-cell:hover { background: var(--hover-tint); }
button.month-cell:not(.month-cell-today):not(.is-selected) { border-color: var(--input-border); }
.month-cell.is-selected { border-color: var(--neon-cyan); background: var(--hover-tint); }
.month-more-short { display: none; }
.month-day { margin-top: 16px; }
.month-day-title { font-size: 0.875rem; color: var(--neon-cyan); margin: 0 0 4px; }
.month-cell-empty { border-color: transparent; }
.month-cell-today { border-color: var(--neon-cyan); box-shadow: 0 0 8px var(--neon-glow) inset; }
.month-cell-day { font-size: 0.75rem; color: var(--text-muted); }
.month-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-event {
  display: block; min-width: 0;
  font-size: 0.75rem; line-height: 1.35;
  padding: 2px 5px;
  background: var(--surface-quiet);
  border-left: 3px solid var(--row-mark, var(--border-dim));
  border-radius: 0 var(--radius) var(--radius) 0;
}
.month-event-label { display: block; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-event.due-critical { --row-mark: var(--danger); }
.month-event.due-soon     { --row-mark: var(--warn); }
.month-event.due-past     { --row-mark: var(--danger); }
.month-event.due-future   { --row-mark: var(--neon-cyan); }
.month-more { font-size: 0.75rem; color: var(--text-muted); padding-left: 8px; }

.month-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.month-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--border-dim); }
.month-dot.due-critical { background: var(--danger); }
.month-dot.due-soon { background: var(--warn); }
.month-dot.due-past { background: var(--text-muted); }
.month-dot.due-future { background: var(--neon-cyan); }

.schedule-grid-form { display: grid; grid-template-columns: 130px 110px 110px 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.schedule-grid-form input, .schedule-grid-form select { width: 100%; }
.schedule-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 20px; }
.schedule-day { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border-dim); padding: 12px; min-height: 120px; }
.schedule-day.is-today { border-color: var(--neon-cyan); }
.schedule-today { color: var(--text-muted); font-weight: normal; }
.schedule-day-title { font-size: 0.75rem; color: var(--neon-cyan); margin: 0 0 10px; text-align: center; }
.schedule-day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.schedule-block { border-left: var(--accent-width) solid var(--neon-cyan); padding: 6px 8px; font-size: 0.75rem; background: var(--surface); }
.schedule-block-time { display: block; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.schedule-block-label { display: block; margin: 2px 0 6px; }
.schedule-block-actions { display: flex; gap: 4px; }
.schedule-block .del-btn, .schedule-block .edit-btn { padding: 1px 6px; font-size: 0.75rem; margin: 0; }
.schedule-empty { list-style: none; color: var(--text-faint); font-size: 0.75rem; text-align: center; padding: 10px 0; }

.tool-block { border-radius: var(--radius-card); border: 1px solid var(--border-dim); background: var(--surface); padding: 18px 20px; margin-bottom: 24px; }
.tool-title { margin: 0 0 4px; font-size: 1.125rem; color: var(--neon-cyan); }
.tool-block > .hint:first-of-type { margin-top: 4px; }

.tool-block > summary { cursor: pointer; }
.tool-block[open] > summary { margin-bottom: 12px; }

.calc-line { display: flex; gap: 8px; align-items: stretch; margin-bottom: 4px; }
.calc-line input { flex: 1 1 auto; font-size: 1.125rem; }
.calc-msg { color: var(--danger); font-size: 0.875rem; margin: 6px 0; }
.calc-msg[hidden] { display: none; }
.calc-history { list-style: none; margin: 10px 0; padding: 0; }
.calc-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 4px; font-size: 0.875rem; cursor: pointer; border-bottom: 1px solid var(--border-dim); }
.calc-row:hover { background: var(--hover-tint); }
.calc-row:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: -2px; background: var(--hover-tint); }
.calc-row-expr { color: var(--text-faint); }
.calc-row-value { font-weight: bold; white-space: nowrap; }

.tool-out { margin-top: 14px; }
.tool-out-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 0.875rem; }
.tool-out-row.is-total { border-top: 1px solid var(--border-dim); font-weight: bold; }
.tool-out-big { font-size: 1.75rem; color: var(--neon-cyan); margin-bottom: 8px; }
.tool-out-unit { font-size: 1rem; color: var(--text-muted); }

.tz-add { display: flex; gap: 8px; margin: 12px 0; align-items: flex-start; }
.tz-combo { position: relative; flex: 1 1 auto; min-width: 0; }
.tz-combo input { width: 100%; }
.tz-options { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none; background: var(--chrome-bg); backdrop-filter: var(--chrome-blur); -webkit-backdrop-filter: var(--chrome-blur); border: 1px solid var(--border-dim); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); max-height: 320px; overflow-y: auto; }
.tz-option { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; cursor: pointer; }
.tz-option[aria-selected="true"], .tz-option:hover { background: var(--hover-tint); }
.tz-option-city { font-weight: bold; color: var(--text-white); white-space: nowrap; }
.tz-option-zone { flex: 1 1 auto; min-width: 0; font-size: 0.75rem; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-option-time { flex: none; font-size: 0.875rem; color: var(--text-light); }
.tz-option-delta { flex: none; font-size: 0.75rem; color: var(--text-muted); }
.tz-option.is-empty { cursor: default; color: var(--text-muted); font-size: 0.875rem; }
.tz-option.is-empty:hover { background: transparent; }
.tz-list { display: flex; flex-direction: column; gap: 10px; }
.tz-row { border: 1px solid var(--border-dim); border-radius: var(--radius-card); background: var(--surface); padding: 12px 14px; }
.tz-row-head { display: flex; align-items: baseline; gap: 10px; }
.tz-who { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tz-city { font-weight: bold; font-size: 1.125rem; color: var(--text-white); }
.tz-meta { font-size: 0.75rem; color: var(--text-faint); }
.tz-clock { flex: none; white-space: nowrap; font-size: 1.75rem; line-height: 1; color: var(--text-white); }
.tz-day { position: relative; height: 22px; margin: 10px 0 0; }
.tz-track { position: absolute; left: 0; right: 0; top: 7px; height: 8px; background: var(--hover-tint); box-shadow: inset 0 0 0 1px var(--border-dim); border-radius: 999px; overflow: hidden; }
.tz-night, .tz-band { position: absolute; top: 0; bottom: 0; border-radius: 0; }
.tz-night { background: var(--bg-dark); opacity: 0.4; }
.tz-band { background: var(--neon-cyan); }
.tz-now { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: var(--warn); border-radius: 0; }
.tz-now::after { content: ""; position: absolute; left: 50%; top: -2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--warn); }
.tz-scale { display: flex; justify-content: space-between; margin-top: 2px; font-size: 0.625rem; color: var(--text-faint); }
.tz-overlap { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }

.img-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.img-pick-btn { display: inline-block; }
.img-quality-val { color: var(--text-faint); }
#img-quality { width: 100%; }
.img-results { display: flex; flex-direction: column; gap: 10px; }
.img-result { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-dim); padding: 8px 10px; }
.img-thumb {
  width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover;
  border: 1px solid var(--border-dim);
  background-image: repeating-conic-gradient(rgba(128, 128, 128, 0.25) 0% 25%, transparent 0% 50%);
  background-size: 12px 12px;
}
.img-result-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.img-result-meta { font-size: 0.75rem; color: var(--text-faint); }

.words-text, .clean-text {
  width: 100%; min-height: 140px; resize: vertical;
  font-family: var(--font-mono); font-size: 0.875rem;
  margin-bottom: 12px;
}

.color-pair { display: flex; gap: 8px; align-items: stretch; }
.color-pair .color-field { flex: 0 0 52px; width: 52px; }
.color-pair input[type="text"] { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); }

.ct-sample {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--border-dim); border-radius: var(--radius-card);
  font-size: 1.125rem;
}
.ct-sample[hidden] { display: none; }
.ct-verdict.is-pass { color: var(--ok); }
.ct-verdict.is-fail { color: var(--danger); }
.ct-min { color: var(--text-muted); font-weight: normal; }

.wheel-harmony { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.wheel-row { display: flex; flex-direction: column; gap: 6px; }
.wheel-row-name { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 4px; cursor: pointer;
  font-family: inherit;
}
.swatch:hover { background: var(--hover-tint); }
.swatch-chip {
  width: 56px; height: 40px; border-radius: var(--radius);
  border: 1px solid var(--border-dim);
}
.swatch-hex { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-light); }
.swatch-label { font-size: 0.75rem; color: var(--text-muted); }

.pass-opts, .tool-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0; }
.pass-opts label, .tool-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.875rem; padding: 2px 0; }
.pass-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
#pass-out {
  flex: 1 1 220px; min-width: 0;
  font-family: var(--font-mono); font-size: 1.125rem; letter-spacing: 0.02em;
}

.qr-text {
  width: 100%; min-height: 68px; resize: vertical;
  font-family: var(--font-mono); font-size: 0.875rem;
  margin-bottom: 12px;
}

.qr-canvas {
  margin: 4px 0 12px;
  border: 1px solid var(--border-dim); border-radius: var(--radius-card);
  padding: 10px;
  max-width: 300px;
}
.qr-canvas svg { display: block; width: 100%; height: auto; }
.qr-actions, .clean-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.qr-actions[hidden], .clean-actions[hidden] { display: none; }

.diff-panes { display: flex; flex-wrap: wrap; gap: 12px; }
.diff-pane { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; min-width: 0; font-size: 0.875rem; }
.diff-pane textarea {
  width: 100%; min-height: 130px; resize: vertical;
  font-family: var(--font-mono); font-size: 0.875rem;
}

.diff-lines {
  margin-top: 14px;
  border: 1px solid var(--border-dim); border-radius: var(--radius-card);
  overflow: hidden;
}
.diff-line {
  display: flex; gap: 8px;
  padding: 3px 10px;
  border-radius: 0;
  font-family: var(--font-mono); font-size: 0.8125rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diff-line.is-add { box-shadow: inset 3px 0 0 var(--ok); }
.diff-line.is-del { box-shadow: inset 3px 0 0 var(--danger); }
.diff-sign { flex: 0 0 auto; width: 1ch; user-select: none; }
.diff-line.is-add .diff-sign { color: var(--ok); }
.diff-line.is-del .diff-sign { color: var(--danger); }
.diff-line.is-same .diff-sign { color: var(--text-muted); }
.diff-text { flex: 1 1 auto; min-width: 0; }
.diff-gap {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 0.75rem; color: var(--text-muted);
  border-top: 1px solid var(--border-dim); border-bottom: 1px solid var(--border-dim);
}

.color-field { position: relative; display: inline-flex; }

.color-swatch {
  width: 100%; min-width: 44px; height: 42px;
  padding: 0;
  border: 1px solid var(--input-border);
  box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan);
  background: #000;
  cursor: pointer;
}
.color-swatch:hover { border-color: var(--neon-cyan); }

.color-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 232px;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-section);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
}
.color-pop[hidden] { display: none; }
.color-pop.to-left { left: auto; right: 0; }

.color-area {
  position: relative;
  height: 130px;
  border-radius: var(--radius);
  background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)),
                    linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
  cursor: crosshair;
  touch-action: none;
}
.color-hue {
  position: relative;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  cursor: ew-resize;
  touch-action: none;
}
.color-dot, .color-hue-dot {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.color-hue-dot { top: 50%; background: transparent; }
.color-area:focus-visible, .color-hue:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.color-pop .color-hex {
  width: 100%;
  margin-top: 10px;
  font-family: var(--font-mono);
  text-align: center;
}
.color-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.color-preset {
  height: 26px;
  padding: 0;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  cursor: pointer;
}
.color-preset:hover { border-color: var(--neon-cyan); }

.summary-modal {
  position: fixed; inset: 0; z-index: 1150;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.summary-modal[hidden] { display: none; }
.summary-box {
  width: 100%; max-width: 1180px; height: 92vh; max-height: 92vh;
  border-radius: var(--radius-card);
  background: var(--chrome-bg);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  border: 1px solid var(--border-dim);
  box-shadow: inset var(--accent-width) 0 0 var(--neon-cyan), var(--shadow-modal);
  display: grid; grid-template-columns: 290px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.summary-side {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; min-height: 0; overflow-y: auto;
  border-right: 1px solid var(--border-dim);
}
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-head .settings-close { border-color: var(--input-border); }
.summary-title { margin: 0; color: var(--neon-cyan); font-size: 1.125rem; }
.summary-side select, .summary-side textarea { width: 100%; box-sizing: border-box; }
.summary-side textarea { resize: vertical; min-height: 5.5em; line-height: 1.4; }
.summary-hint { margin-top: -6px; }
.summary-month { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.summary-month .terminal-btn-sm { min-width: 38px; font-size: 1rem; padding: 6px 10px; }
.summary-month output { text-align: center; font-weight: 600; color: var(--text-white); }
.summary-checks { display: flex; flex-direction: column; gap: 8px; }
.summary-checks .cfg-check { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; cursor: pointer; }
.summary-checks .cfg-check input { width: auto; flex: none; }
.summary-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.summary-actions .terminal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; }
.summary-actions .terminal-btn svg { width: 16px; height: 16px; flex: none; }
.summary-actions .terminal-btn:disabled { background: var(--surface-quiet); color: var(--text-faint); cursor: default; }
.summary-preview { background: var(--surface-quiet); padding: 24px; min-height: 0; min-width: 0; overflow-y: auto; }

.summary-sheet {
  background: #ffffff; color: #16161d;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 0.875rem; line-height: 1.45; font-variant-numeric: tabular-nums;
  text-transform: none; letter-spacing: normal;
  max-width: 780px; margin: 0 auto; padding: 44px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.14), 0 18px 40px rgba(0,0,0,0.14);
  display: flex; flex-direction: column; gap: 22px;
  border-radius: 0;
}
.summary-sheet * { border-radius: 0; }
.summary-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; flex-wrap: wrap; }
.summary-from { display: flex; flex-direction: column; gap: 1px; color: #4a4a55; overflow-wrap: anywhere; min-width: 0; }
.summary-from b { color: #16161d; font-weight: 600; font-size: 1rem; }
.summary-meta { margin-left: auto; text-align: right; color: #4a4a55; display: flex; flex-direction: column; gap: 1px; }
.summary-doc, .summary-for, .summary-box-k, .summary-table th {
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.summary-doc { color: #16161d; }
.summary-heading { border-top: 2px solid #16161d; padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.summary-for { color: #5f5f6b; }
.summary-heading h3 {
  margin: 0; color: #16161d; font-family: inherit; font-size: 1.75rem; line-height: 1.15;
  font-weight: 600; text-transform: none; overflow-wrap: anywhere;
}
.summary-period { font-size: 1rem; color: #4a4a55; }
.summary-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border: 1px solid #d9d9e0; }
.summary-boxes > div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid #d9d9e0; min-width: 0; }
.summary-boxes > div:first-child { border-left: none; }
.summary-box-k { color: #5f5f6b; display: flex; align-items: center; gap: 6px; }
.summary-box-v { font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.summary-dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; border: 1.5px solid #16161d; box-sizing: border-box; }
.summary-dot.is-invoiced { background: radial-gradient(circle, #16161d 0 1.5px, transparent 2px); }
.summary-dot.is-paid { background: #16161d; }
.summary-table { width: 100%; border-collapse: collapse; color: inherit; font-size: inherit; }
.summary-table th { text-align: left; color: #5f5f6b; padding: 0 8px 6px; border-bottom: 1px solid #16161d; }
.summary-table td { padding: 7px 8px; border-bottom: 1px solid #d9d9e0; vertical-align: top; overflow-wrap: anywhere; }
.summary-table th:first-child, .summary-table td:first-child { padding-left: 0; }
.summary-table th:last-child, .summary-table td:last-child { padding-right: 0; }
.summary-table .summary-num { text-align: right; white-space: nowrap; overflow-wrap: normal; }
.summary-table .summary-date { white-space: nowrap; overflow-wrap: normal; }
.summary-note, .summary-soft, .summary-item-note { color: #4a4a55; }
.summary-state { display: inline-flex; align-items: center; gap: 6px; color: #4a4a55; }
.summary-group td { padding-top: 14px; font-weight: 600; }
.summary-group td > span:first-child { margin-right: 12px; }
.summary-group .summary-soft { font-weight: 400; float: right; }
.summary-table tfoot td { border-bottom: none; border-top: 2px solid #16161d; font-weight: 600; padding-top: 9px; }
.summary-table tfoot .summary-total-money { white-space: normal; }
.summary-soft { font-weight: 400; }
.summary-empty { margin: 0; padding: 28px 0; text-align: center; color: #4a4a55; max-width: none; font-size: inherit; }
.summary-foot { border-top: 1px solid #d9d9e0; padding-top: 10px; color: #5f5f6b; font-size: 0.75rem; }
.summary-foot b { color: #16161d; font-weight: 600; }
.summary-list { display: none; flex-direction: column; }
.summary-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 8px 0; border-bottom: 1px solid #d9d9e0; }
.summary-item-main { font-weight: 600; overflow-wrap: anywhere; }
.summary-item .summary-num { text-align: right; }
.summary-item-note { grid-column: 1 / -1; overflow-wrap: anywhere; }
.summary-list-group { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; padding-top: 12px; font-weight: 600; border-bottom: 1px solid #16161d; overflow-wrap: anywhere; }
.summary-list-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; padding-top: 9px; border-top: 2px solid #16161d; font-weight: 600; }
.summary-list-total .summary-num { text-align: right; }

@media print {
  html:has(body.summary-open), body.summary-open { background: #ffffff !important; }
  body.summary-open::before { display: none !important; }
  body.summary-open > :not(#summary-modal) { display: none !important; }
  body.summary-open .summary-modal { position: static; display: block; padding: 0; background: none; }
  body.summary-open .summary-box {
    display: block; max-width: none; max-height: none; overflow: visible;
    border: 0; border-radius: 0; box-shadow: none; background: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.summary-open .summary-side { display: none; }
  body.summary-open .summary-preview { padding: 0; background: none; overflow: visible; }
  body.summary-open .summary-sheet { max-width: none; padding: 0; box-shadow: none; }
  body.summary-open .summary-table-wrap { display: block; }
  body.summary-open .summary-list { display: none; }
  body.summary-open .summary-table tr { break-inside: avoid; }
  body.summary-open .summary-group { break-after: avoid; }
  body.summary-open .summary-table tfoot { display: table-row-group; }
  @page { margin: 16mm 14mm; }
}
