/* =====================================================================
   MyNetWorths V1 — Stylesheet
   Powered by Eworldlab International
   Palette: navy #0B1220 · white surfaces · gold #F5B800
            assets #10B981 · liabilities #EF4444
   ===================================================================== */

:root {
    --mnw-navy: #0B1220;
    --mnw-navy-2: #111A2E;
    --mnw-navy-3: #1B2640;
    --mnw-surface: #FFFFFF;
    --mnw-gold: #F5B800;
    --mnw-gold-dark: #D9A300;
    --mnw-gold-soft: #FFF7DB;
    --mnw-asset: #10B981;
    --mnw-liability: #EF4444;
    --mnw-ink: #0F172A;
    --mnw-ink-2: #475569;
    --mnw-muted: #94A3B8;
    --mnw-line: #E2E8F0;
    --mnw-radius: 12px;
    --mnw-shadow: 0 10px 30px rgba(2, 6, 23, 0.18), 0 2px 6px rgba(2, 6, 23, 0.08);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--bs-body-font-family);
    background: var(--mnw-navy);
    color: #E2E8F0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

a { color: var(--mnw-gold-dark); }
a:hover { color: var(--mnw-gold); }

.skip-link {
    position: absolute; left: 12px; top: 12px; z-index: 2000;
    background: var(--mnw-gold); color: var(--mnw-navy); padding: 8px 14px; border-radius: 8px;
}

.text-gold { color: var(--mnw-gold) !important; }
.text-asset { color: var(--mnw-asset) !important; }
.text-liability { color: var(--mnw-liability) !important; }
.text-secondary-soft { color: var(--mnw-muted); }

/* ---------- Buttons ---------- */
.btn-gold {
    --bs-btn-color: var(--mnw-navy);
    --bs-btn-bg: var(--mnw-gold);
    --bs-btn-border-color: var(--mnw-gold);
    --bs-btn-hover-color: var(--mnw-navy);
    --bs-btn-hover-bg: #FFC928;
    --bs-btn-hover-border-color: #FFC928;
    --bs-btn-active-color: var(--mnw-navy);
    --bs-btn-active-bg: var(--mnw-gold-dark);
    --bs-btn-active-border-color: var(--mnw-gold-dark);
    --bs-btn-disabled-color: var(--mnw-navy);
    --bs-btn-disabled-bg: #E9D48A;
    --bs-btn-disabled-border-color: #E9D48A;
    --bs-btn-focus-shadow-rgb: 245, 184, 0;
    font-weight: 600;
}

.btn { border-radius: 10px; }
.btn.is-loading { pointer-events: none; opacity: 0.8; }

/* ---------- Navigation ---------- */
.mnw-nav {
    background: rgba(11, 18, 32, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky; top: 0; z-index: 1030;
    padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--mnw-gold); color: var(--mnw-navy); font-size: 1.05rem;
}
.brand-word { font-weight: 500; letter-spacing: -0.01em; color: #fff; }
.brand-word strong { color: var(--mnw-gold); font-weight: 800; }
.mnw-nav .nav-link { color: #CBD5E1; font-weight: 500; border-radius: 8px; padding: 0.45rem 0.75rem; }
.mnw-nav .nav-link:hover { color: #fff; }
.mnw-nav .nav-link.active { color: var(--mnw-navy); background: var(--mnw-gold); }
.nav-user { color: #CBD5E1; font-size: 0.9rem; }

@media (max-width: 991.98px) {
    .mnw-nav .navbar-collapse { padding-top: 0.75rem; }
    .mnw-nav .navbar-nav .nav-link { padding: 0.6rem 0.75rem; }
    .mnw-nav form, .mnw-nav .btn-gold { margin-top: 0.5rem; }
}

/* ---------- Surfaces ---------- */
.card-surface {
    background: var(--mnw-surface);
    color: var(--mnw-ink);
    border-radius: var(--mnw-radius);
    box-shadow: var(--mnw-shadow);
}
.card-surface .text-muted { color: var(--mnw-ink-2) !important; }
.card-title-sm { font-size: 1.05rem; font-weight: 700; color: var(--mnw-ink); margin-bottom: 1rem; }

/* ---------- Landing ---------- */
.hero { padding: 4.5rem 0 4rem; background: radial-gradient(1200px 500px at 85% -10%, rgba(245, 184, 0, 0.14), transparent 60%), var(--mnw-navy); }
.eyebrow {
    display: inline-block; font-size: 0.82rem; font-weight: 600; color: var(--mnw-gold);
    background: rgba(245, 184, 0, 0.1); border: 1px solid rgba(245, 184, 0, 0.3);
    padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: #fff; margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.1rem; color: #CBD5E1; line-height: 1.7; margin-bottom: 2rem; max-width: 36rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.4rem; color: #CBD5E1; margin-right: 1.25rem; margin-bottom: 0.4rem; font-size: 0.93rem; }
.hero-points i { color: var(--mnw-asset); }
.hero-card { padding: 1.75rem; max-width: 30rem; margin-left: auto; }
.hero-card .stat-value { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.sample-note { margin-top: 1rem; font-size: 0.75rem; color: var(--mnw-muted); text-align: right; }

.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 0.5rem; }
.mini-bars span { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--mnw-gold), rgba(245, 184, 0, 0.35)); }
.h-30 { height: 30%; } .h-35 { height: 35%; } .h-38 { height: 38%; } .h-46 { height: 46%; } .h-50 { height: 50%; }
.h-52 { height: 52%; } .h-61 { height: 61%; } .h-66 { height: 66%; } .h-70 { height: 70%; } .h-72 { height: 72%; }
.h-84 { height: 84%; } .h-92 { height: 92%; }
.mini-stat { border-radius: 10px; padding: 0.7rem 0.9rem; background: #F8FAFC; }
.mini-stat small { display: block; color: var(--mnw-ink-2); font-size: 0.78rem; }
.mini-stat strong { font-size: 1.05rem; }
.mini-stat.assets strong { color: var(--mnw-asset); }
.mini-stat.liabilities strong { color: var(--mnw-liability); }

.section-light { background: #F1F5F9; padding: 5rem 0; color: var(--mnw-ink); }
.section-dark { background: var(--mnw-navy-2); padding: 4.5rem 0; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; color: var(--mnw-ink); text-align: center; }
.section-lead { color: var(--mnw-ink-2); font-size: 1.05rem; text-align: center; }

.feature { padding: 1.75rem; }
.feature h3 { font-size: 1.1rem; font-weight: 700; margin: 0.9rem 0 0.5rem; }
.feature p { color: var(--mnw-ink-2); margin-bottom: 0; font-size: 0.95rem; line-height: 1.6; }
.feature-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--mnw-gold-soft); color: var(--mnw-gold-dark); font-size: 1.35rem;
}

.step-num {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--mnw-gold); color: var(--mnw-navy); font-weight: 800; font-size: 1.3rem;
}
.step-title { font-size: 1.15rem; font-weight: 700; color: #fff; }
.step-text { color: #CBD5E1; max-width: 18rem; margin: 0 auto; }

.sec-item { display: flex; gap: 0.85rem; background: #fff; border-radius: 12px; padding: 1rem 1.1rem; height: 100%; box-shadow: 0 1px 3px rgba(2, 6, 23, 0.06); }
.sec-item i { font-size: 1.35rem; color: var(--mnw-asset); line-height: 1.2; }
.sec-item strong { display: block; color: var(--mnw-ink); font-size: 0.95rem; }
.sec-item span { color: var(--mnw-ink-2); font-size: 0.88rem; }

.cta-band { padding: 4.5rem 0; background: linear-gradient(135deg, var(--mnw-navy-3), var(--mnw-navy)); }
.cta-title { color: #fff; font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.cta-text { color: #CBD5E1; margin-bottom: 1.75rem; }

/* ---------- Auth ---------- */
.auth-wrap { padding: 3.5rem 0 4rem; }
.auth-card { padding: 2rem; }
.auth-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.auth-sub { color: var(--mnw-ink-2); margin-bottom: 1.5rem; }
.auth-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--mnw-gold-soft); color: var(--mnw-gold-dark); font-size: 1.8rem;
}
.otp-input { text-align: center; font-size: 1.9rem; font-weight: 700; letter-spacing: 0.6em; padding-left: 0.6em; height: 64px; }
@media (max-width: 575.98px) {
    .auth-card { padding: 1.5rem 1.25rem; }
    .otp-input { font-size: 1.5rem; letter-spacing: 0.45em; }
}

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--mnw-ink); }
.form-control, .form-select { border-radius: 10px; border-color: #CBD5E1; padding: 0.6rem 0.85rem; }
.form-control:focus, .form-select:focus { border-color: var(--mnw-gold); box-shadow: 0 0 0 0.2rem rgba(245, 184, 0, 0.25); }
.input-group > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; border-color: #CBD5E1; }
.form-check-input:checked { background-color: var(--mnw-gold-dark); border-color: var(--mnw-gold-dark); }

/* ---------- App pages ---------- */
.app-wrap { padding: 2.25rem 0 3.5rem; }
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-bottom: 0.25rem; }
.page-sub { color: #94A3B8; }

.stat-card { padding: 1.4rem 1.5rem; position: relative; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat-net::before { background: var(--mnw-gold); }
.stat-assets::before { background: var(--mnw-asset); }
.stat-liabilities::before { background: var(--mnw-liability); }
.stat-label { font-size: 0.82rem; font-weight: 600; color: var(--mnw-ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; color: var(--mnw-ink); margin: 0.35rem 0; overflow-wrap: normal; word-break: normal; line-height: 1.15; }
.stat-value-sm { font-size: clamp(1.1rem, 2.6vw, 1.5rem); }
.stat-assets .stat-value { color: var(--mnw-asset); }
.stat-liabilities .stat-value { color: var(--mnw-liability); }
.stat-sub { font-size: 0.88rem; color: var(--mnw-ink-2); }
.stat-sub a { color: var(--mnw-ink); font-weight: 600; }

.badge-up { background: rgba(16, 185, 129, 0.12); color: #047857; font-weight: 600; }
.badge-down { background: rgba(239, 68, 68, 0.12); color: #B91C1C; font-weight: 600; }

.chart-box { position: relative; height: 320px; }
@media (max-width: 575.98px) { .chart-box { height: 240px; } }
.chart-empty {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; color: var(--mnw-ink-2);
}
.chart-empty i { font-size: 2.4rem; color: var(--mnw-muted); }
.chart-empty p { margin-top: 0.5rem; max-width: 18rem; }

.fx-main { display: flex; justify-content: space-between; align-items: baseline; padding: 0.9rem 1rem; background: var(--mnw-gold-soft); border-radius: 10px; margin-bottom: 0.5rem; }
.fx-pair { font-weight: 600; color: var(--mnw-ink-2); }
.fx-rate { font-size: 1.5rem; font-weight: 800; color: var(--mnw-ink); }
.fx-list li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--mnw-line); font-size: 0.93rem; }
.fx-list li:last-child { border-bottom: 0; }
.tip-box { display: flex; gap: 0.6rem; font-size: 0.86rem; color: var(--mnw-ink-2); background: #F8FAFC; border-radius: 10px; padding: 0.8rem 0.9rem; }
.tip-box i { color: var(--mnw-gold-dark); font-size: 1.05rem; }

/* ---------- Ledger ---------- */
.ledger-summary { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; border-left: 4px solid var(--mnw-asset); }
.ledger-summary.is-liability { border-left-color: var(--mnw-liability); }
.ledger-summary.is-asset .stat-value { color: var(--mnw-asset); }
.ledger-summary.is-liability .stat-value { color: var(--mnw-liability); }
.ledger-table thead th { background: #F8FAFC; color: var(--mnw-ink-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; border-bottom: 1px solid var(--mnw-line); padding: 0.85rem 1rem; }
.ledger-table td { padding: 0.85rem 1rem; }
.ledger-table td .item-name { font-weight: 600; color: var(--mnw-ink); }
.ledger-table td .item-meta { font-size: 0.8rem; color: var(--mnw-ink-2); }
.ledger-table .amount { font-weight: 700; white-space: nowrap; }
.ledger-table[data-kind="asset"] .amount { color: var(--mnw-asset); }
.ledger-table[data-kind="liability"] .amount { color: var(--mnw-liability); }
.cat-pill { display: inline-block; font-size: 0.78rem; font-weight: 600; background: #F1F5F9; color: var(--mnw-ink-2); padding: 0.2rem 0.6rem; border-radius: 999px; }
.row-actions .btn { padding: 0.25rem 0.5rem; }
.row-flash { animation: rowFlash 1.4s ease; }
@keyframes rowFlash { from { background: var(--mnw-gold-soft); } to { background: transparent; } }
.ledger-empty { text-align: center; padding: 3rem 1rem; color: var(--mnw-ink-2); }
.ledger-empty i { font-size: 2.4rem; color: var(--mnw-muted); }
.ledger-empty p { margin: 0.6rem 0 1rem; }

.table > :not(caption) > * > * { border-bottom-color: var(--mnw-line); }

/* ---------- Settings ---------- */
.nok-view { background: #F8FAFC; border-radius: 10px; padding: 0.9rem 1rem; }
.nok-name { font-weight: 700; margin-bottom: 0.25rem; }
.danger-zone { border: 1px solid rgba(239, 68, 68, 0.35); }
.account-facts dt { color: var(--mnw-ink-2); font-weight: 500; }
.account-facts dd { font-weight: 600; margin-bottom: 0.4rem; }

/* ---------- Legal ---------- */
.legal-wrap { padding: 3rem 0 4rem; }
.legal-card { padding: 2.25rem; line-height: 1.75; }
.legal-card h1 { font-weight: 800; letter-spacing: -0.02em; }
.legal-card h2 { font-size: 1.15rem; font-weight: 700; margin-top: 2rem; }
.legal-card p, .legal-card li { color: #334155; }
.legal-meta { color: var(--mnw-ink-2); font-size: 0.9rem; }
.legal-callout { background: var(--mnw-gold-soft); border-left: 4px solid var(--mnw-gold); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.5rem 0; color: var(--mnw-ink); }
@media (max-width: 575.98px) { .legal-card { padding: 1.4rem 1.2rem; } }

/* ---------- Footer ---------- */
.mnw-footer { flex-shrink: 0; padding: 2rem 0; border-top: 1px solid rgba(255, 255, 255, 0.07); background: var(--mnw-navy); }
.footer-brand { color: #fff; font-weight: 500; margin-bottom: 0.2rem; }
.footer-brand strong { color: var(--mnw-gold); font-weight: 800; }
.footer-links a { color: #CBD5E1; text-decoration: none; margin-left: 1rem; font-size: 0.9rem; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--mnw-gold); }
.powered-by { color: var(--mnw-muted); }
.powered-by a { color: var(--mnw-gold); text-decoration: none; font-weight: 600; }

/* ---------- Toasts & modal ---------- */
.toast { border: 0; border-radius: 10px; box-shadow: var(--mnw-shadow); }
.toast.toast-success { background: #ECFDF5; color: #065F46; }
.toast.toast-error { background: #FEF2F2; color: #991B1B; }
.toast.toast-info { background: #EFF6FF; color: #1E3A8A; }
.modal-content { border: 0; border-radius: var(--mnw-radius); color: var(--mnw-ink); }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 767.98px) {
    .hero { padding: 3rem 0; text-align: left; }
    .hero-card { margin: 0 auto; }
    .section-light, .section-dark, .cta-band { padding: 3.25rem 0; }
    .app-wrap { padding: 1.5rem 0 2.5rem; }
    .stat-card { padding: 1.1rem 1.15rem; }
    .ledger-summary { padding: 1rem 1.15rem; }
    .ledger-table td, .ledger-table thead th { padding: 0.7rem 0.75rem; }
}
