:root {
  --cib-navy: #002b5e; --cib-orange: #fc6e35; --cib-sky: #00adea; --cib-ice: #e6f9ff;
  --cib-blue-deep: #00387b; --cib-ink: #313131; --muted: #50677b; --link: #006b96;
  --border: #d6e1e9; --input-border: #7c91a2; --surface: #fff; --error: #a32920;
  font-family: Montserrat, Arial, sans-serif; color: var(--cib-navy); background: #f5f8fb; font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, summary, input[type="checkbox"] { touch-action: manipulation; }
button { cursor: pointer; min-height: 44px; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
:target { scroll-margin-top: 24px; }
h1, h2, h3 { text-wrap: balance; }
button, input, textarea, summary { -webkit-tap-highlight-color: #d7ecf7; }
a { color: var(--link); }
a:hover { color: var(--cib-navy); }
.shell { min-height: 100svh; }
.shell:focus { outline: none; }
.skip-link { position: fixed; z-index: 30; top: 12px; left: 12px; transform: translateY(-160%); padding: 12px 18px; border-radius: 8px; color: white; background: var(--cib-navy); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wordmark { font-size: 2rem; font-weight: 800; letter-spacing: -.07em; line-height: 1; }
.session-view { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.session-view p { color: var(--muted); }
.login-view { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 20px; background: var(--cib-navy); }
.login-brand { display: flex; align-items: center; gap: 20px; color: white; font-size: .875rem; }
.login-brand > span:last-child { padding-left: 20px; border-left: 1px solid #7895b7; }
.login-card { width: min(100%, 480px); padding: 36px; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 64px #001b3a40; }
.eyebrow { margin: 0 0 12px; color: var(--link); font-size: .75rem; font-weight: 700; letter-spacing: .07em; }
.login-card h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.2rem); letter-spacing: -.045em; line-height: 1.2; }
.login-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; font-size: .875rem; }
form { display: grid; gap: 10px; }
label { font-size: .875rem; font-weight: 600; }
.login-card label { margin-top: 10px; }
input, textarea, select { min-width: 0; width: 100%; border: 1px solid var(--input-border); border-radius: 8px; padding: 13px 14px; color: var(--cib-ink); background: var(--surface); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
textarea { min-height: 110px; resize: vertical; line-height: 1.65; }
textarea::placeholder { color: #607487; opacity: 1; }
.password-field { display: flex; border: 1px solid var(--input-border); border-radius: 8px; }
.password-field:has([aria-invalid="true"]) { border-color: var(--error); }
.password-field input { border: 0; }
.password-field .text-button { margin: 3px; padding-inline: 12px; font-size: .75rem; }
.primary-button, .secondary-button, .text-button { border: 1px solid transparent; border-radius: 999px; padding: 11px 18px; font-size: .8125rem; font-weight: 700; transition: background-color 150ms ease, border-color 150ms ease; }
.primary-button { color: var(--cib-navy); background: var(--cib-orange); }
.primary-button:hover:not(:disabled) { background: #ff8b5d; }
.primary-button:active:not(:disabled) { background: #f99e78; }
.primary-button span { margin-left: 8px; font-size: 1rem; }
.secondary-button { border-color: var(--input-border); color: var(--cib-navy); background: var(--surface); }
.secondary-button:hover:not(:disabled) { background: var(--cib-ice); border-color: var(--link); }
.text-button { color: var(--cib-blue-deep); background: transparent; padding-inline: 12px; }
.text-button:hover:not(:disabled) { background: #e8f1f8; }
.login-card .primary-button { margin-top: 10px; }
.form-error, .error { color: var(--error) !important; }
.form-error { margin: 0; font-size: .8125rem; line-height: 1.6; }
.helper, .query-status { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.query-status:empty, #login-status:empty { display: none; }
.login-help { margin-bottom: 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: .75rem !important; }
.login-footer { margin: 0; color: #c2d7eb; font-size: .75rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 16px max(24px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 20px; color: var(--cib-navy); text-decoration: none; }
.brand-title { padding-left: 20px; border-left: 1px solid var(--border); font-size: .875rem; font-weight: 700; }
.brand-title small { display: block; margin-top: 4px; font-size: .6875rem; color: var(--muted); font-weight: 500; }
.session-actions { display: flex; align-items: center; gap: 18px; }
.session-label { color: var(--muted); font-size: .75rem; }
.page-container { width: min(1200px, calc(100% - 48px)); margin: auto; }
.welcome-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 36px 0 28px; }
.welcome-panel h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.2; }
.welcome-panel > div > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.internal-badge { flex-shrink: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: .6875rem; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.consultation, .support-sidebar { min-width: 0; }
.query-form { padding: 24px; border: 1px solid var(--border); border-top: 3px solid var(--cib-orange); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 18px #002b5e06; }
.composer-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
#question-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.query-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 4px; }
.query-actions .primary-button { flex-shrink: 0; }
.query-actions .helper { font-size: .6875rem; }
.conversation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.conversation-toolbar h2 { margin: 0; font-size: .875rem; font-weight: 600; }
.conversation-toolbar button { font-size: .75rem; }
.conversation { display: grid; gap: 28px; min-width: 0; }
.empty-state { padding: 28px; border: 1px dashed #bacbd9; border-radius: 12px; background: #ffffff80; }
.empty-state h3 { margin: 0 0 10px; font-size: 1.125rem; font-weight: 600; }
.empty-state > p { margin: 0; font-size: .8125rem; color: var(--muted); line-height: 1.7; }
.suggestions { display: grid; gap: 8px; margin-top: 20px; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); color: var(--cib-navy); font-size: .8125rem; text-align: left; line-height: 1.5; }
.suggestion:hover { background: var(--cib-ice); border-color: var(--link); }
.suggestion span { color: var(--link); }
.privacy-note { margin: 18px 0 0; font-size: .6875rem; line-height: 1.7; color: var(--muted); }
.guide-card { border: 1px solid #c8e5ef; border-radius: 12px; padding: 24px; background: #eef9fd; }
.document-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #bbdfea; border-radius: 10px; background: var(--surface); color: var(--link); }
.document-icon svg { width: 24px; height: 24px; }
.guide-card h2 { margin: 16px 0 20px; font-size: .9375rem; font-weight: 700; line-height: 1.4; }
.guide-card ol { display: grid; gap: 20px; list-style: none; counter-reset: guide; padding: 0; margin: 0; }
.guide-card li { counter-increment: guide; position: relative; padding-left: 28px; font-size: .75rem; line-height: 1.6; }
.guide-card li::before { content: counter(guide); position: absolute; left: 0; top: 0; font-weight: 700; color: var(--link); }
.guide-card li span { display: block; margin-top: 4px; color: var(--muted); }
.guide-note { margin: 20px 0 0; border-top: 1px solid #c8e5ef; padding-top: 16px; color: var(--muted); font-size: .75rem; line-height: 1.65; }
.turn { display: grid; gap: 12px; min-width: 0; scroll-margin-top: 24px; }
.question-card { padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border); color: var(--cib-navy); background: #eaf1f8; line-height: 1.6; font-size: .875rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.question-label { display: block; margin-bottom: 5px; font-size: .6875rem; color: var(--muted); font-weight: 700; }
.answer-card { position: relative; min-width: 0; padding: 24px 26px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.answer-card::before { position: absolute; top: 20px; bottom: 20px; left: 0; width: 4px; border-radius: 0 3px 3px 0; content: ""; background: linear-gradient(var(--cib-orange) 0 72%, var(--cib-sky) 72%); }
.answer-card h3 { margin: 0 0 16px; font-size: .9375rem; }
.answer-text { color: var(--cib-ink); font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.answer-text p { margin: 0 0 14px; white-space: pre-wrap; }
.answer-text p:last-child { margin-bottom: 0; }
.answer-text ol, .answer-text ul { margin: 12px 0; padding-left: 26px; }
.answer-text li { padding-left: 4px; margin: 8px 0; }
.answer-text h4 { margin: 20px 0 10px; font-size: 1rem; color: var(--cib-navy); }
.answer-text code { border-radius: 3px; padding: 2px 5px; background: #edf2f7; font-size: .875em; }
.answer-text pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; background: #edf2f7; border-radius: 6px; }
.answer-text pre code { padding: 0; }
.answer-meta { margin: 20px 0 0; color: var(--muted); font-size: .75rem; }
.answer-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.answer-tools .text-button { font-size: .75rem; }
.feedback { display: grid; gap: 10px; min-width: min(100%, 430px); }
.feedback-choice { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.feedback-label { font-size: .75rem; color: var(--muted); }
.feedback-choice button { border: 1px solid var(--input-border); border-radius: 999px; padding: 9px 13px; color: var(--cib-navy); background: var(--surface); font-size: .75rem; font-weight: 600; }
.feedback-choice button:hover:not(:disabled) { background: var(--cib-ice); }
.feedback-choice button[aria-pressed="true"] { border-color: var(--cib-navy); color: white; background: var(--cib-navy); }
.feedback-form { width: min(100%, 430px); margin-left: auto; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #f8fbfd; gap: 8px; }
.feedback-form label { margin-top: 6px; font-size: .75rem; }
.feedback-form textarea { min-height: 88px; }
.feedback-form select, .feedback-form input, .feedback-form textarea { font-size: .8125rem; }
.feedback-help { overflow-wrap: anywhere; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.action-message { width: 100%; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.action-message:empty { display: none; }
.sources-card { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.sources-card h4 { margin: 0 0 8px; font-size: .8125rem; }
.sources-hint { margin: 0 0 14px; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.source-list { display: grid; gap: 10px; }
.source-item { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfd; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 700; line-height: 1.6; text-underline-offset: 3px; overflow-wrap: anywhere; }
.source-meta, .source-snippet { margin: 6px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }
.source-item summary { padding: 10px 0 0; font-size: .75rem; font-weight: 500; }
.source-item summary:hover { background: transparent; color: var(--link); }
.notice, .connection-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid #d3b265; border-radius: 8px; color: #674915; background: #fff8e8; font-size: .8125rem; line-height: 1.6; }
.connection-status { margin: 0; justify-content: center; border-radius: 0; }
.recovery-help { margin: 16px 0; color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.answer-loading { display: flex; align-items: center; gap: 12px; font-size: .875rem; line-height: 1.6; }
.answer-spinner { width: 24px; height: 24px; flex: 0 0 24px; border: 3px solid #d6e1e9; border-top-color: var(--link); border-radius: 50%; animation: cib-spin 800ms linear infinite; }
.is-pending::before { display: inline-block; vertical-align: middle; width: 13px; height: 13px; margin-right: 8px; border: 2px solid #7c91a2; border-top-color: var(--cib-navy); border-radius: 50%; content: ""; animation: cib-spin 800ms linear infinite; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding: 22px 0 max(22px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); font-size: .6875rem; line-height: 1.6; color: var(--muted); }
@keyframes cib-spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
  .query-actions { align-items: flex-start; flex-direction: column; }
  .query-actions .primary-button { align-self: flex-end; }
  .guide-card { padding: 20px; }
}
@media (max-width: 760px) {
  .topbar { min-height: 72px; padding: 14px 20px; }
  .session-label, .internal-badge { display: none; }
  .page-container { width: calc(100% - 32px); }
  .welcome-panel { padding: 28px 0 24px; }
  .workspace { grid-template-columns: 1fr; gap: 28px; }
  .support-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .query-actions { flex-direction: row; align-items: center; }
  .guide-card { padding: 20px; }
  .page-footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
  .login-card { padding: 28px 24px; }
  .login-brand { gap: 14px; }
  .login-brand > span:last-child { padding-left: 14px; }
  .brand { gap: 12px; }
  .brand-title { padding-left: 12px; font-size: .75rem; }
  .wordmark { font-size: 1.75rem; }
  .topbar { gap: 12px; padding-inline: 16px; }
  .query-form { padding: 18px; }
  .query-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .query-actions .primary-button { align-self: stretch; }
  .empty-state, .answer-card { padding: 22px 20px; }
  .support-sidebar { grid-template-columns: 1fr; }
  .conversation-toolbar { flex-wrap: wrap; }
  .feedback-label { flex-basis: 100%; }
  .answer-tools { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Administrative operations dashboard */
.login-back-link { color: #d9edf8; font-size: .8125rem; text-underline-offset: 4px; }
.dashboard-shell { min-height: 100svh; }
.dashboard-shell:focus { outline: none; }
.dashboard-view { min-height: 100svh; }
.dashboard-link { display: inline-flex; align-items: center; text-decoration: none; }
.dashboard-container { width: min(1240px, calc(100% - 48px)); margin: auto; }
.dashboard-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 38px 0 24px; }
.dashboard-intro h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -.045em; }
.dashboard-intro > div > p:last-child { max-width: 720px; margin: 12px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.dashboard-filters { display: flex; align-items: end; gap: 12px; flex-shrink: 0; }
.period-control { width: min(230px, 100%); display: grid; gap: 6px; color: var(--muted); font-size: .6875rem; }
.period-control select { padding-block: 10px; font-size: .8125rem; font-weight: 600; }
.dashboard-status { min-height: 20px; margin-bottom: 12px; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-top: 3px solid var(--cib-orange); border-radius: 12px; background: var(--surface); overflow: hidden; }
.metric-strip article { min-width: 0; padding: 20px; border-right: 1px solid var(--border); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip span, .metric-strip small { display: block; color: var(--muted); font-size: .6875rem; line-height: 1.5; }
.metric-strip strong { display: block; margin: 7px 0 3px; font-size: clamp(1.35rem, 2.5vw, 2rem); font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 20px; margin-top: 20px; }
.dashboard-panel { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.clients-panel, .feedback-panel { grid-column: 1 / -1; }
.client-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.client-row { min-width: 0; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfd; font-size: .75rem; }
.client-row strong { overflow-wrap: anywhere; }
.client-row span { color: var(--muted); font-size: .6875rem; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading .eyebrow { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-note, .panel-footnote { color: var(--muted); font-size: .6875rem; line-height: 1.6; }
.panel-footnote { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.daily-activity { display: grid; gap: 14px; }
.daily-row { display: grid; grid-template-columns: 105px minmax(80px, 1fr) minmax(210px, auto); align-items: center; gap: 12px; }
.daily-label { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; }
.daily-label strong { font-variant-numeric: tabular-nums; }
.daily-track { height: 8px; border-radius: 999px; background: #e8f0f6; overflow: hidden; }
.daily-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cib-sky), var(--cib-blue-deep)); }
.daily-detail { color: var(--muted); font-size: .6875rem; text-align: right; white-space: nowrap; }
.outcome-summary { display: grid; gap: 15px; }
.outcome-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: .75rem; }
.outcome-row strong { font-variant-numeric: tabular-nums; }
.outcome-meter { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: #e8f0f6; overflow: hidden; }
.outcome-meter i { display: block; height: 100%; min-width: 2px; background: var(--cib-sky); }
.outcome-row.neutral .outcome-meter i { background: #d3a22b; }
.outcome-row.danger .outcome-meter i { background: var(--error); }
.status-breakdown, .reason-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.status-chip, .reason-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: #f8fbfd; font-size: .6875rem; }
.status-chip strong { color: var(--cib-navy); font-variant-numeric: tabular-nums; }
.table-scroll { max-width: 100%; margin-top: 18px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.table-scroll:focus-visible { outline-offset: 3px; }
table { width: 100%; min-width: 1020px; border-collapse: collapse; color: var(--cib-ink); font-size: .75rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { position: sticky; top: 0; color: var(--cib-navy); background: #eef5fa; font-size: .6875rem; }
td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
td:nth-child(6) { min-width: 280px; line-height: 1.6; }
tr:last-child td { border-bottom: 0; }
.rating-useful { color: #17643c; font-weight: 700; }
.rating-not-useful { color: var(--error); font-weight: 700; }
.empty-copy { margin: 16px 0 0; color: var(--muted); font-size: .8125rem; }

@media (max-width: 900px) {
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .clients-panel, .feedback-panel { grid-column: auto; }
  .daily-row { grid-template-columns: 90px minmax(80px, 1fr); }
  .daily-detail { grid-column: 1 / -1; text-align: left; white-space: normal; }
}
@media (max-width: 600px) {
  .dashboard-container { width: calc(100% - 32px); }
  .dashboard-intro { align-items: stretch; flex-direction: column; padding-top: 28px; }
  .dashboard-filters { align-items: stretch; flex-direction: column; }
  .period-control { width: 100%; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip article { border-right: 0; border-bottom: 1px solid var(--border); }
  .metric-strip article:last-child { border-bottom: 0; }
  .metric-strip article:nth-child(2) { border-bottom: 1px solid var(--border); }
  .dashboard-panel { padding: 18px; }
  .dashboard-topbar .brand-title { display: none; }
  .dashboard-topbar .session-actions { gap: 4px; }
}
/* Cambio 2677: control de pausa legible en el tablero interno. */
.control-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 14px; }
.control-form label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; font-weight: 700; }
.control-form input { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #b9cee0; border-radius: 8px; font: inherit; }
.control-events { margin-top: 14px; color: #35516b; font-size: .86rem; overflow-wrap: anywhere; }
.control-events p { margin: 0; padding: 7px 0; border-top: 1px solid #e4edf4; }
/* Cambio 2677: la atención por folio usa una pantalla de lectura completa y conserva la identidad del portal. */
.admin-navigation { flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; }
.admin-navigation [aria-current="page"] { color: var(--cib-navy); background: #e8f1f8; }
.support-page, .support-workspace { min-height: 100svh; }
.support-page:focus { outline: none; }
.support-container { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
/* Cambio 2677: la bandeja administrativa presenta casos en una tabla y separa las acciones destructivas. */
.support-list-section { margin-top: 32px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--border); border-radius: 14px; background: white; }
.support-list-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.support-list-heading .eyebrow { margin-bottom: 7px; }
.support-list-heading h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.support-list-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.support-list-heading > strong { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: var(--cib-blue-deep); background: #eaf4fa; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.support-list-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, .9fr) minmax(150px, 1fr) auto; align-items: end; gap: 12px; margin-top: 24px; }
.support-list-form label { display: grid; gap: 6px; color: var(--cib-navy); font-size: .6875rem; font-weight: 700; }
.support-list-form input, .support-list-form select { min-height: 46px; padding: 10px 12px; font-size: .75rem; }
.support-list-actions { display: flex; gap: 4px; }
.support-list-actions button { white-space: nowrap; }
.support-list-status { min-height: 21px; margin: 18px 0 14px; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.support-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.support-table-toolbar > span { color: var(--muted); font-size: .75rem; }
.support-table-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.danger-button { min-height: 38px; padding: 8px 14px; border: 1px solid #a62a23; border-radius: 999px; color: #fff; background: #a62a23; font: inherit; font-size: .6875rem; font-weight: 700; cursor: pointer; }
.danger-button:hover:not(:disabled) { background: #872019; }
.danger-button:disabled { opacity: .46; cursor: not-allowed; }
.danger-text-button { min-height: 38px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; color: #a12c26; background: transparent; font: inherit; font-size: .6875rem; font-weight: 700; cursor: pointer; }
.danger-text-button:hover:not(:disabled) { border-color: #f2c6c1; background: #fff1ef; }
.danger-text-button:disabled { color: #8996a4; cursor: not-allowed; }
.support-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.support-case-table { width: 100%; min-width: 980px; border-collapse: collapse; text-align: left; }
.support-case-table th, .support-case-table td { padding: 14px 12px; border-bottom: 1px solid #e4edf3; font-size: .72rem; line-height: 1.5; vertical-align: top; }
.support-case-table thead th { color: #416078; background: #eef5f9; font-size: .625rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.support-case-table tbody tr:last-child th, .support-case-table tbody tr:last-child td { border-bottom: 0; }
.support-case-table tbody tr:hover { background: #f7fbfe; }
.support-check-cell { width: 44px; text-align: center; }
.support-check-cell input { width: 16px; height: 16px; accent-color: var(--cib-blue-deep); cursor: pointer; }
.support-list-item { padding: 0; border: 0; color: var(--cib-blue-deep); background: transparent; font: inherit; font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; text-align: left; }
.support-list-item:hover, .support-list-item[aria-current="true"] { text-decoration: underline; text-underline-offset: 3px; }
.support-list-item-trigger { display: inline-block; padding: 4px 8px; border-radius: 999px; color: #713711; background: #fff0e3; font-size: .625rem; font-weight: 700; white-space: nowrap; }
.support-list-item-question { max-width: 320px; color: var(--cib-ink); overflow-wrap: anywhere; }
.support-list-item-comment { display: block; margin-top: 5px; color: #834017; font-size: .625rem; overflow-wrap: anywhere; }
.support-date-cell { white-space: nowrap; }
.support-row-actions { white-space: nowrap; }
.support-delete-dialog { width: min(480px, calc(100vw - 32px)); padding: 28px; border: 1px solid #d8e5ee; border-top: 4px solid #a62a23; border-radius: 14px; color: var(--cib-navy); box-shadow: 0 20px 70px #062b4d33; }
.support-delete-dialog::backdrop { background: #001e42a3; }
.support-delete-dialog h2 { margin: 8px 0 12px; font-size: 1.3rem; }
.support-delete-dialog p { font-size: .8125rem; line-height: 1.65; }
.support-delete-warning { padding: 12px 14px; border-left: 3px solid #a62a23; background: #fff1ef; }
.support-dialog-close { position: absolute; top: 14px; right: 16px; border: 0; color: var(--muted); background: transparent; font-size: 1.5rem; cursor: pointer; }
.support-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
#support-delete-status { min-height: 20px; color: #a62a23; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.support-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.support-pagination span { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.support-empty { display: flex; align-items: center; gap: 24px; min-height: 150px; margin-top: 18px; padding: 32px; border: 1px dashed #bbcfde; border-radius: 14px; background: white; }
.support-empty-mark { display: grid; flex: 0 0 64px; place-items: center; width: 64px; height: 64px; border: 2px solid #c6e4f1; border-radius: 14px; color: var(--cib-blue-deep); background: #eff8fc; font-weight: 800; letter-spacing: -.04em; }
.support-empty h2 { margin: 0 0 8px; font-size: 1.125rem; }
.support-empty p { max-width: 64ch; margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.support-case-result { margin-top: 18px; border: 1px solid var(--border); border-radius: 14px; background: white; overflow: hidden; }
.support-case-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 28px 32px; border-bottom: 1px solid var(--border); }
.support-case-heading .eyebrow { margin-bottom: 8px; }
.support-case-heading h2 { margin: 0; font-size: clamp(1.45rem, 2.5vw, 2rem); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.support-case-heading h2:focus { outline: none; }
.support-case-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; }
.support-back-link { display: inline-block; margin-top: 12px; font-size: .75rem; font-weight: 700; text-underline-offset: 3px; }
.support-trigger { max-width: 220px; padding: 8px 12px; border: 1px solid #f9c399; border-radius: 999px; color: #743513; background: #fff1e7; font-size: .6875rem; font-weight: 700; text-align: center; }
.support-case-layout { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); }
.support-case-details { padding: 28px; border-right: 1px solid var(--border); background: #f7fafc; }
.support-case-details h3, .support-conversation h3 { margin: 0; font-size: 1rem; }
.support-case-details dl { margin: 12px 0 0; }
.support-detail-row { padding: 13px 0; border-bottom: 1px solid #dfe9f0; }
.support-detail-row dt { margin-bottom: 5px; color: var(--muted); font-size: .6875rem; font-weight: 600; }
.support-detail-row dd { margin: 0; font-size: .8125rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.support-feedback { margin-top: 26px; padding: 16px; border-left: 3px solid var(--cib-orange); border-radius: 0 8px 8px 0; background: #fff0e6; }
.support-feedback h3 { font-size: .75rem; }
.support-feedback p { margin: 7px 0 0; font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-privacy-note { margin: 26px 0 0; color: var(--muted); font-size: .6875rem; line-height: 1.6; }
.support-conversation { min-width: 0; padding: 28px clamp(22px, 3vw, 42px) 42px; }
.support-conversation-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.support-conversation-heading .eyebrow { margin-bottom: 7px; }
.support-conversation-heading > span { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.support-case-transcript { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.support-case-message { width: fit-content; max-width: min(88%, 760px); padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: #f3f8fc; }
.support-case-message.is-question { margin-left: auto; border-color: #bfd8ed; background: #e9f4fd; }
.support-message-role { display: block; margin-bottom: 7px; font-size: .6875rem; font-weight: 800; letter-spacing: .025em; }
.support-case-message p { margin: 0; color: var(--cib-ink); font-size: .875rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-no-messages { color: var(--muted); font-size: .8125rem; }
@media (max-width: 940px) {
  .support-list-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-list-actions { align-self: end; }
  .support-case-layout { grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .dashboard-topbar { flex-direction: column; align-items: stretch; }
  .dashboard-topbar .admin-navigation { justify-content: flex-start; }
  .support-topbar { flex-direction: column; align-items: stretch; }
  .support-topbar .admin-navigation { justify-content: flex-start; }
  .support-container { width: calc(100% - 28px); }
  .support-list-section { margin-top: 14px; }
  .support-list-heading { flex-direction: column; }
  .support-list-form { grid-template-columns: 1fr; }
  .support-list-actions { flex-wrap: wrap; }
  .support-table-toolbar { align-items: flex-start; flex-direction: column; }
  .support-case-layout { grid-template-columns: 1fr; }
  .support-case-details { border-right: 0; border-bottom: 1px solid var(--border); }
  .support-case-heading { flex-direction: column; padding: 24px; }
  .support-conversation { padding: 24px; }
  .support-case-message { max-width: 100%; }
  .support-empty { align-items: start; padding: 24px; }
}
