.erp-company-switch { position: relative; }
.erp-company-btn {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    min-width: 0;
    max-width: 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe3ef;
    background: #fff;
    border-radius: 14px;
    padding: 6px 12px 6px 8px;
    text-align: left;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.erp-company-btn:hover { background: #f8fafc; border-color: #c7d2e0; }
.erp-company-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #eef4ff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.erp-company-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.erp-company-label {
    display: block;
    font-weight: 800;
    font-size: 13px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-company-meta { display: flex; align-items: center; gap: 4px; }
.erp-currency-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.erp-currency-pill.muted { background: #f1f5f9; color: #475569; }
.erp-currency-sep { color: #94a3b8; font-size: 11px; font-weight: 700; }
.erp-company-caret { margin-left: 2px; color: #94a3b8; font-size: 12px; }
.erp-company-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
    width: 280px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15,23,42,.12); padding: 8px;
}
.erp-company-menu-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; padding: 6px 8px; }
.erp-company-item { width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; }
.erp-company-item:hover, .erp-company-item.current { background: #f1f5f9; }

.fin-page { max-width: 1400px; }
.fin-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.fin-kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #2563eb; margin-bottom: 4px; }
.fin-title { font-size: 28px; font-weight: 850; letter-spacing: -.03em; margin: 0; }
.fin-sub { color: #64748b; margin-top: 4px; }
.fin-card { background: #fff; border: 1px solid rgba(15,23,42,.06); border-radius: 16px; box-shadow: 0 10px 28px rgba(15,23,42,.05); }
.fin-card-h { padding: 14px 18px; border-bottom: 1px solid #eef2f7; font-weight: 800; }
.fin-card-b { padding: 16px 18px; }
.fin-table { width: 100%; margin: 0; }
.fin-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; background: #f8fafc; border-bottom: 1px solid #e8eef5; padding: 10px 12px; }
.fin-table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.fin-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.fin-badge { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.fin-badge.draft { background: #eef2ff; color: #3730a3; }
.fin-badge.posted { background: #ecfdf5; color: #047857; }
.fin-badge.cancelled { background: #fef2f2; color: #b91c1c; }
@media print {
    .no-print { display: none !important; }
    .fin-page, .doc-print-page { max-width: none; }
}
.fin-totals { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.fin-stat { background: #f8fafc; border: 1px solid #e8eef5; border-radius: 14px; padding: 12px 14px; }
.fin-stat span { display: block; font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
.fin-stat strong { display: block; margin-top: 4px; font-size: 20px; }
.fin-stat.warn { background: #fff7ed; border-color: #ffedd5; }
.fin-money { display: flex; gap: 18px; flex-wrap: wrap; }
.fin-money div { min-width: 140px; }
.fin-money label { display: block; font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; }
.fin-tree { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.fin-tree-item { display: flex; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; text-align: left; }
.fin-tree-item:hover, .fin-tree-item.active { background: #eef4ff; }
@media (max-width: 900px) {
    .fin-tree, .fin-totals { grid-template-columns: 1fr; }
}
