:root {
    --navy: #1f2d86;
    --ms-blue: #25308f;
    --ms-blue-dark: #111b5f;
    --ms-yellow: #f8b400;
    --steel: #44546a;
    --line: #d8dee8;
    --paper: #f4f7fc;
    --accent: #25308f;
    --danger: #b42318;
    --warn: #b7791f;
    --ok: #15803d;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: #1d2737; font-family: Arial, Helvetica, sans-serif; }
a { color: var(--ms-blue); }
.h5 { font-size: 18px; margin: 0 0 12px; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.text-secondary { color: var(--steel); }
.alert { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-bottom: 16px; background: #eef7ff; }
.alert-danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.btn { border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; min-height: 38px; padding: 8px 12px; text-decoration: none; white-space: nowrap; }
.btn-sm { font-size: 12px; min-height: 30px; padding: 5px 8px; }
.btn-success { background: var(--ms-blue); color: #fff; }
.btn-success:hover { background: var(--ms-blue-dark); }
.btn-outline-success { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-outline-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-outline-secondary { background: #fff; color: var(--steel); border-color: var(--line); }
.form-control, .form-select { border: 1px solid var(--line); border-radius: 8px; color: #1d2737; font: inherit; min-height: 38px; padding: 8px 10px; background: #fff; }
.form-control-sm, .form-select-sm { min-height: 30px; padding: 5px 8px; font-size: 12px; }
.form-label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-check { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.form-check-input { margin: 0; }
.w-100 { width: 100%; }
.w-auto { width: auto; }
.table { border-collapse: collapse; width: 100%; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.table th { background: #f1f5f9; color: #334155; font-size: 12px; text-transform: uppercase; }
.table-sm th, .table-sm td { padding: 6px; font-size: 13px; }
.align-middle td { vertical-align: middle; }
.badge { border-radius: 999px; display: inline-block; font-size: 12px; padding: 4px 8px; }
.collapse:not(.show) { display: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: linear-gradient(180deg, var(--ms-blue-dark) 0%, #172033 100%); color: #fff; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 22px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ms-yellow); color: var(--ms-blue-dark); border-radius: 8px; }
.brand-logo { background: #fff; border-radius: 8px; display: block; max-height: 50px; max-width: 190px; object-fit: contain; padding: 4px; }
.nav-section { color: #91a4bf; font-size: 11px; font-weight: 800; letter-spacing: .08em; margin: 16px 10px 7px; text-transform: uppercase; }
.sidebar nav a { color: #dce5f2; display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 10px 12px; border-radius: 8px; margin-bottom: 3px; border-left: 3px solid transparent; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(248, 180, 0, .16); border-left-color: var(--ms-yellow); color: #fff; }
.content { padding: 22px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.topbar h1 { font-size: 24px; margin: 0; }
.topbar span { color: var(--steel); font-size: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; }
.user-chip a { color: var(--danger); text-decoration: none; }
.user-chip-main { display: grid; gap: 3px; }
.theme-toggle { background: #eef2f7; border: 1px solid var(--line); border-radius: 999px; color: #172033; cursor: pointer; font-weight: 800; min-height: 30px; padding: 5px 10px; }
.theme-mode { align-items: center; display: flex; gap: 6px; margin: 0; }
.theme-mode span { color: #64748b; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.theme-mode select { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: #172033; cursor: pointer; font-size: 12px; font-weight: 800; min-height: 30px; padding: 4px 28px 4px 10px; }
.profile-badge { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; justify-self: start; line-height: 1; padding: 4px 8px; }
.profile-administrador { background: #fee2e2; color: #7f1d1d; }
.profile-supervisora, .profile-supervisor { background: #dbeafe; color: #1d4ed8; }
.profile-cobranca { background: #dcfce7; color: #166534; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
.metric { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ms-yellow); border-radius: 12px; padding: 13px; min-height: 92px; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.metric strong { display: block; font-size: 22px; margin-top: 4px; }
.metric span { color: var(--steel); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.table { background: #fff; }
.badge-risk-verde { background: #dcfce7; color: #166534; }
.badge-risk-amarelo { background: #fef3c7; color: #92400e; }
.badge-risk-vermelho { background: #fee2e2; color: #991b1b; }
.attention-high { color: var(--danger); font-weight: 700; }
.attention-medium { color: var(--warn); font-weight: 700; }
.attention-low { color: var(--ok); font-weight: 700; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--ms-blue-dark), var(--ms-blue)); padding: 20px; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 8px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.password-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.password-toggle { border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 18px; min-height: 38px; min-width: 42px; padding: 0 10px; }
.password-toggle.is-visible { background: #eef7ff; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dashboard-page { display: grid; gap: 20px; }
.dashboard-header { background: linear-gradient(135deg, var(--ms-blue-dark) 0%, var(--ms-blue) 100%); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); color: #fff; display: flex; justify-content: space-between; gap: 22px; padding: 26px; }
.dashboard-title-block h2 { font-size: 30px; line-height: 1.1; margin: 6px 0 8px; }
.dashboard-title-block p { color: #dbe4ef; font-size: 15px; margin: 0; max-width: 720px; }
.dashboard-tag { background: rgba(21, 128, 61, .22); border: 1px solid rgba(134, 239, 172, .35); border-radius: 999px; color: #bbf7d0; display: inline-block; font-size: 12px; font-weight: 800; padding: 6px 10px; text-transform: uppercase; }
.dashboard-filter { align-self: center; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; display: grid; gap: 8px; min-width: 240px; padding: 14px; }
.dashboard-filter label { color: #dbe4ef; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.dashboard-filter select { background: #fff; border: 0; border-radius: 8px; color: #172033; font-size: 15px; min-height: 44px; padding: 8px 12px; width: 100%; }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 16px; }
.dashboard-kpi { background: #fff; border: 1px solid #e4eaf2; border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .07); min-height: 128px; overflow: hidden; padding: 18px; position: relative; }
.dashboard-kpi::before { content: ""; display: block; height: 5px; left: 0; position: absolute; right: 0; top: 0; }
.dashboard-kpi span { color: #64748b; display: block; font-size: 12px; font-weight: 800; letter-spacing: .03em; margin-bottom: 12px; padding-right: 26px; text-transform: uppercase; }
.dashboard-kpi strong { color: #111827; display: block; font-size: 27px; line-height: 1.12; word-break: break-word; }
.dashboard-kpi i { border-radius: 999px; height: 44px; opacity: .12; position: absolute; right: 14px; top: 18px; width: 44px; }
.dashboard-kpi-wide { grid-column: span 2; }
.dashboard-kpi-green::before, .dashboard-kpi-green i { background: #15803d; }
.dashboard-kpi-orange::before, .dashboard-kpi-orange i { background: #ea580c; }
.dashboard-kpi-red::before, .dashboard-kpi-red i { background: #dc2626; }
.dashboard-kpi-dark::before, .dashboard-kpi-dark i { background: #1f2937; }
.dashboard-kpi-navy::before, .dashboard-kpi-navy i { background: #172033; }
.dashboard-panel { background: #fff; border: 1px solid #e4eaf2; border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .06); padding: 20px; }
.dashboard-panel-title { align-items: flex-end; border-bottom: 1px solid #edf1f7; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; }
.dashboard-panel-title h3 { color: #172033; font-size: 20px; margin: 0 0 4px; }
.dashboard-panel-title p { color: #64748b; font-size: 13px; margin: 0; }
.aging-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 14px; }
.aging-card { background: #f8fafc; border: 1px solid #e8eef6; border-radius: 12px; padding: 14px; }
.aging-top { align-items: flex-start; display: flex; justify-content: space-between; gap: 14px; }
.aging-top strong { color: #172033; font-size: 15px; }
.aging-top span { color: #111827; font-size: 17px; font-weight: 900; text-align: right; white-space: nowrap; }
.aging-bar { background: #e8edf4; border-radius: 999px; height: 13px; margin: 14px 0 10px; overflow: hidden; }
.aging-bar div { border-radius: 999px; height: 100%; min-width: 0; }
.aging-bottom { color: #64748b; display: flex; font-size: 12px; font-weight: 700; justify-content: space-between; }
.aging-green .aging-bar div { background: #15803d; }
.aging-yellow .aging-bar div { background: #d6a100; }
.aging-yellow-strong .aging-bar div { background: #b7791f; }
.aging-orange .aging-bar div { background: #ea580c; }
.aging-orange-dark .aging-bar div { background: #c2410c; }
.aging-red .aging-bar div { background: #dc2626; }
.aging-dark .aging-bar div { background: #1f2937; }
.dashboard-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 20px; }
.alert-card-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.alert-card { background: #fff; border: 1px solid #e4eaf2; border-left: 6px solid #64748b; border-radius: 12px; box-shadow: 0 8px 20px rgba(15, 23, 42, .05); color: #172033; display: grid; gap: 10px; min-height: 96px; padding: 14px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.alert-card:hover { box-shadow: 0 14px 28px rgba(15, 23, 42, .10); transform: translateY(-2px); }
.alert-card span { color: #475569; font-size: 13px; font-weight: 800; line-height: 1.25; }
.alert-card strong { font-size: 28px; line-height: 1; }
.alert-green { border-left-color: #15803d; }
.alert-yellow, .alert-yellow-strong { border-left-color: #b7791f; }
.alert-orange { border-left-color: #ea580c; }
.alert-orange-dark { border-left-color: #c2410c; }
.alert-red { border-left-color: #dc2626; }
.alert-dark { border-left-color: #1f2937; }
.monthly-panel { align-content: start; display: grid; }
.monthly-main { background: #172033; border-radius: 12px; color: #fff; padding: 18px; }
.monthly-main span { color: #dbe4ef; display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.monthly-main strong { display: block; font-size: 29px; line-height: 1.1; }
.monthly-progress { background: #e8edf4; border-radius: 999px; height: 16px; margin: 16px 0; overflow: hidden; }
.monthly-progress div { background: #15803d; border-radius: 999px; height: 100%; }
.monthly-stats { display: grid; gap: 10px; }
.monthly-stats div { background: #f8fafc; border: 1px solid #edf1f7; border-radius: 10px; padding: 11px; }
.monthly-stats span { color: #64748b; display: block; font-size: 12px; font-weight: 800; margin-bottom: 5px; text-transform: uppercase; }
.monthly-stats strong { color: #172033; font-size: 17px; }
.dashboard-table-wrap { border: 1px solid #e4eaf2; border-radius: 12px; overflow-x: auto; }
.dashboard-table { border-collapse: separate; border-spacing: 0; min-width: 900px; width: 100%; }
.dashboard-table th { background: #172033; color: #fff; font-size: 12px; letter-spacing: .03em; padding: 12px 10px; position: sticky; top: 0; text-align: left; text-transform: uppercase; }
.dashboard-table td { border-bottom: 1px solid #edf1f7; color: #334155; font-size: 13px; padding: 11px 10px; vertical-align: middle; }
.dashboard-table tbody tr:nth-child(even) td { background: #f8fafc; }
.dashboard-table tbody tr:hover td { background: #eef7ff; }
.dashboard-table a { color: #0f766e; font-weight: 800; text-decoration: none; }
.money-cell { color: #b42318 !important; font-weight: 900; white-space: nowrap; }
.dashboard-status { background: #dcfce7; border-radius: 999px; color: #166534; display: inline-block; font-size: 12px; font-weight: 800; padding: 5px 9px; white-space: nowrap; }
.dashboard-status.is-critical { background: #fee2e2; color: #991b1b; }
.dash-hero { background: #172033; border-radius: 10px; color: #fff; display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 22px; }
.dash-hero h2 { font-size: 28px; margin: 4px 0 6px; }
.dash-hero p { color: #dbe4ef; margin: 0; max-width: 720px; }
.dash-eyebrow { color: #86efac; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.unit-filter { align-self: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; display: grid; gap: 6px; min-width: 220px; padding: 12px; }
.unit-filter label { color: #dbe4ef; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.unit-filter select { background: #fff; border: 0; border-radius: 6px; color: #172033; min-height: 40px; padding: 8px 10px; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); display: flex; gap: 12px; min-height: 112px; padding: 16px; }
.dash-card-featured { grid-column: span 2; }
.dash-card span { color: var(--steel); display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; }
.dash-card strong { color: #111827; display: block; font-size: 25px; line-height: 1.15; }
.dash-icon { border-radius: 8px; color: #fff; display: grid; flex: 0 0 42px; font-weight: 800; height: 42px; place-items: center; }
.tone-green { background: #15803d; }
.tone-yellow { background: #d6a100; }
.tone-yellow-strong { background: #b7791f; }
.tone-orange { background: #ea580c; }
.tone-orange-dark { background: #c2410c; }
.tone-red { background: #dc2626; }
.tone-danger { background: #b42318; }
.tone-dark { background: #1f2937; }
.tone-navy { background: #172033; }
.dash-section { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 18px; padding: 18px; }
.section-title { align-items: flex-end; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { font-size: 19px; margin: 0; }
.section-title span { color: var(--steel); font-size: 13px; }
.escalation-list { display: grid; gap: 12px; }
.escalation-item { border: 1px solid #edf1f7; border-radius: 8px; padding: 12px; }
.escalation-head, .escalation-meta { display: flex; justify-content: space-between; gap: 12px; }
.escalation-head strong { font-size: 15px; }
.escalation-head span { font-weight: 800; }
.escalation-meta { color: var(--steel); font-size: 12px; margin-top: 7px; }
.bar-track { background: #eef2f7; border-radius: 999px; height: 12px; margin-top: 10px; overflow: hidden; }
.bar-fill { border-radius: 999px; height: 100%; }
.dash-grid-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr); gap: 18px; }
.attention-grid { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 10px; }
.attention-card { border: 1px solid var(--line); border-left-width: 5px; border-radius: 8px; color: #1d2737; display: flex; justify-content: space-between; gap: 12px; padding: 12px; text-decoration: none; }
.attention-card span { color: var(--steel); font-size: 13px; }
.attention-card strong { font-size: 22px; }
.tone-border-green { border-left-color: #15803d; }
.tone-border-yellow { border-left-color: #d6a100; }
.tone-border-yellow-strong { border-left-color: #b7791f; }
.tone-border-orange { border-left-color: #ea580c; }
.tone-border-orange-dark { border-left-color: #c2410c; }
.tone-border-red { border-left-color: #dc2626; }
.tone-border-dark { border-left-color: #1f2937; }
.recovery-panel { display: grid; align-content: start; }
.recovery-values { display: grid; gap: 10px; }
.recovery-values div { background: #f8fafc; border: 1px solid #edf1f7; border-radius: 8px; padding: 11px; }
.recovery-values span { color: var(--steel); display: block; font-size: 12px; margin-bottom: 4px; }
.recovery-values strong { font-size: 18px; }
.goal-ring { align-items: center; background: #172033; border-radius: 10px; color: #fff; display: flex; gap: 12px; justify-content: center; margin-top: 14px; min-height: 92px; text-align: center; }
.goal-ring strong { font-size: 30px; }
.goal-ring span { color: #dbe4ef; }
.priority-table td strong { color: #b42318; }
.status-pill { background: #dcfce7; border-radius: 999px; color: #166534; display: inline-block; font-size: 12px; padding: 4px 8px; }
.status-pill.critical { background: #fee2e2; color: #991b1b; }
.productivity-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; }
.productivity-card { border: 1px solid #edf1f7; border-radius: 8px; padding: 14px; }
.productivity-card h3 { color: #172033; font-size: 17px; margin: 0 0 10px; }
.productivity-card dl { display: grid; gap: 8px; margin: 0; }
.productivity-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.productivity-card dt { color: var(--steel); font-size: 13px; }
.productivity-card dd { font-weight: 800; margin: 0; text-align: right; }
.dashboard-page .productivity-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 16px; }
.dashboard-page .productivity-card { background: #f8fafc; border: 1px solid #e4eaf2; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); padding: 16px; }
.dashboard-page .productivity-card h3 { border-bottom: 1px solid #e4eaf2; color: #172033; font-size: 18px; margin: 0 0 12px; padding-bottom: 10px; }
.dashboard-page .productivity-card dl { display: grid; gap: 9px; margin: 0; }
.dashboard-page .productivity-card dl div { align-items: center; display: flex; justify-content: space-between; gap: 12px; }
.dashboard-page .productivity-card dt { color: #64748b; font-size: 13px; }
.dashboard-page .productivity-card dd { color: #172033; font-size: 14px; font-weight: 900; margin: 0; text-align: right; }
.charge-box { background: #f8fafc; border: 1px solid #d8dee8; border-radius: 10px; margin: 10px 0; padding: 14px; }
.charge-form { display: grid; gap: 12px; }
.charge-title { align-items: baseline; display: flex; gap: 10px; justify-content: space-between; }
.charge-title strong { color: #172033; font-size: 17px; }
.charge-title span { color: #44546a; font-size: 13px; }
.charge-form label { color: #334155; display: grid; font-size: 13px; font-weight: 700; gap: 6px; }
.promise-fields { background: #eff6ff; border: 1px solid #bfdbfe; border-left: 6px solid #2563eb; border-radius: 10px; display: none; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 10px; padding: 12px; }
.promise-fields.is-visible { display: grid; }
.promise-fields h4, .promise-fields p { grid-column: 1 / -1; margin: 0; }
.promise-fields h4 { color: #172033; font-size: 17px; }
.promise-fields p { color: #475569; }
.charge-titles { border: 1px solid #e4eaf2; border-radius: 8px; padding: 10px; }
.charge-titles > strong { color: #172033; display: block; margin-bottom: 8px; }
.charge-titles > div { display: grid; gap: 4px; max-height: 160px; overflow: auto; }
.client-header { align-items: center; display: flex; justify-content: space-between; gap: 14px; }
.client-header h2 { color: #172033; margin: 0 0 6px; }
.client-header p { margin: 0; }
.client-summary { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.client-summary article { background: #fff; border: 1px solid #d8dee8; border-radius: 10px; box-shadow: 0 8px 20px rgba(15,23,42,.05); padding: 13px; }
.client-summary span { color: #64748b; display: block; font-size: 12px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; }
.client-summary strong { color: #172033; font-size: 18px; }
.tab-nav { border-bottom: 1px solid #d8dee8; display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 8px; }
.tab-nav a { background: #eef2f7; border-radius: 999px; color: #172033; font-size: 13px; font-weight: 800; padding: 8px 12px; text-decoration: none; white-space: nowrap; }
.tab-block { border-bottom: 1px solid #edf1f7; margin-bottom: 18px; padding-bottom: 18px; scroll-margin-top: 20px; }
.section-row { align-items: center; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.timeline-date { color: #64748b; font-size: 12px; font-weight: 800; padding-top: 10px; }
.timeline-body { background: #f8fafc; border: 1px solid #e4eaf2; border-left: 4px solid #0f766e; border-radius: 8px; padding: 11px; }
.timeline-body strong, .timeline-body span, .timeline-body small { display: block; }
.timeline-body span, .timeline-body small { color: #64748b; font-size: 12px; margin-top: 4px; }
.timeline-body p { margin: 8px 0; }
.wallet-filter { box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.wallet-section-title { align-items: flex-end; display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.wallet-section-title h2 { color: #172033; font-size: 20px; margin: 0 0 4px; }
.wallet-section-title p { color: #64748b; margin: 0; }
.wallet-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.wallet-filter-grid label { color: #334155; display: grid; font-size: 12px; font-weight: 800; gap: 6px; text-transform: uppercase; }
.wallet-check { align-items: center; background: #f8fafc; border: 1px solid #d8dee8; border-radius: 8px; display: flex !important; gap: 8px !important; min-height: 38px; padding: 8px 10px; text-transform: none !important; }
.wallet-summary { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wallet-summary article { background: #fff; border: 1px solid #d8dee8; border-radius: 12px; box-shadow: 0 10px 24px rgba(15,23,42,.06); padding: 14px; }
.wallet-summary span { color: #64748b; display: block; font-size: 12px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; }
.wallet-summary strong { color: #172033; font-size: 21px; }
.wallet-list { display: grid; gap: 14px; }
.wallet-client-card { background: #fff; border: 1px solid #d8dee8; border-left: 6px solid #15803d; border-radius: 14px; box-shadow: 0 12px 28px rgba(15,23,42,.07); display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(170px, .55fr) minmax(360px, 1.3fr); gap: 16px; padding: 16px; }
.wallet-green { border-left-color: #15803d; }
.wallet-yellow { border-left-color: #d6a100; }
.wallet-orange { border-left-color: #ea580c; }
.wallet-red { border-left-color: #dc2626; }
.wallet-dark { border-left-color: #1f2937; }
.wallet-client-main p { color: #64748b; margin: 5px 0 0; }
.wallet-client-title { display: grid; gap: 8px; }
.wallet-client-title a { color: #0f766e; font-size: 18px; font-weight: 900; text-decoration: none; }
.wallet-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wallet-tag { background: #eef2f7; border-radius: 999px; color: #334155; font-size: 12px; font-weight: 800; padding: 4px 8px; }
.wallet-tag.warning { background: #ffedd5; color: #9a3412; }
.wallet-tag.danger { background: #fee2e2; color: #991b1b; }
.wallet-client-money { align-content: center; background: #f8fafc; border: 1px solid #edf1f7; border-radius: 10px; display: grid; padding: 12px; }
.wallet-client-money span, .wallet-client-metrics span { color: #64748b; display: block; font-size: 11px; font-weight: 800; margin-bottom: 4px; text-transform: uppercase; }
.wallet-client-money strong { color: #b42318; font-size: 22px; }
.wallet-client-metrics { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); gap: 8px; }
.wallet-client-metrics div { background: #f8fafc; border: 1px solid #edf1f7; border-radius: 8px; padding: 9px; }
.wallet-client-metrics strong { color: #172033; font-size: 13px; }
.wallet-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; justify-content: flex-end; }
.wallet-actions .btn { min-height: 34px; }
@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .sidebar nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .metric-grid, .form-grid, .dash-kpis, .dash-grid-two, .attention-grid, .productivity-grid, .dashboard-kpi-grid, .aging-grid, .dashboard-split, .alert-card-grid, .dashboard-page .productivity-grid, .client-summary, .promise-fields, .timeline-item, .wallet-filter-grid, .wallet-summary, .wallet-client-card, .wallet-client-metrics { grid-template-columns: 1fr; }
    .client-header, .section-row { align-items: stretch; flex-direction: column; }
    .wallet-section-title { align-items: stretch; flex-direction: column; }
    .wallet-actions { justify-content: flex-start; }
    .dashboard-header { flex-direction: column; padding: 20px; }
    .dashboard-filter { align-self: stretch; min-width: 0; }
    .dashboard-kpi-wide { grid-column: auto; }
    .dash-card-featured { grid-column: auto; }
    .dash-hero, .section-title { align-items: stretch; flex-direction: column; }
    .topbar { align-items: flex-start; flex-direction: column; }
}

[data-theme="dark"] {
    --paper: #0f172a;
    --line: #334155;
    --steel: #cbd5e1;
}
[data-theme="dark"] body { background: #0f172a; color: #e5edf7; }
[data-theme="dark"] .content { background: #0f172a; }
[data-theme="dark"] .topbar h1,
[data-theme="dark"] .client-header h2,
[data-theme="dark"] .section-title h2,
[data-theme="dark"] .wallet-section-title h2,
[data-theme="dark"] .dashboard-panel-title h3,
[data-theme="dark"] .queue-filter h2,
[data-theme="dark"] .queue-panel h3,
[data-theme="dark"] .queue-promise h4,
[data-theme="dark"] .pending-toolbar h2 { color: #f8fafc; }
[data-theme="dark"] .topbar span,
[data-theme="dark"] .text-secondary,
[data-theme="dark"] .queue-filter p,
[data-theme="dark"] .queue-panel p,
[data-theme="dark"] .queue-summary span,
[data-theme="dark"] .queue-card-label,
[data-theme="dark"] .pending-toolbar p { color: #cbd5e1; }
[data-theme="dark"] .user-chip,
[data-theme="dark"] .card,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .dashboard-kpi,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .commercial-card,
[data-theme="dark"] .queue-filter,
[data-theme="dark"] .queue-summary article,
[data-theme="dark"] .queue-card,
[data-theme="dark"] .queue-bulk,
[data-theme="dark"] .pending-toolbar,
[data-theme="dark"] .pending-summary article,
[data-theme="dark"] .pending-table,
[data-theme="dark"] .table,
[data-theme="dark"] .client-panel { background: #111827; border-color: #334155; color: #e5edf7; }
[data-theme="dark"] .queue-panel,
[data-theme="dark"] .queue-check,
[data-theme="dark"] .queue-history-item,
[data-theme="dark"] .queue-empty,
[data-theme="dark"] .wallet-client-money,
[data-theme="dark"] .wallet-client-metrics div,
[data-theme="dark"] .aging-card,
[data-theme="dark"] .monthly-stats div,
[data-theme="dark"] .productivity-card { background: #162033; border-color: #334155; color: #e5edf7; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #0b1220; border-color: #334155; color: #f8fafc; }
[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-success { background: #111827; border-color: #475569; color: #e5edf7; }
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-mode select { background: #f8b400; border-color: #f8b400; color: #111827; }
[data-theme="dark"] .theme-mode span { color: #cbd5e1; }
[data-theme="dark"] .dashboard-kpi strong,
[data-theme="dark"] .commercial-card strong,
[data-theme="dark"] .queue-summary strong,
[data-theme="dark"] .queue-card strong,
[data-theme="dark"] .pending-summary strong,
[data-theme="dark"] .wallet-client-metrics strong,
[data-theme="dark"] .aging-top strong,
[data-theme="dark"] .monthly-stats strong { color: #f8fafc; }
[data-theme="dark"] .dashboard-table td,
[data-theme="dark"] .table td,
[data-theme="dark"] .pending-table td { border-color: #334155; color: #e5edf7; }
[data-theme="dark"] .dashboard-table tbody tr:nth-child(even) td,
[data-theme="dark"] .table th { background: #162033; }

.compact-recovered-table {
    font-size: 13px;
    min-width: 980px;
}

.compact-recovered-table th,
.compact-recovered-table td {
    padding: 8px 10px;
    vertical-align: top;
}

.compact-recovered-table .client-code-name {
    color: #007a78;
    font-weight: 800;
    line-height: 1.25;
}

[data-theme="dark"] .compact-recovered-table .client-code-name {
    color: #5eead4;
}

.store-select-wrap {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.store-select-card {
    width: min(920px, 100%);
    background: #ffffff;
    border: 1px solid #d7e0ec;
    border-radius: 18px;
    padding: 38px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.store-select-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e8f5f3;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.store-select-card h2 {
    margin: 0 0 8px;
    color: #10213a;
    font-size: 38px;
    line-height: 1.05;
}

.store-select-card p {
    margin: 0 0 28px;
    color: #52647d;
    font-size: 18px;
}

.store-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.store-option {
    position: relative;
    overflow: hidden;
    text-align: left;
    border: 1px solid #d7e0ec;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px;
    cursor: pointer;
    min-height: 190px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.store-option::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: #ffc400;
}

.store-option-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #1f2d86;
    color: #ffc400;
    font-size: 22px;
    font-weight: 900;
}

.store-option strong {
    display: block;
    margin-bottom: 8px;
    color: #10213a;
    font-size: 28px;
    line-height: 1.05;
}

.store-option small {
    display: block;
    min-height: 42px;
    margin-bottom: 18px;
    color: #52647d;
    font-size: 14px;
    line-height: 1.35;
}

.store-option span {
    color: #0f766e;
    font-weight: 800;
}

.store-option .store-option-mark {
    color: #ffc400;
}

.store-option:hover {
    transform: translateY(-2px);
    border-color: #1f2d86;
    background: #edfdf8;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

@media (max-width: 760px) {
    .store-option-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        gap: 12px;
    }
}

[data-theme="dark"] .store-select-card,
[data-theme="dark"] .store-option {
    background: #142238;
    border-color: #31415f;
    color: #e5eefb;
}

[data-theme="dark"] .store-select-card p,
[data-theme="dark"] .store-option small {
    color: #a7b4c8;
}

[data-theme="dark"] .store-select-card h2,
[data-theme="dark"] .store-option strong {
    color: #f8fafc;
}
