/*
 * Shared application styles.
 *
 * Keep the legacy stylesheet imported while its established components are
 * migrated into the layered architecture. This preserves cascade order and
 * gives templates a stable app.css entry point.
 */
@import url("styles.css");

/* Shared accounting header/include utilities used across cashflow views. */
.cashflow-header { padding: 0.5rem 1rem; }
.cash-chip-action { font-size: 0.8rem; }
.brand-accent-text { color: var(--brand-accent, #6ee7b7); }

.navbar-brand-logo {
    width: auto;
    height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.navbar-brand-wordmark {
    display: inline-block;
}

.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.profile-avatar {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--brand-accent, #6ee7b7);
    font-size: 0.85rem;
}

.profile-trigger-name {
    max-width: 15rem;
    overflow: hidden;
    color: var(--brand-accent, #6ee7b7);
    font-weight: 700;
    text-overflow: ellipsis;
}

.profile-dropdown {
    min-width: 16rem;
}

.profile-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 1rem;
    color: #f8fafc;
    line-height: 1.25;
}

.profile-dropdown-header span {
    overflow-wrap: anywhere;
    color: #cbd5e1;
    font-size: 0.8rem;
}

.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.profile-dropdown .dropdown-item i {
    width: 1rem;
    text-align: center;
}

.profile-dropdown .profile-logout {
    color: #fca5a5;
}

@media (max-width: 991.98px) {
    #main-navbar {
        width: 100%;
        padding-top: 0.5rem;
    }

    #main-navbar .navbar-nav {
        align-items: stretch;
    }

    .profile-menu {
        margin-top: 0.35rem;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .profile-trigger {
        display: flex;
    }

    .profile-dropdown {
        width: 100%;
        min-width: 0;
        margin-top: 0.25rem;
    }
}

/* Conservative utilities replacing exact, repeated template declarations. */
.cell-pad { padding: 12px 8px; }
.cell-pad-muted { padding: 12px 8px; color: var(--muted, #6b7280); }
.cell-pad-zero { padding: 0; }
.mb-14 { margin-bottom: 14px; }
.mb-20 { margin-bottom: 20px; }
.mb-20-offset { margin-bottom: 20px; margin-left: 8px; }
.mt-12 { margin-top: 12px; }
.table-header-rule { border-bottom: 2px solid #cbd5e1; }
.table-row-rule { border-bottom: 1px solid #e2e8f0; }
.table-empty-cell { padding: 16px; text-align: center; color: var(--muted, #6b7280); }
.full-width-table { width: 100%; text-align: left; border-collapse: collapse; }
.status-active { color: green; }
.status-inactive { color: red; }
.field-error-compact { color: var(--danger, #dc2626); font-size: 0.85rem; }
.header-note { font-size: 0.75em; color: #e2e8f0; }
.calendar-seventh { width: 14.28%; }
.text-075 { font-size: 0.75rem; }
.text-muted-app { color: var(--muted, #6b7280); }
.text-right { text-align: right; }
.block-heading { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.inline-error-box { background: #fee; border: 1px solid #fcc; border-radius: 8px; padding: 12px; margin-bottom: 16px; color: #c00; }
