/* =========================================================
   ABAssist — SOLO FORMULARIO + SUGERENCIAS + TOAST
   (Sin estilos del modal)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --brand: #1a80ad;
    --brand-hover: #085aab;
    --brand-press: #074f8a;
    --focus: #b3d7ff;

    --bg: #ffffff;
    --text: #0f172a;
    /* slate-900 */
    --text-dim: #64748b;
    /* slate-500/600 */
    --border: #e5e7eb;
    /* gray-200 */
    --shadow-1: 0 8px 18px rgba(15, 23, 42, .10);
    --shadow-2: 0 24px 60px rgba(15, 23, 42, .16);

    --radius: 10px;
    --font: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* =========================================================
   COMMAND FORM (dock inferior, centrado)
   ========================================================= */

#abassist-form {
    position: fixed;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 1001;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    font-family: var(--font);
    cursor: move;
    /* Indication of draggability */
}

/* Prefijo “/” (decorativo) */
#abassist-form .abassist__slash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 36px;
    padding: 0 4px;
    border-radius: 6px;
    color: var(--text-dim);
    user-select: none;
}

/* Input */
#abassist-input {
    width: 360px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    line-height: 36px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

#abassist-input::placeholder {
    color: #94a3b8;
}

#abassist-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .18);
    background: #fff;
}

/* Botón Run */
#abassist-form .abassist__btn {
    height: 36px;
    padding: 0 14px;
    min-width: 72px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(10, 102, 194, .95);
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    line-height: 36px;

    box-shadow: 0 6px 16px rgba(10, 102, 194, .25);
    transition: background .15s ease, border-color .15s ease, transform .06s ease, box-shadow .15s ease;
}

#abassist-form .abassist__btn:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    box-shadow: 0 8px 20px rgba(10, 102, 194, .30);
}

#abassist-form .abassist__btn:active {
    transform: translateY(1px);
}

#abassist-form .abassist__btn:disabled {
    opacity: .7;
    cursor: default;
    transform: none;
}

/* Botón Help (icono redondo pequeño) */
#abassist-help.abassist__help {
    appearance: none;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #f9973e;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    margin-left: 4px;
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease, transform .06s ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

#abassist-help.abassist__help:hover {
    background: #f6f8fb;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .10);
}

#abassist-help.abassist__help:active {
    transform: translateY(1px);
}

/* Responsive */
@media (max-width: 520px) {
    #abassist-input {
        width: 240px;
    }
}

@media (max-width: 380px) {
    #abassist-input {
        width: 200px;
    }
}


/* ==========
   OVERLAY / MODAL
   ========== */
#abassist-modal {
    position: fixed;
    inset: 0;
    /* top/right/bottom/left: 0 */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    /* oscuro translúcido */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#abassist-modal .abassist-modal__dialog {
    width: min(1100px, 94vw);
    max-height: 80vh;
    background: #f9fafb;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==========
   HEADER
   ========== */
#abassist-modal .abassist-modal__header {
    padding: 0.9rem 1.4rem;
    background: linear-gradient(120deg, #2563eb, #38bdf8);
    color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#abassist-modal #abassist-modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#abassist-modal .abassist-modal__close {
    border: none;
    background: rgba(15, 23, 42, 0.15);
    color: #f9fafb;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

#abassist-modal .abassist-modal__close:hover {
    background: rgba(15, 23, 42, 0.25);
    transform: scale(1.05);
}

/* ==========
   BODY
   ========== */
#abassist-modal .abassist-modal__body {
    padding: 1.2rem 1.4rem 1.3rem;
    overflow-y: auto;
}

/* Scrollbar discreto */
#abassist-modal .abassist-modal__body::-webkit-scrollbar {
    width: 6px;
}

#abassist-modal .abassist-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

#abassist-modal .abassist-modal__body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}

/* ==========
   SECCIONES (System / Client / Employee)
   ========== */
#abassist-modal .abassist-row--full {
    margin-top: 1rem;
    margin-bottom: 0.35rem;
}

#abassist-modal .abassist-row--full .abassist-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #333;
    font-weight: 600;
}

#abassist-modal .abassist-row--full .abassist-empty::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

/* ==========
   FILA DE COMANDO
   ========== */
#abassist-modal .abassist-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    background: #ffffff;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.35);
    margin-bottom: 0.6rem;
    transition: box-shadow 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}

#abassist-modal .abassist-row:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: rgba(59, 130, 246, 0.45);
}

/* Comando: /client [name] */
#abassist-modal .abassist-row__label {
    flex: 0 0 600px;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: #111827;
    display: flex;
    align-items: center;
}

/* Descripción + botón */
#abassist-modal .abassist-row__value {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.88rem;
    color: #4b5563;
}

/* anula el margin-top inline del div interior */
#abassist-modal .abassist-row__value>div {
    margin-top: 0 !important;
}

/* Texto de descripción ocupa todo lo posible */
#abassist-modal .abassist-row__value {
    white-space: nowrap;
}

#abassist-modal .abassist-row__value {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========
   BOTÓN "Acción"
   ========== */
#abassist-modal .abassist__btn {
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #f9fafb;
    transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.12s ease;
    white-space: nowrap;
}

#abassist-modal .abassist__btn--sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.78rem;
}



#abassist-modal .abassist__btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

/* ===========================
   BOTÓN "Acción" – versión pulida
   =========================== */

.abassist__btn,
.abassist__btn.abassist__btn--sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;

    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;

    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #ffffff;

    /* Sombra más limpia, sin “halo” raro */
    transform: translateY(0);

    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        filter 150ms ease;
}



.abassist__btn:active,
.abassist__btn.abassist__btn--sm:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.50);
    filter: brightness(0.97);
}

.abassist__btn:focus-visible,
.abassist__btn.abassist__btn--sm:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 2px;
}


/* ===========================
   CABECERAS DE SECCIÓN (SYSTEM / CLIENT / EMPLOYEE)
   =========================== */

/* Contenedor de la cabecera */
.abassist-row--full .abassist-empty {
    display: flex;
    align-items: center;

    margin: 0px 0 0px;
    padding: 0px 18px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #333;
    position: relative;
}


/* Punto de color con halo (bullet) a la izquierda */
.abassist-row--full .abassist-empty::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 10px;

    background: #6366f1;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25);
}

/* Texto dentro (por si hay span) */
.abassist-row--full .abassist-empty span {
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

/* Un pelín de separación antes de las filas normales */
.abassist-row--full+.abassist-row {
    margin-top: 4px;
}




/*-----------------------------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------   Cliente ------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------------------------*/



/* =========================
   ABASmart Assistant – Client View
   ==========================*/

#abassist-modal .cmd-client {
    padding: 10px 10px 32px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
}

/* Layout del header CLIENT */

#abassist-modal .cmd-client__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

#abassist-modal .cmd-client__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#abassist-modal .cmd-client__name {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

#abassist-modal .cmd-client__meta {
    font-size: 12px;
    color: #6b7280;
}

/* Botones (Edit y Open) con look ABASmart azul */

#abassist-modal .cmd-client__cta {
    display: flex;
    align-items: center;
    gap: 8px;
}

#abassist-modal .cmd-client__btn,
#abassist-modal .cmd-employee__btn {
    border: none;
    outline: none;
    cursor: pointer;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, #1d6fdc, #33b1ff);
    box-shadow: 0 8px 16px rgba(29, 111, 220, 0.25);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s;
}

#abassist-modal .cmd-client__btn:hover,
#abassist-modal .cmd-employee__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(29, 111, 220, 0.32);
}

#abassist-modal .cmd-client__btn:active,
#abassist-modal .cmd-employee__btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* “Open” concreto (por si viene con clases previas tipo .csbtn) */

#abassist-modal .cmd-employee__btn.csbtn {
    background: linear-gradient(135deg, #1d6fdc, #33b1ff);
    border-radius: 999px !important;
    border: none !important;
    color: #ffffff !important;
}


/* Grid principal */

#abassist-modal .cmd-client__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

/* Cards */

#abassist-modal .cmd-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Cards que ocupan ancho completo */

#abassist-modal .cmd-card--mid,
#abassist-modal .cmd-card--wide {
    grid-column: 1 / -1;
}

/* Títulos de bloque tipo “PRIMARY INSURANCE” */

#abassist-modal .cmd-card__title {
    position: relative;
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

#abassist-modal .cmd-card__title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #1d6fdc;
    /* azul ABASmart */
    box-shadow: 0 0 0 5px rgba(29, 111, 220, 0.14);
}

/* Línea suave tras el título */

#abassist-modal .cmd-card__title::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(to right, rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.05));
}

/* Texto dentro de las cards */

#abassist-modal .cmd-card p {
    margin: 0;
    font-size: 12px;
    color: #374151;
}

#abassist-modal .cmd-card p strong {
    font-weight: 600;
    color: #111827;
}

/* Chips (diagnosis, BCBA, etc.) */

#abassist-modal .cmd-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#abassist-modal .cmd-list li,
#abassist-modal .cmd-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

/* Rendering providers */

#abassist-modal .cmd-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#abassist-modal .cmd-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

#abassist-modal .cmd-contact__left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#abassist-modal .cmd-contact__name {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
}

/* Timeline de próximas visitas */

#abassist-modal .cmd-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

#abassist-modal .cmd-timeline__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
}

#abassist-modal .cmd-timeline__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    margin-top: 4px;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

#abassist-modal .cmd-timeline__title {
    font-weight: 500;
    color: #111827;
}

#abassist-modal .cmd-timeline__date {
    font-size: 11px;
    color: #6b7280;
}

/* Alert de authorizations reutilizando Bootstrap pero limpiando bordes duros */

#abassist-modal .cmd-card .alert-warning {
    border-radius: 10px;
    border: 1px solid rgba(234, 179, 8, 0.5);
    background: #fef3c7;
    font-size: 11px;
    padding: 8px 10px;
    margin: 4px 0 0;
}

/* ============================
   Client matches (listado)
   ============================ */
#abassist-modal .client-select {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
    padding: 8px 4px 4px;
}

/* Header */
#abassist-modal .client-select .cs__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

#abassist-modal .client-select .cs__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4b5563;
    margin: 0 0 2px;
}

#abassist-modal .client-select .cs__meta {
    font-size: 11px;
    color: #9ca3af;
}

/* Empty state */
#abassist-modal .client-select .cs__empty {
    border-radius: 10px;
    padding: 18px 16px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    font-size: 12px;
    color: #6b7280;
}

#abassist-modal .client-select .cs__empty code {
    background: #e5f0ff;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
}

/* Tabla "fake" */
#abassist-modal .client-select .cs__table {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
    font-size: 12px;
}

/* Cabecera */
#abassist-modal .client-select .cs__thead {
    display: grid;
    grid-template-columns: minmax(180px, 2.2fr) minmax(90px, 0.9fr) minmax(110px, 1fr) auto;
    gap: 0;
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(90deg, #f4f7ff, #edf2ff);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

#abassist-modal .client-select .cs__thead>div {
    display: flex;
    align-items: center;
}

#abassist-modal .client-select .cs__th-actions {
    justify-content: flex-end;
}

/* Cuerpo */
#abassist-modal .client-select .cs__tbody {
    max-height: 360px;
    overflow-y: auto;
}

/* Filas */
#abassist-modal .client-select .cs__tr {
    display: grid;
    grid-template-columns: minmax(180px, 2.2fr) minmax(90px, 0.9fr) minmax(110px, 1fr) auto;
    gap: 0;
    padding: 10px 16px;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    background: #ffffff;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    outline: none;
}

#abassist-modal .client-select .cs__tr:last-child {
    border-bottom: none;
}

#abassist-modal .client-select .cs__tr:hover {
    background: linear-gradient(90deg, #f9fbff, #f3f6ff);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

#abassist-modal .client-select .cs__tr:focus-visible {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

/* Celdas */
#abassist-modal .client-select .cs__td {
    display: flex;
    align-items: center;
    min-height: 28px;
    color: #374151;
}

#abassist-modal .client-select .cs__td-name {
    gap: 10px;
}

/* Avatar con inicial */
#abassist-modal .client-select .cs__avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: radial-gradient(circle at 30% 0, #b4d5ff, #2563eb);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.35);
}

#abassist-modal .client-select .cs__name {
    font-weight: 500;
    color: #111827;
}

/* Acciones */
#abassist-modal .client-select .cs__td-actions {
    justify-content: flex-end;
    gap: 6px;
}

/* Botones reutilizando look azul del assistant */
#abassist-modal .client-select .csbtn {
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

#abassist-modal .client-select .csbtn--primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    box-shadow:
        0 10px 22px rgba(37, 99, 235, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

#abassist-modal .client-select .csbtn--primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow:
        0 12px 26px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.35) inset;
    transform: translateY(-1px);
}

#abassist-modal .client-select .csbtn--primary:active {
    transform: translateY(0);
    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.35),
        0 0 0 1px rgba(17, 24, 39, 0.08) inset;
}

#abassist-modal .client-select .csbtn:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(37, 99, 235, 0.7);
}


/*
----------------------------------------------------------------------------------------------------------------------*/
/*
----------------------------------------------------------------------------------------------------------------------*/
/*
----------------------------------------------------------------------------------------------------------------------*/
/*
----------------------------------------------------------------------------------------------------------------------*/


/* ===========================
   EMPLOYEE VIEW (ABASSIST)
   =========================== */

.cmd-employee {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 10px;
    color: #111827;
}

/* ---------- Header ---------- */

.cmd-employee .emp-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.cmd-employee .client-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-employee .emp-name {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.cmd-employee .emp-meta {
    font-size: 13px;
    color: #6b7280;
}

/* Botón Edit (reusa look de los demás) */
.cmd-employee .cmd-client__cta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmd-employee .cmd-client__btn {
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s;
}

.cmd-employee .cmd-client__btn:hover {
    background: #1d4ed8;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.cmd-employee .cmd-client__btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* Variante secundaria para botones tipo "Copy", "Compose" */
.cmd-employee .cmd-client__btn.cmd-client__btn--secondary {
    background: #f3f4ff;
    color: #2563eb;
    box-shadow: none;
}

/* ---------- Grid principal ---------- */

.cmd-employee .emp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr);
    gap: 18px 24px;
}

/* Tarjetas base */

.cmd-employee .emp-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

/* Contact card: columna izquierda */
.cmd-employee .emp-grid>.emp-card:first-of-type {
    grid-column: 1;
}

/* Upcoming Visits card: columna derecha */
.cmd-employee .emp-card.emp-card--wide {
    grid-column: 2;
}

/* Assigned clients: ocupa todo el ancho debajo */
.cmd-employee .emp-grid>.emp-card:last-of-type {
    grid-column: 1 / -1;
}

/* ---------- Títulos de tarjeta ---------- */

.cmd-employee .emp-card__title {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.cmd-employee .emp-card__title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

/* ---------- Contact list ---------- */

.cmd-employee .emp-contact {
    list-style: none;
    margin: 0;
    padding: 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.cmd-employee .emp-contact li {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: flex-start;
    column-gap: 10px;
}

.cmd-employee .emp-contact .k {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.cmd-employee .emp-contact .v {
    color: #111827;
}

.cmd-employee .emp-contact a {
    color: #2563eb;
    text-decoration: none;
}

.cmd-employee .emp-contact a:hover {
    text-decoration: underline;
}

/* Bloque valor + botones (email/phone) */

.cmd-employee .contact-value-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cmd-employee .contact-value-actions .a {
    display: flex;
    gap: 6px;
}

.cmd-employee .contact-value-actions .cmd-client__btn {
    padding-inline: 12px;
    font-size: 12px;
}

/* ---------- Upcoming visits ---------- */

.cmd-employee .emp-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.cmd-employee .emp-card__actions {
    display: flex;
    gap: 8px;
}

.cmd-employee .emp-card__actions .cmd-client__btn {
    padding-inline: 14px;
    font-size: 12px;
}

/* Variante de botón primario para "Open Calendar" */
.cmd-employee .cmd-client__btn.cmd-client__btn--primary {
    background: #2563eb;
    color: #ffffff;
}

/* Timeline */

.cmd-employee .emp-timeline {
    margin-top: 4px;
    padding-left: 4px;
    border-left: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-employee .emp-timeline__item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cmd-employee .emp-timeline__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    margin-left: -5px;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.28);
    flex-shrink: 0;
}

.cmd-employee .emp-timeline__content {
    font-size: 13px;
    color: #111827;
}

.cmd-employee .emp-timeline__title {
    font-weight: 500;
    margin-bottom: 2px;
}

.cmd-employee .emp-timeline__meta {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 6px;
}

/* Estado vacío */

.cmd-employee .emp-empty {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    font-size: 13px;
}

.cmd-employee .emp-empty__title {
    font-weight: 500;
    margin-bottom: 2px;
}

.cmd-employee .emp-empty__hint {
    font-size: 12px;
    color: #6b7280;
}

/* ---------- Assigned clients ---------- */

.cmd-employee .cmd-contacts {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmd-employee .cmd-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid rgba(209, 213, 219, 0.7);
}

.cmd-employee .cmd-contact__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmd-employee .cmd-contact__name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

/* Botón "Open" en clientes asignados */
.cmd-employee .cmd-contact .cmd-client__btn {
    padding-inline: 14px;
    font-size: 12px;
}

/* ---------- Footer ---------- */

.cmd-employee .emp-footer {
    margin-top: 12px;
}

/* ---------- Responsive pequeño ---------- */

@media (max-width: 1024px) {
    .cmd-employee .emp-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cmd-employee .emp-card.emp-card--wide,
    .cmd-employee .emp-grid>.emp-card:last-of-type {
        grid-column: 1;
    }

    .cmd-employee .contact-value-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ===== ABASmart Assistant – Toast ===== */

#abassist-toast {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 9999;
    /* por encima del modal/formulario */
    pointer-events: none;
    /* que no bloquee clics debajo */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Contenedor visual del toast */
#abassist-toast .toast {
    min-width: 260px;
    max-width: 360px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.96);
    /* gris muy oscuro */
    color: #f9fafb;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid rgba(96, 165, 250, 0.35);
    /* borde azul suave */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* animación de entrada */
    opacity: 1;
    transform: translateY(0);
    animation: abassist-toast-in 220ms ease-out;
}

/* Título del toast */
#abassist-toast .toast>strong {
    font-weight: 600;
    font-size: 12px;
}

/* Texto secundario */
#abassist-toast .toast>div {
    font-weight: 400;
    color: #e5e7eb;
}

/* Animación */
@keyframes abassist-toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px) translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Si quieres poder ocultarlo con clase .is-hidden */
#abassist-toast.is-hidden {
    display: none;
}

/* CONTENEDOR GENERAL */
#abassist-modal .cmd-notes {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 4px 0;
}

/* HEADER: TÍTULO + HERRAMIENTAS */
#abassist-modal .cmd-notes__hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    padding: 0 12px 12px;
    border-bottom: 1px solid #e5e7eb;
}

#abassist-modal .cmd-notes__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#abassist-modal .cmd-notes__name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

#abassist-modal .cmd-notes__meta,
#abassist-modal .cmd-muted {
    font-size: 12px;
    color: #6b7280;
}

/* BUSCADOR + CHIPS */
#abassist-modal .cmd-notes__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

#abassist-modal .cmd-notes__search {
    flex: 1 1 220px;
    min-width: 0;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#abassist-modal .cmd-notes__search:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
}

#abassist-modal .cmd-notes__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* CHIPS */
#abassist-modal .cmd-notes .chip {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.2;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

#abassist-modal .cmd-notes .chip:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1d4ed8;
}

#abassist-modal .cmd-notes .chip.is-active {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

/* LISTADO DE NOTAS */
#abassist-modal .cmd-notes .notes {
    padding: 0 12px 4px;
}

#abassist-modal .cmd-notes .notes__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 430px;
    overflow: auto;
}

/* TARJETA DE NOTA */
#abassist-modal .cmd-notes .note {
    display: grid;
    grid-template-columns: minmax(110px, 130px) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.16s ease, transform 0.12s ease, border-color 0.16s ease;
}

#abassist-modal .cmd-notes .note:hover {
    transform: translateY(-1px);
    border-color: #c7d2fe;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

/* COLUMNA IZQUIERDA: FECHA + MINUTOS */
#abassist-modal .cmd-notes .note__left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    color: #6b7280;
}

#abassist-modal .cmd-notes .note__date {
    font-weight: 600;
    color: #111827;
}

#abassist-modal .cmd-notes .note__mins {
    font-size: 11px;
}

/* CUERPO NOTA */
#abassist-modal .cmd-notes .note__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#abassist-modal .cmd-notes .note__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

#abassist-modal .cmd-notes .note__code {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
}

#abassist-modal .cmd-notes .note__meta {
    font-size: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #6b7280;
}

#abassist-modal .cmd-notes .note__analyst {
    font-weight: 500;
}

/* STATUS BADGES */
#abassist-modal .cmd-notes .note__status {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#abassist-modal .cmd-notes .note__status--draft {
    background: #f3f4f6;
    color: #4b5563;
}

#abassist-modal .cmd-notes .note__status--submitted {
    background: #fef3c7;
    color: #92400e;
}

#abassist-modal .cmd-notes .note__status--signed {
    background: #dcfce7;
    color: #166534;
}

/* ACCIONES */
#abassist-modal .cmd-notes .note__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

#abassist-modal .cmd-notes .note__actions .cmd-client__btn {
    font-size: 11px;
    padding: 5px 10px;
}

/* ESTADO VACÍO */
#abassist-modal .cmd-notes .empty {
    padding: 30px 16px 10px;
    text-align: center;
    color: #6b7280;
}

#abassist-modal .cmd-notes .empty__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

#abassist-modal .cmd-notes .empty__hint {
    font-size: 12px;
}

/* FOOTER */
#abassist-modal .cmd-notes__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 4px;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

#abassist-modal .cmd-notes__footer-left,
#abassist-modal .cmd-notes__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    #abassist-modal .cmd-notes .note {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
    }

    #abassist-modal .cmd-notes .note__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    #abassist-modal .cmd-notes__hero {
        align-items: flex-start;
    }

    #abassist-modal .cmd-notes__tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    #abassist-modal .cmd-notes__search {
        width: 100%;
    }

    #abassist-modal .cmd-notes__filters {
        justify-content: flex-start;
    }
}


/* ROOT LAYOUT */
.cmd-insurance {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 18px 14px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #0f172a;
}

/* HEADER */
.cmd-insurance__hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.cmd-insurance__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-insurance__name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.cmd-insurance__meta {
    font-size: 11px;
    color: #64748b;
}

.cmd-insurance__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Reutiliza botones existentes, solo pequeño ajuste local si hace falta */
.cmd-insurance .cmd-client__btn {
    font-size: 11px;
    padding: 5px 10px;
}

/* GRID */
.cmd-insurance__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

/* En pantallas medianas/grandes: 3 columnas arriba + 1 wide abajo */
@media (min-width: 880px) {
    .cmd-insurance__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: flex-start;
    }

    .cmd-insurance__grid .card--wide {
        grid-column: 1 / -1;
    }
}

/* CARD BASE */
.cmd-insurance .card {
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 10px 11px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmd-insurance .card__title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}

/* HEAD DENTRO DE CARD WIDE */
.cmd-insurance .card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.cmd-insurance .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* KEY/VALUE (SUMMARY / COVERAGE) */
.cmd-insurance .kv {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.cmd-insurance .kv>div {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.06);
}

.cmd-insurance .kv dt {
    font-weight: 500;
    color: #475569;
}

.cmd-insurance .kv dd {
    margin: 0;
    text-align: right;
    color: #0f172a;
    font-weight: 400;
}

/* ID CARD */
.cmd-insurance .idcard {
    border-radius: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    padding: 8px 9px;
    background: linear-gradient(135deg, #eff6ff 0%, #f9fafb 40%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
}

.cmd-insurance .idcard__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cmd-insurance .idcard__row span {
    color: #475569;
}

.cmd-insurance .idcard__row strong {
    color: #0f172a;
    font-weight: 600;
}

.cmd-insurance .idcard__actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* AUTHS LIST */
.cmd-insurance .auths {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.cmd-insurance .auth {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #ffffff;
    padding: 8px 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmd-insurance .auth__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
}

.cmd-insurance .auth__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
}

.cmd-insurance .auth__title strong {
    font-weight: 600;
    color: #0f172a;
}

.cmd-insurance .auth__desc {
    color: #64748b;
    font-size: 11px;
}

.cmd-insurance .auth__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

/* Chips locales para metas */
.cmd-insurance .chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #f8fafc;
    color: #475569;
    font-weight: 500;
}

/* METER / PROGRESS */
.cmd-insurance .auth__line {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-insurance .meter {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.cmd-insurance .meter__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 50%, #22c55e 100%);
}

.cmd-insurance .auth__units {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: #475569;
}

.cmd-insurance .auth__units .u--used {
    font-weight: 600;
    color: #1d4ed8;
}

.cmd-insurance .auth__units .u--remain {
    font-weight: 500;
    color: #16a34a;
}

/* AUTHS ACTIONS */
.cmd-insurance .auth__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

/* EMPTY STATES */
.cmd-insurance .empty {
    border-radius: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    padding: 10px 11px;
    background: #f8fafc;
    text-align: left;
}

.cmd-insurance .empty__title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.cmd-insurance .empty__hint {
    font-size: 11px;
    color: #64748b;
}

/* FOOTER */
.cmd-insurance__footer {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cmd-insurance__footer-left,
.cmd-insurance__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Utilidad muted reutilizada */
.cmd-muted {
    color: #64748b;
}

/* ===========================
   CMD CALL (Phone directory)
   =========================== */

.cmd-call {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #0f172a;
}

/* Header */
.cmd-call__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.cmd-call__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-call__name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.cmd-call__meta {
    font-size: 11px;
    color: #6b7280;
}

.cmd-call__cta {
    display: flex;
    gap: 8px;
}

/* Card de contactos (scopeado solo a cmd-call) */
.cmd-call .card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 14px 14px 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cmd-call .card__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

/* Lista de teléfonos */
.cmd-call .phones {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmd-call .phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.cmd-call .phone:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.cmd-call .phone__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cmd-call .phone__who {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cmd-call .phone__name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmd-call .phone__number {
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.cmd-call .phone__number:hover {
    text-decoration: underline;
}

.cmd-call .phone__number--muted {
    color: #9ca3af;
}

/* Chips locales */
.cmd-call .chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 500;
}

/* Acciones de cada teléfono */
.cmd-call .phone__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

/* Reutiliza los estilos de botones del asistente, pero scopeados
   por si acaso esta página se carga aislada */
.cmd-call .cmd-client__btn {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease, box-shadow 0.08s ease;
    white-space: nowrap;
}

.cmd-call .cmd-client__btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-0.5px);
}

.cmd-call .cmd-client__btn:disabled {
    opacity: 0.45;
    cursor: default;
}

/* Variante primaria */
.cmd-call .cmd-client__btn--primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.cmd-call .cmd-client__btn--primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Empty state */
.cmd-call .empty {
    padding: 22px 14px;
    text-align: center;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
}

.cmd-call .empty__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.cmd-call .empty__hint {
    font-size: 11px;
    color: #6b7280;
}

/* Footer */
.cmd-call__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.cmd-call__footer-left,
.cmd-call__footer-right {
    display: flex;
    gap: 8px;
}

/* ROOT EMAIL VIEW */
.cmd-email {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
    font-size: 14px;
}

/* HEADER */
.cmd-email__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cmd-email__title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cmd-email__name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.cmd-email__meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.cmd-email__cta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* GENÉRICO MUTED SOLO AQUÍ */
.cmd-email .cmd-muted {
    color: #6b7280;
    font-size: 0.8rem;
}

/* CARD WRAPPER (solo dentro de cmd-email) */
.cmd-email .card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0.85rem 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.cmd-email .card__title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

/* LISTA DE EMAILS */
.cmd-email .emails {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cmd-email .email {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed #e5e7eb;
}

.cmd-email .email:last-child {
    border-bottom: none;
}

/* COLUMNA IZQUIERDA */
.cmd-email .email__main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.cmd-email .email__who {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cmd-email .email__name {
    font-weight: 500;
    color: #111827;
    font-size: 0.9rem;
}

.cmd-email .email__addr {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}

.cmd-email .email__addr:hover {
    text-decoration: underline;
}

.cmd-email .email__addr--muted {
    color: #9ca3af;
}

/* CHIP SOLO AQUÍ */
.cmd-email .chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #e5f0ff;
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.23);
}

/* ACCIONES A LA DERECHA */
.cmd-email .email__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.35rem;
    align-items: center;
}

/* Botones dentro de esta vista (reutiliza .cmd-client__btn global) */
.cmd-email .cmd-client__btn {
    font-size: 0.78rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border-width: 1px;
    line-height: 1.2;
}

/* Estado disabled visual */
.cmd-email .cmd-client__btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* EMPTY STATE */
.cmd-email .empty {
    text-align: center;
    padding: 1.25rem 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.cmd-email .empty__title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.cmd-email .empty__hint {
    font-size: 0.8rem;
}

/* FOOTER */
.cmd-email__footer {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.cmd-email__footer-left,
.cmd-email__footer-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .cmd-email__hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-email__cta {
        align-self: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .cmd-email .email {
        flex-direction: column;
        align-items: stretch;
    }

    .cmd-email .email__actions {
        justify-content: flex-start;
    }

    .cmd-email__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cmd-email__footer-left,
    .cmd-email__footer-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* ===== Client Progress (cmd-progress) ===== */

.cmd-progress {
    padding: 16px 18px 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header */

.cmd-progress__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.cmd-progress__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-progress__name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.cmd-progress__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
}

.cmd-progress__meta .cmd-muted {
    color: #6b7280;
}

.cmd-progress__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* KPIs */

.cmd-progress .kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cmd-progress .kpi {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: radial-gradient(circle at top left, #eff6ff 0, #f9fafb 45%, #ffffff 100%);
    padding: 10px 12px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cmd-progress .kpi__label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.cmd-progress .kpi__value {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* Card base (solo en cmd-progress) */

.cmd-progress .card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-progress .card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.cmd-progress .card__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.cmd-progress .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Programs list */

.cmd-progress .programs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-progress .program {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f9fafb;
}

.cmd-progress .program__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cmd-progress .program__title {
    font-size: 12px;
    color: #111827;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
}

.cmd-progress .program__title .muted {
    font-size: 11px;
    color: #6b7280;
}

.cmd-progress .program__updated {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

/* Progress bar (meter) */

.cmd-progress .program__progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-progress .meter {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.cmd-progress .meter__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.cmd-progress .program__stats {
    font-size: 11px;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.cmd-progress .program__stats .u {
    display: inline-flex;
    align-items: center;
}

.cmd-progress .program__stats .u--done {
    font-weight: 600;
    color: #111827;
}

.cmd-progress .program__stats .u--pct {
    color: #2563eb;
    font-weight: 500;
}

.cmd-progress .program__stats .muted {
    color: #9ca3af;
}

/* Actions */

.cmd-progress .program__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

/* Empty state */

.cmd-progress .empty {
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
    padding: 12px;
    text-align: center;
}

.cmd-progress .empty__title {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 2px;
}

.cmd-progress .empty__hint {
    font-size: 11px;
    color: #6b7280;
}

/* Footer */

.cmd-progress__footer {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cmd-progress__footer-left,
.cmd-progress__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Responsivo */

@media (max-width: 900px) {
    .cmd-progress .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cmd-progress__hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-progress .kpis {
        grid-template-columns: 1fr 1fr;
    }

    .cmd-progress .program__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-progress__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================
   CMD AUTH – Authorizations
   ========================= */

.cmd-auth {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #0f172a;
}

/* ---------- Header ---------- */

.cmd-auth__hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.cmd-auth__title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cmd-auth__name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #020617;
}

.cmd-auth__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 11px;
    color: #6b7280;
}

.cmd-muted {
    color: #6b7280;
}

/* Tools (search + filtros) */

.cmd-auth__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.cmd-auth__search {
    flex: 1 1 180px;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 0.4rem 0.8rem;
    font-size: 13px;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cmd-auth__search:focus {
    border-color: #0f766e;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.cmd-auth__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ---------- Chips ---------- */

.cmd-auth .chip {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 0.18rem 0.65rem;
    font-size: 11px;
    line-height: 1.4;
    background: #f9fafb;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cmd-auth .chip:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.cmd-auth .chip.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ecfeff;
    box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.3);
}

/* Variantes de estado en chips de la lista */

.cmd-auth .chip--state {
    border: none;
}

.cmd-auth .chip--active {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

.cmd-auth .chip--soon {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.cmd-auth .chip--expired {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* ---------- Card contenedor ---------- */

.cmd-auth .card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 0.9rem 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.cmd-auth .card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cmd-auth .card__title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.cmd-auth .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cmd-auth .card__head-actions .cmd-client__btn {
    font-size: 11px;
    padding-inline: 0.55rem;
}

/* ---------- Lista de autorizaciones ---------- */

.cmd-auth .auths {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cmd-auth .auth {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0.7rem 0.75rem;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Diferenciar visualmente según estado */
.cmd-auth .auth[data-state="active"] {
    border-color: rgba(22, 163, 74, 0.3);
}

.cmd-auth .auth[data-state="soon"] {
    border-color: rgba(245, 158, 11, 0.3);
}

.cmd-auth .auth[data-state="expired"] {
    border-color: rgba(220, 38, 38, 0.3);
    background: #fef2f2;
}

/* Cabecera de cada autorización */

.cmd-auth .auth__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
}

.cmd-auth .auth__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.cmd-auth .auth__code {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.cmd-auth .auth__desc {
    font-size: 12px;
    color: #4b5563;
}

.cmd-auth .auth__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

/* Línea de progreso */

.cmd-auth .auth__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
}

.cmd-auth .meter {
    position: relative;
    flex: 1 1 140px;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.cmd-auth .meter__bar {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #22c55e);
    transition: width 0.25s ease-out;
}

.cmd-auth .auth__units {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 11px;
    color: #4b5563;
}

.cmd-auth .auth__units .u--used {
    font-weight: 600;
    color: #0f172a;
}

.cmd-auth .auth__units .u--remain {
    color: #0f766e;
}

/* Acciones */

.cmd-auth .auth__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.cmd-auth .auth__actions .cmd-client__btn {
    font-size: 11px;
    padding-inline: 0.55rem;
}

/* ---------- Footer ---------- */

.cmd-auth__footer {
    margin-top: 0.9rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.cmd-auth__footer-left,
.cmd-auth__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cmd-auth__footer-right .cmd-client__btn {
    font-size: 11px;
}

/* ---------- Estados vacíos ---------- */

.cmd-auth .empty {
    padding: 1.1rem 0.5rem 0.3rem;
    text-align: center;
    color: #6b7280;
}

.cmd-auth .empty__title {
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: #374151;
}

.cmd-auth .empty__hint {
    font-size: 12px;
}

/* ---------- Responsivo dentro del modal ---------- */

@media (max-width: 720px) {
    .cmd-auth__hero {
        flex-direction: column;
        align-items: stretch;
    }

    .cmd-auth__cta,
    .cmd-auth__tools {
        width: 100%;
    }

    .cmd-auth .card__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-auth .auth__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-auth .auth__chips {
        justify-content: flex-start;
    }

    .cmd-auth .auth__actions {
        justify-content: flex-start;
    }

    .cmd-auth__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== PA VIEW (cmd-pa) ===== */

.cmd-pa {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header */

.cmd-pa__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0 12px;
    border-bottom: 1px solid #e5e7eb;
}

.cmd-pa__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-pa__name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.cmd-pa__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.cmd-pa__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Grid layout */

.cmd-pa__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

/* Cards solo dentro de cmd-pa (no global) */

.cmd-pa .card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06),
        0 1px 0 rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-pa .card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.cmd-pa .card__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.cmd-pa .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.cmd-pa .card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

/* Key/value list */

.cmd-pa .kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0;
}

.cmd-pa .kv>div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.cmd-pa .kv dt {
    font-weight: 500;
    color: #6b7280;
}

.cmd-pa .kv dd {
    margin: 0;
    font-weight: 500;
    color: #111827;
    text-align: right;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chips de estado */

.cmd-pa .chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    color: #374151;
    white-space: nowrap;
}

.cmd-pa .chip--state {
    border-width: 0;
}

/* Estados: active / soon / expired / unknown */

.cmd-pa .chip--active {
    background-color: #dcfce7;
    color: #166534;
}

.cmd-pa .chip--soon {
    background-color: #fef3c7;
    color: #92400e;
}

.cmd-pa .chip--expired {
    background-color: #fee2e2;
    color: #b91c1c;
}

.cmd-pa .chip--unknown {
    background-color: #e5e7eb;
    color: #374151;
}

/* Timeline barras PA */

.cmd-pa .timeline {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-pa .timeline__bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.cmd-pa .timeline__fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.cmd-pa .timeline__legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
}

/* Utilidades en stack */

.cmd-pa .stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Footer */

.cmd-pa__footer {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cmd-pa__footer-left,
.cmd-pa__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Botones (se apoya en estilos globales de cmd-client__btn; aquí solo ajustes mínimos) */

.cmd-pa .cmd-client__btn {
    font-size: 12px;
    padding: 4px 10px;
}

.cmd-pa .cmd-client__btn--primary {
    font-weight: 600;
}

/* Helpers locales */

.cmd-pa .muted,
.cmd-pa .cmd-muted {
    color: #6b7280;
    font-size: 11px;
}

/* Responsivo pequeño */

@media (max-width: 640px) {
    .cmd-pa__hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-pa .kv>div {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .cmd-pa .kv dd {
        max-width: 100%;
        text-align: left;
    }

    .cmd-pa__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ROOT */
.cmd-services {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    font-size: 13px;
}

/* HEADER */
.cmd-services__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.cmd-services__title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cmd-services__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.cmd-services__meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.cmd-services__cta {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* CARD (solo dentro de cmd-services) */
.cmd-services .card {
    background: #f9fafb;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cmd-services .card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.cmd-services .card__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.cmd-services .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

/* LISTA DE SERVICIOS */
.svcs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.svc {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.svc:hover {
    border-color: #cbd5f5;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

/* CABECERA DE CADA FILA */
.svc__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.svc__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: baseline;
}

.svc__title .muted {
    font-size: 0.8rem;
    color: #6b7280;
}

/* CHIPS DE ESTADO */
.svc__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

.cmd-services .chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.7rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}

/* Colores de estado (usa svc_state_class) */
.cmd-services .chip--active {
    border-color: #16a34a;
    background: #ecfdf3;
    color: #166534;
}

.cmd-services .chip--paused {
    border-color: #ca8a04;
    background: #fef9c3;
    color: #92400e;
}

.cmd-services .chip--ended {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

/* META (frecuencia, terapeuta) */
.svc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #4b5563;
}

.svc__meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

/* ACCIONES */
.svc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

/* FOOTER */
.cmd-services__footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cmd-services__footer-left,
.cmd-services__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .cmd-services__hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-services__cta {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .svc {
        padding: 0.6rem 0.65rem;
    }

    .svc__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .svc__actions {
        justify-content: flex-start;
    }

    .cmd-services__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===========================
   Billing view (cmd-billing)
   =========================== */

.cmd-billing {
    padding: 1rem 1.25rem 1.25rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header / hero */

.cmd-billing__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.cmd-billing__title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.cmd-billing__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.cmd-billing__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.cmd-billing__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Reusa botones globales .cmd-client__btn, solo pequeños ajustes locales si hace falta */
.cmd-billing .cmd-client__btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
}

/* ===========================
   KPIs
   =========================== */

.cmd-billing .kpis {
    margin-top: 0.35rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.cmd-billing .kpi {
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 3.3rem;
}

.cmd-billing .kpi__label {
    font-size: 0.7rem;
    color: #6b7280;
}

.cmd-billing .kpi__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.cmd-billing .kpi--emph {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* ===========================
   Card contenedor
   =========================== */

.cmd-billing .card {
    margin-top: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cmd-billing .card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.15rem;
}

.cmd-billing .card__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.cmd-billing .card__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* ===========================
   Tabla de claims
   =========================== */

.cmd-billing .tbl {
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    font-size: 0.78rem;
    background: #ffffff;
}

.cmd-billing .tbl__head {
    display: grid;
    grid-template-columns:
        minmax(100px, 1.1fr)
        /* ID */
        minmax(90px, 0.9fr)
        /* Date */
        minmax(90px, 0.9fr)
        /* Service */
        minmax(90px, 0.9fr)
        /* Amount */
        minmax(110px, 1fr)
        /* Payer */
        minmax(150px, 1.4fr)
        /* Status */
        minmax(140px, 1.3fr);
    /* Actions */
    padding: 0.4rem 0.75rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #4b5563;
    column-gap: 0.5rem;
}

.cmd-billing .tbl__head>div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-billing .tbl__body {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmd-billing .tbl__body .row {
    display: grid;
    grid-template-columns:
        minmax(100px, 1.1fr) minmax(90px, 0.9fr) minmax(90px, 0.9fr) minmax(90px, 0.9fr) minmax(110px, 1fr) minmax(150px, 1.4fr) minmax(140px, 1.3fr);
    padding: 0.45rem 0.75rem;
    column-gap: 0.5rem;
    border-top: 1px solid #f3f4f6;
    align-items: center;
}

.cmd-billing .tbl__body .row:nth-child(2n) {
    background: #fcfcfd;
}

.cmd-billing .cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmd-billing .cell.is-right {
    text-align: right;
}

.cmd-billing .row__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

/* ===========================
   Chips de estado
   =========================== */

.cmd-billing .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #4b5563;
}

/* Pagado */
.cmd-billing .chip--paid {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

/* Pendiente */
.cmd-billing .chip--pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* Denegado */
.cmd-billing .chip--denied {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Enviado / Submitted */
.cmd-billing .chip--submitted {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* ===========================
   Empty state
   =========================== */

.cmd-billing .empty {
    padding: 1rem 0.25rem 0.5rem;
    text-align: center;
}

.cmd-billing .empty__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.cmd-billing .empty__hint {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ===========================
   Footer
   =========================== */

.cmd-billing__footer {
    margin-top: 0.5rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cmd-billing__footer-left,
.cmd-billing__footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* ===========================
   Responsivo
   =========================== */

@media (max-width: 800px) {
    .cmd-billing__hero {
        flex-direction: column;
        align-items: stretch;
    }

    .cmd-billing .tbl__head,
    .cmd-billing .tbl__body .row {
        grid-template-columns:
            minmax(90px, 1fr) minmax(80px, 0.9fr) minmax(80px, 0.9fr) minmax(80px, 0.9fr) minmax(90px, 1fr) minmax(140px, 1.4fr) minmax(120px, 1.3fr);
    }

    .cmd-billing__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .cmd-billing .tbl {
        font-size: 0.72rem;
    }

    .cmd-billing .tbl__head,
    .cmd-billing .tbl__body .row {
        grid-template-columns:
            minmax(80px, 1.1fr) minmax(70px, 0.9fr) minmax(70px, 0.9fr) minmax(70px, 0.9fr) minmax(80px, 1fr) minmax(120px, 1.4fr) minmax(110px, 1.3fr);
    }

    .cmd-billing__hero {
        gap: 0.6rem;
    }
}

/* ===========================
   Client Units View (cmd-units)
   Scoped styles
=========================== */

.cmd-units {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -------- Header -------- */

.cmd-units .units-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.cmd-units .units-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-units .units-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.cmd-units .units-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.cmd-units .cmd-muted {
    color: #6b7280;
}

.cmd-units .units-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.cmd-units .units-search {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 6px 10px;
    font-size: 13px;
    min-width: 190px;
    outline: none;
}

.cmd-units .units-search:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.cmd-units .units-filters {
    display: flex;
    gap: 6px;
}

/* Chips */

.cmd-units .chip {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 3px 10px;
    font-size: 11px;
    line-height: 1.3;
    background: #f9fafb;
    color: #4b5563;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cmd-units .chip.is-active {
    background: rgba(37, 99, 235, 0.08);
    border-color: #2563eb;
    color: #1d4ed8;
}

/* Estado chip units */

.cmd-units .chip--state {
    border: none;
    font-weight: 500;
}

.cmd-units .chip--ok {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.cmd-units .chip--low {
    background: rgba(234, 179, 8, 0.12);
    color: #92400e;
}

.cmd-units .chip--depleted {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

/* -------- KPIs -------- */

.cmd-units .units-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.cmd-units .units-kpi {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-units .units-kpi--wide {
    grid-column: span 1;
}

.cmd-units .units-kpi__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.cmd-units .units-kpi__value {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* -------- Card (list) -------- */

.cmd-units .units-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-units .units-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.cmd-units .units-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.cmd-units .units-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* -------- Units list -------- */

.cmd-units .units-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.cmd-units .unit {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmd-units .unit__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.cmd-units .unit__title {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
}

.cmd-units .unit__code {
    font-weight: 600;
    color: #111827;
}

.cmd-units .unit__desc {
    font-size: 12px;
    color: #4b5563;
}

.cmd-units .unit__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

/* Meter / progress */

.cmd-units .meter {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.cmd-units .meter__bar {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    transition: width 0.3s ease;
}

/* Stats line */

.cmd-units .unit__line {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-units .unit__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 12px;
    color: #4b5563;
}

.cmd-units .unit__stats .u {
    white-space: nowrap;
}

.cmd-units .unit__stats .u--used {
    font-weight: 500;
    color: #1f2933;
}

.cmd-units .unit__stats .u--rem {
    font-weight: 500;
}

.cmd-units .unit__stats .u--pct {
    color: #6b7280;
}

/* Actions */

.cmd-units .unit__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 2px;
}

/* Reutiliza el botón base ya definido en otras vistas:
   aquí solo pequeños ajustes locales si hace falta */
.cmd-units .cmd-client__btn {
    font-size: 11px;
    padding: 4px 9px;
}

/* -------- Footer -------- */

.cmd-units .units-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.cmd-units .units-footer__left,
.cmd-units .units-footer__right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* -------- Empty state -------- */

.cmd-units .empty {
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
    padding: 14px;
    text-align: center;
}

.cmd-units .empty__title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #111827;
}

.cmd-units .empty__hint {
    font-size: 12px;
    color: #6b7280;
}

/* -------- Responsive tweaks -------- */

@media (max-width: 768px) {
    .cmd-units .units-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .cmd-units .units-tools {
        justify-content: flex-start;
    }

    .cmd-units .units-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cmd-units .units-kpi--wide {
        grid-column: span 2;
    }

    .cmd-units .unit__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-units .unit__actions {
        justify-content: flex-start;
    }
}


/* =========================
   EMPLOYEE CONTACT (emp-contact)
   ========================= */
.emp-contact {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Header ---------- */
.emp-contact .empc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.emp-contact .empc__id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.emp-contact .empc__avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e5f0ff, #eff6ff);
    border: 1px solid #d1e3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #2563eb;
    flex-shrink: 0;
}

.emp-contact .empc__title {
    min-width: 0;
}

.emp-contact .empc__name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.emp-contact .empc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

/* ---------- Botones header / footer ---------- */
.emp-contact .empc__cta,
.emp-contact .empc__footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Botón base */
.emp-contact .empc__btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.emp-contact .empc__btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transform: translateY(-0.5px);
}

.emp-contact .empc__btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Botón primario */
.emp-contact .empc__btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.emp-contact .empc__btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Botón ghost (footer) */
.emp-contact .empc__btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #4b5563;
    box-shadow: none;
}

.emp-contact .empc__btn--ghost:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* ---------- Grid de tarjetas ---------- */
.emp-contact .empc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    gap: 16px;
}

/* Tercera tarjeta a todo lo ancho */
.emp-contact .empc__card--wide {
    grid-column: 1 / -1;
}

/* Tarjetas */
.emp-contact .empc__card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emp-contact .empc__card-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

/* ---------- Campos (label + value) ---------- */
.emp-contact .empc__field {
    display: flex;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px dashed #f3f4f6;
}

.emp-contact .empc__field:last-of-type {
    border-bottom: none;
}

.emp-contact .empc__label {
    flex: 0 0 90px;
    font-weight: 500;
    color: #4b5563;
}

.emp-contact .empc__value {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #111827;
}

.emp-contact .empc__value a {
    color: #2563eb;
    text-decoration: none;
}

.emp-contact .empc__value a:hover {
    text-decoration: underline;
}

/* Links de acción pequeñitos (Compose, Copy, Call…) */
.emp-contact .empc__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emp-contact .empc__link {
    border: none;
    background: none;
    padding: 0;
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    cursor: pointer;
}

.emp-contact .empc__link:hover {
    text-decoration: underline;
}

/* Hint pequeño en la tarjeta de Zelle */
.emp-contact .empc__hint {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

/* ---------- Quick ops (tarjeta ancha) ---------- */
.emp-contact .empc__ops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Footer ---------- */
.emp-contact .empc__footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .emp-contact .empc__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-contact .empc__cta {
        width: 100%;
        justify-content: flex-start;
    }

    .emp-contact .empc__grid {
        grid-template-columns: 1fr;
    }

    .emp-contact .empc__card--wide {
        grid-column: auto;
    }

    .emp-contact .empc__footer {
        flex-direction: column;
        align-items: flex-start;
    }

}

/* ===========================
   EMPLOYEE PROCODES (ABASmart)
   =========================== */

.emp-procodes {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header */
.emp-procodes .pc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.emp-procodes .pc__who {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emp-procodes .pc__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e0f2fe;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #0369a1;
}

.emp-procodes .pc__title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px;
    color: #0f172a;
}

.emp-procodes .pc__meta {
    font-size: 12px;
    color: #6b7280;
}

/* Buttons (emp-procodes scope) */
.emp-procodes .pc__btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.emp-procodes .pc__btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-0.5px);
}

.emp-procodes .pc__btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.emp-procodes .pc__btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Ghost variant (for Matrix/Request/etc.) */
.emp-procodes .pc__btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #4b5563;
}

.emp-procodes .pc__btn--ghost:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Top bar: filters + KPIs */
.emp-procodes .pc__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
}

/* Chips */
.emp-procodes .pc__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emp-procodes .pc__chip {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 4px 10px;
    font-size: 11px;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.emp-procodes .pc__chip.is-active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

/* KPIs */
.emp-procodes .pc__stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.emp-procodes .pc__kpi {
    padding: 6px 10px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    min-width: 70px;
}

.emp-procodes .pc__kpi-n {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

.emp-procodes .pc__kpi-l {
    font-size: 11px;
    color: #6b7280;
}

/* Table wrapper */
.emp-procodes .pc__table {
    margin-top: 4px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
}

/* Table head */
.emp-procodes .pc__thead {
    display: grid;
    grid-template-columns: 0.6fr 2fr 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.emp-procodes .pc__th-actions {
    text-align: right;
}

/* Table body */
.emp-procodes .pc__tbody {
    display: flex;
    flex-direction: column;
}

.emp-procodes .pc__tr {
    display: grid;
    grid-template-columns: 0.6fr 2fr 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    align-items: center;
    border-top: 1px solid #f3f4f6;
}

.emp-procodes .pc__tr:nth-child(even) {
    background: #f9fafb;
}

.emp-procodes .pc__tr:hover {
    background: #eff6ff;
}

/* Cells */
.emp-procodes .pc__td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emp-procodes .pc__td-code {
    display: flex;
    align-items: center;
}

/* Code badge */
.emp-procodes .pc__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

/* Role pill */
.emp-procodes .pc__pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5f3ff;
    font-size: 11px;
    color: #1e40af;
}

/* Description */
.emp-procodes .pc__desc {
    font-size: 12px;
    color: #111827;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Allowed label */
.emp-procodes .pc__allow {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.emp-procodes .pc__allow--yes {
    background: #dcfce7;
    color: #166534;
}

.emp-procodes .pc__allow--no {
    background: #fef3c7;
    color: #92400e;
}

/* Actions cell */
.emp-procodes .pc__td-actions {
    text-align: right;
}

/* Footer */
.emp-procodes .pc__footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.emp-procodes .pc__footer-right {
    display: flex;
    gap: 8px;
}

/* Responsivo básico dentro del modal */
@media (max-width: 900px) {

    .emp-procodes .pc__thead,
    .emp-procodes .pc__tr {
        grid-template-columns: 0.8fr 2fr 1fr 0.8fr;
        grid-auto-rows: auto;
        row-gap: 4px;
    }

    .emp-procodes .pc__td:nth-child(3),
    .emp-procodes .pc__td:nth-child(4),
    .emp-procodes .pc__td:nth-child(5),
    .emp-procodes .pc__td:nth-child(6),
    .emp-procodes .pc__th-actions {
        display: none;
    }

    .emp-procodes .pc__td-actions {
        grid-column: 2 / -1;
        text-align: right;
    }
}

/* ===========================
   EMP VISITS · ABASMART STYLE
   =========================== */

.emp-visits {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
    padding: 12px 16px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Header */

.empv__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.empv__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empv__name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.empv__meta {
    font-size: 12px;
    color: #6b7280;
}

/* Botones (ABASmart look, claros y azules) */

.empv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
    white-space: nowrap;
}

.empv-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.empv-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.empv-btn:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

/* Variante primaria */

.empv-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.empv-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.empv-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #2563eb;
}

.empv-btn--ghost:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Estado vacío */

.empv__empty {
    padding: 18px 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.empv__empty-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Lista de visitas */

.empv__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Tarjeta de visita */

.empv-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.empv-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
    transform: translateY(-1px);
}

/* Columna de hora/fecha */

.empv-card__time {
    min-width: 88px;
    text-align: right;
    padding-right: 4px;
    border-right: 1px solid #e5e7eb;
}

.empv-card__date {
    font-size: 12px;
    color: #6b7280;
}

.empv-card__hours {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

/* Columna principal */

.empv-card__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.empv-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.empv-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.empv-sep {
    color: #d1d5db;
}

.empv-muted {
    color: #6b7280;
    font-weight: 400;
}

.empv-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4b5563;
}

.empv-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 500;
}

/* Acciones */

.empv-card__actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

/* Footer */

.empv__footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.empv__footer-spacer {
    flex: 1;
}

/* Responsivo (modal estrecho) */

@media (max-width: 720px) {
    .empv__hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .empv-card {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .empv-card__time {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
        padding-right: 0;
        padding-bottom: 6px;
        margin-bottom: 4px;
    }

    .empv-card__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .empv__footer {
        flex-wrap: wrap;
    }
}

/* ===========================
   EMP SUPERVISION
   =========================== */
.emp-supervision {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 13px;
    color: #111827;
}

/* Header */
.esv__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e5e7eb;
}

.esv__who {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.esv__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e0f2fe;
    border: 1px solid #bfdbfe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #1d4ed8;
}

.esv__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.esv__meta {
    font-size: .75rem;
    color: #6b7280;
}

/* Botones */
.esv__cta,
.esv__row-actions,
.esv__footer-right {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.esv-btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 9999px;
    padding: .35rem .9rem;
    font-size: .75rem;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #111827;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

.esv-btn:hover {
    background: #f3f4f6;
    border-color: #cbd5f5;
}

.esv-btn:active {
    transform: translateY(1px);
}

.esv-btn--primary {
    border-color: #0ea5e9;
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
}

.esv-btn--primary:hover {
    background: #0284c7;
    border-color: #0284c7;
}

.esv-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #4b5563;
}

.esv-btn--ghost:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Grid y cards */
.esv__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.esv__card {
    background: #ffffff;
    border-radius: .75rem;
    border: 1px solid #e5e7eb;
    padding: .9rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.esv__card--wide {
    grid-column: 1 / -1;
}

.esv__card-title {
    font-size: .9rem;
    font-weight: 600;
    margin: 0 0 .25rem 0;
    color: #111827;
}

.esv__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

/* Campos */
.esv__field {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    font-size: .8rem;
}

.esv__label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9ca3af;
}

.esv__value {
    color: #111827;
}

.esv__hint {
    margin-top: .25rem;
    font-size: .75rem;
    color: #6b7280;
}

/* Chips / pill / status */
.esv-pill {
    display: inline-flex;
    align-items: center;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: .75rem;
    color: #1d4ed8;
}

.esv-status {
    font-size: .8rem;
    font-weight: 500;
    color: #16a34a;
}

/* Requirement gauge */
.esv__requirement {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.esv__gauge {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.esv-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.esv-gauge-svg .bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 10;
}

.esv-gauge-svg .fg {
    fill: none;
    stroke: #0ea5e9;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    /* 2πr for r=54 aprox */
    stroke-dashoffset: calc(339.292 - 339.292 * (var(--p, 0) / 100));
    transition: stroke-dashoffset .3s ease;
}

.esv__gauge-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
}

.esv__gauge-label span {
    font-size: .7rem;
    color: #6b7280;
}

.esv__req-info {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .8rem;
}

.esv__req-line {
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* Timeline de logs */
.esv__empty {
    font-size: .8rem;
    color: #6b7280;
}

.esv__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.esv-tl-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .5rem;
}

.esv-tl-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 999px;
    background: #0ea5e9;
    margin-top: .2rem;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.esv-tl-content {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-size: .8rem;
}

.esv-tl-title {
    font-weight: 500;
    color: #111827;
}

.esv-tl-note {
    color: #4b5563;
}

.esv-sep {
    margin: 0 .2rem;
    color: #9ca3af;
}

.esv-muted {
    color: #6b7280;
}

/* Footer */
.esv__footer {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-top: .5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: .5rem;
}

.esv__footer-spacer {
    flex: 1 1 auto;
}

/* Responsivo */
@media (max-width: 900px) {
    .esv__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .esv__card--wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .esv__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .esv__cta {
        justify-content: flex-start;
    }

    .esv__requirement {
        flex-direction: column;
        align-items: flex-start;
    }

    .esv__footer {
        flex-wrap: wrap;
    }
}


/* =========================
   EMP RATE / PAYROLL (ABASmart)
   ========================= */

.emp-rate {
    font-family: inherit;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header */

.er__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.er__who {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.er__avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #0369a1;
    font-weight: 600;
}

.er__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    color: #0f172a;
}

.er__meta {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.er__sep {
    opacity: 0.6;
}

.er__status {
    font-weight: 500;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
}

/* Botones */

.er__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.er-btn {
    appearance: none;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
        color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.er-btn:hover {
    background: #f3f4f6;
    border-color: #cbd5e1;
}

.er-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.er-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Variante primaria */

.er-btn--primary {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.er-btn--primary:hover {
    background: #0284c7;
    border-color: #0284c7;
}

/* Variante ghost */

.er-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #4b5563;
}

.er-btn--ghost:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Links pequeños (Copy, etc.) */

.er-link {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    color: #0ea5e9;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.er-link:hover {
    color: #0284c7;
}

/* GRID PRINCIPAL */

.er__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Cards */

.er__card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.er__card--wide {
    grid-column: 1 / -1;
}

.er__card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Filas internas */

.er__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.er__row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

/* KPIs dentro de la primera card */

.er__kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.er__kpi {
    min-width: 0;
}

.er__kpi-n {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.er__kpi-l {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Campos label / value */

.er__field {
    display: grid;
    grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
    gap: 0.25rem 0.75rem;
    align-items: baseline;
    font-size: 0.85rem;
}

.er__label {
    font-weight: 500;
    color: #4b5563;
}

.er__value {
    color: #111827;
    word-break: break-word;
}

.er__value a {
    color: #0ea5e9;
    text-decoration: none;
}

.er__value a:hover {
    text-decoration: underline;
}

/* Hint text */

.er__hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Quick ops card */

.er__ops {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Footer */

.er__footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.25rem;
    padding-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.er__footer-spacer {
    flex: 1;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .er__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .er__cta {
        justify-content: flex-start;
    }

    .er__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .er__card--wide {
        grid-column: auto;
    }

    .er__field {
        grid-template-columns: minmax(0, 1fr);
    }

    .er__label {
        font-size: 0.8rem;
    }
}

/* ===========================
   Employee Documents / Compliance
   =========================== */

.emp-docs {
    font-size: 14px;
    color: #111827;
}

/* Header */
.emp-docs .ed__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.emp-docs .ed__who {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emp-docs .ed__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #6b7280;
}

.emp-docs .ed__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 2px;
}

.emp-docs .ed__meta {
    font-size: 12px;
    color: #6b7280;
}

/* Header CTAs */
.emp-docs .ed__cta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Buttons (local to emp-docs) */
.emp-docs .ed-btn {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    padding: 0.35rem 0.9rem;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #111827;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-docs .ed-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.emp-docs .ed-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.emp-docs .ed-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.emp-docs .ed-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.emp-docs .ed-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #4b5563;
}

.emp-docs .ed-btn--ghost:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Top bar: chips + KPIs */
.emp-docs .ed__bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    border-top: 1px solid #f3f4f6;
}

.emp-docs .ed__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Filter chips */
.emp-docs .ed__chip {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    padding: 0.25rem 0.75rem;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.emp-docs .ed__chip.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* KPIs */
.emp-docs .ed__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.emp-docs .ed__kpi {
    min-width: 70px;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.emp-docs .ed__kpi-n {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.emp-docs .ed__kpi-l {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* Empty state */
.emp-docs .ed__empty {
    padding: 1.75rem 1.25rem;
    text-align: center;
    border-radius: 0.75rem;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
    color: #4b5563;
    font-size: 13px;
}

.emp-docs .ed__empty-icon {
    font-size: 24px;
    margin-bottom: 0.25rem;
}

/* List / table */
.emp-docs .ed__list {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
}

/* Table header */
.emp-docs .ed__thead {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1.4fr auto;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.emp-docs .ed__th-actions {
    text-align: right;
}

/* Table body / rows */
.emp-docs .ed__tbody {
    display: flex;
    flex-direction: column;
}

.emp-docs .ed__tr {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1.4fr auto;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    font-size: 13px;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

.emp-docs .ed__tr:nth-child(even) {
    background: #fcfcfd;
}

.emp-docs .ed__tr:last-child {
    border-bottom: none;
}

.emp-docs .ed__td {
    color: #111827;
}

.emp-docs .ed__td-doc strong {
    font-weight: 600;
}

/* Actions column */
.emp-docs .ed__td-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

/* Status badges */
.emp-docs .ed-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid transparent;
}

/* OK = green */
.emp-docs .ed-badge--ok {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

/* Expiring = amber */
.emp-docs .ed-badge--warn {
    background: #fffbeb;
    color: #92400e;
    border-color: #fed7aa;
}

/* Expired = red */
.emp-docs .ed-badge--danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* Missing / muted = gray */
.emp-docs .ed-badge--muted {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

/* Footer */
.emp-docs .ed__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.emp-docs .ed__footer-spacer {
    flex: 1;
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .emp-docs .ed__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-docs .ed__cta {
        align-self: stretch;
        justify-content: flex-start;
    }

    .emp-docs .ed__bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-docs .ed__list .ed__thead,
    .emp-docs .ed__list .ed__tr {
        grid-template-columns: 1.6fr 1.1fr 1.1fr 1.1fr 1.2fr auto;
    }
}

@media (max-width: 640px) {

    .emp-docs .ed__list .ed__thead,
    .emp-docs .ed__list .ed__tr {
        grid-template-columns: 1.8fr 1.2fr 1.2fr auto;
    }

    .emp-docs .ed__thead>div:nth-child(4),
    .emp-docs .ed__thead>div:nth-child(5),
    .emp-docs .ed__tbody .ed__tr>.ed__td:nth-child(4),
    .emp-docs .ed__tbody .ed__tr>.ed__td:nth-child(5) {
        display: none;
    }
}



/* Contenedor de la lista */
.cmd-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Item individual */
.cmd-provider-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.cmd-provider-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

/* Avatar con inicial */
.cmd-provider-item__avatar {
    width: 36px;
    height: 36px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Información del texto */
.cmd-provider-item__info {
    flex-grow: 1;
}

.cmd-provider-item__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

/* Tags de colores según el tipo */
.cmd-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.cmd-tag--bcba {
    background: #dcfce7;
    color: #166534;
}

.cmd-tag--rbt {
    background: #dbeafe;
    color: #1e40af;
}

.cmd-tag--bcaba {
    background: #fef9c3;
    color: #854d0e;
}

/* Botón de acción */
.cmd-btn-icon {
    padding: 6px 12px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #475569;
}

.cmd-btn-icon:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.contact-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    /* Cambiamos a columna para dar aire */
    gap: 4px;
}

.contact-item label {
    font-size: 11px;
    text-transform: uppercase;
    color: #a0aec0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-data {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* El link a la izquierda, botones a la derecha */
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.contact-data a,
.contact-data span {
    font-size: 14px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-actions {
    display: flex;
    gap: 6px;
    margin-left: 10px;
}

/* Botones circulares pequeños y elegantes */
.contact-actions button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.contact-actions button:hover {
    background: #3182ce;
    color: white;
    transform: translateY(-1px);
}


/* Contenedor que permite que los tags fluyan */
.contact-data--wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    /* Un poco más de aire para los tags */
}

/* Estilo para los códigos de diagnóstico */
.cmd-tag--dx {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    /* Los códigos médicos se leen mejor en mono */
}

/* Efecto hover para el botón de mapas */
.contact-actions button:hover .fa-map-marker-alt {
    color: #e53e3e;
    /* Rojo típico de pin de mapa */
}

/* Eliminamos el punto si es un pseudo-elemento ::before */
.abassist-row:has(.no-dot-row)::before,
.abassist-modal li:has(.no-dot-row)::before {
    content: none !important;
    display: none !important;
}

/* Estilo del footer para que ocupe todo el ancho */
.coming-soon-footer.no-dot-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e0;
    color: #718096;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
}

.emp-header-row {
    display: flex;
    align-items: center;
    /* Centra verticalmente el tag con el texto */
    gap: 12px;
    /* Espacio horizontal entre el tag y el nombre */
    flex-wrap: nowrap;
    /* Evita que el nombre se baje en pantallas normales */
}

.emp-name {
    margin: 0;
    /* Quitamos márgenes por defecto del h2 */
    line-height: 1;
    /* Ajusta la altura de línea para que se vea nivelado */
}

.cmd-tag {
    flex-shrink: 0;
    /* Evita que el tag se aplaste si el nombre es muy largo */
}

.abassist__form {
    position: relative;
    /* Para posicionar el badge */
}

.abassist__badge-new {
    position: absolute;
    top: -10px;
    left: -5px;
    /* Movido a la izquierda */
    background: #27ae60;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse-glow-green 2s infinite;
    z-index: 20;
}

@keyframes pulse-glow-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}