.credit-analysis-panel {
  min-height: calc(100vh - 72px);
  padding: clamp(16px, 2vw, 30px);
  color: #1b2b3c;
  background: #edf4f7;
}
.ca-header { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:0 auto 20px; max-width:1600px; }
.ca-header h1 { margin:0; font-size:clamp(23px,3vw,32px); }
.ca-eyebrow { margin:0 0 5px; color:#71839a; font-size:10px; font-weight:800; letter-spacing:.12em; }
.ca-subtitle { margin:6px 0 0; color:#61748a; font-size:13px; }
.ca-primary,.ca-secondary,.ca-actions button { border:1px solid #b8d0df; border-radius:10px; padding:10px 15px; background:#fff; color:#075f80; font-weight:700; cursor:pointer; }
.ca-primary { border-color:#00658a; background:#00658a; color:#fff; }
.ca-primary:disabled,.ca-actions button:disabled { cursor:not-allowed; opacity:.45; }
.ca-filters { display:grid; grid-template-columns:minmax(200px,2fr) repeat(7,minmax(115px,1fr)); gap:9px; max-width:1600px; margin:0 auto 14px; padding:12px; border:1px solid #d4e2ea; border-radius:14px; background:#fff; }
.ca-filters label,.ca-form-grid>label { display:grid; gap:5px; color:#667b8f; font-size:11px; font-weight:700; }
.ca-filters input,.ca-filters select,.ca-form-grid input,.ca-form-grid select,.ca-form-grid textarea,.ca-comment-form input { width:100%; min-height:39px; box-sizing:border-box; border:1px solid #c8d7e2; border-radius:9px; padding:8px 10px; color:#203248; background:#fff; font:inherit; }
.ca-search { display:flex!important; align-items:center; gap:9px!important; padding:0 10px; border:1px solid #c8d7e2; border-radius:10px; }
.ca-search input { border:0; outline:0; }
.ca-list-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:1580px; margin:17px auto 9px; color:#64788d; font-size:12px; }
.ca-status-tabs { display:flex; align-items:center; gap:6px; }
.ca-status-tabs button { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:5px 11px; border:1px solid #bfd3df; border-radius:999px; background:#fff; color:#075f80; font:inherit; font-weight:700; cursor:pointer; }
.ca-status-tabs button span { display:grid; min-width:20px; height:20px; padding:0 5px; place-items:center; border-radius:999px; background:#edf4f8; color:#49657c; font-size:10px; }
.ca-status-tabs button.active { border-color:#00658a; background:#00658a; color:#fff; }
.ca-status-tabs button.active span { background:#ffffff30; color:#fff; }
.ca-list { display:grid; gap:7px; max-width:1600px; margin:auto; }
.ca-row { display:flex; align-items:center; gap:12px; width:100%; min-height:62px; padding:10px 14px; border:1px solid #d4e1e9; border-radius:14px; background:#fff; text-align:left; cursor:pointer; box-shadow:0 2px 4px #17324d0a; }
.ca-row:hover { border-color:#86b9d0; box-shadow:0 4px 14px #16486612; }
.ca-avatar { display:grid; flex:none; width:34px; height:34px; place-items:center; border-radius:50%; background:#00658a; color:#fff; font-size:11px; font-weight:800; }
.ca-row-main { display:grid; min-width:0; flex:1; gap:4px; }
.ca-row-main strong { overflow:hidden; color:#12283c; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.ca-row-main small { overflow:hidden; color:#667b8e; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.ca-row-meta { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; color:#5b7188; font-size:11px; }
.ca-badge { padding:3px 8px; border:1px solid #c6d9e5; border-radius:7px; background:#f2f7fa; color:#48647e; white-space:nowrap; }
.ca-badge.inprogress { border-color:#9ed7ff; background:#eaf7ff; color:#0079ba; }
.ca-badge.resolved { background:#edf8f0; color:#287b42; }
.ca-badge.cancelled { background:#fff1f0; color:#ab4037; }
.ca-badge.priority { color:#075c99; }
.ca-empty,.ca-loading { display:grid; min-height:160px; place-content:center; padding:24px; border:1px dashed #c3d6e1; border-radius:14px; color:#647b91; background:#fff; text-align:center; }
.ca-error { color:#8d3631; }
.ca-message { max-width:1560px; margin:0 auto 12px; padding:10px 13px; border-radius:9px; background:#e7f5fb; color:#075c80; font-size:13px; }
.ca-message.is-error { background:#fff1f0; color:#9b3730; }
.ca-message.hidden { display:none; }
.ca-reminders { max-width:1600px; margin:0 auto 12px; padding:12px; border:1px solid #cfdae4; border-radius:12px; background:#fff; color:#344c61; font-size:12px; }
.ca-reminders>strong { display:block; margin-bottom:8px; }
.ca-reminders article { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; border-top:1px solid #e7edf1; }
.ca-reminders article.unread { background:#f5fbfe; }
.ca-reminders article div { display:grid; gap:3px; }
.ca-reminders article span,.ca-reminders article time { color:#6d8092; }
.ca-reminders article button { flex:none; border:1px solid #bdd1de; border-radius:8px; padding:6px 9px; background:#fff; color:#075f80; cursor:pointer; font-size:11px; }
.ca-fab { display:none; }
.ca-dialog { width:min(690px,calc(100vw - 28px)); max-height:90vh; padding:0; border:1px solid #cddce6; border-radius:17px; color:#1a2d40; box-shadow:0 20px 70px #09263c40; }
.ca-dialog::backdrop { background:#12263866; backdrop-filter:blur(2px); }
.ca-dialog form { display:flex; flex-direction:column; max-height:90vh; }
.ca-dialog header { display:flex; align-items:center; justify-content:space-between; padding:19px 22px 12px; border-bottom:1px solid #e2ebf0; }
.ca-dialog h2 { margin:0; font-size:21px; }
.ca-dialog header button { width:36px; height:36px; border:1px solid #cad8e2; border-radius:9px; background:#fff; color:#426780; font-size:22px; cursor:pointer; }
.ca-dialog-body { overflow:auto; padding:17px 22px; }
.ca-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.ca-wide { grid-column:1 / -1; }
.ca-check { display:flex!important; align-items:center; gap:8px!important; color:#324b61!important; font-weight:600!important; }
.ca-check input { width:auto!important; min-height:0!important; }
.ca-check-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 12px; padding:10px; border:1px solid #d5e2e9; border-radius:10px; }
.ca-date-shortcuts { display:flex; flex-wrap:wrap; gap:5px; margin-top:3px; }
.ca-date-shortcuts button { border:1px solid #d0e0e9; border-radius:7px; padding:5px 7px; background:#f8fbfd; color:#17698a; cursor:pointer; font-size:10px; font-weight:650; }
.ca-dialog footer { display:flex; justify-content:flex-end; gap:9px; padding:12px 22px 18px; border-top:1px solid #e2ebf0; }
.ca-dialog .ca-message { margin-bottom:12px; }
.ca-hint { grid-column:1/-1; margin:0; color:#6b7d90; font-size:12px; }
.ca-detail { position:fixed; z-index:1200; inset:0 0 0 auto; display:flex; flex-direction:column; width:min(680px,100vw); background:#fff; box-shadow:-18px 0 54px #17334d2b; transform:translateX(105%); transition:transform .2s ease; }
.ca-detail.is-open { transform:translateX(0); }
.ca-detail-head { display:flex; align-items:center; gap:13px; padding:18px; border-bottom:1px solid #d9e4eb; }
.ca-detail-head h2 { margin:0 0 8px; font-size:18px; }
.ca-detail-meta { display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:#687b8d; font-size:11px; }
.ca-tabs { display:flex; gap:7px; padding:11px 18px; border-bottom:1px solid #e1e9ef; }
.ca-tabs button { padding:8px 13px; border:1px solid #c4d5df; border-radius:9px; background:#fff; color:#075f80; font-weight:700; cursor:pointer; }
.ca-tabs button.active { border-color:#00658a; background:#00658a; color:#fff; }
.ca-detail-content { overflow:auto; flex:1; padding:18px; }
.ca-data-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; margin:0; }
.ca-data-tools { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.ca-data-grid div { padding:11px 0; border-bottom:1px solid #e8eef2; }
.ca-data-grid dt { margin-bottom:4px; color:#74869a; font-size:11px; }
.ca-data-grid dd { margin:0; color:#1e3448; font-size:13px; font-weight:650; overflow-wrap:anywhere; }
.ca-detail-content h3 { margin:22px 0 10px; font-size:14px; }
.ca-timeline { display:grid; gap:10px; padding-left:20px; color:#647a8e; font-size:12px; }
.ca-timeline li { padding-left:3px; }
.ca-timeline strong,.ca-timeline time { margin-right:10px; color:#244258; }
.ca-timeline span { display:block; margin-top:4px; }
.ca-conversation { display:grid; gap:10px; }
.ca-conversation article { padding:12px; border:1px solid #deeaef; border-radius:11px; background:#f8fbfc; }
.ca-conversation article strong { margin-right:9px; color:#244156; }
.ca-conversation time { color:#798b9c; font-size:11px; }
.ca-conversation p { margin:8px 0 0; white-space:pre-wrap; font-size:13px; }
.ca-comment-form { display:flex; gap:8px; margin-top:14px; }
.ca-comment-form input { flex:1; }
.ca-table-wrap { overflow:auto; }
.ca-times { width:100%; border-collapse:collapse; font-size:12px; }
.ca-times th,.ca-times td { padding:10px 8px; border-bottom:1px solid #e3ebf0; text-align:left; white-space:nowrap; }
.ca-times th { color:#70849a; font-size:11px; }
.ca-time-panel { display:grid; gap:20px; }
.ca-time-section { min-width:0; }
.ca-time-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:11px; }
.ca-time-section-head h3 { margin:0 0 4px; color:#18344a; font-size:15px; }
.ca-time-section-head p { margin:0; max-width:850px; color:#6b8093; font-size:12px; line-height:1.5; }
.ca-time-status { flex:none; padding:5px 9px; border:1px solid #b9d9c3; border-radius:999px; background:#eff9f1; color:#287b42; font-size:11px; font-weight:750; }
.ca-time-status.is-closed { border-color:#cbd8e0; background:#f3f7f9; color:#586f81; }
.ca-sla-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.ca-sla-card { display:grid; align-content:start; gap:7px; min-width:0; padding:14px; border:1px solid #d4e2ea; border-radius:12px; background:linear-gradient(145deg,#fff,#f6fafc); }
.ca-sla-card>span { color:#62798c; font-size:11px; font-weight:700; }
.ca-sla-card>strong { color:#075f80; font-size:clamp(18px,2vw,24px); line-height:1.15; overflow-wrap:anywhere; }
.ca-sla-card>small { color:#8293a1; font-size:10px; line-height:1.4; }
.ca-trace-list { position:relative; display:grid; gap:0; margin:0; padding:0; list-style:none; }
.ca-trace-list::before { position:absolute; top:17px; bottom:18px; left:8px; width:2px; background:#d9e7ee; content:""; }
.ca-trace-item { position:relative; display:grid; grid-template-columns:18px minmax(0,1fr); gap:10px; padding-bottom:10px; }
.ca-trace-marker { z-index:1; width:10px; height:10px; margin:14px 0 0 4px; border:2px solid #fff; border-radius:50%; background:#087296; box-shadow:0 0 0 1px #087296; }
.ca-trace-card { min-width:0; padding:11px 13px; border:1px solid #dce7ed; border-radius:10px; background:#fff; }
.ca-trace-top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.ca-trace-top strong { color:#203c51; font-size:12px; }
.ca-trace-top time { flex:none; color:#70869a; font-size:10px; }
.ca-trace-meta { display:flex; flex-wrap:wrap; gap:5px 14px; margin-top:5px; color:#71869a; font-size:10px; }
.ca-trace-card p { margin:7px 0 0; color:#465f73; font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.ca-periods { overflow:hidden; border:1px solid #d5e2e9; border-radius:11px; background:#fff; }
.ca-periods summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; color:#175676; font-size:13px; font-weight:750; cursor:pointer; }
.ca-periods summary span { color:#697e90; font-size:11px; font-weight:600; }
.ca-periods[open] summary { border-bottom:1px solid #e3edf2; background:#f5fafc; }
.ca-period-list { display:grid; }
.ca-period-card { display:grid; grid-template-columns:1.1fr 1fr 1fr .8fr; gap:12px; padding:11px 14px; border-bottom:1px solid #e6edf1; }
.ca-period-card:last-child { border-bottom:0; }
.ca-period-card>div { display:grid; align-content:start; gap:4px; min-width:0; }
.ca-period-card>div span { color:#74899a; font-size:10px; }
.ca-period-card>div strong { color:#2c465a; font-size:11px; overflow-wrap:anywhere; }
.ca-time-footnote { margin:0; color:#71869a; font-size:11px; }
.ca-time-footnote strong { color:#38566d; }
.ca-actions { display:flex; flex-wrap:wrap; gap:7px; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid #dde7ed; background:#f9fbfc; }
.ca-actions button { padding:8px 10px; font-size:12px; }
.ca-actions button.ca-danger { color:#a82d2d; border-color:#dfaaa5; background:#fff7f6; }
.ca-actions button.ca-danger:hover { background:#ffe9e6; }
body.global-shell-active #creditAnalysisPanel { box-sizing:border-box; width:calc(100% - 280px); max-width:calc(100% - 280px); min-height:100vh; margin-left:280px; padding:24px 30px; }
@media (max-width:950px) { .ca-filters { grid-template-columns:repeat(3,minmax(0,1fr)); } .ca-search { grid-column:1/-1; } }
@media (max-width:620px) {
  .credit-analysis-panel { min-height:100vh; padding:14px 10px 76px; }
  .ca-header { align-items:flex-start; margin-bottom:12px; }
  .ca-header>.ca-primary { display:none; }
  .ca-subtitle { max-width:240px; font-size:11px; }
  .ca-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:9px; }
  .ca-search { grid-column:1/-1; }
  .ca-row { align-items:flex-start; padding:10px; }
  .ca-row-meta { justify-content:flex-start; gap:5px; font-size:10px; }
  .ca-row-main strong { white-space:normal; font-size:12px; }
  .ca-row-main small { white-space:normal; }
  .ca-fab { position:fixed; z-index:10; right:17px; bottom:25px; display:grid; width:55px; height:55px; place-items:center; border:0; border-radius:50%; background:#00658a; color:#fff; font-size:30px; box-shadow:0 6px 22px #00658a55; }
  .ca-form-grid,.ca-data-grid { grid-template-columns:1fr; }
  .ca-wide { grid-column:auto; }
  .ca-check-list { grid-template-columns:1fr; }
  .ca-detail { top:0; width:100vw; }
  .ca-actions { gap:5px; }
}
@media (max-width:768px) {
  body.global-shell-active #creditAnalysisPanel { width:100%; max-width:100%; min-height:100vh; margin-left:0; padding:12px 12px calc(82px + env(safe-area-inset-bottom)); }
}

/* Alineación visual con Tareas 360 */
.ca-filters {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  padding:10px;
  border-radius:13px;
}
.ca-filters label:not(.ca-search) {
  display:flex;
  align-items:center;
  min-width:0;
  min-height:42px;
  gap:7px;
  padding:0 10px;
  border:1px solid #c8d7e2;
  border-radius:10px;
  background:#fff;
  font-size:12px;
  font-weight:500;
}
.ca-filter-name { flex:none; color:#71839a; white-space:nowrap; }
.ca-filters input:not([type="search"]),.ca-filters select {
  width:auto!important;
  flex:1 1 0;
  min-width:0;
  min-height:38px;
  padding:6px 2px;
  margin:0!important;
  border:0!important;
  border-radius:0;
  background:transparent!important;
  box-shadow:none!important;
  outline-color:#83bbd3;
  font-size:12px;
}
.ca-search { grid-column:span 2; min-height:42px; }
.ca-header>.ca-primary { display:none; }
#creditAnalysisPanel button.ca-fab {
  position:fixed;
  z-index:1100;
  right:24px;
  bottom:24px;
  display:grid;
  width:56px;
  height:56px;
  place-items:center;
  border:0!important;
  border-radius:50%!important;
  background:#005a82!important;
  color:#fff!important;
  font-size:31px;
  line-height:1;
  box-shadow:0 6px 22px #005a8255;
  cursor:pointer;
}
.ca-dialog {
  width:min(650px,calc(100vw - 28px));
  max-height:min(760px,calc(100dvh - 40px));
  border-radius:22px;
  overflow:hidden;
}
.ca-dialog form { min-height:0; max-height:min(760px,calc(100dvh - 40px)); }
.ca-dialog-body { min-height:0; overscroll-behavior:contain; }
.ca-form-grid>label { align-content:start; }
.ca-form-grid input:not([type="checkbox"]),.ca-form-grid select,.ca-form-grid textarea {
  align-self:start;
  min-height:42px;
  margin:0!important;
}
.ca-dialog footer { flex:none; padding:12px 22px 16px; }
.ca-dialog footer .ca-primary { min-height:42px; padding:10px 20px; border-radius:10px; border-color:#005a82!important; background:#005a82!important; color:#fff!important; }
.ca-detail { width:min(450px,100vw); }
#creditAnalysisDetail .ca-tabs>button.active { border-color:#005a82!important; background:#005a82!important; color:#fff!important; }
body.global-shell-active #creditAnalysisPanel {
  width:calc(100% - var(--shell-sidebar-width-collapsed,64px));
  max-width:calc(100% - var(--shell-sidebar-width-collapsed,64px));
  margin-left:var(--shell-sidebar-width-collapsed,64px);
  padding:20px 18px;
}
body.global-shell-active.desktop-sidebar-open #creditAnalysisPanel {
  width:calc(100% - var(--shell-sidebar-width-expanded,292px));
  max-width:calc(100% - var(--shell-sidebar-width-expanded,292px));
  margin-left:var(--shell-sidebar-width-expanded,292px);
}
@media (max-width:1200px) {
  .ca-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ca-search { grid-column:span 2; }
}
@media (max-width:760px) {
  .ca-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ca-search { grid-column:1/-1; }
  .ca-list-heading { gap:6px; }
  .ca-status-tabs { gap:4px; }
  .ca-status-tabs button { gap:4px; min-height:31px; padding:4px 8px; font-size:11px; }
  .ca-status-tabs button span { min-width:18px; height:18px; padding:0 3px; }
  .ca-filters label:not(.ca-search) { display:grid; align-content:center; gap:2px; padding:4px 9px; }
  .ca-filters input:not([type="search"]),.ca-filters select { min-height:30px; padding:2px 0; }
  .ca-fab { right:17px; bottom:calc(78px + env(safe-area-inset-bottom)); }
  .ca-detail { width:100vw; }
  body.global-shell-active #creditAnalysisPanel,
  body.global-shell-active.desktop-sidebar-open #creditAnalysisPanel { width:100%; max-width:100%; margin-left:0; }
}

/* Vista integrada: filtros y contenido ocupan el area bajo el encabezado de Tareas 360. */
body.tasks360-active #creditAnalysisPanel {
  box-sizing:border-box; width:100%; max-width:none; min-height:0; margin:0; padding:12px 24px 28px;
  color:#1b2b3c; background:transparent;
}
body.tasks360-active.credit-analysis-active #creditAnalysisPanel { display:block; }
body.tasks360-active:not(.credit-analysis-active) #creditAnalysisPanel,
body.tasks360-active:not(.credit-analysis-active) #creditAnalysisPanel button.ca-fab { display:none !important; }
body.tasks360-active #creditAnalysisPanel .ca-filters {
  display:grid; grid-template-columns:minmax(220px,2fr) repeat(7,minmax(100px,1fr)); gap:8px;
  max-width:none; margin:0; padding:0; border:0; border-radius:0; background:transparent;
}
body.tasks360-active #creditAnalysisPanel .ca-search { grid-column:auto; min-height:44px; }
body.tasks360-active #creditAnalysisPanel .ca-filters label:not(.ca-search) { min-height:44px; }
body.tasks360-active #creditAnalysisPanel .ca-list-heading { max-width:none; margin:16px 0 9px; }
body.tasks360-active #creditAnalysisPanel .ca-list { max-width:none; }
body.tasks360-active #creditAnalysisPanel .ca-reminders,
body.tasks360-active #creditAnalysisPanel .ca-message { max-width:none; }
body.tasks360-active #creditAnalysisPanel button.ca-fab { right:24px; bottom:24px; }

@media (max-width:1200px) {
  body.tasks360-active #creditAnalysisPanel .ca-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.tasks360-active #creditAnalysisPanel .ca-search { grid-column:1/-1; }
}
@media (max-width:760px) {
  body.tasks360-active #creditAnalysisPanel { padding:10px 12px calc(82px + env(safe-area-inset-bottom)); }
  body.tasks360-active #creditAnalysisPanel .ca-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  body.tasks360-active #creditAnalysisPanel .ca-search { grid-column:1/-1; }
  body.tasks360-active #creditAnalysisPanel .ca-filters label:not(.ca-search) { min-height:40px; padding:4px 8px; }
  body.tasks360-active #creditAnalysisPanel button.ca-fab { right:17px; bottom:calc(78px + env(safe-area-inset-bottom)); }
}

/* Estados y controles del panel de Analistas de Crédito. */
.ca-filter-options { display:contents; }
.ca-filter-toggle { display:none; }
.ca-row.resolved .ca-row-main strong,.ca-detail-title.resolved { text-decoration:line-through; text-decoration-color:#25c46a; text-decoration-thickness:2px; }
.ca-row.cancelled .ca-row-main strong,.ca-detail-title.cancelled { text-decoration:line-through; text-decoration-color:#c03932; text-decoration-thickness:2px; }
.ca-reminder-label { display:inline-flex; align-items:center; gap:7px; color:#324b61; }
.ca-reminder-label svg { width:17px; height:17px; flex:none; color:#00658a; }
.ca-additional-companies { padding:12px; border:1px solid #d5e2e9; border-radius:12px; background:#f5fafc; }
.ca-additional-companies[hidden] { display:none; }
.ca-additional-companies h3 { margin:0 0 3px; color:#175676; font-size:14px; }
.ca-additional-companies>p { margin:0 0 12px; color:#667b8f; font-size:12px; }
.ca-additional-company { padding:10px 0; border-top:1px solid #dce8ee; }
.ca-additional-company>strong { display:block; margin-bottom:8px; color:#254b62; font-size:12px; }
.ca-additional-company>div { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ca-additional-company label { display:grid; gap:5px; color:#667b8f; font-size:11px; font-weight:700; }
@media (max-width:620px) { .ca-additional-company>div { grid-template-columns:1fr; } }
.ca-badge.paused { border-color:#e7c987; background:#fff7e5; color:#825700; }
.ca-dialog header .ca-dialog-close { display:grid; flex:none; width:42px; height:42px; place-items:center; border:1px solid #abc9d9!important; border-radius:12px; background:#f4fafd!important; color:#005f86!important; cursor:pointer; }
.ca-dialog header .ca-dialog-close svg { width:20px; height:20px; }
.ca-dialog header .ca-dialog-close:hover,.ca-dialog header .ca-dialog-close:focus-visible { border-color:#005f86!important; background:#e2f3fa!important; outline:2px solid #83bbd3; outline-offset:2px; }
.ca-dialog-body > label { display:grid; gap:6px; margin-bottom:14px; color:#324b61; font-size:12px; font-weight:700; }
.ca-dialog-body > label input,.ca-dialog-body > label select,.ca-dialog-body > label textarea { width:100%; box-sizing:border-box; min-height:42px; padding:9px 11px; border:1px solid #c8d7e2; border-radius:10px; background:#fff; color:#203248; font:inherit; }
.ca-history,.ca-collaborators { overflow:hidden; border:1px solid #d5e2e9; border-radius:11px; background:#fff; }
.ca-history { margin-top:20px; }
.ca-history summary,.ca-collaborators summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; color:#175676; font-size:13px; font-weight:750; cursor:pointer; }
.ca-history summary span,.ca-collaborators summary span { color:#697e90; font-size:11px; font-weight:600; }
.ca-history[open] summary,.ca-collaborators[open] summary { border-bottom:1px solid #e3edf2; background:#f5fafc; }
.ca-history .ca-timeline { margin:12px 14px 16px; }
.ca-collaborators .ca-check-list { border:0; border-radius:0; }
.ca-collaborators .ca-check[hidden] { display:none!important; }
.ca-conversation-closed { margin:14px 0 0; padding:12px; border:1px solid #d5e2e9; border-radius:10px; background:#f5fafc; color:#526a7d; font-size:12px; }
.ca-detail > [data-ca-detail-message]:not(.hidden) { margin:10px 18px 0; }
.ca-form-grid input[readonly] { background:#f1f6f9!important; color:#536b7e; }
@media (max-width:760px) {
  body.tasks360-active #creditAnalysisPanel .ca-filters { grid-template-columns:minmax(0,1fr) auto; }
  body.tasks360-active #creditAnalysisPanel .ca-search { grid-column:1; min-width:0; }
  body.tasks360-active #creditAnalysisPanel .ca-filter-toggle { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:44px; padding:0 11px; border:1px solid #b8d0df!important; border-radius:10px; background:#fff!important; color:#075f80!important; font-size:12px; font-weight:750; cursor:pointer; }
  .ca-filter-toggle svg { width:18px; height:18px; }
  body.tasks360-active #creditAnalysisPanel .ca-filter-options { display:none; grid-column:1/-1; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  body.tasks360-active #creditAnalysisPanel .ca-filter-options.is-open { display:grid; }
  body.tasks360-active #creditAnalysisPanel .ca-filter-options label { min-width:0; }
  .ca-dialog header { padding:15px 16px 12px; }
  .ca-dialog header .ca-dialog-close { width:44px; height:44px; }
}

@media (max-width:700px) {
  body.tasks360-active.credit-analysis-active .tasks360-layout.tasks360-redesign-v2 .tasks360-main {
    grid-template-rows:auto minmax(0,1fr)!important;
  }
  body.tasks360-active.credit-analysis-active .tasks360-main-header {
    height:auto!important;
    min-height:0!important;
    padding-bottom:10px!important;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row {
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    align-items:start;
    column-gap:10px;
    row-gap:8px;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row .ca-avatar {
    grid-column:1;
    grid-row:1;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row-main {
    grid-column:2;
    grid-row:1;
    width:100%;
    min-width:0;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row-main strong,
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row-main small {
    overflow-wrap:anywhere;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-row-meta {
    grid-column:1/-1;
    grid-row:2;
    justify-content:flex-start;
    min-width:0;
  }
}
@media (max-width:700px) {
  .ca-time-panel { gap:16px; }
  .ca-sla-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .ca-sla-card { padding:11px; }
  .ca-sla-card>strong { font-size:18px; }
  .ca-time-section-head { align-items:flex-start; }
  .ca-time-section-head p { font-size:11px; }
  .ca-trace-top { align-items:flex-start; flex-direction:column; gap:3px; }
  .ca-trace-card { padding:10px; }
  .ca-period-card { grid-template-columns:1fr 1fr; gap:9px 12px; padding:11px; }
}
/* Listado integrado: encabezado y filtros fijos; solo se desplazan los análisis. */
@media (min-width:701px) {
  body.tasks360-active.credit-analysis-active .tasks360-layout {
    height:calc(100dvh - 46px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
}
body.tasks360-active.credit-analysis-active .tasks360-main {
  height:100% !important;
  min-height:0 !important;
  align-content:stretch !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  overflow:hidden !important;
}
body.tasks360-active.credit-analysis-active #creditAnalysisPanel {
  display:flex !important;
  flex-direction:column;
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
}
body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-records-scroll {
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  padding:0 4px calc(92px + env(safe-area-inset-bottom)) 0;
}
body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-records-scroll:focus-visible {
  outline:2px solid #83bbd3;
  outline-offset:2px;
}
body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-records-scroll .ca-list-heading {
  margin-top:16px;
}
@media (max-width:700px) {
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel .ca-records-scroll {
    padding-bottom:0;
  }
}
.ca-filter-options .ca-multiselect { position:relative; display:grid; min-width:0; gap:5px; }
.ca-filter-options .ca-multiselect-trigger { display:flex; align-items:center; justify-content:space-between; gap:6px; width:100%; min-width:0; min-height:39px; overflow:hidden; padding:8px 10px; border:1px solid #c8d7e2; border-radius:9px; background:#fff; color:#203248; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.ca-multiselect-menu { position:absolute; z-index:1250; top:100%; left:0; width:max(100%,230px); max-height:280px; overflow:auto; margin-top:4px; padding:7px; border:1px solid #cad9e2; border-radius:10px; background:#fff; box-shadow:0 10px 28px #14334b24; }
.ca-multiselect-menu[hidden] { display:none; }
.ca-multiselect-menu label { display:flex!important; align-items:center; gap:8px!important; min-height:35px; padding:5px 7px; border-radius:7px; color:#263d51; font-size:12px; cursor:pointer; }
.ca-multiselect-menu label:hover { background:#eff7fa; }
.ca-multiselect-menu input { width:16px!important; min-height:16px!important; flex:none; accent-color:#00658a; }
.ca-multiselect-actions { display:flex; justify-content:flex-end; padding:0 4px 5px; border-bottom:1px solid #e7edf1; }
.ca-multiselect-actions button,.ca-clear-filters { border:0; background:transparent; color:#076486; font:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.ca-fab-wrap { position:fixed; z-index:1300; right:28px; bottom:26px; }
.ca-fab-wrap .ca-fab { position:static!important; }
.ca-action-menu { position:absolute; right:0; bottom:calc(100% + 10px); display:grid; min-width:190px; padding:6px; border:1px solid #cbdbe4; border-radius:12px; background:#fff; box-shadow:0 12px 32px #17324d30; }
.ca-action-menu button { padding:11px 13px; border:0; border-radius:8px; background:#fff; color:#183449; text-align:left; font:inherit; font-weight:700; cursor:pointer; }
.ca-action-menu button:hover,.ca-action-menu button:focus-visible { background:#edf6fa; }
.ca-statistics-view { display:flex; flex:1 1 auto; min-height:0; flex-direction:column; width:100%; max-width:1600px; margin:0 auto; }
.ca-statistics-header { display:flex; align-items:center; gap:18px; margin-bottom:16px; }
.ca-statistics-header h2 { margin:0; color:#183449; font-size:23px; }
.ca-statistics-content { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }

/* Opciones de multiselección y controles compactos de Analistas de Crédito. */
.ca-multiselect-menu label.ca-ms-option {
  display:flex!important; align-items:center; justify-content:flex-start; gap:10px!important;
  width:100%; min-width:0; min-height:34px; padding:6px 10px!important;
  border:0!important; border-radius:7px; background:transparent!important;
  color:#263d51; font-size:12px; font-weight:500; text-align:left;
}
.ca-multiselect-menu label.ca-ms-option:hover { background:#eff7fa!important; }
.ca-multiselect-menu label.ca-ms-option[hidden] { display:none!important; }
.ca-multiselect-menu .ca-ms-option input[type="checkbox"] {
  display:block; flex:0 0 16px!important; width:16px!important; height:16px; min-height:16px!important;
  margin:0!important; padding:0!important; border:initial!important; accent-color:#00658a;
}
.ca-ms-option span { min-width:0; overflow-wrap:anywhere; }
.ca-ms-search { width:100%!important; min-height:34px!important; flex:none!important; margin:4px 0 6px!important; padding:6px 8px!important; border:1px solid #d3e0e8!important; border-radius:7px!important; background:#fff!important; }
.ca-multiselect-menu { width:min(300px,calc(100vw - 32px)); }
.ca-filters label:not(.ca-search):not(.ca-ms-option):not(.ca-comment-filter) { min-width:0; }
.ca-comment-filter {
  display:flex!important; align-items:center; justify-content:flex-start; gap:7px!important;
  min-width:0; min-height:38px; padding:0 8px!important; border:1px solid #c8d7e2;
  border-radius:9px; background:#fff; color:#405c73; font-size:11px!important; white-space:nowrap;
}
.ca-filters .ca-comment-filter input[type="checkbox"] { flex:0 0 16px!important; width:16px!important; height:16px; min-height:16px!important; margin:0!important; accent-color:#00658a; }
.ca-due-filter { position:relative; display:grid; align-content:center; min-width:0; min-height:42px; gap:3px; padding:3px 8px; border:1px solid #c8d7e2; border-radius:9px; background:#fff; }
.ca-due-trigger { display:flex; align-items:center; justify-content:space-between; gap:6px; width:100%; min-width:0; min-height:25px; overflow:hidden; padding:2px 0; border:0; background:transparent; color:#203248; font:inherit; font-size:12px; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.ca-due-trigger>span { flex:none; color:#71839a; }
.ca-due-popover { position:absolute; z-index:1260; top:calc(100% + 5px); left:0; width:min(340px,calc(100vw - 32px)); padding:10px; border:1px solid #cad9e2; border-radius:11px; background:#fff; box-shadow:0 10px 28px #14334b24; }
.ca-due-popover[hidden] { display:none; }
.ca-due-presets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:9px; }
.ca-due-presets button,.ca-due-actions button { min-height:32px; padding:5px 8px; border:1px solid #c8d7e2; border-radius:7px; background:#fff; color:#075f80; font:inherit; font-size:11px; font-weight:650; cursor:pointer; }
.ca-due-presets button.active { border-color:#5aa7c7; background:#f0f8fc; }
.ca-due-range { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ca-filters .ca-due-range label:not(.ca-search):not(.ca-ms-option):not(.ca-comment-filter) { display:grid!important; align-items:initial; gap:4px!important; min-width:0; min-height:0; padding:0!important; border:0!important; border-radius:0; background:transparent!important; color:#667b8f; font-size:10px!important; }
.ca-filters .ca-due-range input[type="date"] { width:100%!important; min-width:0; min-height:34px!important; padding:5px 6px!important; border:1px solid #c8d7e2!important; border-radius:7px!important; background:#fff!important; font-size:11px!important; }
.ca-due-actions { display:flex; justify-content:space-between; gap:8px; margin-top:9px; }
.ca-clear-filters { align-self:center; min-height:32px; padding:0 10px; border:1px solid #c8d7e2; border-radius:999px; background:#fff; white-space:nowrap; }
.ca-filter-sort { min-width:0; }
.ca-filters .ca-filter-sort select { width:100%!important; min-width:0; }
.ca-row.has-pending-comment { box-shadow:inset 3px 0 0 #f08a24,0 2px 4px #17324d0a; }
.ca-comment-flag { position:relative; display:inline-grid; flex:none; width:19px; height:19px; place-items:center; color:#00658a; }
.ca-comment-flag svg { width:17px; height:17px; }
.ca-comment-flag i { position:absolute; top:0; right:0; width:7px; height:7px; border:1px solid #fff; border-radius:50%; background:#f08a24; }
@media (min-width:1501px) {
  .ca-filters { grid-template-columns:minmax(190px,1.6fr) repeat(4,minmax(112px,1fr)) minmax(135px,1.15fr) minmax(160px,1.35fr) auto auto; gap:7px; }
  .ca-filters .ca-search { grid-column:auto; }
}
@media (max-width:1500px) {
  .ca-filters { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
  .ca-filters .ca-search { grid-column:span 2; }
  .ca-filter-options { display:contents; }
}
@media (max-width:760px) {
  .ca-due-popover { left:auto; right:0; width:min(340px,calc(100vw - 32px)); }
  .ca-due-range { grid-template-columns:1fr; }
  .ca-comment-filter { min-height:36px; white-space:normal; }
  .ca-multiselect-menu { width:min(300px,calc(100vw - 32px)); }
  .ca-multiselect[data-multiselect="sucursalId"] .ca-multiselect-menu,
  .ca-multiselect[data-multiselect="analystId"] .ca-multiselect-menu { left:auto; right:0; }
}
.ca-statistics-content .tasks360-statistics-workspace { display:block; }
@media (max-width:700px) {
  .ca-fab-wrap { right:17px; bottom:calc(78px + env(safe-area-inset-bottom)); }
  .ca-statistics-header { align-items:flex-start; flex-direction:column; gap:10px; }
  .ca-statistics-header h2 { font-size:20px; }
  .ca-multiselect-menu { width:max(100%, min(270px, calc(100vw - 40px))); }
  .ca-statistics-content .tasks360-credit-kpi-double { grid-template-columns:minmax(0,1fr)!important; }
  .ca-statistics-content .tasks360-credit-kpi-double>div { min-width:0; }
}

/* Barra compacta para Crédito: todos los controles en una fila en escritorio. */
@media (min-width:1201px) {
  body.tasks360-active #creditAnalysisPanel .ca-filters {
    grid-template-columns:minmax(180px,1.8fr) minmax(82px,.8fr) repeat(7,minmax(86px,1fr));
    gap:6px;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filters label:not(.ca-search) {
    min-height:38px;
    gap:4px;
    padding:0 6px;
    font-size:10px;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filter-name { font-size:10px; }
  body.tasks360-active #creditAnalysisPanel .ca-multiselect { gap:2px; }
  body.tasks360-active #creditAnalysisPanel .ca-multiselect-trigger {
    min-height:25px;
    padding:3px 2px;
    font-size:11px;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filters input:not([type="search"], [type="checkbox"], [type="date"]),
  body.tasks360-active #creditAnalysisPanel .ca-filters select { min-height:26px; font-size:11px; }
  body.tasks360-active #creditAnalysisPanel .ca-filters input[type="date"] { min-height:26px; padding:2px 0; font-size:10px; }
  body.tasks360-active #creditAnalysisPanel .ca-search { min-height:38px; }
  body.tasks360-active #creditAnalysisPanel .ca-clear-filters {
    min-width:0;
    padding:4px 2px;
    font-size:10px;
    white-space:normal;
  }
}

@media (max-width:1200px) and (min-width:761px) {
  body.tasks360-active #creditAnalysisPanel .ca-filter-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  body.tasks360-active #creditAnalysisPanel .ca-filter-toggle { display:inline-flex; }
  body.tasks360-active #creditAnalysisPanel .ca-clear-filters { justify-self:start; }
}

/* Mantiene visible el compositor y desplaza solo la conversación. */
.ca-detail-content.is-conversation { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ca-detail-content.is-conversation .ca-conversation { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ca-detail-content.is-conversation .ca-comment-form, .ca-detail-content.is-conversation .ca-conversation-closed { flex: 0 0 auto; }

/* Estadísticas: ocupar el alto disponible y conservar el desplazamiento sin barra visible. */
@media (min-width: 761px) {
  body.tasks360-active.credit-analysis-active .tasks360-layout.tasks360-redesign-v2 {
    box-sizing: border-box !important;
    height: calc(100dvh - 24px) !important;
    min-height: 0 !important;
  }
  body.tasks360-active.credit-analysis-active .tasks360-layout.tasks360-redesign-v2 .tasks360-main {
    height: 100% !important;
    grid-template-rows: 72px minmax(0, 1fr) !important;
  }
  body.tasks360-active.credit-analysis-active #creditAnalysisPanel { min-height: 0 !important; }
  .ca-statistics-view { min-height: 0; }
  .ca-statistics-content { scrollbar-width: none; -ms-overflow-style: none; }
  .ca-statistics-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
}

/* Filtros de Crédito en una sola fila de cápsulas. */
@media (min-width: 1201px) {
  body.tasks360-active #creditAnalysisPanel .ca-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filter-options { display: contents !important; }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-search,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-multiselect,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-due-filter,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-filter-sort,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-comment-filter {
    box-sizing: border-box !important;
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    gap: 7px !important;
    height: 44px !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #dce4ec !important;
    border-radius: 12px !important;
    background: #fff !important;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-search { flex: 1.8 1 240px !important; }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-comment-filter { flex: 0 0 auto !important; white-space: nowrap !important; }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-filter-name {
    flex: 0 0 auto !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-search input,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-multiselect-trigger,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-due-trigger,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-filter-sort select {
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #203248 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
  }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-search input { height: 100% !important; }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-comment-filter input[type="checkbox"] { flex: 0 0 16px !important; }
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-clear-filters { flex: 0 0 auto !important; }
}

@media (max-width: 760px) {
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-search,
  body.tasks360-active #creditAnalysisPanel .ca-filters .ca-filter-toggle {
    box-sizing: border-box !important;
    height: 44px !important;
    min-height: 44px !important;
    align-self: stretch !important;
  }
}
@media (max-width: 760px) {
  .ca-statistics-content { scrollbar-width: none; -ms-overflow-style: none; }
  .ca-statistics-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
