/*
 * Shemify Tax Prep — Tracker #10 v1
 * Page-scoped styles for Accounting → Tax Prep.
 *
 * All values use semantic tokens from design-tokens.css (no raw hex).
 * Mirrors tax_center.css patterns 1:1 — buttons, table, modal, badges —
 * just renamed to .tp-* for page scoping.
 */

/* Council 2026-05-04 rewrite — page is full-width like every other
 * Shemify Accounting page (Invoices/Bills/Year-End Taxes/etc). The old
 * max-width:1280px caused a "squeezed column" look on wide displays.
 * The host #tax-prep-page is already width:100% (workspace shim), so all
 * we need here is consistent padding + tokens. */
.tp-page {
  padding: 24px 28px;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
}

/* ──────────────────────────────────────────────────────────────────────
 * Section heads + titles — Council 2026-05-04. Mirrors year-end-taxes
 * .ye-header pattern: title block on left, toolbar on right, both flex
 * children with `flex-wrap:wrap` so on a narrow viewport the toolbar
 * drops to its own row instead of overlapping the title. Also bumps the
 * h2 to a true page-level title size (22px) since this is the page H1.
 * ────────────────────────────────────────────────────────────────────── */
.tp-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.tp-title-wrap { display: flex; align-items: center; gap: 10px; }
.tp-section-title {
  font: 700 22px/1.2 var(--font);
  letter-spacing: -.025em;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(200,160,76,.06);
}
.tp-help-btn {
  /* Council Order 7 — touch targets ≥ 44×44 (was 26×26). */
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--raised);
  color: var(--ink-3);
  font: 700 16px var(--font);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transition: all .2s var(--spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tp-help-btn:hover { color: var(--gold); transform: scale(1.05); box-shadow: inset 0 0 0 1px var(--gold-glow-ring); }

.tp-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ──────────────────────────────────────────────────────────────────────
 * Buttons
 * ────────────────────────────────────────────────────────────────────── */
.tp-btn {
  /* Council Order 7 — min-height 44 to meet touch target spec. */
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  font: 600 13px var(--font);
  letter-spacing: -.005em;
  transition: all .22s var(--spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tp-btn-primary {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  color: var(--void);
  box-shadow: 0 2px 12px rgba(200,160,76,.25), 0 0 30px rgba(200,160,76,.1), inset 0 1px 0 rgba(255,255,255,.2);
}
.tp-btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 28px rgba(200,160,76,.4), 0 0 60px rgba(200,160,76,.15), inset 0 1px 0 rgba(255,255,255,.25); }
.tp-btn-primary:active { transform: scale(.97); }
/* Council Round 1 Order 10 [UX]: disabled state must look disabled.
 * Drop the gold glow + gradient and desaturate so a Cashier/Manager
 * doesn't see a glowing button that invites a tap. */
.tp-btn-primary[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: rgba(255,255,255,.06);
  color: var(--ink-3);
  filter: grayscale(1);
}
html.light .tp-btn-primary[disabled] {
  background: rgba(0,0,0,.04);
  color: var(--ink-3);
}
.tp-export-disabled-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.tp-role-hint {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.tp-btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.2);
}
.tp-btn-ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-1px) scale(1.01); }

.tp-btn-secondary {
  background: linear-gradient(135deg, rgba(200,160,76,.12), rgba(200,160,76,.06));
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(200,160,76,.15), 0 2px 8px rgba(200,160,76,.08);
}
.tp-btn-secondary:hover { transform: translateY(-1px) scale(1.01); box-shadow: inset 0 0 0 1px rgba(200,160,76,.25), 0 4px 16px rgba(200,160,76,.15); }

/* ──────────────────────────────────────────────────────────────────────
 * KPI strip
 * ────────────────────────────────────────────────────────────────────── */
.tp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.tp-kpi {
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.015) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.2);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
/* Council Round 1 Order 11 [UX]: 9.5px is unreadable on iPad at arm's
 * length and violates CLAUDE.md anti-pattern "Text smaller than 14px
 * for body content." Bump to 13px and tighten tracking accordingly. */
.tp-kpi-label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px; }
.tp-kpi-value {
  font: 200 36px var(--font);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 2px 20px rgba(0,0,0,.5), 0 0 40px var(--gold-glow);
  margin-bottom: 6px;
}
.tp-kpi-foot { font-size: 11px; color: var(--ink-3); }
.tp-kpi.tp-kpi-good .tp-kpi-value { color: var(--green); text-shadow: 0 0 20px var(--green-glow); }
.tp-kpi.tp-kpi-bad  .tp-kpi-value { color: var(--red);   text-shadow: 0 0 20px var(--red-glow); }

/* ──────────────────────────────────────────────────────────────────────
 * Warnings banner
 * ────────────────────────────────────────────────────────────────────── */
.tp-warn-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--amber-glow);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,.15);
  color: var(--amber);
  margin: 8px 0 16px;
  font-size: 13px;
}
.tp-warn-icon { color: var(--amber); flex: 0 0 auto; }
.tp-warn-text { flex: 1; color: var(--ink); }
.tp-warn-text strong { color: var(--amber); }

/* ──────────────────────────────────────────────────────────────────────
 * Schedule C card
 * ────────────────────────────────────────────────────────────────────── */
.tp-sched-card {
  margin: 16px 0;
  padding: 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.015) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 4px 16px rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
}
.tp-sched-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tp-sched-title { font: 600 16px var(--font); letter-spacing: -.015em; color: var(--ink); }
.tp-sched-period { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.tp-line-list { display: flex; flex-direction: column; gap: 2px; }
.tp-line-section-head {
  margin-top: 18px;
  padding: 8px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tp-line-section-head:first-child { margin-top: 0; }

.tp-line-row {
  display: grid;
  grid-template-columns: 1fr auto 140px;
  gap: 16px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  font-size: 13px;
  color: var(--ink);
}
.tp-line-row:hover { background: rgba(255,255,255,.02); }
.tp-line-computed-row { color: var(--ink-2); }
.tp-line-label { font-weight: 500; }
.tp-line-actions { color: var(--ink-3); font-size: 12px; }
.tp-line-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.005em;
}
.tp-line-detail {
  /* Council Order 7 — min-height 44 (was ~23 with 4px padding). */
  min-height: 44px;
  background: rgba(255,255,255,.04);
  color: var(--ink-2);
  font: 600 12px var(--font);
  padding: 8px 14px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transition: all .2s var(--spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tp-line-detail:hover { color: var(--gold); background: var(--gold-glow); box-shadow: inset 0 0 0 1px var(--gold-glow-ring); }
.tp-line-empty { color: var(--ink-4); font-size: 11px; }
.tp-line-computed { color: var(--ink-4); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.tp-line-net {
  margin-top: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 2px solid rgba(200,160,76,.25);
  border-bottom: 2px solid rgba(200,160,76,.25);
  background: linear-gradient(180deg, var(--gold-glow), transparent);
}
.tp-line-net .tp-line-label { font: 600 14px var(--font); color: var(--gold); letter-spacing: -.01em; }
.tp-line-net .tp-line-amount {
  font: 200 32px var(--font);
  letter-spacing: -.04em;
  color: var(--gold);
  text-shadow: 0 2px 20px var(--gold-glow-strong), 0 0 40px var(--gold-glow);
}

/* ──────────────────────────────────────────────────────────────────────
 * Unmapped accounts table
 * ────────────────────────────────────────────────────────────────────── */
.tp-unmapped-card {
  margin: 16px 0;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.015) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.2);
}
.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tp-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 10px 8px;
  text-align: left;
}
.tp-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  color: var(--ink);
}
.tp-table tr:hover td { background: rgba(255,255,255,.02); }
.tp-num { text-align: right; font-variant-numeric: tabular-nums; }
.tp-mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink-2);
}
.tp-link {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font: 600 12px var(--font);
  padding: 0;
}
.tp-link:hover { color: var(--gold-bright); }
.tp-link-disabled {
  color: var(--ink-4);
  font: 600 12px var(--font);
  cursor: not-allowed;
}

/* ──────────────────────────────────────────────────────────────────────
 * Skeleton loaders
 * ────────────────────────────────────────────────────────────────────── */
.tp-skel-strip {
  height: 100px;
  margin: 16px 0;
  border-radius: var(--r-lg);
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%),
    rgba(255,255,255,.02);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.tp-skel-row {
  height: 28px;
  margin: 8px 0;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%),
    rgba(255,255,255,.02);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ──────────────────────────────────────────────────────────────────────
 * Empty / error states
 * ────────────────────────────────────────────────────────────────────── */
.tp-empty {
  margin: 60px auto;
  max-width: 520px;
  padding: 40px 30px;
  text-align: center;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.tp-empty-title { font: 600 16px var(--font); letter-spacing: -.015em; margin-bottom: 8px; color: var(--ink); }
.tp-empty-desc { font-size: 13px; color: var(--ink-2); }

.tp-error-card {
  margin: 20px 0;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--red-glow);
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.18);
  color: var(--ink);
}
.tp-error-title { font: 600 14px var(--font); color: var(--red); margin-bottom: 6px; }
.tp-error-desc  { font-size: 12px; color: var(--ink-2); font-family: ui-monospace, monospace; word-break: break-word; }

/* ──────────────────────────────────────────────────────────────────────
 * Modal — Council 2026-05-04 rewrite. Tax Prep no longer ships its own
 * modal CSS. We use the prototype's GLOBAL .modal-overlay / .modal-panel
 * / .rgb-orb / .modal-hd / .modal-body / .modal-ft / .modal-input /
 * .modal-label / .modal-field / .modal-close classes from
 * /app/ui-components.css. Those provide the full Section 9.3 system:
 *   - 3 floating RGB orbs (gold / blue / green) on the backdrop
 *   - iOS-grade spring entrance with overshoot bounce
 *   - 24px backdrop blur + saturate(1.5)
 *   - Shell parallax (.dashboard-shell.mdl-on)
 *   - Stagger-in for header → body items → footer
 *   - mdl-glow pulse on settle
 * Just inject .modal-overlay > .rgb-orb + .modal-panel > .modal-hd
 * .modal-body .modal-ft and the global animations take over.
 *
 * Tax-Prep-specific tweak: a slightly wider panel (700px) because mapping
 * tables and config forms benefit from horizontal room. We use a marker
 * class .tp-modal on the overlay so we can target only OUR modals
 * without disrupting other pages' modals. */
.tp-modal.modal-overlay .modal-panel { max-width: 700px; }
.tp-modal.modal-overlay .modal-panel.tp-modal-md { max-width: 560px; }
.tp-modal.modal-overlay .modal-panel.tp-modal-sm { max-width: 440px; }

/* ──────────────────────────────────────────────────────────────────────
 * Forms inside modals
 * ────────────────────────────────────────────────────────────────────── */
.tp-form { display: flex; flex-direction: column; gap: 16px; }
.tp-form-row { display: flex; flex-direction: column; gap: 6px; }
.tp-form-row > label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.tp-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .tp-form-grid-2 { grid-template-columns: 1fr; } }

.tp-input,
select.tp-input {
  padding: 10px 14px;
  font: 500 14px var(--font);
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  border: none;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: all .2s var(--spring);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.tp-input:hover { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.tp-input:focus {
  box-shadow: 0 0 0 3px var(--gold-glow), inset 0 0 0 1px rgba(200,160,76,.2);
  outline: none;
}
select.tp-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239898A8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: rgba(255,255,255,.03);
  padding-right: 32px;
  color-scheme: dark;
}

.tp-readonly {
  padding: 10px 14px;
  background: rgba(255,255,255,.02);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font: 500 14px var(--font);
}

.tp-hint { font-size: 11px; color: var(--ink-3); line-height: 1.5; }

.tp-check {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-size: 13px; color: var(--ink);
  cursor: pointer;
}
.tp-check input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }

/* ──────────────────────────────────────────────────────────────────────
 * Light mode inversions (token-driven, no overrides needed for most)
 * ────────────────────────────────────────────────────────────────────── */
html.light .tp-skel-strip,
html.light .tp-skel-row {
  background:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.05) 50%, transparent 100%),
    rgba(0,0,0,.02);
}

/* ──────────────────────────────────────────────────────────────────────
 * Responsive
 * ────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Council Order 6 — keep .tp-line-actions visible on tablet. Shemify is
   * tablets-first; hiding the drill button broke Tiffany's audit flow on
   * iPad. Switch to a 2-row stack: label on top, [actions + amount] below.
   */
  .tp-page { padding: 16px; }
  .tp-line-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label amount" "actions amount";
    gap: 4px 12px;
    padding: 12px 6px;
  }
  .tp-line-row .tp-line-label   { grid-area: label; }
  .tp-line-row .tp-line-actions { grid-area: actions; justify-self: start; }
  .tp-line-row .tp-line-amount  { grid-area: amount; align-self: center; }
}
@media (max-width: 480px) {
  .tp-section-head { flex-direction: column; align-items: stretch; }
  .tp-toolbar { flex-direction: column; align-items: stretch; }
  .tp-kpi-grid { grid-template-columns: 1fr; }
  .tp-line-net .tp-line-amount { font-size: 26px; }
}

/* ──────────────────────────────────────────────────────────────────────
 * Council Order 7 — FY dropdown trigger min-height
 * ────────────────────────────────────────────────────────────────────── */
#tp-fy-dropdown .ui-dropdown-trigger { min-height: 44px; padding: 10px 14px; }

/* ──────────────────────────────────────────────────────────────────────
 * URGENT FIX (post-phase10_f): The FY dropdown menu was stacking
 * INLINE below the trigger because no `.ui-dropdown-menu` rule was
 * scoped to Tax Prep. Without `position: absolute` the menu falls
 * into normal flow and pushes Configure + Export below it. Mirrors
 * the pattern year_end_taxes.js bakes inline at js-injection time.
 * ────────────────────────────────────────────────────────────────────── */
#tax-prep-host .ui-dropdown,
.tp-modal .ui-dropdown {
  position: relative;
  display: inline-block;
  width: auto;          /* override ui-components.css :466 .ui-dropdown { width: 100% } */
}
#tax-prep-host .ui-dropdown-trigger,
.tp-modal .ui-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  color: var(--ink);
  font: 500 13px var(--font);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .22s var(--spring);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 2px 12px rgba(0,0,0,.20);
  min-height: 44px;
}
html.light #tax-prep-host .ui-dropdown-trigger,
html.light .tp-modal .ui-dropdown-trigger {
  background: linear-gradient(180deg, #FFFFFF, #FAFAF8);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.04);
}
#tax-prep-host .ui-dropdown-trigger:hover,
.tp-modal .ui-dropdown-trigger:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  transform: translateY(-1px);
}
#tax-prep-host .ui-dropdown-chevron,
.tp-modal .ui-dropdown-chevron {
  transition: transform .22s var(--spring);
  opacity: .6;
}
#tax-prep-host .ui-dropdown.open .ui-dropdown-chevron,
.tp-modal .ui-dropdown.open .ui-dropdown-chevron {
  transform: rotate(180deg);
}
#tax-prep-host .ui-dropdown-menu,
.tp-modal .ui-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: var(--elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 32px rgba(0,0,0,.50);
  border-radius: var(--r);
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  pointer-events: none;
  transition: all .22s var(--spring);
  z-index: 1100;
}
html.light #tax-prep-host .ui-dropdown-menu,
html.light .tp-modal .ui-dropdown-menu {
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.10);
}
#tax-prep-host .ui-dropdown.open .ui-dropdown-menu,
.tp-modal .ui-dropdown.open .ui-dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#tax-prep-host .ui-dropdown-item,
.tp-modal .ui-dropdown-item {
  padding: 8px 12px 8px 28px;
  border-radius: 8px;
  font: 400 13px var(--font);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease;
  position: relative;
}
#tax-prep-host .ui-dropdown-item:hover,
.tp-modal .ui-dropdown-item:hover {
  background: rgba(255,255,255,.05);
}
html.light #tax-prep-host .ui-dropdown-item:hover,
html.light .tp-modal .ui-dropdown-item:hover {
  background: rgba(0,0,0,.04);
}
#tax-prep-host .ui-dropdown-item.selected::before,
.tp-modal .ui-dropdown-item.selected::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(200,160,76,.5);
}

/* ──────────────────────────────────────────────────────────────────────
 * Council Order 8 — Light-mode overrides for Tax Prep surfaces
 * ────────────────────────────────────────────────────────────────────── */
html.light .tp-kpi-value {
  color: var(--ink);
  text-shadow: 0 2px 6px rgba(0,0,0,.06), 0 0 24px rgba(150,117,10,.06);
}
html.light .tp-kpi {
  background: linear-gradient(180deg, rgba(0,0,0,.02) 0%, rgba(0,0,0,.005) 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
}
html.light .tp-sched-card,
html.light .tp-unmapped-card,
html.light .tp-empty {
  background: linear-gradient(180deg, rgba(0,0,0,.02) 0%, rgba(0,0,0,.005) 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
}
html.light .tp-line-row { border-bottom: 1px solid rgba(0,0,0,.05); }
html.light .tp-line-row:hover { background: rgba(0,0,0,.025); }
html.light .tp-line-section-head { border-bottom: 1px solid rgba(0,0,0,.08); }
html.light .tp-line-detail {
  background: rgba(0,0,0,.04);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  color: var(--ink-2);
}
html.light .tp-line-detail:hover {
  background: var(--gold-glow);
  box-shadow: inset 0 0 0 1px var(--gold-glow-ring);
  color: var(--gold);
}
html.light .tp-line-net {
  border-top-color: rgba(150,117,10,.3);
  border-bottom-color: rgba(150,117,10,.3);
  background: linear-gradient(180deg, rgba(150,117,10,.06), transparent);
}
html.light .tp-table th,
html.light .tp-table td { border-bottom-color: rgba(0,0,0,.06); }
html.light .tp-table tr:hover td { background: rgba(0,0,0,.025); }
html.light .tp-input,
html.light select.tp-input {
  background: rgba(0,0,0,.025);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  color: var(--ink);
}
html.light select.tp-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  color-scheme: light;
}
html.light .tp-readonly {
  background: rgba(0,0,0,.025);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
  color: var(--ink-2);
}
/* Light-mode modal panel/head/foot/close are now driven by the global
 * /app/ui-components.css rules (html.light .modal-panel, etc.). No
 * page-scoped overrides needed. */
html.light .tp-help-btn {
  background: rgba(0,0,0,.04);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
html.light .tp-btn-ghost {
  background: rgba(0,0,0,.04);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  color: var(--ink);
}
html.light .tp-btn-ghost:hover { background: rgba(0,0,0,.07); }

/* Council Order 11 — glossary tooltip styling (used by .tp-term spans). */
.tp-term {
  border-bottom: 1px dotted var(--ink-3);
  cursor: help;
  position: relative;
}
.tp-term:hover, .tp-term:focus-visible {
  outline: none;
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.tp-term-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--elevated);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font: 400 12px/1.5 var(--font);
  width: max-content;
  max-width: 320px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 100;
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}
.tp-term:hover .tp-term-tooltip,
.tp-term:focus-visible .tp-term-tooltip,
.tp-term.is-tooltip-open .tp-term-tooltip { opacity: 1; }
html.light .tp-term-tooltip {
  background: var(--elevated);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.18);
}

/* Council Order 12 — page explainer subtitle. */
.tp-page-desc {
  margin: 0 0 16px;
  max-width: 720px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Council Order 10 — books-vs-Schedule-C gap line in warning banner. */
.tp-warn-gap {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.tp-warn-gap strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Council Round 2 Order 2 [DATA]: blocking banner when catalog is degraded.
 * Stronger red-tone than the regular amber unmapped-accounts warning, since
 * this is a HARD block that prevents export entirely. */
.tp-warn-banner--critical {
  background: linear-gradient(180deg, rgba(248,113,113,.10), rgba(248,113,113,.04));
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.32);
  color: var(--ink);
  margin: 8px 0 16px;
}
.tp-warn-banner--critical .tp-warn-icon { color: var(--red); }
.tp-warn-banner--critical strong { color: var(--red); }

/* ──────────────────────────────────────────────────────────────────────
 * Round 1 Order 8 [UX]: All-mapped success state.
 * Renders when `unmappedCount === 0`. Replaces the prior empty return
 * which left a black hole on the page.
 * ────────────────────────────────────────────────────────────────────── */
.tp-mapped-success {
  margin-top: 24px;
  padding: 32px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(74,222,128,.06) 0%, rgba(74,222,128,.02) 100%);
  box-shadow: inset 0 0 0 1px rgba(74,222,128,.18), 0 2px 8px rgba(0,0,0,.18);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
html.light .tp-mapped-success {
  background: linear-gradient(180deg, rgba(13,148,72,.05) 0%, rgba(13,148,72,.02) 100%);
  box-shadow: inset 0 0 0 1px rgba(13,148,72,.20), 0 2px 8px rgba(0,0,0,.04);
}
.tp-mapped-success-icon { color: var(--green); display: flex; align-items: center; justify-content: center; }
.tp-mapped-success-title {
  font: 600 16px var(--font);
  color: var(--ink);
  letter-spacing: -.01em;
}
.tp-mapped-success-desc {
  font: 400 13px/1.5 var(--font);
  color: var(--ink-2);
  text-align: center;
  max-width: 440px;
  margin: 0;
}
.tp-mapped-success-actions {
  display: flex; gap: 12px; margin-top: 8px;
  flex-wrap: wrap; justify-content: center;
}

/* ──────────────────────────────────────────────────────────────────────
 * Round 1 Order 12 [UX]: modal close 44×44 touch target.
 * Global .modal-close from ui-components.css ships at 32×32 (desktop
 * convention). Shemify is tablets-first; bump every Tax Prep modal's
 * close button to 44×44 per Section 4.6 (touch targets ≥ 44px).
 * ────────────────────────────────────────────────────────────────────── */
.tp-modal.modal-overlay .modal-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
}

/* ──────────────────────────────────────────────────────────────────────
 * Round 1 Order 9 + Round 2 Order 6 [UX/A11Y]: Verify-$0 drill button.
 * The pill is the same shape as the active drill button but quieter so
 * it telegraphs "this is empty — I'm letting you confirm there's
 * nothing here." Round 2 fix: contrast was 2.1:1 on var(--ink-4)
 * against the page surface (WCAG AA fail; CLAUDE.md anti-pattern).
 * Bumped to var(--ink-2) which clears 4.5:1 in dark mode and AAA in
 * light mode. The "quiet" affordance is preserved via subtler bg +
 * inset shadow, NOT via dim text.
 * ────────────────────────────────────────────────────────────────────── */
.tp-line-detail--empty {
  background: rgba(255,255,255,.02);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.tp-line-detail--empty:hover {
  color: var(--ink);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
html.light .tp-line-detail--empty {
  background: rgba(0,0,0,.02);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
html.light .tp-line-detail--empty:hover {
  color: var(--ink);
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

/* ──────────────────────────────────────────────────────────────────────
 * Round 2 Order 7 [UX]: `.tp-hint` inherits `var(--ink-3)` for the
 * surrounding paragraph dimness, but `<strong>` inside hints must lift
 * to primary ink so bolded recommendations (e.g. Round 1 Order 14's
 * "Most small retail and café shops use Cash basis") are visible at all.
 * ────────────────────────────────────────────────────────────────────── */
.tp-hint strong {
  color: var(--ink);
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────────────────
 * Round 2 Order 8A [UX]: disabled Export wrap stretched the toolbar to
 * 62px (44 + gap + 14 hint), shifting the FY dropdown + Configure
 * baseline 9px below the page title for non-Owner users. Position the
 * role hint absolutely so the wrap matches sibling buttons at 44px.
 * ────────────────────────────────────────────────────────────────────── */
.tp-export-disabled-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tp-export-disabled-wrap .tp-role-hint {
  position: absolute;
  bottom: -18px;
  right: 0;
  white-space: nowrap;
}
