/* Ajustes de legibilidad y densidad sobre los componentes de Control MTC. */
:root {
    --muted: #657188;
    --line: #e2e6ed;
    --background: #f5f6f9;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(24,33,66,.035);
}

.page-content { padding: 24px 28px 48px; }
.page-heading { margin-bottom: 20px; }
.page-heading h1 { font-size: 23px; font-weight: 600; letter-spacing: -.025em; }
.page-heading p { margin-top: 6px; font-size: 13px; }
.eyebrow { margin-bottom: 6px; color: #657188; font-size: 10px; font-weight: 600; letter-spacing: .07em; }
.panel { border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-heading, .filter-panel-heading, .health-workers-heading { padding: 14px 18px; }
.panel-heading h2, .section-title h2 { font-size: 15px; font-weight: 600; }
.panel-heading h2::before { display: none; }
.section-count { color: #526079; background: #edf0f5; font-size: 12px; }
.primary-button, .secondary-button, .button-link { min-height: 44px; font-size: 13px; font-weight: 600; border-radius: 6px; }
.primary-button { box-shadow: none; }
.primary-button:hover:not(:disabled) { background: #7147bd; }
.secondary-button:hover:not(:disabled) { border-color: #b7c0cf; background: #f8f9fb; }
.icon-button, .icon-link { border-radius: 6px; }
.text-link, .back-link { color: #7147bd; font-weight: 600; }
.topbar .health-pill { min-height: 44px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.side-nav nav a { font-family: Inter, "Segoe UI", sans-serif; font-size: 13px; }
.nav-section { color: #657188; font-size: 10px; }
.brand small { color: #657188; font-size: 11px; }

.field { gap: 7px; color: #44516a; font-size: 12px; font-weight: 600; }
.field input, .field select { border-radius: 6px; border-color: #cfd6e2; font-size: 13px; font-weight: 400; }
.field > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.field input::placeholder { color: #6a7589; opacity: 1; }
.filter-panel .filter-grid { gap: 14px; padding: 18px; }
.quick-filters button { min-height: 44px; border-radius: 6px; color: #526079; border-color: #dce1ea; font-size: 12px; font-weight: 500; }
.quick-filters button.active { color: #63429f; border-color: #d6c7f0; background: #f1ebfa; box-shadow: none; }
.quick-filters button:hover { color: #63429f; background: #f7f4fc; }
.results-heading .export-button { min-height: 44px; }
.pagination-controls button { min-height: 44px; min-width: 44px; font-size: 12px; white-space: nowrap; }
.status-badge { min-height: 26px; padding: 3px 9px; gap: 7px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.status-dot { width: 6px; height: 6px; box-shadow: none; }
.system-alert { border-radius: 6px; }
.system-alert strong, .system-alert span { font-size: 12px; }

/* La bandeja agrupa solicitud, estado y ejecución en seis columnas. */
table.consultations-table-operational { width: 100%; min-width: 0; table-layout: fixed; }
.consultations-table-operational th { padding: 12px; color: #526079; background: #f8f9fb; font-size: 12px; font-weight: 600; }
.consultations-table-operational td { padding: 16px 12px; color: #34425a; font-size: 13px; vertical-align: top; }
.consultations-table-operational th:nth-child(1) { width: 18%; }
.consultations-table-operational th:nth-child(2) { width: 27%; }
.consultations-table-operational th:nth-child(3) { width: 21%; }
.consultations-table-operational th:nth-child(4) { width: 11%; }
.consultations-table-operational th:nth-child(5) { width: 16%; }
.consultations-table-operational th:nth-child(6) { width: 7%; }
.consultation-identity-cell > strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.consultations-table-operational .table-subtext { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.consultations-table-operational .worker-column strong { font-size: 12px; font-weight: 600; }
.consultations-table-operational .worker-column small { margin-top: 6px; font-size: 11px; font-weight: 400; line-height: 1.5; }
.consultations-table-operational .notification-column { min-width: 0; }
.consultations-table-operational .time-column { font-size: 13px; font-weight: 600; }
.consultations-table-operational .status-stack { min-width: 0; gap: 6px; }
.consultations-table-operational .status-stack > small { color: #59667d; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.next-attempt-note { display: inline-flex; align-items: flex-start; gap: 5px; }
.next-attempt-note .app-icon { margin-top: 2px; }
.consultations-table-operational .action-column { vertical-align: middle; }
.consultations-table-operational tbody tr:last-child td { border-bottom: 0; }
.consultation-card-detailed { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.consultation-card-detailed .consultation-icon { display: none; }
.consultation-card-detailed .consultation-content { width: 100%; }
.consultation-card-detailed .consultation-title { flex-wrap: wrap; gap: 8px; }
.consultation-card-detailed .consultation-title strong { font-size: 14px; font-weight: 600; }
.consultation-card-detailed .consultation-status-detail { font-size: 12px; }
.consultation-card-detailed .consultation-card-trace { border: 0; border-radius: 0; gap: 12px; }
.consultation-card-detailed .consultation-card-trace > div { padding: 0; border: 0; }
.consultation-card-trace dt { font-size: 11px; }
.consultation-card-trace dd { font-size: 12px; font-weight: 500; }
.consultation-card-notification { padding-top: 12px; border-top: 1px solid var(--line); }
.consultation-card-notification > span { font-size: 11px; font-weight: 500; }
.consultation-card-open { min-height: 44px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; color: #7147bd; font-size: 12px; font-weight: 600; }
.consultation-card:focus-visible { outline: 3px solid #b9a1e9; outline-offset: 2px; }

/* Tiempos en una sola franja y resultado antes de la auditoría. */
.detail-time-summary { gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.detail-time-summary .detail-kpi { min-height: 88px; padding: 16px 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.detail-time-summary .detail-kpi:last-child { border-right: 0; }
.detail-time-summary .detail-kpi-icon { display: none; }
.detail-time-summary .detail-kpi small { color: #526079; font-size: 12px; }
.detail-time-summary .detail-kpi strong { margin-top: 6px; font-size: 22px; font-weight: 600; }
.detail-meta-compact { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.detail-meta-compact > div { padding: 12px 16px; }
.detail-meta-compact span { font-size: 11px; }
.detail-meta-compact strong { font-size: 12px; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.detail-meta-compact .mono { font-size: 11px; }
.consultation-primary-result { margin-bottom: 20px; }
.unified-mtc-heading { min-height: 64px; }
.unified-mtc-status small { font-size: 11px; }
.unified-mtc-status strong { font-size: 15px; }
.mtc-driver-summary { min-height: 84px; background: #f8f9fc; }
.mtc-driver-summary small { font-size: 10px; }
.mtc-driver-summary strong { font-size: 15px; font-weight: 600; }
.mtc-driver-summary > div > span { font-size: 12px; }
.mtc-driver-icon { width: 40px; height: 40px; border-radius: 8px; color: #657188; background: #eceff5; }
.mtc-tab { min-height: 50px; font-size: 12px; font-weight: 600; }
.mtc-tab.active { color: #7147bd; background: #faf8fe; }
.mtc-tab::after { height: 2px; }
.mtc-license-card > header strong, .mtc-record-heading { font-size: 13px; font-weight: 600; }
.mtc-license-grid dt, .inline-detail-grid dt, .record-detail-summary dt { font-size: 11px; }
.mtc-license-grid dd, .inline-detail-grid dd, .record-detail-summary dd { font-size: 13px; font-weight: 500; }
.extracted-section-heading { min-height: 48px; }
.extracted-section-heading h4 { font-size: 12px; font-weight: 600; }
.extracted-section-heading > span { font-size: 11px; }
.extracted-table th { font-size: 11px; font-weight: 600; }
.extracted-table td { font-size: 12px; }
.row-toggle, .record-view-button { width: 44px; height: 44px; }
.row-toggle { border-radius: 6px; color: #526079; border-color: #d6dde8; background: #fff; }
.record-view-button { border-radius: 6px; }
.worker-trace-heading > div > span { font-size: 12px; }
.worker-trace-summary { background: #fff; }
.worker-trace-summary dt, .worker-attempt dt { font-size: 11px; }
.worker-trace-summary dd, .worker-attempt dd { font-size: 12px; font-weight: 500; }
.worker-trace-summary .worker-trace-attempts dd small { font-size: 11px; font-weight: 400; }
.worker-attempt-list { padding: 12px 16px 16px; gap: 8px; background: #fff; }
.worker-attempt-disclosure { border-radius: 6px; }
.worker-attempt-summary { min-height: 64px; padding: 12px 14px; display: grid; grid-template-columns: minmax(160px,.8fr) minmax(0,2fr) 20px; align-items: center; gap: 8px 16px; cursor: pointer; list-style: none; }
.worker-attempt-summary::-webkit-details-marker { display: none; }
.worker-attempt-summary:focus-visible { outline: 2px solid #a58bd8; outline-offset: -3px; }
.worker-attempt-identity { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.worker-attempt-identity strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.worker-attempt-summary > .status-badge { grid-column: 2; grid-row: 1; justify-self: end; }
.worker-attempt-start { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--muted); font-size: 11px; }
.worker-attempt-start > small { font-size: inherit; }
.worker-attempt-cause { grid-column: 2; grid-row: 2; color: #59667d; font-size: 12px; line-height: 1.5; }
.worker-attempt-chevron { grid-column: 3; grid-row: 1 / 3; color: #657188; }
.worker-attempt-disclosure[open] > .worker-attempt-summary { border-bottom: 1px solid var(--line); background: #fafbfc; }
.worker-attempt-disclosure[open] .worker-attempt-chevron { transform: rotate(90deg); }
.worker-attempt-network p, .worker-network-facts, .worker-network-heading small { font-size: 11px; }
.worker-network-heading strong { font-size: 12px; }
.notification-panel { margin-top: 18px; }
.notification-empty { padding: 16px 18px; }
.notification-empty strong { font-size: 13px; font-weight: 600; }
.notification-empty-icon { width: 32px; height: 32px; border-radius: 6px; color: #657188; background: #edf0f5; font-size: 16px; }

/* Monitoreo: una sola superficie operativa, sin encabezados ni resúmenes duplicados. */
.health-workers-panel { border-radius: 8px; }
.health-command-bar { min-height: 74px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.health-command-title { min-width: 0; display: flex; align-items: center; gap: 18px; }
.health-command-title h1 { margin: 0; color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.health-command-summary { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: #667085; font-size: 12px; }
.health-command-summary span { white-space: nowrap; }
.health-command-summary strong { color: #344054; font-weight: 600; }
.health-command-summary .is-processing, .health-command-summary .is-processing strong { color: #93620a; }
.health-command-summary .needs-attention, .health-command-summary .needs-attention strong { color: #b4233e; }
.health-command-summary .is-filtered { color: #6941c6; }
.health-command-bar .health-update-button { flex: 0 0 auto; }
.health-workers-panel .health-filter-grid { padding: 16px 18px; grid-template-columns: minmax(260px,1fr) minmax(180px,240px) auto; background: #fff; }
.health-workers-table th { height: 46px; padding: 12px; background: #f8f9fb; font-size: 12px; font-weight: 600; }
.health-workers-table td { height: 76px; padding: 14px 12px; font-size: 13px; font-weight: 400; }
.health-workers-table th:nth-child(1) { width: 25%; }
.health-workers-table th:nth-child(2) { width: 19%; }
.health-workers-table th:nth-child(3) { width: 10%; }
.health-workers-table th:nth-child(4) { width: 25%; }
.health-workers-table th:nth-child(5) { width: 14%; }
.health-workers-table th:nth-child(6) { width: 7%; }
.worker-table-identity strong { font-size: 13px; font-weight: 600; }
.worker-table-identity small { margin-top: 4px; font-size: 11px; font-weight: 400; }
.worker-table-identity .worker-icon { color: #657188; background: #f0f2f6; }
.worker-version-value, .worker-signal-value, .worker-activity-value { font-size: 12px; }
.worker-current-work { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
.worker-current-work > strong, .worker-current-work > a { font-size: 12px; font-weight: 500; }
.worker-current-work > small, .worker-current-work > span { color: var(--muted); line-height: 1.5; }
.worker-current-work > small { font-size: 11px; }
.worker-current-work > span { font-size: 12px; }
.health-worker-mobile-card { border-radius: 8px; }
.health-worker-mobile-card > header strong { font-size: 14px; font-weight: 600; }
.health-worker-mobile-card > header span, .health-worker-mobile-card dt { font-size: 11px; }
.health-worker-mobile-card dd { font-size: 13px; font-weight: 500; }
.health-worker-mobile-card > footer { font-size: 11px; }
.worker-context-panel { width: min(880px,calc(100vw - 48px)); box-shadow: 0 16px 56px rgba(11,16,40,.22); }
.worker-dialog-identity { min-width: 0; }
.worker-dialog-title-row { margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.worker-dialog-title-row h2 { margin: 0; }
.worker-dialog-meta { margin: 5px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 11px; }
.worker-dialog-meta span + span::before { content: "·"; margin-right: 14px; color: #a0a8b8; }
.worker-inline-detail-header h2 { font-size: 20px; font-weight: 600; }
.worker-inline-detail-header small { font-size: 11px; }
.worker-context-overview dt, .worker-pause-detail dt, .worker-detail-grid dt { font-size: 11px; }
.worker-context-overview dd, .worker-pause-detail dd, .worker-detail-grid dd { font-size: 12px; font-weight: 500; }
.worker-idle, .worker-admission, .worker-recent-empty { font-size: 12px; }
.worker-recent > header strong { font-size: 13px; font-weight: 600; }
.worker-recent > header span, .worker-recent > header small { font-size: 11px; }
.worker-recent-item > div > span { font-size: 11px; }
.worker-recent-item > div > strong { font-size: 12px; font-weight: 500; }
.worker-context-panel .worker-recent-item { grid-template-columns: minmax(80px,.9fr) minmax(0,1.45fr) minmax(70px,.8fr) auto; gap: 12px; align-items: center; }
.worker-context-panel .worker-recent-item > a { grid-column: auto; justify-self: end; }
.worker-recent-query > small, .worker-recent-execution > small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.worker-recent-result .status-badge { max-width: 100%; white-space: normal; }
.worker-detail-grid > .worker-detail-wide { grid-column: 1 / -1; border-right: 0; }
.worker-technical-section > strong { display: block; padding: 14px 16px; color: #44516a; font-size: 12px; font-weight: 600; }
.worker-pause-summary > p { padding: 12px 14px 0; color: #6b532b; font-size: 12px; }
.worker-pause-summary > dl { grid-template-columns: minmax(0,1fr); }
.worker-mobile-current-work { grid-column: 1 / -1; }
.worker-technical-details > summary { min-height: 48px; font-size: 12px; font-weight: 600; }
.worker-actions button { min-height: 44px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.worker-management > summary span { font-size: 13px; font-weight: 600; }
.worker-management > summary small, .worker-management-body > p { font-size: 11px; }
.worker-dialog-footer .secondary-button { font-size: 12px; }

/* Diálogos con altura de contenido en escritorio, hoja completa en móvil. */
.record-detail-modal { inset: 50% auto auto 50%; width: min(960px,calc(100vw - 48px)); max-height: calc(100dvh - 48px); transform: translate(-50%,-50%); border-radius: 8px; box-shadow: 0 16px 56px rgba(11,16,40,.22); }
.record-detail-header { padding: 16px 20px; }
.record-detail-header h2 { font-size: 18px; font-weight: 600; }
.record-detail-body { background: #fff; }
.record-detail-footer { padding: 12px 20px; }
.consultation-editor-modal { inset: 50% auto auto 50%; width: min(480px,calc(100vw - 40px)); max-height: calc(100dvh - 40px); transform: translate(-50%,-50%); border-radius: 8px; overflow: hidden; animation: none; box-shadow: 0 16px 56px rgba(11,16,40,.22); }
.consultation-editor-modal .drawer-header { padding: 18px 20px; }
.consultation-editor-modal h2 { font-size: 18px; font-weight: 600; }
.consultation-editor-body { padding: 20px; gap: 14px; }
.manual-consultation-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.consultation-editor-actions { padding: 14px 20px; }

@media (max-width: 1200px) {
    .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .filter-grid .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .health-workers-table th, .health-workers-table td { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 1024px) {
    .page-content { padding: 20px; }
    .detail-meta-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .worker-trace-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .worker-trace-summary > div { border-bottom: 1px solid var(--line); }
    .worker-trace-summary > div:nth-child(2n) { border-right: 0; }
    .worker-trace-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
    .worker-attempt > dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .worker-attempt > dl > div:nth-child(2n) { border-right: 0; }
    .worker-attempt > dl > .worker-attempt-wide { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .page-content { padding: 18px 16px 96px; }
    .page-heading { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
    .page-heading h1 { font-size: 22px; }
    .page-heading p { font-size: 12px; }
    .heading-actions { width: 100%; }
    .heading-actions > button { width: 100%; }
    .filter-panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .filter-panel .filter-grid { grid-template-columns: minmax(0,1fr); padding: 16px; }
    .filter-actions { width: 100%; flex-direction: column; }
    .filter-actions > button { width: 100%; }
    .results-heading { align-items: flex-start; flex-wrap: wrap; }
    .results-panel .mobile-cards { display: grid; gap: 12px; padding: 12px; background: #f8f9fb; }
    .results-panel .desktop-table { display: none; }
    .consultation-card-detailed .consultation-card-trace { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-time-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-time-summary .detail-kpi { min-height: 82px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .detail-time-summary .detail-kpi:nth-child(2n) { border-right: 0; }
    .detail-time-summary .detail-kpi:nth-last-child(-n+2) { border-bottom: 0; }
    .detail-time-summary .detail-kpi strong { font-size: 20px; }
    .health-command-bar { min-height: 0; padding: 14px 16px; align-items: flex-start; }
    .health-command-title { align-items: flex-start; flex-direction: column; gap: 5px; }
    .health-command-title h1 { font-size: 18px; }
    .health-command-summary { gap: 4px 10px; font-size: 11px; }
    .health-command-bar .health-update-button { min-width: 44px; padding: 0 12px; }
    .health-workers-panel .health-filter-grid { grid-template-columns: minmax(0,1fr); padding: 16px; }
    .worker-context-panel { width: calc(100dvw - 32px); max-width: calc(100dvw - 32px); }
    .worker-attempt-summary { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 12px; }
    .worker-attempt-identity { align-items: flex-start; flex-direction: column; gap: 4px; }
    .worker-attempt-start { grid-column: 1 / -1; grid-row: 2; }
    .worker-attempt-cause { grid-column: 1 / -1; grid-row: 3; padding-right: 0; }
    .worker-attempt-chevron { display: none; }
    .worker-attempt-summary .status-badge { max-width: 100%; white-space: normal; }
    .record-detail-modal, .consultation-editor-modal { inset: 0; width: 100dvw; height: 100dvh; max-height: 100dvh; border-radius: 0; transform: none; }
    .record-detail-modal { grid-template-rows: auto minmax(0,1fr) auto; }
    .record-detail-footer, .consultation-editor-actions { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .consultation-editor-actions { flex-direction: column-reverse; }
    .consultation-editor-actions > button { width: 100%; }
}

@media (max-width: 600px) {
    .worker-context-panel .worker-recent-item { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .worker-context-panel .worker-recent-item > a { grid-column: 1 / -1; justify-self: stretch; }
}

@media (max-width: 430px) {
    .worker-context-panel { inset: 0; width: 100dvw; max-width: 100dvw; max-height: 100dvh; transform: none; }
    .detail-meta-compact { grid-template-columns: minmax(0,1fr); }
    .detail-meta-compact > div { padding: 10px 14px; }
    .detail-time-summary .detail-kpi small { font-size: 11px; }
    .consultation-card-detailed .consultation-card-trace { grid-template-columns: minmax(0,1fr); }
    .worker-trace-summary { grid-template-columns: minmax(0,1fr); }
    .worker-trace-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .worker-trace-summary > div:last-child { border-bottom: 0; }
    .worker-attempt > dl { grid-template-columns: minmax(0,1fr); }
    .worker-attempt > dl > div { border-right: 0; }
    .worker-attempt > dl > .worker-attempt-network { grid-template-columns: minmax(0,1fr); }
    .worker-context-panel .worker-recent-item { grid-template-columns: minmax(0,1fr); }
    .worker-context-panel .worker-recent-item > a { grid-column: 1; }
}

/* Panel operativo con densidad Ynex: métricas sobrias y lectura rápida. */
.dashboard-heading { margin-bottom: 16px; }
.dashboard-heading h1 { font-size: 23px; font-weight: 600; }
.dashboard-heading .page-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }
.dashboard-overview-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.dashboard-overview-grid .metric-card { position: relative; min-height: 120px; padding: 17px 42px 17px 18px; gap: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); transform: none; }
.dashboard-overview-grid .metric-card:hover { border-color: #cdd4df; box-shadow: 0 5px 14px rgba(24,33,66,.07); transform: none; }
.dashboard-overview-grid .metric-main { align-items: flex-start; gap: 12px; }
.dashboard-overview-grid .metric-icon { width: 38px; height: 38px; border-radius: 8px; }
.dashboard-overview-grid .metric-primary .metric-icon { color: #7147bd !important; background: #f0eafa; }
.dashboard-overview-grid .metric-success .metric-icon { color: #12805f !important; background: #e7f7f1; }
.dashboard-overview-grid .metric-warning .metric-icon { color: #a86b0d !important; background: #fff3dc; }
.dashboard-overview-grid .metric-danger .metric-icon { color: #bd3650 !important; background: #fce9ed; }
.dashboard-overview-grid .metric-label { color: #526079; font-size: 12px; font-weight: 500; }
.dashboard-overview-grid .metric-copy strong { margin: 7px 0 5px; font-size: 27px; font-weight: 600; }
.dashboard-overview-grid .metric-copy small { max-width: none; color: var(--muted); font-size: 11px; line-height: 1.35; }
.metric-card-chevron { position: absolute; top: 18px; right: 16px; width: 24px; height: 24px; display: grid; place-items: center; color: #8b95a8; }
.metric-card-chevron .app-icon { width: 16px; height: 16px; }
.dashboard-grid { grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); gap: 16px; }
.chart-panel .panel-heading, .activity-panel .panel-heading { min-height: 54px; }
.chart-shell { height: 250px; padding: 18px 16px 12px 2px; }
.activity-panel .activity-list { padding: 0 16px 6px; }

/* Las acciones del worker son visibles como control, pero permanecen protegidas. */
.worker-management > summary { list-style: none; }
.worker-management > summary::-webkit-details-marker { display: none; }
.worker-management > summary strong { color: #3f4a61; font-size: 13px; font-weight: 600; }
.worker-management-toggle { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d7dde8; border-radius: 6px; color: #526079; background: #fff; font-size: 11px !important; font-weight: 600 !important; white-space: nowrap; }
.worker-management-toggle .app-icon { width: 15px; height: 15px; transition: transform .15s ease; }
.worker-management[open] .worker-management-toggle { color: #6644a8; border-color: #cfc2e7; background: #f8f5fc; }
.worker-management[open] .worker-management-toggle .app-icon { transform: rotate(180deg); }

@media (max-width: 1180px) {
    .dashboard-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-grid { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 430px) {
    .dashboard-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .dashboard-overview-grid .metric-card { min-height: 112px; padding: 14px 32px 14px 14px; }
    .dashboard-overview-grid .metric-main { gap: 8px; }
    .dashboard-overview-grid .metric-icon { width: 32px; height: 32px; }
    .dashboard-overview-grid .metric-copy strong { font-size: 23px; }
    .dashboard-overview-grid .metric-copy small { font-size: 10px; }
    .metric-card-chevron { top: 14px; right: 9px; }
    .worker-management > summary { min-height: 60px; align-items: center; flex-direction: row; gap: 10px; }
    .worker-management-toggle { flex: 0 0 auto; }
}

@media (max-width: 360px) {
    .dashboard-overview-grid .metric-icon { display: none; }
}
