/*
 * Conexa · ajustes visuales del panel Filament (/admin y /plataforma).
 * Archivo estático (sin build): lo carga App\Filament\Support\PanelTheme en <head>.
 * Los colores base vienen de la paleta del panel: "gray" azul marino en los tonos oscuros
 * (modo oscuro azul, no negro) y primario #1E3A8A.
 */

:root {
    --cx-primary: #1E3A8A;
    --cx-sky: #38BDF8;
    --cx-guide-bg: #EFF6FF;
    --cx-guide-border: #BFDBFE;
    --cx-guide-text: #1E3A8A;
    --cx-guide-body: #334155;
}

.dark {
    --cx-guide-bg: #12204A;
    --cx-guide-border: #24386A;
    --cx-guide-text: #BAE6FD;
    --cx-guide-body: #CBD5E1;
}

/* ---------- Logo siempre sobre blanco ---------- */
.cx-brand {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 6px 12px;
    height: 100%;
}

.cx-brand-img {
    height: 100%;
    width: auto;
    display: block;
}

.dark .cx-brand {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 16px -8px rgba(0, 0, 0, .6);
}

/* ---------- Tipografía y tamaños más cómodos ---------- */
.fi-body {
    font-size: 15px;
}

.fi-header-heading {
    letter-spacing: -0.01em;
}

/* Botones y campos más altos: más fáciles de tocar y leer. */
.fi-btn {
    min-height: 2.5rem;
    font-weight: 600;
}

.fi-input-wrp {
    min-height: 2.75rem;
    border-radius: 12px;
}

.fi-fo-field-wrp-helper-text,
.fi-fo-field-wrp-hint {
    font-size: 13px;
    line-height: 1.45;
}

/* Tarjetas y secciones con esquinas más suaves. */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-modal-window {
    border-radius: 16px;
}

/* ---------- Menú lateral ---------- */
.fi-sidebar-item-btn {
    border-radius: 10px;
    min-height: 2.6rem;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-item-active > .fi-sidebar-item-btn {
    background: rgba(30, 58, 138, .1);
    box-shadow: inset 3px 0 0 var(--cx-primary);
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.dark .fi-sidebar-item-active > .fi-sidebar-item-btn {
    background: rgba(56, 189, 248, .14);
    box-shadow: inset 3px 0 0 var(--cx-sky);
}

/* En oscuro el texto e ícono activos usan el celeste (el azul primario no contrasta sobre azul marino). */
.dark .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.dark .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.dark .fi-tabs-item.fi-active,
.dark .fi-tabs-item.fi-active .fi-tabs-item-label,
.dark .fi-tabs-item.fi-active .fi-icon {
    color: #7DD3FC;
}

/* Botón primario en oscuro: celeste con texto azul marino (como en la app). */
.dark .fi-btn.fi-color-primary:not(.fi-outlined) {
    --bg: #38BDF8;
    --hover-bg: #7DD3FC;
    --text: #172554;
    --hover-text: #172554;
    --dark-bg: #38BDF8;
    --dark-hover-bg: #7DD3FC;
    --dark-text: #172554;
    --dark-hover-text: #172554;
}

.fi-sidebar-group-label {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---------- Guía "¿Para qué sirve esta pantalla?" ---------- */
.cx-guide {
    background: var(--cx-guide-bg);
    border: 1px solid var(--cx-guide-border);
    border-radius: 16px;
    margin-bottom: 4px;
    overflow: hidden;
}

.cx-guide-head {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.cx-guide-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--cx-primary);
    color: #fff;
}

.dark .cx-guide-icon {
    background: var(--cx-sky);
    color: #172554;
}

.cx-guide-icon-svg {
    width: 22px;
    height: 22px;
}

.cx-guide-titles {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cx-guide-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--cx-guide-text);
    opacity: .75;
}

.cx-guide-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--cx-guide-text);
}

.cx-guide-toggle {
    flex: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--cx-guide-text);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--cx-guide-border);
    background: rgba(255, 255, 255, .6);
}

.dark .cx-guide-toggle {
    background: rgba(255, 255, 255, .04);
}

.cx-guide-body {
    padding: 0 18px 16px 72px;
    color: var(--cx-guide-body);
    font-size: 15px;
    line-height: 1.55;
}

.cx-guide-what {
    margin: 0 0 10px;
}

.cx-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.cx-guide-steps li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cx-guide-n {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--cx-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.dark .cx-guide-n {
    background: var(--cx-sky);
    color: #172554;
}

.cx-guide-tip {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(56, 189, 248, .12);
}

@media (max-width: 640px) {
    .cx-guide-body {
        padding: 0 16px 14px;
    }

    .cx-guide-toggle {
        display: none;
    }
}

/* ---------- Tareas rápidas (pantalla "Hoy") ---------- */
.cx-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.cx-task {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-950);
    text-align: left;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
}

.cx-task:hover {
    transform: translateY(-2px);
    border-color: #93C5FD;
    box-shadow: 0 12px 24px -16px rgba(30, 58, 138, .5);
}

.dark .cx-task {
    background: var(--gray-900);
    border-color: var(--gray-700);
    color: #F1F5F9;
}

.dark .cx-task:hover {
    border-color: var(--cx-sky);
}

.cx-task-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #DBEAFE;
    color: var(--cx-primary);
}

.dark .cx-task-icon {
    background: rgba(56, 189, 248, .15);
    color: var(--cx-sky);
}

.cx-task-icon svg {
    width: 24px;
    height: 24px;
}

.cx-task-title {
    font-weight: 800;
    font-size: 15px;
}

.cx-task-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

.dark .cx-task-desc {
    color: var(--gray-300);
}

.cx-task-badge {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    background: #FEF3C7;
    color: #92400E;
}

/* Lista de primeros pasos. */
.cx-steps {
    display: grid;
    gap: 10px;
}

.cx-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.dark .cx-step {
    border-color: var(--gray-700);
}

.cx-step-check {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    border: 2px solid var(--gray-300);
    color: var(--gray-500);
}

.cx-step.done .cx-step-check {
    background: #10B981;
    border-color: #10B981;
    color: #fff;
}

.cx-step-body {
    flex: 1;
    min-width: 0;
}

.cx-step-title {
    font-weight: 700;
}

.cx-step-detail {
    font-size: 13px;
    color: var(--gray-500);
}

.dark .cx-step-detail {
    color: var(--gray-300);
}

.cx-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--gray-200);
    overflow: hidden;
}

.dark .cx-bar {
    background: var(--gray-700);
}

.cx-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1E3A8A, #38BDF8);
}

/* Resumen de confirmación en asistentes (emitir cuota, registrar pago). */
.cx-summary {
    padding: 14px 16px;
    border-radius: 14px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    font-size: 15px;
    line-height: 1.5;
}

.dark .cx-summary {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .4);
    color: #A7F3D0;
}

.cx-summary strong {
    font-weight: 800;
}
