/* ===== NET WORTH HERO ===== */

.nw-hero {
    background: var(--background);
    border: 2px solid var(--wealth);
    border-radius: 14px;
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.nw-hero-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--muted-foreground);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.nw-hero-value {
    font-family: var(--font-family-heading);
    font-size: 3.2rem;
    font-weight: 400;
    color: var(--foreground);
    line-height: 1;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
}

.nw-hero-value[data-sign="positive"] { color: var(--wealth); }
.nw-hero-value[data-sign="negative"] { color: var(--primary-vivid); }

.nw-hero-breakdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    font-size: 0.88rem;
    color: var(--muted-foreground);
    margin-bottom: 0.85rem;
}

.nw-hero-breakdown strong { color: var(--foreground); }

.nw-hero-divider { color: var(--border); }

.nw-verdict {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.55;
    margin: 0;
    font-style: italic;
}

.nw-verdict--warning { color: var(--primary-vivid); font-style: normal; }
.nw-verdict--ok      { color: var(--muted-foreground); font-style: normal; }
.nw-verdict--good    { color: var(--wealth); font-style: normal; }
.nw-verdict--strong  { color: var(--wealth); font-weight: 600; font-style: normal; }

/* ===== PRE-POPULATION NOTICE ===== */

.nw-prepop-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--wealth-bg);
    border-left: 3px solid var(--wealth);
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.nw-prepop-icon {
    color: var(--wealth);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.nw-prepop-notice a {
    color: var(--wealth);
    font-weight: 500;
    text-decoration: none;
}

.nw-prepop-notice a:hover { text-decoration: underline; }

/* ===== TWO-COLUMN GRID ===== */

.nw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.nw-col { min-width: 0; }

.nw-col-heading {
    font-family: var(--font-family-heading);
    font-size: 1.2rem;
    font-weight: 400;
    padding-bottom: 0.5rem;
    margin-bottom: 1.1rem;
    border-bottom: 2px solid;
    letter-spacing: -0.01em;
}

.nw-col-heading--assets    { color: var(--wealth); border-bottom-color: var(--wealth); }
.nw-col-heading--liabilities { color: var(--primary-vivid); border-bottom-color: var(--primary-vivid); }

/* ===== SECTIONS ===== */

.nw-section {
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.nw-section:last-of-type { border-bottom: none; }

.nw-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-bottom: 0.65rem;
}

/* ===== FIELDS ===== */

.nw-field { margin-bottom: 0.65rem; }

.nw-field label {
    display: block;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.nw-field input {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
}

.nw-field-hint {
    display: block;
    font-size: 0.74rem;
    color: var(--muted-foreground);
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* ===== READ-ONLY INVESTMENT DISPLAY ===== */

.nw-inv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.nw-inv-row:last-child { border-bottom: none; }

.nw-inv-label {
    font-size: 0.88rem;
    color: var(--muted-foreground);
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

.nw-inv-value {
    font-family: var(--font-family-heading);
    font-size: 0.95rem;
    color: var(--wealth);
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}

.nw-inv-row--total {
    border-top: 1.5px solid var(--wealth);
    border-bottom: none;
    padding-top: 0.5rem;
    margin-top: 0.2rem;
}

.nw-inv-row--total .nw-inv-label {
    color: var(--foreground);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nw-inv-row--total .nw-inv-value {
    font-size: 1rem;
}

.nw-no-data {
    font-size: 0.84rem;
    color: var(--muted-foreground);
    font-style: italic;
    line-height: 1.5;
    margin: 0.25rem 0 0;
}

.nw-no-data a {
    color: var(--wealth);
    font-weight: 500;
    text-decoration: none;
}

.nw-no-data a:hover { text-decoration: underline; }

/* ===== ADDITIONAL (CATCH-ALL) ROWS ===== */

.nw-row {
    display: grid;
    grid-template-columns: 1fr 120px 28px;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.nw-row[role="listitem"] { list-style: none; }

.nw-row input {
    padding: 0.42rem 0.6rem;
    font-size: 0.86rem;
}

.nw-row--planner .nw-row-name {
    background: var(--wealth-bg);
    border-color: rgba(45, 106, 79, 0.25);
    color: var(--wealth);
    font-weight: 500;
}

.nw-row-empty {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin: 0.25rem 0 0.5rem;
    font-style: italic;
}

.nw-row-remove {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    color: var(--muted-foreground);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.nw-row-remove:hover,
.nw-row-remove:focus-visible {
    border-color: var(--primary-vivid);
    color: var(--primary-vivid);
    outline: none;
}

/* ===== ADD BUTTON ===== */

.nw-add-btn {
    background: none;
    border: 1.5px dashed var(--wealth);
    border-radius: 8px;
    color: var(--wealth);
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    margin-top: 0.35rem;
    width: 100%;
    transition: background 0.2s ease;
}

.nw-add-btn:hover,
.nw-add-btn:focus-visible {
    background: var(--wealth-bg);
    outline: 2px solid var(--wealth);
    outline-offset: 2px;
}

.nw-add-btn--debt {
    border-color: var(--primary-vivid);
    color: var(--primary-vivid);
}

.nw-add-btn--debt:hover,
.nw-add-btn--debt:focus-visible {
    background: rgba(196, 93, 62, 0.06);
    outline-color: var(--primary-vivid);
}

/* ===== ADDITIONAL SECTION ===== */

.nw-section--extra {
    background: var(--background);
    border-radius: 8px;
    padding: 0.85rem;
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    border-bottom: none;
}

/* ===== NO-PLANNER HINT ===== */

.nw-no-planner {
    font-size: 0.79rem;
    color: var(--muted-foreground);
    margin-top: 0.4rem;
    font-style: italic;
    line-height: 1.45;
}

.nw-no-planner a {
    color: var(--wealth);
    font-weight: 500;
    text-decoration: none;
}

.nw-no-planner a:hover { text-decoration: underline; }

/* ===== COLUMN TOTALS ===== */

.nw-col-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}

.nw-col-total-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nw-col-total-value {
    font-family: var(--font-family-heading);
    font-size: 1.1rem;
    color: var(--foreground);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .nw-hero { padding: 1.5rem 1rem 1.25rem; }
    .nw-hero-value { font-size: 2.4rem; }

    .nw-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nw-row {
        grid-template-columns: 1fr 100px 28px;
    }
}

@media (max-width: 480px) {
    .nw-hero-value { font-size: 2rem; }

    .nw-row {
        grid-template-columns: 1fr 28px;
        grid-template-rows: auto auto;
        row-gap: 0.3rem;
    }

    .nw-row .nw-row-name   { grid-column: 1 / -1; }
    .nw-row .nw-row-amount { grid-column: 1; grid-row: 2; }
    .nw-row .nw-row-remove { grid-column: 2; grid-row: 2; }
}
