:root{--deep-red:#9e1b1e;--orange-red:#de3a1e;--black:#111;--gray-900:#1a1a1a;--gray-700:#4a4a4a;--gray-500:#767676;--gray-300:#d9d9d9;--gray-200:#e8e8e8;--gray-100:#f4f4f4;--white:#fff;--sidebar-width:240px;--radius:8px;--shadow:0 1px 3px #00000014, 0 1px 2px #0000000f}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--gray-100);color:var(--gray-900);-webkit-font-smoothing:antialiased;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}a{color:var(--deep-red);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit}.app-shell{min-height:100vh;display:flex}.sidebar{width:var(--sidebar-width);background:var(--black);color:var(--white);flex-direction:column;flex-shrink:0;padding:20px 0;display:flex}.sidebar-brand{border-bottom:1px solid #ffffff1f;margin-bottom:12px;padding:0 20px 20px}.sidebar-brand .brand-title{color:var(--white);letter-spacing:.2px;font-size:17px;font-weight:700}.sidebar-brand .brand-sub{color:var(--orange-red);text-transform:uppercase;letter-spacing:.6px;margin-top:2px;font-size:11px}.sidebar-nav{flex-direction:column;gap:2px;padding:0 10px;display:flex}.sidebar-link{border-radius:var(--radius);color:#ffffffbf;align-items:center;gap:10px;padding:10px 12px;font-size:14px;font-weight:500;display:flex}.sidebar-link:hover{color:var(--white);background:#ffffff0f;text-decoration:none}.sidebar-link.active{background:var(--deep-red);color:var(--white)}.main-area{flex-direction:column;flex:1;min-width:0;display:flex}.topbar{background:var(--white);border-bottom:1px solid var(--gray-200);flex-shrink:0;justify-content:space-between;align-items:center;height:60px;padding:0 28px;display:flex}.topbar h1{color:var(--gray-900);margin:0;font-size:18px;font-weight:700}.topbar .env-pill{color:var(--deep-red);text-transform:uppercase;letter-spacing:.4px;background:#fbeaea;border:1px solid #f3caca;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:600}.page-content{flex:1;min-width:0;padding:28px}.kpi-grid{flex-wrap:wrap;gap:16px;margin-bottom:28px;display:flex}.kpi-card{background:var(--white);border-radius:var(--radius);border:1px solid var(--gray-200);border-left:4px solid var(--deep-red);cursor:default;flex:220px;padding:20px 24px;transition:all .2s;box-shadow:0 2px 8px #0000000f}.kpi-card:hover{border-left-color:var(--orange-red);transform:translateY(-1px);box-shadow:0 4px 16px #9e1b1e14}.kpi-card .kpi-label{color:var(--gray-500);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px;font-size:11px;font-weight:700;display:block}.kpi-card .kpi-value{color:var(--gray-900);letter-spacing:-.5px;margin-bottom:6px;font-size:28px;font-weight:800;line-height:1.2}.kpi-card .kpi-sub{color:var(--gray-500);font-size:12px;line-height:1.4}.panel{background:var(--white);border-radius:var(--radius);border:1px solid var(--gray-200);margin-bottom:20px;padding:24px;box-shadow:0 2px 8px #0000000f}.panel-title{color:var(--gray-900);letter-spacing:-.3px;margin:0 0 16px;font-size:16px;font-weight:800}.filters-bar{flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:16px;display:flex}.filters-bar input[type=text],.filters-bar select{border:1px solid var(--gray-300);background:var(--white);color:var(--gray-900);border-radius:6px;padding:8px 10px;font-size:13px}.filters-bar input[type=text]{min-width:220px}.filters-bar .clear-btn{border:1px solid var(--gray-300);background:var(--white);color:var(--gray-700);cursor:pointer;border-radius:6px;padding:8px 12px;font-size:13px}.filters-bar .clear-btn:hover{background:var(--gray-100)}.table-wrap{overflow-x:auto}table.data-table{border-collapse:collapse;width:100%;font-size:13px}.data-table thead th{text-align:left;text-transform:uppercase;letter-spacing:.4px;color:var(--white);background:var(--deep-red);white-space:nowrap;padding:10px 12px;font-size:11px;font-weight:700;position:sticky;top:0}.data-table thead th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.data-table tbody td{border-bottom:1px solid var(--gray-200);color:var(--gray-900);white-space:nowrap;padding:10px 12px}.data-table tbody tr:hover{background:var(--gray-100)}.data-table tbody tr.clickable{cursor:pointer}.cell-muted{color:var(--gray-500)}.cell-strong{font-weight:600}.badge{text-transform:uppercase;letter-spacing:.3px;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:700;display:inline-block}.badge-paid{color:#1e7a34;background:#e6f4ea}.badge-open{color:#3a4a63;background:#eef1f6}.badge-overdue{color:var(--deep-red);background:#fdeceb}.badge-defaulted{background:var(--deep-red);color:var(--white)}.badge-partial{color:#a35b00;background:#fff4e5}.badge-neutral{background:var(--gray-200);color:var(--gray-700)}.badge-risk-critical,.badge-priority-p1{background:var(--deep-red);color:var(--white)}.badge-risk-high,.badge-priority-p2{color:#b8500f;background:#fdece3}.badge-risk-medium,.badge-priority-p3{color:#8a6d00;background:#fff6db}.badge-risk-low,.badge-priority-p4{color:#1e7a34;background:#e6f4ea}.badge-agent{background:var(--deep-red);color:var(--white)}.pagination{color:var(--gray-700);justify-content:space-between;align-items:center;margin-top:14px;font-size:13px;display:flex}.pagination .pager-btns{gap:6px;display:flex}.pagination button{border:1px solid var(--gray-300);background:var(--white);cursor:pointer;border-radius:6px;padding:6px 12px;font-size:13px}.pagination button:disabled{opacity:.4;cursor:not-allowed}.pagination button:not(:disabled):hover{border-color:var(--deep-red);color:var(--deep-red)}.state-box{text-align:center;color:var(--gray-500);padding:40px 20px;font-size:14px}.state-box.error{color:var(--deep-red)}.breadcrumb{color:var(--gray-500);margin-bottom:10px;font-size:13px}.breadcrumb a{color:var(--gray-500)}.breadcrumb a:hover{color:var(--deep-red)}.detail-grid{flex-wrap:wrap;gap:16px;display:flex}.detail-grid>.panel{flex:320px;min-width:0}.field-row{border-bottom:1px solid var(--gray-200);justify-content:space-between;padding:8px 0;font-size:13px;display:flex}.field-row:last-child{border-bottom:none}.field-row .field-label{color:var(--gray-500)}.field-row .field-value{color:var(--gray-900);font-weight:600}.tabs{border-bottom:1px solid var(--gray-200);gap:4px;margin-bottom:16px;display:flex}.tab-btn{color:var(--gray-500);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:10px 16px;font-size:13px;font-weight:600}.tab-btn.active{color:var(--deep-red);border-bottom-color:var(--deep-red)}.detail-header{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px;display:flex}.detail-header h2{margin:0 0 4px;font-size:22px}.detail-header .detail-sub{color:var(--gray-500);font-size:13px}.pill-row{flex-wrap:wrap;gap:8px;display:flex}.driver-row{border-bottom:1px solid var(--gray-200);padding:10px 0}.driver-row:last-child{border-bottom:none}.driver-top{justify-content:space-between;margin-bottom:4px;font-size:13px;display:flex}.driver-label{color:var(--gray-900);font-weight:600}.driver-points{color:var(--deep-red);font-weight:700}.driver-bar-track{background:var(--gray-200);border-radius:4px;height:6px;margin-bottom:4px;overflow:hidden}.driver-bar-fill{background:var(--orange-red);border-radius:4px;height:100%;display:block}.driver-evidence{color:var(--gray-500);font-size:12px}.action-card-evidence{color:var(--gray-500);background:var(--gray-100);border-radius:6px;margin:8px 0;padding:8px 10px;font-size:12px}.btn-approve{cursor:pointer;color:var(--white);background:#1e7a34;border:none;border-radius:6px;padding:7px 16px;font-size:13px;font-weight:600}.btn-approve:hover{background:#166028}.btn-approve:disabled{opacity:.5;cursor:not-allowed}.btn-draft-action{border:1px solid var(--deep-red);background:var(--white);color:var(--deep-red);cursor:pointer;white-space:nowrap;border-radius:6px;padding:5px 12px;font-size:12px;font-weight:600}.btn-draft-action:hover{background:#fdeceb}.btn-draft-action:disabled{opacity:.5;cursor:not-allowed}.page-intro{color:var(--gray-700);max-width:760px;margin:-6px 0 18px;font-size:13.5px;line-height:1.6}.chat-panel{background:var(--white);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;display:flex;overflow:hidden}.chat-panel-page{height:calc(100vh - 116px);min-height:480px}.chat-panel-widget{width:380px;height:560px;max-height:calc(100vh - 100px)}.chat-panel-header{background:var(--black);color:var(--white);flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:12px;padding:14px 18px;display:flex}.chat-panel-title{font-size:15px;font-weight:700}.chat-panel-title:before{content:"";background:var(--orange-red);border-radius:50%;width:8px;height:8px;margin-right:8px;display:inline-block}.chat-panel-context{color:#ffffffa6;margin-top:3px;font-size:12px}.chat-panel-header-actions{flex-shrink:0;align-items:center;gap:6px;display:flex}.chat-clear-btn,.chat-close-btn{color:var(--white);cursor:pointer;background:#ffffff1a;border:none;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600}.chat-clear-btn:hover,.chat-close-btn:hover{background:#fff3}.chat-close-btn{padding:5px 9px}.chat-messages{background:var(--gray-100);flex-direction:column;flex:1;gap:4px;padding:16px 18px;display:flex;overflow-y:auto}.chat-empty{text-align:center;color:var(--gray-700);margin:auto 0}.chat-empty p{max-width:320px;margin:0 auto 16px;font-size:13px;line-height:1.5}.chat-suggestions{flex-direction:column;align-items:center;gap:8px;display:flex}.chat-suggestions button{border:1px solid var(--gray-300);background:var(--white);color:var(--gray-900);cursor:pointer;border-radius:999px;max-width:300px;padding:7px 14px;font-size:12px}.chat-suggestions button:hover{border-color:var(--deep-red);color:var(--deep-red)}.chat-bubble-row{margin:6px 0;display:flex}.chat-bubble-row.user{justify-content:flex-end}.chat-bubble-row.assistant{justify-content:flex-start}.chat-bubble{max-width:82%;box-shadow:var(--shadow);border-radius:14px;padding:10px 14px;font-size:13.5px;line-height:1.5}.chat-bubble.user{background:var(--deep-red);color:var(--white);border-bottom-right-radius:4px}.chat-bubble.assistant{background:var(--white);color:var(--gray-900);border-bottom-left-radius:4px}.chat-bubble.assistant.error{color:var(--deep-red);background:#fdeceb}.chat-bubble-text{white-space:pre-wrap;word-break:break-word;line-height:1.6}.chat-bubble-text strong{font-weight:700}.chat-bubble-meta{flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;display:flex}.chat-action-link{font-size:12px;font-weight:600}.chat-typing{align-items:center;gap:4px;padding:4px 0;display:inline-flex}.chat-typing span{background:var(--gray-500);border-radius:50%;width:6px;height:6px;animation:1.2s ease-in-out infinite chat-typing-bounce}.chat-typing span:nth-child(2){animation-delay:.15s}.chat-typing span:nth-child(3){animation-delay:.3s}@keyframes chat-typing-bounce{0%,60%,to{opacity:.5;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.chat-input-bar{border-top:1px solid var(--gray-200);background:var(--white);flex-shrink:0;gap:8px;padding:12px 14px;display:flex}.chat-input-bar input{border:1px solid var(--gray-300);color:var(--gray-900);border-radius:999px;flex:1;padding:9px 16px;font-size:13.5px}.chat-input-bar input:focus{border-color:var(--deep-red);outline:none}.chat-input-bar button{background:var(--deep-red);color:var(--white);cursor:pointer;border:none;border-radius:999px;padding:9px 20px;font-size:13px;font-weight:700}.chat-input-bar button:hover:not(:disabled){background:var(--orange-red)}.chat-input-bar button:disabled{opacity:.5;cursor:not-allowed}.chat-response-structured{flex-direction:column;gap:12px;display:flex}.response-summary{color:var(--gray-900);border-bottom:2px solid var(--gray-200);word-break:break-word;white-space:normal;margin-bottom:12px;padding-bottom:12px;font-size:14px;font-weight:500;line-height:1.6}.response-summary strong{color:var(--gray-900);font-weight:700}.response-draft{background:var(--gray-50);border:1px solid var(--gray-200);border-left:4px solid var(--deep-red);border-radius:var(--radius);padding:12px 14px}.response-draft-label{color:var(--deep-red);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px;font-size:11px;font-weight:700}.response-draft-body{color:var(--gray-900);word-break:break-word;font-family:Georgia,Times New Roman,serif;font-size:13px;line-height:1.6}.draft-subject{color:var(--gray-900);border-bottom:1px solid var(--gray-200);margin-bottom:10px;padding-bottom:10px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;font-weight:600}.draft-subject-label{color:var(--gray-500);text-transform:uppercase;letter-spacing:.4px;margin-right:6px;font-size:11px;font-weight:700}.draft-paragraph{margin:0 0 10px}.draft-paragraph:last-child{margin-bottom:0}.draft-list{margin:0 0 10px;padding-left:20px}.draft-list:last-child{margin-bottom:0}.draft-list li{margin-bottom:4px}.draft-list li:last-child{margin-bottom:0}.draft-history{border-top:1px solid var(--gray-200);margin-top:18px;padding-top:16px}.draft-history-title{color:var(--gray-500);text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px;font-size:12px;font-weight:700}.draft-history-list{flex-direction:column;gap:8px;display:flex}.draft-history-item{border:1px solid var(--gray-200);border-radius:var(--radius);overflow:hidden}.draft-history-header{background:var(--gray-50);cursor:pointer;text-align:left;width:100%;font:inherit;color:inherit;border:none;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;display:flex}.draft-history-header-main{align-items:center;gap:8px;min-width:0;display:flex}.draft-history-chevron{color:var(--gray-500);flex-shrink:0;transition:transform .15s;display:inline-block}.draft-history-chevron.open{transform:rotate(90deg)}.draft-history-summary{white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:600;overflow:hidden}.draft-history-header-meta{flex-shrink:0;align-items:center;gap:10px;display:flex}.draft-history-date{color:var(--gray-500);font-size:12px}.draft-history-delete{color:var(--gray-500);border-radius:4px;padding:2px 6px;font-size:12px;font-weight:600}.draft-history-delete:hover{color:var(--deep-red);background:var(--gray-100,var(--gray-200))}.draft-history-delete-error{color:var(--deep-red);border-top:1px solid var(--gray-200);padding:8px 12px;font-size:12px}.draft-history-body{border-top:1px solid var(--gray-200);padding:12px}.response-section{border-left:4px solid var(--deep-red);flex-direction:column;gap:8px;margin:6px 0;padding:10px 0 10px 12px;display:flex}.response-section-title{color:var(--deep-red);letter-spacing:.3px;text-transform:capitalize;margin-bottom:6px;font-size:13px;font-weight:700}.response-items{flex-direction:column;gap:8px;display:flex}.response-item{flex-direction:column;gap:4px;font-size:13px;display:flex}.item-label{color:var(--gray-900);text-transform:capitalize;font-size:13px;font-weight:600}.item-label.highlight{color:var(--deep-red);font-weight:700}.item-value{color:var(--gray-700);word-break:break-word;border-left:2px solid var(--gray-300);padding-left:8px;font-size:13px;line-height:1.5}.item-source{color:var(--gray-500);margin-top:2px;font-size:11px;font-style:italic}.copilot-widget{z-index:1000;flex-direction:column;align-items:flex-end;gap:14px;display:flex;position:fixed;bottom:24px;right:24px}.copilot-launcher{background:var(--deep-red);color:var(--white);cursor:pointer;border:none;border-radius:999px;align-items:center;gap:9px;padding:13px 20px;font-size:14px;font-weight:700;display:flex;box-shadow:0 4px 14px #9e1b1e59}.copilot-launcher:hover{background:var(--orange-red)}.copilot-launcher-dot{background:var(--white);border-radius:50%;width:8px;height:8px;display:inline-block}.copilot-widget-panel{animation:.15s ease-out copilot-widget-pop}@keyframes copilot-widget-pop{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@media (width<=480px){.chat-panel-widget{width:calc(100vw - 32px);height:calc(100vh - 140px)}.copilot-widget{align-items:stretch;bottom:16px;left:16px;right:16px}}.section-divider{background:linear-gradient(90deg, transparent, var(--gray-300), transparent);height:1px;margin:32px 0}.priority-summary{margin-bottom:28px}.priority-summary h3{color:var(--gray-900);letter-spacing:-.3px;margin:0 0 8px;font-size:18px;font-weight:700}.priority-summary>p{color:var(--gray-600);margin:0 0 18px;font-size:14px;line-height:1.5}.priority-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;display:grid}.priority-bracket{background:var(--white);border-radius:var(--radius);border:1px solid var(--gray-200);border-left:5px solid var(--deep-red);cursor:pointer;padding:20px;transition:all .2s;box-shadow:0 2px 8px #0000000f}.priority-bracket:hover{transform:translateY(-2px);box-shadow:0 8px 24px #0000001f}.bracket-header{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.bracket-band{letter-spacing:-.3px;font-size:15px;font-weight:700}.bracket-count{color:var(--deep-red);font-size:24px;font-weight:800;line-height:1}.bracket-amount{color:var(--gray-900);letter-spacing:-.3px;margin-bottom:10px;font-size:16px;font-weight:700}.bracket-reason{color:var(--gray-600);font-size:12px;line-height:1.4}.cell-number{text-align:right;color:var(--gray-700);font-weight:500}.cell-highlight{color:var(--deep-red);font-weight:600}.aging-stacked-bar{background:var(--gray-100);border-radius:var(--radius);width:100%;height:24px;margin-bottom:20px;display:flex;overflow:hidden}.aging-segment{transition:opacity .2s}.aging-segment:hover{opacity:.8}.aging-legend{flex-direction:column;gap:12px;display:flex}.aging-legend-item{align-items:center;gap:12px;display:flex}.aging-color{border-radius:4px;flex-shrink:0;width:20px;height:20px}.aging-info{flex:1}.aging-label{color:var(--gray-900);margin-bottom:2px;font-size:13px;font-weight:600}.aging-desc{color:var(--gray-500);margin-left:4px;font-size:12px;font-weight:400}.aging-amount{color:var(--gray-700);justify-content:space-between;align-items:center;font-size:14px;display:flex}.aging-percent{color:var(--deep-red);margin-left:8px;font-size:13px;font-weight:700}.top-customers-table{border:1px solid var(--gray-200);border-radius:var(--radius);flex-direction:column;gap:0;display:flex;overflow-x:auto}.table-header{background:var(--gray-100);border-bottom:1px solid var(--gray-200);color:var(--gray-700);text-transform:uppercase;letter-spacing:.5px;grid-template-columns:minmax(110px,1.3fr) 96px 104px 90px 56px;gap:6px;min-width:470px;padding:10px 12px;font-size:10px;font-weight:700;display:grid}.table-row{border-bottom:1px solid var(--gray-200);cursor:pointer;grid-template-columns:minmax(110px,1.3fr) 96px 104px 90px 56px;align-items:center;gap:6px;min-width:470px;padding:10px 12px;transition:background .2s;display:grid}.table-row:hover{background:var(--gray-50)}.table-row:last-child{border-bottom:none}.col-name{flex-direction:column;gap:1px;min-width:0;display:flex}.customer-id{color:var(--gray-500);text-transform:uppercase;letter-spacing:.5px;white-space:nowrap;text-overflow:ellipsis;font-size:10px;font-weight:700;overflow:hidden}.customer-name{color:var(--gray-900);white-space:nowrap;text-overflow:ellipsis;font-size:11px;font-weight:600;overflow:hidden}.col-risk,.col-priority{justify-content:center;align-items:center;min-width:0;display:flex}.col-risk .badge,.col-priority .badge{white-space:normal;text-align:center;padding:3px 6px;font-size:10px;line-height:1.3}.col-overdue{text-align:right}.overdue-amount{color:var(--deep-red);white-space:nowrap;font-size:12px;font-weight:700}.overdue-ratio{color:var(--gray-500);white-space:nowrap;margin-top:1px;font-size:10px}.col-score{text-align:center}.risk-score{color:var(--deep-red);background:var(--gray-100);text-align:center;border-radius:4px;min-width:40px;padding:4px 8px;font-size:14px;font-weight:700}
