/* Layer: base — split from public/styles.css (P0.1). P0.4: @font-face + stacks. */

/* ===== @font-face (self-hosted; CSP font-src 'self') ===== */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/vendor/fonts/instrument-sans/instrument-sans-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/vendor/fonts/source-serif-4/source-serif-4-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/vendor/fonts/source-serif-4/source-serif-4-latin-wght-italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/vendor/fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/vendor/fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body:not(.reconciliation-mode) #transactions-table .tx-recon-include-col {
    display: none;
}



/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: var(--font-ui);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Tabular figures — theme-instrument.md §Figures (non-optional for numeral columns) */
.data-table td,
.report-table td,
.split-table td,
.household-org-table td,
.household-members-table td,
.permissions-grant-table td,
.reconciliation-register-table td,
#transactions-table td,
#accounts-table td,
#portfolio-holdings-table td,
.amount-large,
.amount-increase,
.amount-decrease,
.amount-credit,
.amount-debit,
.amount-neutral {
    font-variant-numeric: tabular-nums;
}



body.sidebar-collapsed {
    --sidebar-current: var(--sidebar-width-collapsed);
}



body.sidebar-collapsed .sidebar-toggle-chevron {
    transform: rotate(180deg);
    margin-left: -2px;
}



body.sidebar-collapsed .logo {
    flex-direction: column;
    padding: 0 0.5rem 1rem;
    gap: 0.65rem;
}



body.sidebar-collapsed .logo-title {
    justify-content: center;
    font-size: 1.5rem;
}



body.sidebar-collapsed .logo-word {
    display: none;
}



body.sidebar-collapsed .sidebar-toggle {
    width: 100%;
    max-width: 2.5rem;
}



/*
 * Collapsed there is no room for the heading text, so it becomes a divider that
 * still separates the groups. `syncNavGroupLabelVisibility` sets aria-hidden to
 * match, so nothing is announced that cannot be seen.
 */
body.sidebar-collapsed .nav-group-label {
    height: 0;
    margin: 0.5rem 0.5rem 0;
    padding: 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}



body.sidebar-collapsed .nav-item-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
    gap: 0;
}



body.sidebar-collapsed .nav-item:hover,
body.sidebar-collapsed .nav-item.active {
    transform: none;
}



body.sidebar-collapsed .nav {
    padding: 0 0.5rem;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}



@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}



body.sidebar-collapsed .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
}



body.auth-pending .sidebar,
body.signed-out .sidebar {
    display: none;
}



body.auth-pending .main-content,
body.signed-out .main-content {
    margin-left: 0;
}



body.auth-pending .main-content-inner,
body.signed-out .main-content-inner {
    max-width: none;
    padding: 0;
}



@keyframes invoice-upload-pulse {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
}