/* ==========================================================================
   Professional Balance Sheet Layout
   ========================================================================== */

.bs-wrapper {
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06) !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 20px;
}

/* ---------- Header ---------- */
.bs-wrapper .bs-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #fff !important;
    padding: 32px 32px !important;
    text-align: center !important;
    border-bottom: 4px solid #4f46e5 !important;
}

.bs-wrapper .bs-header .bs-company {
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 6px 0 !important;
    color: #fff !important;
}

.bs-wrapper .bs-header .bs-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    color: #cbd5e1 !important;
    margin: 0 0 10px 0 !important;
}

.bs-wrapper .bs-header .bs-asof {
    font-size: 13px !important;
    color: #94a3b8 !important;
    margin: 0 !important;
}

.bs-wrapper .bs-header .bs-asof strong {
    color: #fff !important;
    font-weight: 600 !important;
}

/* ---------- Filter card ---------- */
.bs-filter-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.bs-filter-card .form-group { margin-bottom: 0; }
.bs-filter-card label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 6px;
}

/* ---------- Two-column body ---------- */
.bs-wrapper .bs-body {
    display: flex !important;
    flex-wrap: wrap !important;
    background: #e2e8f0 !important;
    margin: 0 !important;
}

.bs-wrapper .bs-column {
    background: #ffffff !important;
    flex: 1 1 50% !important;
    max-width: 50% !important;
    min-width: 280px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid #e2e8f0;
}

.bs-wrapper .bs-column:last-child { border-right: none; }

@media (max-width: 768px) {
    .bs-wrapper .bs-column {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

.bs-wrapper .bs-column-header {
    background: #f8fafc !important;
    padding: 16px 24px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 !important;
}

.bs-wrapper .bs-column-header h4 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    line-height: 1 !important;
}

.bs-wrapper .bs-column-header h4 i.bs-liability-icon,
.bs-wrapper .bs-column-header h4 i.bs-asset-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    margin-right: 6px;
}

.bs-wrapper .bs-liability-icon {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.bs-wrapper .bs-asset-icon {
    background: #dcfce7 !important;
    color: #15803d !important;
}

/* ---------- Account rows ---------- */
.bs-wrapper .bs-account-list {
    flex: 1;
    padding: 6px 0;
    background: #ffffff;
}

.bs-wrapper .bs-account-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 13px 24px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background 0.15s !important;
    margin: 0 !important;
}

.bs-wrapper .bs-account-row:hover {
    background: #fafbfc !important;
}

.bs-wrapper .bs-account-row:last-child { border-bottom: none !important; }

.bs-wrapper .bs-account-label {
    font-size: 13.5px !important;
    color: #334155 !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1;
}

.bs-wrapper .bs-account-label .bs-bullet {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: #cbd5e1 !important;
    display: inline-block !important;
    flex-shrink: 0;
}

.bs-wrapper .bs-account-value {
    font-size: 14px !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
    min-width: 120px !important;
    white-space: nowrap;
}

/* Sub-group header */
.bs-wrapper .bs-subgroup-header {
    padding: 14px 24px 8px 24px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: #64748b !important;
    background: #fafbfc !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: 1px solid #f1f5f9 !important;
}

.bs-wrapper .bs-subgroup .bs-account-row {
    padding-left: 40px !important;
}

.bs-wrapper .bs-subgroup .bs-account-label {
    color: #475569 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* ---------- Totals footer ---------- */
.bs-wrapper .bs-totals {
    display: flex !important;
    flex-wrap: wrap !important;
    background: #e2e8f0 !important;
    border-top: 2px solid #cbd5e1 !important;
    margin: 0 !important;
}

.bs-wrapper .bs-total-cell {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    padding: 20px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 1 50% !important;
    max-width: 50% !important;
    min-width: 280px !important;
    box-sizing: border-box !important;
    border-right: 1px solid #e2e8f0;
}

.bs-wrapper .bs-total-cell:last-child { border-right: none; }

@media (max-width: 768px) {
    .bs-wrapper .bs-total-cell {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

.bs-wrapper .bs-total-cell .bs-total-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #0f172a !important;
}

.bs-wrapper .bs-total-cell .bs-total-value {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    font-variant-numeric: tabular-nums !important;
}

.bs-wrapper .bs-total-liability .bs-total-value { color: #b91c1c !important; }
.bs-wrapper .bs-total-asset .bs-total-value { color: #15803d !important; }

/* ---------- Action footer ---------- */
.bs-wrapper .bs-actions {
    background: #ffffff !important;
    padding: 16px 24px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.bs-btn-print {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 9px 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.15s !important;
}

.bs-btn-print:hover {
    background: #4338ca !important;
    border-color: #4338ca !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
}

.bs-wrapper .bs-account-value .fa-spin {
    color: #94a3b8 !important;
    font-size: 12px !important;
}

/* ---------- Print ---------- */
@media print {
    .bs-wrapper .bs-header {
        background: #fff !important;
        color: #0f172a !important;
        border-bottom: 2px solid #0f172a !important;
    }
    .bs-wrapper .bs-header .bs-company,
    .bs-wrapper .bs-header .bs-title,
    .bs-wrapper .bs-header .bs-asof,
    .bs-wrapper .bs-header .bs-asof strong { color: #0f172a !important; }
    .bs-wrapper .bs-column-header { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; }
    .bs-wrapper .bs-total-cell { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; }
    .bs-wrapper { box-shadow: none !important; border: 1px solid #000 !important; }
    .bs-wrapper .bs-actions { display: none !important; }
}