/* Vistas del módulo AT (administración, captación, seguimiento, ejecutivos, inicio).
   Independiente de Coaching. Cargar después de soc-coaching-views.css.
*/

/* Hub AT /administracion: mismos tokens de cards que :root.coaches-theme,
   sin activar el tema de coaching en el resto de la app. */
.soc-at-admin-page,
.soc-at-page,
.at-prospect-window {
    --verde-primario-soc: #006d4e;
    --verde-claro-soc: #4ed176;
    --azul-primario-soc: #079def;
    --celeste-soc: #52deff;
    --coral-soc: #ff7150;
    --rosa-vibrante-soc: #ff9fcf;
    --salmon-soc: #ff9c9c;
    --rosa-palido-soc: #ffbdde;
    --soc-brand-green: var(--verde-primario-soc);
    --soc-brand-green-light: var(--verde-claro-soc);
    --soc-brand-blue: var(--azul-primario-soc);
    --soc-brand-sky: var(--celeste-soc);
    --soc-brand-coral: var(--coral-soc);
    --soc-brand-pink: var(--rosa-vibrante-soc);
    --soc-brand-salmon: var(--salmon-soc);
    --soc-brand-pale-pink: var(--rosa-palido-soc);
    --soc-cfg-bg: #f4f7f6;
    --soc-cfg-surface: #ffffff;
    --soc-cfg-surface-muted: #f8faf9;
    --soc-cfg-border: #e8ecea;
    --soc-cfg-border-strong: #c5d5cf;
    --soc-cfg-text: #1a1a1a;
    --soc-cfg-text-muted: #5c6569;
    --soc-cfg-accent: var(--soc-brand-green);
    --soc-cfg-accent-soft: #e8f5f0;
    --soc-cfg-accent-mint: var(--soc-brand-green-light);
    --soc-cfg-radius-sm: 10px;
    --soc-cfg-radius: 5px;
    --soc-cfg-radius-lg: 5px;
    --soc-cfg-shadow: 0 6px 28px rgba(0, 0, 0, 0.06);
    --soc-cfg-shadow-hover: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.soc-at-page .soc-ui-panel--grid .k-grid-header .k-table-th,
.soc-at-page .soc-ui-panel--grid .k-grid-header th,
.soc-at-page .soc-ui-panel--grid .k-grid-header .k-column-title,
.soc-at-page .soc-ui-panel--grid .k-grid-header .k-link {
    background: #fff !important;
    color: var(--verde-primario-soc) !important;
    font-weight: 700;
}

.at-ejecutivos-page .at-ejecutivos-status {
    display: inline-flex;
    align-self: flex-start;
    border: 1px solid var(--verde-primario-soc);
    border-radius: 999px;
    overflow: hidden;
}

.at-ejecutivos-page .at-ejecutivos-status__btn {
    background: #fff;
    border: 0;
    border-right: 1px solid var(--verde-primario-soc);
    color: var(--verde-primario-soc);
    padding: 7px 22px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.at-ejecutivos-page .at-ejecutivos-status__btn:last-child {
    border-right: 0;
}

.at-ejecutivos-page .at-ejecutivos-status__btn.active {
    background: var(--verde-primario-soc);
    color: #fff;
}

.at-ejecutivos-page .soc-ui-panel-head--toolbar {
    flex-wrap: nowrap;
    gap: 16px;
    background: #fff;
}

.at-ejecutivos-page .soc-sessions-toolbar {
    display: flex;
    margin-left: auto;
}

.at-ejecutivos-page .soc-sessions-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.at-ejecutivos-page .soc-sessions-search i {
    position: absolute;
    left: 10px;
    font-size: 1rem;
    color: var(--soc-cfg-text-muted);
    pointer-events: none;
}

.at-ejecutivos-page .soc-sessions-search input {
    height: 36px;
    padding: 6px 12px 6px 32px;
    border: 1px solid var(--soc-cfg-border);
    border-radius: 5px;
    background: #fff;
    min-width: 240px;
    outline: none;
}

.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header .k-table-thead > .k-table-row:first-child > .k-table-th,
.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header .k-table-thead > .k-table-row:first-child > th,
.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header thead > tr:first-child > th,
.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header thead > tr:first-child > .k-table-th,
.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header .k-column-title,
.at-ejecutivos-page .soc-ui-panel--grid .k-grid-header .k-link {
    background: var(--verde-primario-soc) !important;
    background-color: var(--verde-primario-soc) !important;
    color: #fff !important;
}

.at-ejecutivos-page .at-ejecutivos-mail {
    color: #5b6b9a;
    text-decoration: none;
}

.at-ejecutivos-page .at-ejecutivos-mail:hover {
    text-decoration: underline;
}

.soc-at-page .at-prospect-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 1rem;
}

@media (max-width: 768px) {
    .soc-at-page .at-prospect-form-grid {
        grid-template-columns: 1fr;
    }
}

.at-prospect-window .at-prospect-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 1rem;
}

@media (max-width: 768px) {
    .at-prospect-window .at-prospect-form-grid {
        grid-template-columns: 1fr;
    }
}

.at-prospect-link {
    color: var(--verde-primario-soc, #006d4e);
    font-weight: 700;
    text-decoration: none;
}

.at-prospect-link:hover {
    text-decoration: underline;
}

.at-detail-card {
    padding: 16px 18px 18px;
    margin-bottom: 12px;
}

.at-detail-card__title {
    margin: 0 0 14px;
    color: var(--verde-primario-soc, #006d4e);
    font-size: 16px;
    font-weight: 800;
}

.at-detail-card__subtitle {
    margin: 18px 0 10px;
    color: var(--verde-primario-soc, #006d4e);
    font-size: 14px;
    font-weight: 800;
}

.soc-at-page .at-prospect-form-grid.at-prospect-form-grid--two {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .soc-at-page .at-prospect-form-grid.at-prospect-form-grid--two {
        grid-template-columns: 1fr;
    }
}

.at-prospect-detail {
    --soc-btn-primary: var(--verde-primario-soc, #006d4e);
    --soc-btn-primary-hover: #005a40;
    --soc-btn-primary-disabled-bg: color-mix(in srgb, var(--verde-primario-soc, #006d4e) 35%, #ffffff);
    --soc-btn-primary-disabled-border: color-mix(in srgb, var(--verde-primario-soc, #006d4e) 45%, #ffffff);
}

.at-doc-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.at-doc-upload__row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(560px, 100%);
}

.at-doc-upload__file {
    flex: 1;
    background: #fff;
    height: 38px;
    padding: 6px 10px;
}

.at-mini-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.at-mini-table th {
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #d7dde3;
}

.at-mini-table td {
    padding: 8px 10px;
    font-size: 13px;
    border-bottom: 1px solid #eef2f5;
}

.at-mini-table tbody tr {
    background: #eefaf3;
}

.at-mini-table__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
}

.at-icon-btn {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.at-icon-btn.is-accepted {
    color: #16a34a;
}

.at-icon-btn--danger {
    color: #ef4444;
}

.at-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.at-comment-box {
    min-height: 120px;
    resize: both;
    background: #f7f8fa;
}

.at-comment-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.at-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin: 0;
}

.at-mention-select {
    width: 220px;
    max-width: 100%;
}

.at-mention-select:disabled {
    background: #f3e8e8;
}

.at-comment-toolbar .btn-soc-primary {
    margin-left: auto;
}

.at-mention-tag {
    display: inline-block;
    margin-left: 6px;
    color: var(--verde-primario-soc, #006d4e);
    font-weight: 700;
}

.at-pdf-frame {
    width: 100%;
    height: 560px;
    border: 0;
}

/* ---------- Inicio AT dashboard ---------- */
.at-inicio-page .at-inicio-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 1100px) {
    .at-inicio-page .at-inicio-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .at-inicio-page .at-inicio-kpis {
        grid-template-columns: 1fr;
    }
}

.at-inicio-kpi {
    background: var(--verde-primario-soc, #006d4e);
    color: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0, 109, 78, 0.18);
}

.at-inicio-kpi__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    opacity: 0.95;
}

.at-inicio-kpi__value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.at-inicio-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 1100px) {
    .at-inicio-charts {
        grid-template-columns: 1fr;
    }
}

.at-inicio-chart-card {
    padding: 18px 18px 8px;
}

.at-inicio-chart-card__title {
    margin: 0 0 12px;
    color: var(--verde-primario-soc, #006d4e);
    font-size: 1.15rem;
    font-weight: 700;
}

.at-inicio-donut-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(140px, 0.8fr);
    gap: 8px;
    align-items: center;
}

@media (max-width: 700px) {
    .at-inicio-donut-layout {
        grid-template-columns: 1fr;
    }
}

.at-inicio-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0 8px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.at-inicio-donut-legend li {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #334155;
}

.at-inicio-donut-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.at-inicio-follow-up {
    padding: 18px;
}

.at-inicio-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #dfe8e3;
}

.at-inicio-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.at-inicio-table thead th {
    background: var(--verde-primario-soc, #006d4e);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    white-space: nowrap;
}

.at-inicio-table thead th:first-child {
    border-top-left-radius: 9px;
}

.at-inicio-table thead th:last-child {
    border-top-right-radius: 9px;
}

.at-inicio-table tbody td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid #e8eee9;
    color: #1f2937;
    background: #fff;
}

.at-inicio-table tbody tr:nth-child(even) td {
    background: #f7fbf8;
}

.at-inicio-table__empty {
    text-align: center;
    color: #64748b;
    padding: 24px 14px !important;
}
