/* ==========================================================================
   Clarifolio.App — page-specific styles only. Everything shared (tokens,
   components, the rail shell, auth pages) comes from Clarifolio.UI:
   tokens.css / base.css / components.css / shell.css. Tokens only here too.
   ========================================================================== */

/* ---- Recent activity list (Dashboard) ------------------------------------ */
.activity-list { padding: 0; overflow: hidden; }
.activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: var(--divider);
}
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: var(--fg-soft); }
.activity-ticker { font-weight: 800; font-size: 1rem; }
.activity-date { font-size: .78rem; color: var(--fg-muted); }
.activity-metrics { display: flex; align-items: center; gap: var(--space-6); }
.activity-metric-label { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.activity-metric-value { font-size: .9rem; font-weight: 700; }
.activity-metric-amount { min-width: 120px; text-align: right; font-size: .95rem; font-weight: 700; }

/* ---- Forms (Trades/Income/Issuers/Securities/Goals create pages) ---------- */
.form-card {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-section-title {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: var(--divider);
    font: 700 .72rem/1.2 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-muted);
}
@media (max-width: 992px) { .form-card { margin-bottom: var(--space-6); } }

/* ---- Feedback dialog success state (_FeedbackModal) ----------------------- */
.feedback-success-mark { margin: 0 auto var(--space-4); }

/* ---- Account settings (Manage) ------------------------------------------- */
.settings-nav .nav-pills .nav-link { justify-content: flex-start; margin-bottom: var(--space-1); }
@media (min-width: 768px) { .settings-nav { position: sticky; top: var(--space-6); } }

/* ---- Shares / Bonds / Bills sections ------------------------------------- */
/* A company's share of the cost of all shares held (Shares page). */
.weight-bar {
    display: block;
    min-width: 64px;
    height: 6px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--fg-soft);
}
.weight-bar > span { display: block; width: var(--pct); height: 100%; background: var(--fg); }

/* Dated list of expected payments (Bonds page, Dashboard "Coming up"). */
.schedule-list { margin: 0; padding: 0; list-style: none; }
.schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--divider);
}
.schedule-row:last-child { border-bottom: 0; }
.schedule-date { min-width: 4.5rem; font: 700 .78rem/1.2 var(--font-mono); color: var(--fg-muted); text-transform: uppercase; }
.schedule-what { flex: 1; min-width: 0; }
.schedule-what .cell-primary { overflow-wrap: anywhere; }
.schedule-amount { font-weight: 700; text-align: right; white-space: nowrap; }

/* Maturity ladder: a handful of years shouldn't stretch into full-width blocks. */
.bar-chart-fixed .bar-col { flex: 0 1 72px; }

/* Income calendar: this month's label stands out from the rest. */
.bar-col.is-current .bar-label { color: var(--fg); text-decoration: underline; }

/* Matured bonds/bills awaiting a redemption (Bills page, Dashboard). */
.attention-card { border-color: var(--warning); }
.attention-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--divider);
}
.attention-row:last-child { border-bottom: 0; }

/* Live figures under the one-step Bonds/Bills/Shares forms. */
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 600px) { .preview-grid { grid-template-columns: 1fr; } }
.preview-label { display: block; font: 700 .66rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.preview-value { display: block; margin-top: var(--space-1); font: 700 1.05rem/1.2 var(--font-mono); }

/* ---- Monthly statement: printable (Statements/Details) ------------------- */
@media print {
    .app-rail, .mobile-topbar, .rail-backdrop, .statement-actions, .accent-switcher, .alert { display: none !important; }
    .app-shell, .app-main { display: block; margin: 0; padding: 0; }
    body { background: var(--surface); }
    .statement .card, .statement .stat-tile { box-shadow: none; break-inside: avoid; }
    .statement .table-responsive { overflow: visible; }
}

/* ---- Dashboard net worth --------------------------------------------------- */
.net-worth-value { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.statement-month-select { width: auto; min-width: 9.5rem; }
.statement-year-select { width: auto; min-width: 6rem; }

/* ---- Onboarding tour (Dashboard) ------------------------------------------ */
.tour-card { max-width: 560px; }
.tour-progress { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.tour-step { min-height: 190px; }
.tour-note { font-size: .85rem; color: var(--fg-muted); }
.tour-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.tour-action {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
    background: var(--surface);
    border: var(--border-subtle);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-small);
    transition: transform .08s ease, box-shadow .08s ease;
}
.tour-action:hover { color: var(--fg); transform: translate(var(--shadow-xs), var(--shadow-xs)); box-shadow: var(--shadow-pressed); }
.tour-action .bi { font-size: 1.1rem; }
.tour-footer { justify-content: space-between; align-items: center; }
.tour-dots { display: flex; gap: var(--space-2); }
.tour-dot {
    width: 9px;
    height: 9px;
    border: var(--border-width-subtle) solid var(--border-color);
    border-radius: var(--radius-pill);
}
.tour-dot.is-active { background: var(--accent); }
@media (max-width: 480px) {
    .tour-actions { grid-template-columns: 1fr; }
    .tour-dots { display: none; }
}

/* ---- Demo banner (every page while exploring the demo) -------------------- */
.demo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding: var(--space-3) var(--space-4);
    color: var(--accent-ink);
    background: var(--accent);
    border: var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-small);
}
.demo-banner .btn-ghost { color: var(--accent-ink); }
.demo-banner-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---- Updated terms dialog (every page until accepted) --------------------- */
.legal-update { z-index: 1100; }
.legal-update .dialog-card { max-width: 560px; }
.legal-update-note { font-size: .85rem; color: var(--fg-muted); }
