/* -----------------------------------------------------------------------
   Global — Sunflower Twilight palette
   Background: #A3D0D4  Primary dark: #004753  Accent: #46ABB0
   Success: #46ABB0     Danger: #E0564D        Gold: #CCAA14
----------------------------------------------------------------------- */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #A3D0D4;
    color: #344054;
}

/* Override Bootstrap success/danger to match colour palette */
.text-success { color: #46ABB0 !important; }
.text-danger  { color: #E0564D !important; }

/* -----------------------------------------------------------------------
   Layout — cap at 1600px, expand on large monitors
----------------------------------------------------------------------- */
.container-fluid {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Net Worth page opt-in for wider layout at 1800px+ */
@media (min-width: 1800px) {
    .container-fluid.wide-container { max-width: none; }
    .col-wide-6 { flex: 0 0 50%; max-width: 50%; }
}

/* -----------------------------------------------------------------------
   Cashflow / Savings: charts left, table right at 1800px+
----------------------------------------------------------------------- */
.wide-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 0.25rem;
    margin-bottom: 2rem;
}

@media (min-width: 1800px) {
    .wide-section {
        max-width: none;
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .wide-section .charts-pane { flex: 0 0 55%; min-width: 0; }
    .wide-section .table-pane  { flex: 1; min-width: 0; overflow-x: auto; }
}

/* -----------------------------------------------------------------------
   Navbar
----------------------------------------------------------------------- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem !important;
    transition: color 0.15s;
}

.navbar-nav .nav-link:hover { color: white !important; }

.navbar-nav .nav-link.nav-active {
    color: #CCAA14 !important;
    font-weight: 700;
}

.navbar-nav .dropdown-toggle {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.9rem;
}
.navbar-nav .dropdown-toggle:hover { color: white !important; }

/* -----------------------------------------------------------------------
   Cards
----------------------------------------------------------------------- */
.card-body { padding: 1.25rem 1.5rem; }

.chart-card {
    background: white;
    border: none;
}

/* -----------------------------------------------------------------------
   Chart containers
----------------------------------------------------------------------- */
.chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #004753;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* Fixed-height chart wrapper */
.chart-wrap {
    position: relative;
}

/* Dynamic-height chart wrapper (category bar chart) */
.chart-wrap-h {
    position: relative;
    min-height: 350px;
}

/* -----------------------------------------------------------------------
   Preset buttons
----------------------------------------------------------------------- */
.preset-scroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px 3px;
}

@media (min-width: 992px) {
    .preset-scroll {
        justify-content: flex-end;
        gap: 4px 6px;
    }
}

.preset-btn {
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 500;
    background-color: white;
    border: 1px solid #004753;
    color: #004753;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    line-height: 1.4;
}

.preset-btn:hover {
    background-color: #003340;
    color: white;
}

.preset-btn.active {
    background-color: #004753;
    color: white;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* -----------------------------------------------------------------------
   Chart column mobile spacing
----------------------------------------------------------------------- */
@media (max-width: 767px) {
    .chart-col { margin-bottom: 1.25rem; }
}

/* -----------------------------------------------------------------------
   Login page
----------------------------------------------------------------------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #A3D0D4;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

/* -----------------------------------------------------------------------
   Table: expandable sub-rows
----------------------------------------------------------------------- */
.expand-btn {
    background: none;
    border: none;
    padding: 0;
    color: #888;
    font-size: 0.7rem;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.expand-btn:hover { color: #004753; }

/* -----------------------------------------------------------------------
   Transactions: sortable column headers
----------------------------------------------------------------------- */
th.sortable {
    cursor: pointer;
    user-select: none;
}
th.sortable:hover { background-color: #354a52; }
