/* Trial Balance — extends Chart of Accounts smart layout */

.tb-wrap .coa-topbar-sub {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-instructions {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.5rem 0.65rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.66rem;
    color: #475569;
    line-height: 1.45;
}

.tb-instructions__icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #93c5fd;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-instructions strong {
    display: block;
    color: #1e3a5f;
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
}

.coa-ledger-hint span {
    display: block;
    margin-top: 0.08rem;
}

.tb-filter-card {
    padding: 0.55rem 0.65rem !important;
}

.tb-filter-bar {
    flex-wrap: wrap;
    align-items: flex-end !important;
}

.tb-date-wrap {
    min-width: 200px;
}

.tb-date-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #dc2626;
    margin-bottom: 0.18rem;
}

.tb-date-input-wrap {
    min-width: 220px;
}

.tb-gen-btn {
    align-self: flex-end;
    white-space: nowrap;
}

.tb-table .coa-th-num,
.tb-table .coa-td-num {
    min-width: 88px;
}

.tb-th-opening,
.tb-th-closing {
    min-width: 100px;
}

.tb-folder-icon {
    color: #f59e0b;
    font-size: 0.72rem;
    margin-right: 0.2rem;
    vertical-align: -1px;
}

.tb-name--parent {
    font-weight: 600;
}

.tb-row--parent > td {
    background: #f8fafc;
}

.tb-tfoot-row td {
    font-weight: 700;
    background: #eff6ff !important;
}

.tb-diff-row td {
    padding: 0.35rem 0.55rem !important;
    background: #f8fafc;
    border-top: 1px dashed #cbd5e1;
    font-size: 0.66rem;
}

.tb-diff-label {
    color: #64748b;
    margin-right: 0.35rem;
}

.tb-diff--ok { color: #15803d; }
.tb-diff--warn { color: #b45309; }

.tb-diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
}

.tb-diff-badge--ok {
    background: #dcfce7;
    color: #166534;
}

.tb-diff-badge--warn {
    background: #fef3c7;
    color: #92400e;
}

@media print {
    .tb-instructions,
    .tb-filter-card,
    .coa-pager,
    .coa-group-panel { display: none !important; }
}

@media (max-width: 900px) {
    .tb-filter-bar .coa-search-wrap { min-width: 100%; }
    .tb-date-wrap { width: 100%; }
}
