/* Shared workspace theme derived from the approved INKA ERP reference. */
.erp-body { --accent:#1763dc; --accent-strong:#1052bd; --muted:#64748b; --ink:#18273c; --line:#e5eaf1; --line-soft:#e5eaf1; --shadow-soft:0 2px 4px #18273c03; background:#f4f6f9; color:var(--ink); }
.erp-body .app-shell { display:block; padding-left:238px; }
.erp-body .sidebar { position:fixed; inset:0 auto 0 0; width:238px; height:100dvh; min-height:0; background:#101d32; border:0; box-shadow:none; padding:26px 18px 16px; display:flex; flex-direction:column; gap:0; z-index:30; color:#aebbd0; overflow-y:auto; }
.erp-body .brand { display:block; padding:0 12px 20px; }
.erp-body .brand-logo-wrap { justify-content:flex-start; min-height:0; }
.erp-body .inka-brand-logo { width:150px; max-width:150px; max-height:48px; filter:brightness(0) invert(1); }
.erp-body .brand-text { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.erp-workspace-label { color:#8192ac; padding:0 12px 16px; text-transform:uppercase; letter-spacing:1.5px; font-size:10px; }
.erp-body .side-nav { display:flex; flex-direction:column; gap:2px; }
.erp-nav-group { margin:14px 0 0; }
.erp-nav-label { font-size:10px; font-weight:650; letter-spacing:1.2px; text-transform:uppercase; color:#8192ac; margin:0 12px 5px; }
.erp-body .nav-link, .erp-body .side-nav button.nav-link { min-height:39px; padding:9px 12px; gap:11px; border:0; color:#afbdd1; background:transparent; box-shadow:none; font-weight:500; font-size:13px; border-radius:7px; }
.erp-body .nav-link:hover, .erp-body .side-nav button.nav-link:hover { background:#1a2b45; color:#fff; }
.erp-body .nav-link.active { background:#2465ce; color:#fff; }
.erp-body .nav-glyph { color:currentColor; border:0; background:none; width:19px; height:19px; min-width:19px; box-shadow:none; }
.erp-body .nav-link.active .nav-glyph { background:none; color:inherit; border:0; }
.erp-body .sidebar-footer { display:grid; background:none; border:0; border-top:1px solid #29364b; border-radius:0; color:#8192ac; padding:18px 10px 0; margin-top:20px; font-size:11px; }
.erp-body .sidebar-footer strong { color:#e7edf6; font-size:13px; }
.erp-body .sidebar-footer em { color:#aebbd0; font-weight:400; }
.erp-body .nav-divider { display:block; border-color:#29364b; margin:14px 10px; }
.erp-body .workspace-topbar { height:72px; min-height:72px; padding:0 34px; flex-direction:row; align-items:center; gap:16px; }
.erp-breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; flex:1; }
.erp-body .topbar-kicker { display:inline; text-transform:none; font-size:13px; font-weight:400; margin:0; }
.erp-body .topbar-kicker::after { content:' /'; }
.erp-body .workspace-topbar strong { display:inline; font-size:13px; font-weight:550; }
.erp-topbar-account { font-size:12px; color:var(--muted); }
.erp-body .content-body { overflow:visible; min-width:0; max-width:1600px; padding:29px 34px 36px; }
.erp-body h1 { font-size:26px; font-weight:700; letter-spacing:-.7px; line-height:1.3; margin:0 0 7px; overflow-wrap:anywhere; }
.erp-body h2 { font-size:16px; font-weight:650; letter-spacing:-.15px; }
.erp-body .page-head { align-items:center; margin-bottom:25px; }
.erp-body .page-head .muted { margin:0; }
.erp-body .crumb { font-size:12px; font-weight:400; margin-bottom:8px; }
.erp-body .panel, .erp-body .table-wrap, .erp-body .card, .erp-body .toolbar { border-radius:10px; box-shadow:var(--shadow-soft); }
.erp-body .panel { padding:22px; }
.erp-body button, .erp-body .button { border-radius:7px; box-shadow:none; font-weight:600; font-size:13px; padding:10px 14px; min-height:38px; }
.erp-body button.secondary, .erp-body .button.secondary { background:#fff; border:1px solid var(--line); color:#34445b; }
.erp-body input, .erp-body select, .erp-body textarea { border-radius:7px; border-color:#dce4ef; min-height:39px; box-shadow:none; }
.erp-body :is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #79b4ff; outline-offset:3px; }
.erp-body .table-wrap { overflow:auto; }
.erp-body table { font-size:13px; }
.erp-body th { font-size:10px; text-transform:uppercase; letter-spacing:.5px; background:#f9fafc; font-weight:600; color:#718198; }
.erp-body th, .erp-body td { padding:15px 18px; border-bottom:1px solid #edf0f5; }
.erp-body td { color:#40516a; }
.erp-body tbody tr:last-child td { border-bottom:0; }
.erp-body tbody tr:hover { background:#f8fbff; }
.erp-body .file-badge { border-radius:5px; padding:5px 8px; font-size:11px; font-weight:600; line-height:1.25; border:0; }
.erp-body .file-badge.status-overdue { color:#b44331; background:#fff0eb; }
.erp-body .file-badge.status-paid { color:#18714d; background:#e9f6ed; }
.erp-body .file-badge.status-partial { color:#7652ac; background:#f1ebfa; }
.erp-body .file-badge.status-approved { color:#2b62ad; background:#eaf2ff; }
.erp-body .file-badge.status-pending, .erp-body .file-badge.status-draft { color:#68788e; background:#edf1f6; }
.erp-body .accounting-register-filters { display:grid; grid-template-columns:2fr repeat(3,minmax(130px,1fr)); gap:12px; padding:18px; border-radius:10px; background:#fff; align-items:end; }
.erp-body .accounting-register-filters .filter-field { min-width:0; width:auto; }
.erp-body .accounting-register-filters input, .erp-body .accounting-register-filters select { width:100%; min-width:0; }
.erp-body .invoice-register-table .invoice-reference { min-width:9rem; max-width:18rem; }
.erp-body .results-pagination { padding:16px 18px; }
.erp-date-chip { padding:10px 13px; background:white; border:1px solid var(--line); border-radius:7px; color:#506077; font-size:13px; white-space:nowrap; }
.erp-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.erp-kpi { display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:10px; padding:20px; color:var(--ink); min-width:0; text-decoration:none; }
.erp-kpi:hover { border-color:#b9cfee; text-decoration:none; }
.erp-kpi-label { color:#52627a; font-size:13px; }
.erp-kpi-value { font-size:24px; letter-spacing:-.8px; line-height:1.3; margin:14px 0 7px; }
.erp-money-line { display:block; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.erp-money-line small { font-size:11px; color:#8490a2; letter-spacing:0; font-weight:500; margin-left:6px; }
.erp-kpi>small { font-size:11px; color:#79869b; line-height:1.5; }
.erp-kpi-alert { border-top:3px solid #e37962; padding-top:18px; }
.erp-kpi-alert .erp-kpi-value { color:#b64531; }
.erp-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr); gap:24px; margin-bottom:24px; }
.erp-body .erp-panel { padding:0; overflow:hidden; margin-bottom:24px; }
.erp-dashboard-grid .erp-panel { margin-bottom:0; }
.erp-panel-head { display:flex; align-items:center; justify-content:space-between; padding:20px 22px; border-bottom:1px solid var(--line); gap:14px; }
.erp-panel-head h2 { margin:0; }
.erp-panel-head p { margin:5px 0 0; font-size:12px; color:var(--muted); }
.erp-panel-head a { font-size:12px; white-space:nowrap; font-weight:600; }
.erp-panel .table-wrap { border:0; border-radius:0; box-shadow:none; }
.erp-queue-row { display:flex; align-items:center; gap:15px; justify-content:space-between; padding:18px 22px; border-bottom:1px solid #edf0f5; }
.erp-queue-row:hover { background:#f8fbff; text-decoration:none; }
.erp-queue-row>span { min-width:0; }
.erp-queue-row strong { font-size:13px; }
.erp-queue-row small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.erp-queue-row .erp-queue-money { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.erp-queue-money small { color:#b44331; }
.erp-panel-note { padding:14px 22px; color:var(--muted); font-size:11px; margin:0; background:#fbfcfe; }
.erp-collections { padding:24px; font-size:28px; font-weight:700; }
.erp-collections .erp-money-line { margin-bottom:12px; }
.erp-empty { padding:30px 22px; color:var(--muted); font-size:13px; }
.erp-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 275px; gap:24px; align-items:start; }
.erp-detail-summary { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:20px; padding:24px; border-bottom:1px solid var(--line); }
.erp-field-label { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.7px; color:#8090a5; margin-bottom:8px; }
.erp-detail-summary strong { font-size:17px; }
.erp-detail-summary small { display:block; margin-top:7px; color:var(--muted); }
.erp-detail-summary .erp-balance { font-size:24px; color:#b44331; font-variant-numeric:tabular-nums; }
.erp-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); padding:0 22px; overflow:auto; }
.erp-tabs a { padding:17px 0; font-size:13px; color:#738197; white-space:nowrap; font-weight:600; }
.erp-tabs a[aria-selected=true] { color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.erp-tab-panel { padding:22px; }
.erp-tab-panel[hidden] { display:none; }
.erp-tab-panel h2 { margin:0 0 16px; }
.erp-tab-panel .table-wrap { margin:0 -22px; width:calc(100% + 44px); }
.erp-context dl { margin:0; }
.erp-context dt { font-size:10px; color:#8090a5; text-transform:uppercase; letter-spacing:.7px; margin-top:20px; }
.erp-context dd { margin:7px 0 0; font-size:13px; overflow-wrap:anywhere; }
.erp-context h2 { margin:0 0 22px; }
.erp-totals { margin:24px 0 0 auto; max-width:320px; display:grid; gap:12px; }
.erp-totals div { display:flex; justify-content:space-between; gap:20px; }
.erp-totals div:last-child { border-top:1px solid var(--line); padding-top:15px; font-weight:700; }
.erp-totals span:last-child { font-variant-numeric:tabular-nums; white-space:nowrap; }
.erp-payment-tools { margin-top:24px; }
.erp-payment-tools .invoice-workspace { grid-template-columns:1fr 1fr; }
.erp-payment-tools .invoice-payment-card { grid-column:1/-1; }
.erp-activity { padding:12px 0 16px 18px; border-left:2px solid #e1e9f5; }
.erp-activity small { display:block; margin-top:5px; color:var(--muted); }
.erp-disclosure { margin:20px 0; }
.erp-disclosure>summary { cursor:pointer; font-weight:600; padding:12px 0; }
.erp-record-heading { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.erp-record-heading h1 { margin:0; }
.erp-body .erp-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.erp-form-grid>p, .erp-form-grid>.erp-form-actions, .erp-form-grid>label:has(textarea) { grid-column:1/-1; }
.erp-form-actions { display:flex; gap:12px; }
.erp-mobile-menu { display:none; }
.skip-link { position:fixed; top:-100px; left:12px; background:#fff; padding:12px; z-index:100; }
.skip-link:focus { top:10px; }
@media (max-width:1200px) {
    .erp-body .content-body { padding:25px 24px; }
    .erp-kpi { padding:18px 15px; }
    .erp-kpi-value { font-size:21px; }
    .erp-detail-grid { grid-template-columns:minmax(0,1fr) 230px; }
    .erp-detail-summary { grid-template-columns:1fr 1fr; }
    .erp-detail-summary>div:first-child { grid-column:1/-1; }
    .erp-body .accounting-register-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
    .erp-body .app-shell { padding-left:0; }
    .erp-body .sidebar { position:relative; width:100%; height:auto; min-height:0; }
    .erp-navigation-ready .sidebar { display:none; }
    .erp-navigation-ready.erp-nav-open .sidebar { display:flex; position:fixed; top:64px; bottom:0; width:238px; height:calc(100dvh - 64px); box-shadow:8px 0 35px #101d3250; }
    .erp-body .erp-mobile-menu { display:block; padding:6px 10px; font-size:20px; }
    .erp-body .workspace-topbar { position:sticky; top:0; z-index:25; height:64px; min-height:64px; padding:0 20px; }
    .erp-body .content-body { padding:24px 20px; }
    .erp-detail-grid { grid-template-columns:1fr; }
    .erp-body .sidebar .brand-logo-wrap, .erp-body .sidebar .sidebar-footer { display:flex; }
    .erp-body .sidebar .sidebar-footer { flex-direction:column; }
    .erp-dashboard-grid { grid-template-columns:1fr; gap:18px; }
    .erp-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
    .erp-body h1 { font-size:24px; }
    .erp-body .content-body { padding:22px 16px; }
    .erp-body .page-head { align-items:stretch; }
    .erp-date-chip { align-self:flex-start; }
    .erp-body .accounting-register-filters { grid-template-columns:1fr 1fr; }
    .erp-body .accounting-register-filters .filter-field:first-child { grid-column:1/-1; }
    .erp-topbar-account { display:none; }
    .erp-kpis { gap:10px; }
    .erp-kpi { padding:16px 12px; }
    .erp-kpi-value { font-size:19px; }
    .erp-kpi-label { font-size:12px; }
    .erp-detail-summary { padding:20px; }
    .erp-queue-row { padding:16px; align-items:flex-start; }
    .erp-queue-row .erp-queue-money { white-space:normal; }
    .erp-tabs { gap:20px; padding:0 18px; }
    .erp-payment-tools .invoice-workspace, .erp-body .erp-form-grid { grid-template-columns:1fr; }
    .erp-body .actions { flex-wrap:wrap; }
}
@media print {
    .erp-body .sidebar, .erp-body .workspace-topbar, .erp-body .skip-link { display:none; }
    .erp-body .app-shell { padding:0; }
    .erp-tab-panel[hidden] { display:block; }
    .erp-detail-grid, .erp-dashboard-grid { display:block; }
}
.erp-body .accounting-register-filters { grid-template-columns:2fr 1fr 1fr auto auto; margin-bottom:16px; border:1px solid var(--line); }
.erp-body .accounting-register-filters .filter-field { border:0; padding:0; box-shadow:none; background:none; }
.erp-body .accounting-register-filters .filter-field>span:first-child { font-size:11px; font-weight:500; color:var(--muted); }
.erp-advanced-filters { grid-column:1/-1; }
.erp-advanced-filters>summary { font-size:12px; color:var(--muted); cursor:pointer; padding:3px 0; }
.erp-advanced-filters>div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; padding-top:14px; }
.erp-body .invoice-register-table th, .erp-body .invoice-register-table td { text-align:left; padding:14px 15px; }
.erp-body .invoice-register-table th:nth-last-child(-n+2), .erp-body .invoice-register-table td:nth-last-child(-n+2) { text-align:right; }
.erp-body .invoice-register-table th { white-space:nowrap; }
@media(max-width:1100px) {
    .erp-body .accounting-register-filters { grid-template-columns:2fr 1fr 1fr; }
    .erp-advanced-filters>div { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:620px) {
    .erp-body .accounting-register-filters { grid-template-columns:1fr 1fr; }
    .erp-advanced-filters>div { grid-template-columns:1fr 1fr; }
}
.erp-detail-grid>* { min-width:0; }
.erp-body .table-wrap { max-width:100%; }
.erp-body .accounting-register-filters input, .erp-body .accounting-register-filters select { border:1px solid #dce4ef; padding:9px 10px; }
@media(max-width:900px) {
    .erp-body .erp-mobile-menu { width:40px; flex:0 0 40px; }
    .erp-breadcrumb { flex-wrap:nowrap; overflow:hidden; }
    .erp-breadcrumb strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .erp-detail-grid { grid-template-columns:minmax(0,1fr); }
}
