/* Shared public-site palette, applied to the existing light workspace. */
:root {
  --brand-main: #2a1050;
  --brand-action: #5c1370;
  --brand-action-hover: #711986;
  --brand-accent: #a38bc2;
  --brand-selected: #c9bddb;
  --brand-deep: #1b052e;
  --brand-neutral: #c9bddb;
  --brand-link: var(--brand-main);
  --brand-gray: #a091b5;
  --brand-lavender: #ede8f5;
  --ink: #242d49;
  --muted: #596581;
  --blue: var(--brand-link);
  --line: #d9ddee;
  --bg: #ede8f5;
  --sidebar: var(--brand-main);
  --brand-soft: #f0eef7;
  --brand-soft-line: #d9ddee;
}

::selection { background: #eee8f5; color: var(--brand-deep); }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline-color: var(--brand-link); }

/* Navigation keeps its existing responsive layout and visibility rules. */
.brand { color: #fff; }
.brand-mark { background: transparent; flex-shrink: 0; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand small, .sidebar-bottom small { color: #fff; }
.nav-link { color: #fff; }
.nav-link:hover { background: var(--brand-accent); color: var(--brand-deep); }
.nav-link.active { background: var(--brand-accent); color: var(--brand-deep); box-shadow: inset 3px 0 var(--brand-neutral); }
.nav-link b { background: #452363; color: #fff; }
.sidebar-bottom { border-color: #a091b5; }
.local-icon { color: #e8ecfa; }
.nav-account-badge.funded { background: #2b5547; color: #c3ebd4; }
.nav-account-badge.evaluation { background: #452363; color: #e8ecfa; }
.nav-account-badge.empty { background: #452363; color: #fff; }

.breadcrumb span { color: #a091b5; }
.breadcrumb strong { color: #4d5c81; }
.save-status { color: #4d5c81; background: #eee8f5; }
.eyebrow { color: var(--muted); }
.workspace footer { color: var(--muted); flex-wrap: wrap; gap: 12px 20px; }
.workspace footer > span { margin-left: auto; }
.public-site-link { color: var(--brand-link); font-weight: 600; }
.public-site-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Actions and focus affordances. Destructive actions retain their red styling. */
.button { border-color: #c9bddb; }
.button:hover { background: #f0eef7; }
.button.primary { background: var(--brand-action); border-color: var(--brand-action); color: #fff; box-shadow: 0 2px 3px #5c137014; }
.button.primary:hover { background: var(--brand-action-hover); border-color: var(--brand-action-hover); color: #fff; }
.button.danger:hover { background: #ffe9ed; }
.text-link, .back-link { color: var(--brand-link); }
.text-link.danger-link, .danger-link { color: var(--red); }
.account-link { color: var(--brand-main); }
.account-link:hover { color: var(--brand-link); }
.account-action-icon, .account-breakdown-trigger { color: #a091b5; }
.account-action-icon:hover, .account-action-icon:focus-visible,
.account-breakdown-trigger:hover, .account-breakdown-trigger:focus-visible {
  color: var(--brand-link); background: var(--brand-soft);
}
.icon-button { color: #a091b5; }
.icon-button:hover { background: #f0eef7; }
.field { color: #4d5c81; }
.field input, .field select, .field textarea { border-color: #c9bddb; box-shadow: 0 1px 2px #2a105005; }
.field input:focus, .field select:focus, .field textarea:focus { outline-color: var(--brand-accent); border-color: var(--brand-main); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field select:disabled, .journal-result-field input:disabled { background: #eee8f5; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-link); }

/* Lavender neutrals keep cash losses and profits in their original colors. */
.stat > span, .account-status-card > div > span { color: #596581; }
.stat small, .field-help, .footnote, .backup-counts, td small { color: var(--muted); }
.stat.net { background: var(--brand-main); border-color: var(--brand-main); }
.stat.net::after { background: var(--brand-selected); }
.stat.net > span, .stat.net small { color: #fff; }
.firm-meta, .detail-banner, .account-counts { color: var(--muted); }
.stat .active-stage-total, .firm-stage-counts, .preserve-lines, .modal-copy { color: #4d5c81; }
.empty-icon, .backup-icon { background: var(--brand-soft); color: #a091b5; }
th { color: var(--muted); background: #f7f6fa; }
td { border-bottom-color: #ebeaf3; }
tbody tr:hover { background: #fcfbfe; }
.results-table .results-period-cell { background: #f0eef7; border-right-color: #d9ddee; }
.badge { background: #eee8f5; color: #4d5c81; }
.badge.evaluation { background: #eee8f5; color: var(--brand-link); }
.badge.passed, .badge.approved { background: #eaf1e0; color: #566742; }
.badge.paid { background: #eee8f5; color: #4d5c81; }
.entry-symbol { background: #eee8f5; color: var(--muted); }
.timeline-dot { background: var(--brand-accent); border-color: #dce3f6; }
.renewal-item { border-bottom-color: #d9ddee; }
dialog { box-shadow: 0 25px 80px #1b052e33; }
dialog::backdrop { background: #1b052e75; }
#market-popup { border-color: var(--line); box-shadow: 0 22px 90px #1b052e30; }
#market-popup::backdrop { background: #1b052e55; }
#toast { background: var(--brand-main); box-shadow: 0 5px 20px #1b052e30; }

/* The same selected-tab treatment across results, accounts, and calendar. */
.results-tabs button { color: var(--muted); }
.results-tabs button:hover { color: var(--brand-link); background: #f0eef7; }
.results-tabs button[aria-selected="true"] { color: var(--brand-deep); background: #e9e0f2; border-color: var(--brand-selected); }
.results-tabs button:focus-visible { outline-color: var(--brand-link); }
#accounts-panel:focus-visible, #results-panel:focus-visible,
#calendar-view-panel:focus-visible { outline-color: var(--brand-main); }
.results-page-controls .button:disabled { background: #f0eef7; }

/* Calendar: lavender highlights retain the meaning of transaction colors. */
.calendar-legend, .calendar-caption, .calendar-day-totals,
.calendar-week-month, .calendar-month-cash, .calendar-month-metrics,
.calendar-month-meta, .calendar-detail-event small,
.calendar-detail-event details { color: var(--muted); }
.calendar-legend .refund, .calendar-legend .reminder { color: var(--brand-link); }
.calendar-weekdays, .calendar-scroll-hint { color: var(--muted); background: #f7f6fa; }
.calendar-day:hover { background: #f0eef7; }
.calendar-day.outside { background: #fcfbfe; color: var(--muted); }
.calendar-day.selected { background: #e9e0f2; box-shadow: inset 0 0 0 2px var(--brand-main); }
.calendar-day-select:hover { background: #dce3f355; }
.calendar-today-label, .calendar-more { color: var(--brand-link); }
.calendar-chip.refund { color: var(--brand-link); background: #f0eef7; }
.calendar-chip.reminder { color: #4d5c81; background: #eee8f5; box-shadow: inset 0 0 0 1px #d9ddee; }
.calendar-chip.rejected { color: #4d5c81; background: #eee8f5; }
.calendar-date-note { color: #4d5c81; background: var(--brand-soft); border-color: var(--brand-soft-line); }
.calendar-detail-event.refund .calendar-detail-amount > strong { color: var(--brand-link); }
.calendar-detail-event.rejected .calendar-detail-amount > strong,
.calendar-detail-event.reminder .calendar-detail-amount > strong { color: var(--muted); }
.calendar-month-card:hover, .calendar-month-card:focus-visible { background: #f0eef7; border-color: #c9bddb; }
.calendar-month-card.current { background: #f0f2fa; border-color: var(--brand-selected); }
.calendar-month-card-title > span { color: var(--brand-gray); }
.calendar-month-meta { border-top-color: #dce3f6; }
.calendar-journal-summary { background: #f0eef7; border-color: #d9ddee; }
.calendar-note-indicator { color: var(--brand-link); border-color: #c9bddb; }

/* Journal and integration surfaces. */
.journal-tabs a { color: var(--muted); }
.journal-tabs a.active { color: var(--brand-link); border-color: var(--brand-link); }
.journal-card:hover { background: #fcfbfe; border-color: #c9bddb; }
.journal-card-date, .journal-save-state { color: var(--muted); }
.journal-tags span { color: #4d5c81; background: #eee8f5; }
.journal-day-strip { background: #eee8f5; border-color: #d9ddee; }
.journal-day-strip > span { color: var(--muted); }
.journal-day-strip strong { color: var(--brand-main); }
.journal-result-field small, .import-preview-row small { color: var(--muted); }
.import-preview-row.invalid small { color: var(--red); }
.import-preview-row.possible_duplicate small { color: #996b1d; }
.journal-shot img { background: #f0eef7; }
.journal-day-bars > a:hover { background: #f0eef7; }
.connection-details p, .market-popup-intro, .market-popup-list p { color: #4d5c81; }
.market-popup-event-title > span, .market-source-line span,
.market-popup-footnote { color: var(--muted); }

/* Supported firms that use manual entries and completed-trade imports. */
.manual-firm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.manual-firm-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 550; }
.manual-firm-item:hover { background: #f5f3fa; border-color: var(--brand-muted); }
.manual-firm-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.import-workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-left: 22px; margin: 0 0 22px; }
.import-workflow-steps li { padding-left: 3px; color: var(--brand-main); }
.import-workflow-steps strong { display: block; font-size: 14px; }
.import-workflow-steps span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.import-workflow .connection-actions { margin-bottom: 22px; }
@media (max-width: 900px) { .import-workflow-steps { grid-template-columns: 1fr; gap: 16px; } }

/* Subscription offer and customer administration. */
.member-plan-card { background: linear-gradient(145deg, #fcfbfe, #eee8f5); border-color: #d9ddee; }
.member-plan-card h2, .member-price { color: var(--brand-main); }
.member-price span { color: var(--muted); }
.member-trial { color: var(--brand-link); }
.member-features { color: #4d5c81; }
.member-features li::before { color: var(--brand-link); }
.member-plan-card > .button.primary { background: var(--brand-action); border-color: var(--brand-action); color: #fff; box-shadow: none; }
.member-plan-card > .button.primary:hover { background: var(--brand-action-hover); border-color: var(--brand-action-hover); color: #fff; }
.member-notice { color: #4d5c81; background: #f0eef7; border-color: #d9ddee; }
.member-setup-details summary { color: var(--brand-link); }

@media (max-width: 720px) {
  .workspace footer { gap: 8px 16px; }
  .workspace footer > span { margin-left: 0; }
  .public-site-link { margin-left: auto; }
}

/* Dark wordmark and purple candles sit on a light plate in the sidebar. */
.brand{flex-direction:column;align-items:flex-start;gap:9px;padding:0;min-width:0}
.brand .brand-lockup{display:block;width:100%;max-width:198px;height:auto;background:#faf9fc;border-radius:7px;padding:9px 8px;box-sizing:border-box}
.brand small{font-size:9px;letter-spacing:1.35px;margin-top:0;padding-left:3px}
@media(max-width:720px){.brand .brand-lockup{width:220px;max-width:100%}}

/* Plain trial headline with a compact monthly/yearly billing control. */
.member-plan-card h2 { font-size: 32px; line-height: 1.15; margin: 18px 0 10px; letter-spacing: -.9px; }
.member-plan-subtitle { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0 0 24px; }
.member-billing-selector { display: flex; align-items: stretch; width: 100%; max-width: 310px; padding: 6px; margin: 0 0 24px; border: 1px solid #e2b04a; border-radius: 999px; background: var(--brand-main); gap: 4px; }
.member-billing-selector button { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 52px; padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: #fff; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.25; }
.member-billing-selector button small { display: block; font-size: 10px; font-weight: 650; letter-spacing: .4px; text-transform: uppercase; margin-top: 2px; }
.member-billing-selector button[aria-pressed="true"] { background: #e2b04a; color: #fff; }
.member-billing-selector button:hover { box-shadow: inset 0 0 0 1px #e2b04a; }
.member-billing-selector button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.member-owner-access { font-size: 24px; font-weight: 700; color: var(--brand-main); }
@media(max-width:720px) { .member-plan-card h2 { font-size: 29px; } }
