/* ASSETS/BUILDS/APPLICATION.CSS */

/* ========================================================================= */
@charset "UTF-8";

/* ========================================================================= */
/* 1. VARIABLES Y ESTILOS BASE */
/* ========================================================================= */
/* ============================================================================
   VARIABLES CSS — CONFIGURACIÓN DE COLORES
   ============================================================================

   ⭐ CAMBIO RÁPIDO: Solo modifica estas 2 líneas para cambiar el color
      principal de toda la plataforma:

   --color-primary: #635BFF;   👈 CAMBIA ESTE
   --btn-primary: #6366f1;     👈 Y ESTE (mismo valor)

   Ejemplos:
   - Verde:  #10b981
   - Azul:   #1652f0
   - Rojo:   #dc2626
   - Negro:  #1f2937
   - Cyan:   #06b6d4

============================================================================ */

:root {
    /* ══════════════════════════════════════════════
       COLOR PRINCIPAL ⭐
    ══════════════════════════════════════════════ */
    --color-primary: #635BFF;
    --color-secondary: #16CDC7;
    --color-secondary-bg: #f8f9fa;

    /* ══════════════════════════════════════════════
       TEXTOS
    ══════════════════════════════════════════════ */
    --color-text-dark: #111827;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;

    /* ══════════════════════════════════════════════
       BORDES Y FONDOS
    ══════════════════════════════════════════════ */
    --color-border: #e5e7eb;
    --color-star: #fff;

    /* ══════════════════════════════════════════════
       BOTONES ⭐
    ══════════════════════════════════════════════ */
    --btn-primary: #6366f1;
    --btn-secondary: #14b8a6;
    --btn-success: #10b981;
    --btn-info: #06b6d4;
    --btn-warning: #f59e0b;
    --btn-danger: #ec4899;
    --btn-light: #f3f4f6;
    --btn-dark: #0a1929;

    /* ══════════════════════════════════════════════
       ALERTAS
    ══════════════════════════════════════════════ */
    --alert-primary: #6366f1;
    --alert-primary-border: #a5b4fc;
    --alert-secondary: #14b8a6;
    --alert-secondary-border: #5eead4;
    --alert-success: #10b981;
    --alert-success-border: #6ee7b7;
    --alert-info: #06b6d4;
    --alert-info-border: #67e8f9;
    --alert-warning: #f59e0b;
    --alert-warning-border: #fcd34d;
    --alert-danger: #dc2626;
    --alert-danger-border: #f9a8d4;

    /* ══════════════════════════════════════════════
       TABLAS
    ══════════════════════════════════════════════ */
    --table-primary: #e0deff;
    --table-secondary: #ccfbf1;
    --table-success: #d7f4e2;
    --table-info: #daf4fb;
    --table-warning: #fef3ce;
    --table-danger: #ffe0e9;
    --table-dark: #0a2540;

    /* ══════════════════════════════════════════════
       POPOVERS Y TOOLTIPS
    ══════════════════════════════════════════════ */
    --popover-bg: white;
    --popover-border: #e5e7eb;
    --popover-gap: 16px;
    --tooltip-bg: #1f2937;
    --tooltip-color: white;

    /* ══════════════════════════════════════════════
       LAYOUT / DIMENSIONES
    ══════════════════════════════════════════════ */
    --sidebar-primary-width: 60px;
    --primary-item-size: 40px;
    --primary-icon-size: 1.1rem;
    --sidebar-secondary-width: 200px;
    --secondary-menu-font: 13px;
    --secondary-menu-line: 20px;
    --secondary-menu-padding-y: 7px;
    --secondary-menu-padding-x: 10px;
    --secondary-icon-width: 20px;
    --sidebar-width: 250px;
    --sidebar-closed-width: 70px;
    --header-height: 60px;
    --arrow-offset: 8px;

    /* Formularios compactos */
    --form-control-padding-y: 8px;
    --form-control-padding-x: 12px;
    --form-control-font: 13px;
    --form-control-line: 1.4;
    --form-control-radius: 8px;
    --form-control-border: 1.5px;
    --form-label-font: 13px;
    --form-group-margin: 16px;
    --form-row-gap: 14px;

    /* Tablas compactas */
    --table-padding-y: 8px;
    --table-padding-x: 12px;
    --table-font: 13px;
    --table-head-font: 12px;
    --table-radius: 8px;
    --table-first-col-width: 52px;
    --table-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --table-badge-padding-y: 3px;
    --table-badge-padding-x: 8px;
    --table-badge-font: 11px;
    --table-card-header-padding-y: 12px;
    --table-card-header-padding-x: 16px;
    --table-cell-gap: 8px;
    --table-cell-icon-size: 18px;
    --table-avatar-size: 32px;
    --table-action-btn: 28px;
    --table-action-gap: 6px;

    /* ══════════════════════════════════════════════
       ANIMACIONES
    ══════════════════════════════════════════════ */
    --transition-speed: 0.4s;
    --bezier-curve: cubic-bezier(0.4, 0, 0.2, 1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Manrope", Tahoma, sans-serif;
    background-color: var(--color-secondary-bg);
}

/* ========================================================================= */
/* 2. LAYOUT PRINCIPAL (GRID) */
/* ========================================================================= */
.dashboard-layout {
    display: grid;
    grid-template-columns: var(--sidebar-primary-width) var(--sidebar-secondary-width) 1fr;
    height: 100vh;
    overflow: hidden;
    transition: grid-template-columns var(--transition-speed) var(--bezier-curve);
}

.sidebar-hidden {
    grid-template-columns: var(--sidebar-primary-width) 0px 1fr !important;
}

/* ========================================================================= */
/* 3. SIDEBAR PRIMARIO (Izquierda - Iconos) */
/* ========================================================================= */
.sidebar-primary {
    grid-column: 1/2;
    background-color: #F5F7FB;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    overflow: visible !important;
}

.primary-header {
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    cursor: pointer;
}

#toggleSidebarBtn {
    font-size: 1rem;
    color: var(--color-text-dark);
    transition: transform var(--transition-speed);
}

.sidebar-hidden #toggleSidebarBtn {
    transform: rotate(90deg);
}

.primary-item {
    width: var(--primary-item-size);
    height: var(--primary-item-size);
    border-radius: 10px;
    margin: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.primary-item::before {
    font-family: 'remixicon' !important;
    font-style: normal;
    font-size: var(--primary-icon-size);
    color: var(--color-text-light);
}

/* Iconos Remix Icon */
.primary-item.icon-dashboard::before {
    content: "\ee93"; /* ri-bar-chart-line */
}

.primary-item.icon-apps::before {
    content: "\f016"; /* ri-sticky-note-line */
}

.primary-item.icon-ecommerce::before {
    content: "\f07f"; /* ri-shopping-bag-line */
}

.primary-item:hover {
    background-color: #DDDBFC;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.primary-item:hover::before {
    color: var(--color-primary);
}

.primary-item.active {
    background-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.primary-item.active::before {
    color: var(--color-star) !important;
}

/* Flecha indicadora para el elemento activo */
.primary-item.active::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--color-primary);
    z-index: 10;
}

/* Tooltip al hacer hover */
.primary-item:hover:not(.active)::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--primary-item-size) + 10px);
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-secondary);
    color: var(--color-star);
    font-family: 'Manrope', sans-serif;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 999;
    border: none;
}

/* ========================================================================= */
/* 4. SIDEBAR SECUNDARIO (Menú Desplegable) */
/* ========================================================================= */
.sidebar-secondary {
    grid-column: 2/3;
    background-color: #fff;
    border-right: 1px solid var(--color-border);
    height: 100vh;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.sidebar-hidden .sidebar-secondary {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.secondary-header {
    font-family: 'Manrope', sans-serif;
    height: 52px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-weight: 900;
    border-bottom: 1px solid var(--color-border);
}

.logo-text {
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    color: var(--color-primary);
    gap: 8px;
}


.logo-text .fa-star {
    color: var(--color-star);
    font-size: 0.8em;
}

.secondary-menu ul {
    list-style: none;
    padding: 6px 2px;
    margin: 0;
}

.section-title {
    font-family: 'Manrope', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 11px;
    line-height: 20px;
    color: rgb(41, 52, 61);
    margin: 10px 8px 4px;
    letter-spacing: 0.4px;
    position: relative;
    padding-top: 10px;
}

/* Línea separadora */
.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 12px;
    height: 1px;
    background-color: var(--color-border);
}

/* Quitar el separador del primer título */
.section-title:first-of-type::before {
    display: none;
}

/* Enlaces generales del sidebar secundario */
.menu-item a {
    padding: var(--secondary-menu-padding-y) var(--secondary-menu-padding-x);
    display: flex;
    align-items: center;
    width: 100%;
    font-family: 'Manrope', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: var(--secondary-menu-font);
    line-height: var(--secondary-menu-line);
    color: rgb(41, 52, 61);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.2s, color 0.2s;
}

/* Texto */
.menu-item a:hover {
    color: var(--color-primary);
}

.menu-item.active > a {
    background-color: var(--color-primary);
    color: rgb(255, 255, 255); /* Color blanco cuando está activo */
    font-weight: 400; /* Mantiene el peso 400 incluso cuando está activo */
}

.menu-item.active > a {
    background-color: var(--color-primary);
    color: #fff;
}

/* ------------------------------------------------------------------------- */
/* NUEVO: SOLUCIÓN PARA MOSTRAR ICONOS EN PANEL 2 Y EVITAR MOVIMIENTO */
/* ------------------------------------------------------------------------- */

/* 1. Creamos el espacio para el icono dentro del enlace */
.secondary-menu .menu-item a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: var(--secondary-icon-width);
    margin-right: 4px;
    text-align: center;
    display: inline-block;
    color: #333;
    transition: color 0.2s;
}

.secondary-menu .menu-item a i,
.secondary-menu .dropdown-toggle i,
.secondary-menu .sub-menu-item a i {
    font-size: 14px !important;
    margin-right: 6px !important;
}

/* Cambia color del icono cuando está activo */
.menu-item.active a::before {
    color: var(--color-star) !important;
}

.menu-item a:hover::before {
    color: var(--color-primary);
}

/* 2. Mapeo de Iconos (Igual que en sidebar 1, pero aplicado aquí) */
.menu-item.icon-dashboard a::before {
    content: "\f5fd";
}

.menu-item.icon-apps a::before {
    content: "\f00a";
}

.menu-item.icon-ecommerce a::before {
    content: "\f07a";
}

.menu-item.icon-user-profile a::before {
    content: "\f2bd";
}

/* ========================================================================= */
/* 5. ESTILOS DE DROPDOWN Y SUBMENÚS */
/* ========================================================================= */
.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--secondary-menu-padding-y) var(--secondary-menu-padding-x);
    font-family: 'Manrope', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: var(--secondary-menu-font);
    line-height: var(--secondary-menu-line);
    color: rgb(41, 52, 61);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

/* Contenedor del texto e icono izquierdo */
.dropdown-toggle .flex-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
}

.menu-text {
    flex-grow: 1;
    text-align: left;
    color: inherit; /* Heredar el color del padre */
}

/* Flecha del Dropdown (SOLUCIÓN TEMBLOR) */
.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s, color 0.2s;
    min-width: 20px;
    text-align: right;
    color: inherit; /* Heredar el color del padre */
}

/* Hover en dropdown */
.menu-item.has-dropdown:hover .dropdown-toggle {
    color: var(--color-primary);
}

.menu-item.has-dropdown:hover .dropdown-arrow {
    color: var(--color-primary);
}

/* Dropdown activo (cuando tiene clase .active) */
.menu-item.has-dropdown.active .dropdown-toggle {
    background-color: var(--color-primary);
    color: #fff !important;
}

.menu-item.has-dropdown.active .dropdown-toggle .menu-text {
    color: #fff !important;
}

.menu-item.has-dropdown.active .dropdown-toggle .dropdown-arrow {
    color: #fff !important;
}

.menu-item.has-dropdown.active .dropdown-arrow {
    color: #fff;
}

/* Dropdown abierto (cuando tiene clase .open) */
.has-dropdown.open .dropdown-toggle {
    background-color: var(--color-primary);
    color: #fff;
}

.has-dropdown.open .dropdown-toggle .menu-text {
    color: #fff !important;
}

.has-dropdown.open .dropdown-toggle .dropdown-arrow {
    color: #fff !important;
    transform: rotate(180deg);
}

.has-dropdown.open .dropdown-arrow {
    color: #fff;
    transform: rotate(180deg);
}

/* El icono ::before del dropdown debe seguir las mismas reglas */
.menu-item.has-dropdown .dropdown-toggle::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: var(--secondary-icon-width);
    text-align: center;
    display: inline-block;
    color: rgb(41, 52, 61);
    transition: color 0.2s;
}

.menu-item.has-dropdown:hover .dropdown-toggle::before {
    color: var(--color-primary);
}

.menu-item.has-dropdown.active .dropdown-toggle::before,
.menu-item.has-dropdown.open .dropdown-toggle::before {
    color: #fff !important;
}

.dropdown-menu {
    display: none; /* ⬅️ SALE del layout */
    opacity: 0;
    transform: translateY(-4px);
}

.has-dropdown.open .dropdown-menu {
    display: block; /* ⬅️ vuelve al layout */
    opacity: 1;
    transform: translateY(0);
    animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.has-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.sub-menu-item a {
    background-color: transparent !important;
    color: #5a6a85 !important;
    font-weight: 400 !important;
    font-size: 12px !important;
    padding: 6px 10px 6px 12px !important;
    border-radius: 6px;
    margin: 1px 6px;
    display: flex;
    align-items: center;
}

/* Quitamos el ::before generado por las reglas generales para los submenús */
.sub-menu-item a::before {
    content: none !important;
}

.sub-menu-item a::after {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    background-color: #5a6a85;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    order: -1;
    transition: 0.2s;
}

.sub-menu-item a:hover {
    color: var(--color-primary) !important;
}

.sub-menu-item a:hover::after {
    background-color: var(--color-primary);
    transform: scale(1.2);
}

.sub-menu-item.active a {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
}

.sub-menu-item.active a::after {
    background-color: var(--color-primary) !important;
}

.menu-item.has-dropdown.active .dropdown-toggle,
.has-dropdown.open .dropdown-toggle {
    background-color: var(--color-primary);
    color: #fff;
}

/* ========================================================================= */
/* 6. CONTENT WRAPPER Y NAVBAR SUPERIOR */
/* ========================================================================= */
.content-wrapper {
    grid-column: 3/4;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--color-secondary-bg);
    position: relative;
}

.dashboard-navbar {
    height: var(--header-height);
    min-height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background-color: transparent;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-title h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}


.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-solar {
    background-color: #e0e7ff;
    color: #4f46e5;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.icon-action {
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.icon-action:hover {
    color: var(--color-primary);
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* ========================================================================= */
/* 7. MAIN CONTENT */
/* ========================================================================= */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #ffffff;
    margin: 0 20px 20px 20px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    transition: border-radius 0.5s var(--bezier-curve), margin 0.5s var(--bezier-curve);
}

.sidebar-hidden .main-content {
    border-radius: 30px;
    margin: 10px 30px 30px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}


/* ========================================================================= */
/* 8. SISTEMA DE FORMULARIOS */
/* ========================================================================= */

/* Contenedor de grupo de formulario */
.form-group {
    margin-bottom: var(--form-group-margin);
}

/* Label del formulario */
.form-label {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: var(--form-label-font);
    color: var(--color-text-dark);
    margin-bottom: 6px;
    display: block;
}

/* Input base - estilo form-control */
.form-control {
    width: 100%;
    padding: var(--form-control-padding-y) var(--form-control-padding-x);
    font-family: 'Manrope', sans-serif;
    font-size: var(--form-control-font);
    line-height: var(--form-control-line);
    color: var(--color-text-dark);
    background-color: #fff;
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: var(--form-control-radius);
    outline: none;
    transition: all 0.2s ease;
}

/* Placeholder */
.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Focus state */
.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

/* Hover state */
.form-control:hover:not(:disabled):not(:focus) {
    border-color: #d1d5db;
}

/* Helper text (texto de ayuda) */
.form-helper {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* Input deshabilitado */
.form-control:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* Input readonly */
.form-control[readonly] {
    background-color: #f9fafb;
    color: var(--color-text-dark);
    cursor: default;
    border-color: #e5e7eb;
}

.form-control[readonly]:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

/* Input con error */
.form-control.is-invalid {
    border-color: #ef4444;
}

.form-control.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Mensaje de error */
.invalid-feedback {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: block;
}

/* Input con éxito */
.form-control.is-valid {
    border-color: #10b981;
}

.form-control.is-valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Mensaje de éxito */
.valid-feedback {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #10b981;
    margin-top: 4px;
    display: block;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* Input pequeño */
.form-control-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* Input grande */
.form-control-lg {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 9px;
}

/* Grid de formularios (2 columnas) */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--form-row-gap);
}

/* Grid de formularios (3 columnas) */
.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--form-row-gap);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Input con icono a la izquierda */
.input-group {
    position: relative;
}

.input-group .form-control {
    padding-left: 34px;
}

.input-group-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.form-control:focus ~ .input-group-icon {
    color: var(--color-primary);
}

/* Checkbox y Radio personalizados */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-label {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--color-text-dark);
    cursor: pointer;
}

/* Switch toggle */
.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: 24px;
    background-color: #d1d5db;
    border: none;
    position: relative;
}

.form-switch .form-check-input:checked {
    background-color: var(--color-primary);
}

/* Botón de formulario */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #5048e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}


/* Estilos para los links de Devise */
.devise-links {
    text-align: center;
    margin-top: 20px;
}

.devise-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.devise-links a:hover {
    color: #5048e5;
    text-decoration: underline;
}


/* ========================================================================= */
/* 9. GRID SYSTEM PARA FORMULARIOS Y LAYOUTS */
/* ========================================================================= */

/* ----- CONTENEDORES DE GRID ----- */

/* Row - Para layouts generales (tablas, cards, etc.) */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

/* Form Grid - Para formularios específicamente */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    width: 100%;
}

/* ----- SISTEMA DE 12 COLUMNAS ----- */
.col-1 {
    grid-column: span 1;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-5 {
    grid-column: span 5;
}

.col-6 {
    grid-column: span 6;
}

.col-7 {
    grid-column: span 7;
}

.col-8 {
    grid-column: span 8;
}

.col-9 {
    grid-column: span 9;
}

.col-10 {
    grid-column: span 10;
}

.col-11 {
    grid-column: span 11;
}

.col-12 {
    grid-column: span 12;
}

/* Columna automática (distribuye espacio equitativamente) */
.col {
    grid-column: span 1;
    flex: 1;
}

/* ----- VARIANTES PARA DIFERENTES BREAKPOINTS - Medium (md) ----- */
.col-md-1 {
    grid-column: span 1;
}

.col-md-2 {
    grid-column: span 2;
}

.col-md-3 {
    grid-column: span 3;
}

.col-md-4 {
    grid-column: span 4;
}

.col-md-5 {
    grid-column: span 5;
}

.col-md-6 {
    grid-column: span 6;
}

.col-md-7 {
    grid-column: span 7;
}

.col-md-8 {
    grid-column: span 8;
}

.col-md-9 {
    grid-column: span 9;
}

.col-md-10 {
    grid-column: span 10;
}

.col-md-11 {
    grid-column: span 11;
}

.col-md-12 {
    grid-column: span 12;
}

/* ----- GAP PERSONALIZADO ----- */
.gap-0 {
    gap: 0;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 12px;
}

.gap-3 {
    gap: 16px;
}

.gap-4 {
    gap: 20px;
}

.gap-5 {
    gap: 24px;
}

.gap-6 {
    gap: 32px;
}

/* ----- UTILIDADES DE MARGEN ----- */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 12px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 24px;
}

/* ----- BOTONES DE ACCIÓN ----- */

/* Acciones de formulario (alineadas a la derecha) */
.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
}

.form-actions .btn,
.form-actions input.btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    gap: 6px;
    line-height: 1;
}

.form-actions .btn:hover,
.form-actions input.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.form-actions .btn i {
    font-size: 14px;
    line-height: 1;
}

/* Acciones con un solo botón (ancho completo) */
.form-actions-single {
    margin-top: 8px;
}

/* Botón de ancho completo */
.btn-block {
    width: 100%;
}

/* Botón Reset (rosa/rojo claro) */
.btn-reset {
    background-color: #fce7f3;
    color: #ec4899;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background-color: #fbcfe8;
    transform: translateY(-1px);
}

.btn-reset:active {
    transform: translateY(0);
}

/* ----- RESPONSIVE - TABLETS (max-width: 1024px) ----- */
@media (max-width: 1024px) {
    .col-md-1,
    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-md-9,
    .col-md-10,
    .col-md-11,
    .col-md-12 {
        grid-column: span 12;
    }

    .row {
        gap: 16px;
    }
}

/* ----- RESPONSIVE - MOBILE (max-width: 768px) ----- */
@media (max-width: 768px) {
    /* Todas las columnas ocupan el ancho completo en móvil */
    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12 {
        grid-column: span 12 !important;
    }

    /* Reduce el gap en móviles */
    .row,
    .form-grid {
        gap: 16px;
    }

    /* Botones apilados verticalmente */
    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-reset {
        width: 100%;
    }
}

/* ----- ALINEACIÓN DE CONTENIDO ----- */
.align-start {
    align-items: start;
}

.align-center {
    align-items: center;
}

.align-end {
    align-items: end;
}

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

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: end;
}

.justify-between {
    justify-content: space-between;
}

/* ----- ORDEN DE COLUMNAS ----- */
.order-1 {
    order: 1;
}

.order-2 {
    order: 2;
}

.order-3 {
    order: 3;
}

.order-first {
    order: -1;
}

.order-last {
    order: 999;
}


/* ========================================================================= */
/* 11. CHECKBOXES Y RADIOS PERSONALIZADOS */
/* ========================================================================= */

/* ----- CHECKBOX BASE ----- */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.form-check-input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    background-color: white;
}

/* Hover en checkbox */
.form-check-input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--color-primary);
}

/* Checkbox checked - Color Primary (Morado) */
.form-check-input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Icono de check */
.form-check-input[type="checkbox"]:checked::before {
    content: "\f00c"; /* Font Awesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
}

/* Checkbox deshabilitado */
.form-check-input[type="checkbox"]:disabled {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-check-input[type="checkbox"]:disabled:checked {
    background-color: #c7d2fe;
    border-color: #c7d2fe;
}

/* Label del checkbox */
.form-check-label {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: var(--color-text-dark);
    cursor: pointer;
    user-select: none;
}

.form-check-input:disabled ~ .form-check-label {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ----- VARIANTES DE COLOR PARA CHECKBOXES ----- */

/* Success - Verde */
.form-check-input.check-success:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.form-check-input.check-success:disabled:checked {
    background-color: #86efac;
    border-color: #86efac;
}

/* Danger - Rosa/Rojo */
.form-check-input.check-danger:checked {
    background-color: #ec4899;
    border-color: #ec4899;
}

.form-check-input.check-danger:disabled:checked {
    background-color: #f9a8d4;
    border-color: #f9a8d4;
}

/* Warning - Amarillo */
.form-check-input.check-warning:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.form-check-input.check-warning:disabled:checked {
    background-color: #fcd34d;
    border-color: #fcd34d;
}

/* Primary - Morado (ya definido arriba, pero lo dejamos para consistencia) */
.form-check-input.check-primary:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input.check-primary:disabled:checked {
    background-color: #c7d2fe;
    border-color: #c7d2fe;
}

/* Secondary - Cyan */
.form-check-input.check-secondary:checked {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.form-check-input.check-secondary:disabled:checked {
    background-color: #a5f3fc;
    border-color: #a5f3fc;
}

/* ----- VARIANTES CON BORDER OUTLINE ----- */
.form-check-input.check-outline:checked {
    background-color: white;
    border-width: 2px;
}

.form-check-input.check-outline.check-success:checked {
    border-color: #10b981;
}

.form-check-input.check-outline.check-success:checked::before {
    color: #10b981;
}

.form-check-input.check-outline.check-danger:checked {
    border-color: #ec4899;
}

.form-check-input.check-outline.check-danger:checked::before {
    color: #ec4899;
}

.form-check-input.check-outline.check-warning:checked {
    border-color: #f59e0b;
}

.form-check-input.check-outline.check-warning:checked::before {
    color: #f59e0b;
}

.form-check-input.check-outline.check-primary:checked {
    border-color: var(--color-primary);
}

.form-check-input.check-outline.check-primary:checked::before {
    color: var(--color-primary);
}

.form-check-input.check-outline.check-secondary:checked {
    border-color: var(--color-secondary);
}

.form-check-input.check-outline.check-secondary:checked::before {
    color: var(--color-secondary);
}

/* ----- RADIO BUTTONS ----- */
.form-check-input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%; /* Circular para radios */
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    background-color: white;
}

/* Hover en radio */
.form-check-input[type="radio"]:hover:not(:disabled) {
    border-color: var(--color-primary);
}

/* Radio checked */
.form-check-input[type="radio"]:checked {
    background-color: white;
    border-color: var(--color-primary);
    border-width: 2px;
}

/* Punto interno del radio */
.form-check-input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-primary);
}

/* Radio deshabilitado */
.form-check-input[type="radio"]:disabled {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-check-input[type="radio"]:disabled:checked {
    border-color: #c7d2fe;
}

.form-check-input[type="radio"]:disabled:checked::before {
    background-color: #c7d2fe;
}

/* ----- GRUPOS DE CHECKBOXES/RADIOS ----- */
.check-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* ----- SWITCH TOGGLE (Bonus) ----- */
.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: 24px;
    background-color: #d1d5db;
    border: none;
    position: relative;
    cursor: pointer;
}

.form-switch .form-check-input::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    top: 3px;
    left: 3px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch .form-check-input:checked {
    background-color: var(--color-primary);
}

.form-switch .form-check-input:checked::before {
    left: 23px;
}

.form-switch .form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ========================================================================= */
/* 12. TABLAS MODERNAS */
/* ========================================================================= */

/* Variables de colores para tablas */

/* Contenedor responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabla base */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Manrope', sans-serif;
    background-color: white;
    border-radius: var(--table-radius);
    overflow: hidden;
    box-shadow: var(--table-shadow);
}

/* Header de la tabla */
.table thead {
    background-color: #f3f4f6;
}

.table thead th {
    padding: var(--table-padding-y) var(--table-padding-x);
    font-weight: 600;
    font-size: var(--table-head-font);
    text-align: left;
    color: var(--color-text-dark);
    border-bottom: 1.5px solid #e5e7eb;
    white-space: nowrap;
}

/* Primera columna del header (alineada al centro para números) */
.table thead th:first-child {
    text-align: center;
    width: var(--table-first-col-width);
}

/* Body de la tabla */
.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table tbody td {
    padding: var(--table-padding-y) var(--table-padding-x);
    font-size: var(--table-font);
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* Primera columna del body (números centrados) */
.table tbody td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* Última fila sin borde */
.table tbody tr:last-child td {
    border-bottom: none;
}

/* ----- VARIANTES DE COLOR PARA TABLAS (CON VARIABLES) ----- */

/* Primary Table - Morado */
.table-primary thead {
    background-color: var(--color-primary);
}

.table-primary thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-primary tbody tr {
    background-color: white;
}

.table-primary tbody tr:hover {
    background-color: color-mix(in srgb, var(--color-primary) 12%, white);
}

/* Success Table - Verde */
.table-success thead {
    background-color: #10b981;
}

.table-success thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-success tbody tr {
    background-color: white;
}

.table-success tbody tr:hover {
    background-color: var(--table-success);
}

/* Info Table - Cyan/Azul claro */
.table-info thead {
    background-color: var(--color-primary);
}

.table-info thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-info tbody tr {
    background-color: white;
}

.table-info tbody tr:hover {
    background-color: color-mix(in srgb, var(--color-primary) 12%, white);
}

/* Warning Table - Amarillo */
.table-warning thead {
    background-color: #f59e0b;
}

.table-warning thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-warning tbody tr {
    background-color: white;
}

.table-warning tbody tr:hover {
    background-color: var(--table-warning);
}

/* Danger Table - Rosa/Rojo */
.table-danger thead {
    background-color: #ec4899;
}

.table-danger thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-danger tbody tr {
    background-color: white;
}

.table-danger tbody tr:hover {
    background-color: var(--table-danger);
}

/* Dark Table - Oscura */
.table-dark thead {
    background-color: var(--table-dark);
}

.table-dark thead th {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.table-dark tbody tr {
    background-color: white;
}

.table-dark tbody tr:hover {
    background-color: #f3f4f6;
}

/* ----- TABLA STRIPED (Rayada intercalada) ----- */

/* Primary Striped */
.table-primary.table-striped tbody tr:nth-child(odd) {
    background-color: var(--table-primary);
}

.table-primary.table-striped tbody tr:nth-child(even) {
    background-color: white;
}

.table-primary.table-striped tbody tr:hover {
    background-color: #d1ceff;
}

/* Success Striped */
.table-success.table-striped tbody tr:nth-child(odd) {
    background-color: var(--table-success);
}

.table-success.table-striped tbody tr:nth-child(even) {
    background-color: white;
}

.table-success.table-striped tbody tr:hover {
    background-color: #c2eed5;
}

/* Info Striped */
.table-info.table-striped tbody tr:nth-child(odd) {
    background-color: var(--table-info);
}

.table-info.table-striped tbody tr:nth-child(even) {
    background-color: white;
}

.table-info.table-striped tbody tr:hover {
    background-color: #c5eef7;
}

/* Warning Striped */
.table-warning.table-striped tbody tr:nth-child(odd) {
    background-color: var(--table-warning);
}

.table-warning.table-striped tbody tr:nth-child(even) {
    background-color: white;
}

.table-warning.table-striped tbody tr:hover {
    background-color: #fdeeb8;
}

/* Danger Striped */
.table-danger.table-striped tbody tr:nth-child(odd) {
    background-color: var(--table-danger);
}

.table-danger.table-striped tbody tr:nth-child(even) {
    background-color: white;
}

.table-danger.table-striped tbody tr:hover {
    background-color: #ffd1e0;
}

/* Striped genérica (sin color específico) */
.table-striped:not(.table-primary):not(.table-success):not(.table-info):not(.table-warning):not(.table-danger) tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

.table-striped:not(.table-primary):not(.table-success):not(.table-info):not(.table-warning):not(.table-danger) tbody tr:nth-child(even) {
    background-color: white;
}

.table-striped:not(.table-primary):not(.table-success):not(.table-info):not(.table-warning):not(.table-danger) tbody tr:hover {
    background-color: #f3f4f6;
}

/* ----- TABLA CON BORDES (BORDERED) ----- */

/* Bordes horizontales y verticales */
.table-bordered {
    border: 1px solid #e5e7eb;
}

.table-bordered thead th {
    border: 1px solid #e5e7eb;
}

.table-bordered tbody td {
    border: 1px solid #e5e7eb;
}

/* Bordes solo horizontales */
.table-bordered-horizontal thead th {
    border-left: none;
    border-right: none;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.table-bordered-horizontal tbody td {
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
}

/* Bordes solo verticales */
.table-bordered-vertical thead th {
    border-top: none;
    border-bottom: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

.table-bordered-vertical tbody td {
    border-top: none;
    border-bottom: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

/* ----- TABLA BORDERLESS ----- */
.table-borderless thead th,
.table-borderless tbody td {
    border: none;
}

/* ----- TABLA HOVER ----- */
.table-hover tbody tr:hover {
    background-color: #f3f4f6;
    cursor: pointer;
}

/* ----- TABLA SMALL (Extra compacta) ----- */
.table-sm thead th,
.table-sm tbody td {
    padding: 6px 10px;
    font-size: 12px;
}

/* ----- TABLA LARGE ----- */
.table-lg thead th,
.table-lg tbody td {
    padding: 12px 16px;
    font-size: 14px;
}

/* ----- ACCIONES EN TABLA ----- */
.table-actions {
    display: flex;
    gap: var(--table-action-gap);
    justify-content: center;
}

.table-actions form {
    display: contents;
}

.table-actions .btn-icon {
    width: var(--table-action-btn);
    height: var(--table-action-btn);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.table-actions .btn-edit {
    background-color: #dbeafe;
    color: #3b82f6;
}

.table-actions .btn-edit:hover {
    background-color: #3b82f6;
    color: white;
}

.table-actions .btn-delete {
    background-color: #fee2e2;
    color: #ef4444;
}

.table-actions .btn-delete:hover {
    background-color: #ef4444;
    color: white;
}

.table-actions .btn-view {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.table-actions .btn-view:hover {
    background-color: #4f46e5;
    color: white;
}

/* Acciones compactas — iconos show/edit/delete en tablas */
.table-info tbody td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.table-info tbody td:last-child form {
    display: inline-flex;
    margin: 0;
    vertical-align: middle;
}

.table-info tbody td:last-child .btn {
    width: var(--table-action-btn);
    height: var(--table-action-btn);
    min-width: var(--table-action-btn);
    padding: 0;
    font-size: 13px;
    line-height: 1;
    border-radius: 6px;
    gap: 0;
    display: inline-flex;
    vertical-align: middle;
}

.table-info tbody td:last-child .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.table-info tbody td:last-child .btn i {
    font-size: 13px;
    line-height: 1;
}

/* ----- BADGES EN TABLAS ----- */
.table-badge {
    display: inline-block;
    padding: var(--table-badge-padding-y) var(--table-badge-padding-x);
    border-radius: 12px;
    font-size: var(--table-badge-font);
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-primary {
    background-color: #e0e7ff;
    color: #4338ca;
}

.badge-info {
    background-color: #cffafe;
    color: #155e75;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-active {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-completed {
    background-color: #ddd6fe;
    color: #5b21b6;
}

.badge-cancel {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ----- AVATARES EN TABLAS ----- */
.table-avatar {
    display: flex;
    align-items: center;
    gap: var(--table-cell-gap);
}

.table-avatar img {
    width: var(--table-avatar-size);
    height: var(--table-avatar-size);
    border-radius: 50%;
    object-fit: cover;
}

.table-avatar-info {
    display: flex;
    flex-direction: column;
}

.table-avatar-name {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: var(--table-font);
    line-height: 1.3;
}

.table-avatar-role {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.3;
}

/* ----- GRUPOS DE AVATARES (Team) ----- */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    margin-left: -8px;
    border: 2px solid white;
}

.avatar-group .avatar-circle:first-child {
    margin-left: 0;
}

/* Colores para avatares de letras */
.avatar-cyan {
    background-color: #06b6d4;
}

.avatar-pink {
    background-color: #ec4899;
}

.avatar-purple {
    background-color: #8b5cf6;
}

.avatar-yellow {
    background-color: #f59e0b;
}

.avatar-green {
    background-color: #10b981;
}

.avatar-blue {
    background-color: #3b82f6;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #e5e7eb;
        border-radius: var(--table-radius);
        padding: 10px;
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
        font-size: var(--table-font);
    }

    .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-dark);
    }

    .avatar-group .avatar-circle {
        margin-left: -4px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}


/* ========================================================================= */
/* 13. SISTEMA DE BOTONES */
/* ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== BOTONES DE COLOR (General) ========== */

/* Primary */
.btn-primary {
    background-color: var(--btn-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #5048e5;
}

/* Secondary */
.btn-secondary {
    background-color: var(--btn-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #0d9488;
}

/* Success */
.btn-success {
    background-color: var(--btn-success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

/* Info */
.btn-info {
    background-color: var(--btn-info);
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
}

/* Warning */
.btn-warning {
    background-color: var(--btn-warning);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

/* Danger */
.btn-danger {
    background-color: var(--btn-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #db2777;
}

/* Light */
.btn-light {
    background-color: var(--btn-light);
    color: var(--color-text-dark);
}

.btn-light:hover {
    background-color: #e5e7eb;
}

/* Dark */
.btn-dark {
    background-color: var(--btn-dark);
    color: white;
}

.btn-dark:hover {
    background-color: #051929;
}

/* ========== BOTONES LIGHT (Colores Pastel) ========== */

/* Light Primary */
.bg-primary-subtle {
    background-color: #e0deff;
    color: var(--btn-primary);
}

.bg-primary-subtle:hover {
    background-color: #d1ceff;
}

.text-primary {
    color: var(--btn-primary);
}

/* Light Secondary */
.bg-secondary-subtle {
    background-color: #d4f8f6;
    color: var(--btn-secondary);
}

.bg-secondary-subtle:hover {
    background-color: #c0f3f0;
}

.text-secondary {
    color: var(--btn-secondary);
}

/* Light Success */
.bg-success-subtle {
    background-color: #d7f4e2;
    color: #047857;
}

.bg-success-subtle:hover {
    background-color: #c2eed5;
}

.text-success {
    color: #047857;
}

/* Light Info */
.bg-info-subtle {
    background-color: #daf4fb;
    color: #0e7490;
}

.bg-info-subtle:hover {
    background-color: #c5eef7;
}

.text-info {
    color: #0e7490;
}

/* Light Warning */
.bg-warning-subtle {
    background-color: #fef3ce;
    color: #b45309;
}

.bg-warning-subtle:hover {
    background-color: #fdeeb8;
}

.text-warning {
    color: #b45309;
}

/* Light Danger */
.bg-danger-subtle {
    background-color: #ffe0e9;
    color: #be185d;
}

.bg-danger-subtle:hover {
    background-color: #ffd1e0;
}

.text-danger {
    color: #be185d;
}

/* ========== BOTONES OUTLINE ========== */

/* Outline Primary */
.btn-outline-primary {
    background-color: transparent;
    color: var(--btn-primary);
    border: 2px solid var(--btn-primary);
}

.btn-outline-primary:hover {
    background-color: var(--btn-primary);
    color: white;
}

/* Outline Secondary */
.btn-outline-secondary {
    background-color: transparent;
    color: var(--btn-secondary);
    border: 2px solid var(--btn-secondary);
}

.btn-outline-secondary:hover {
    background-color: var(--btn-secondary);
    color: white;
}

/* Outline Success */
.btn-outline-success {
    background-color: transparent;
    color: var(--btn-success);
    border: 2px solid var(--btn-success);
}

.btn-outline-success:hover {
    background-color: var(--btn-success);
    color: white;
}

/* Outline Info */
.btn-outline-info {
    background-color: transparent;
    color: var(--btn-info);
    border: 2px solid var(--btn-info);
}

.btn-outline-info:hover {
    background-color: var(--btn-info);
    color: white;
}

/* Outline Warning */
.btn-outline-warning {
    background-color: transparent;
    color: var(--btn-warning);
    border: 2px solid var(--btn-warning);
}

.btn-outline-warning:hover {
    background-color: var(--btn-warning);
    color: white;
}

/* Outline Danger */
.btn-outline-danger {
    background-color: transparent;
    color: var(--btn-danger);
    border: 2px solid var(--btn-danger);
}

.btn-outline-danger:hover {
    background-color: var(--btn-danger);
    color: white;
}

/* Outline Dark */
.btn-outline-dark {
    background-color: transparent;
    color: var(--btn-dark);
    border: 2px solid var(--btn-dark);
}

.btn-outline-dark:hover {
    background-color: var(--btn-dark);
    color: white;
}

/* ========== BOTONES ROUNDED (Más redondeados) ========== */
.btn-rounded {
    border-radius: 25px;
}

/* Versión con clase rounded-pill */
.rounded-pill {
    border-radius: 50px;
}

/* ========== TAMAÑOS DE BOTONES ========== */

/* Extra Small */
.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Small */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Normal (default) ya está definido en .btn */

/* Large */
.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
}

/* ========== BOTONES BLOCK (Ancho completo) ========== */
.btn-block {
    display: flex;
    width: 100%;
}

/* ========== BOTONES CIRCULARES (ICON BUTTONS) ========== */

/* Botón circular base */
.btn-circle {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Botón circular small */
.btn-circle.btn-sm,
.round-40 {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

/* Botón circular large (48px) */
.btn-circle.btn-lg,
.round-48 {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

/* Botón circular extra large (56px) */
.btn-circle.btn-xl,
.round-56 {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

/* ========== GRUPOS DE BOTONES ========== */
.btn-group {
    display: inline-flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .btn:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: none;
}

.btn-group .btn:hover {
    transform: none;
    box-shadow: none;
    z-index: 1;
}

/* Tamaños de grupos */
.btn-group-lg .btn {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-group-sm .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== TAMAÑOS DE FUENTE PARA ICONOS ========== */
.fs-3 {
    font-size: 1.75rem;
}

.fs-4 {
    font-size: 1.5rem;
}

.fs-5 {
    font-size: 1.25rem;
}

.fs-6 {
    font-size: 1rem;
}

.fs-7 {
    font-size: 1.5rem;
}

.fs-8 {
    font-size: 2rem;
}

/* ========== ICON UTILITIES ========== */
.icon-sm {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.icon-md {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.icon-lg {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* ========== UTILIDADES ========== */

/* Alineación de iconos */
.d-inline-flex {
    display: inline-flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

/* Margen entre elementos */
.me-1 {
    margin-right: 4px;
}

.me-2 {
    margin-right: 8px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.px-2 {
    padding-left: 8px;
    padding-right: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        border-radius: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .btn-group .btn:first-child {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        border-bottom-left-radius: 0;
    }

    .btn-group .btn:last-child {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        border-top-right-radius: 0;
        border-bottom: none;
    }
}


/* ========== ALERT BASE ========== */
.alert {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert strong {
    font-weight: 700;
}

/* ========== DEFAULT ALERTS (Colores Light/Subtle) ========== */

/* Alert Primary */
.alert-primary {
    background-color: var(--alert-primary-light);
    color: var(--alert-primary);
}

/* Alert Secondary */
.alert-secondary {
    background-color: var(--alert-secondary-light);
    color: var(--alert-secondary);
}

/* Alert Success */
.alert-success {
    background-color: var(--alert-success-light);
    color: #047857;
}

/* Alert Info */
.alert-info {
    background-color: var(--alert-info-light);
    color: #0e7490;
}

/* Alert Warning */
.alert-warning {
    background-color: var(--alert-warning-light);
    color: #b45309;
}

/* Alert Danger */
.alert-danger,
.alert-error {
    background-color: var(--alert-danger-light);
    color: #be185d;
}

/* Alert Light */
.alert-light {
    background-color: var(--alert-light);
    color: #6b7280;
}

/* Alert Dark */
.alert-dark {
    background-color: var(--alert-dark);
    color: white;
}

/* ========== DISMISSIBLE ALERTS (Colores Sólidos) ========== */

.alert-dismissible {
    padding-right: 50px;
}

/* Primary Dismissible */
.alert-dismissible.bg-primary {
    background-color: var(--alert-primary);
    color: white;
}

/* Secondary Dismissible */
.alert-dismissible.bg-secondary {
    background-color: var(--alert-secondary);
    color: white;
}

/* Success Dismissible */
.alert-dismissible.bg-success {
    background-color: var(--alert-success);
    color: white;
}

/* Danger/Error Dismissible */
.alert-dismissible.bg-danger,
.alert-dismissible.bg-error {
    background-color: var(--alert-danger);
    color: white;
}

/* Warning Dismissible */
.alert-dismissible.bg-warning {
    background-color: var(--alert-warning);
    color: white;
}

/* Info Dismissible */
.alert-dismissible.bg-info {
    background-color: var(--alert-info);
    color: white;
}

/* Light Dismissible */
.alert-dismissible.bg-light {
    background-color: var(--alert-light);
    color: #374151;
}

/* Dark Dismissible */
.alert-dismissible.bg-dark {
    background-color: var(--alert-dark);
    color: white;
}

/* ========== OUTLINE ALERTS ========== */

.alert-outline-primary,
.border-primary {
    background-color: white;
    border: 2px solid var(--alert-primary-border);
    color: var(--alert-primary);
}

.alert-outline-secondary,
.border-secondary {
    background-color: white;
    border: 2px solid var(--alert-secondary-border);
    color: var(--alert-secondary);
}

.alert-outline-success,
.border-success {
    background-color: white;
    border: 2px solid var(--alert-success-border);
    color: #047857;
}

.alert-outline-danger,
.border-danger {
    background-color: white;
    border: 2px solid var(--alert-danger-border);
    color: #be185d;
}

.alert-outline-warning,
.border-warning {
    background-color: white;
    border: 2px solid var(--alert-warning-border);
    color: #b45309;
}

.alert-outline-info,
.border-info {
    background-color: white;
    border: 2px solid var(--alert-info-border);
    color: #0e7490;
}

/* ========== LIGHT ALERTS (Background Subtle + Border) ========== */

.alert-light-primary {
    background-color: var(--alert-primary-light);
    border: 1px solid var(--alert-primary-border);
    color: var(--alert-primary);
}

.alert-light-secondary {
    background-color: var(--alert-secondary-light);
    border: 1px solid var(--alert-secondary-border);
    color: var(--alert-secondary);
}

.alert-light-success {
    background-color: var(--alert-success-light);
    border: 1px solid var(--alert-success-border);
    color: #047857;
}

.alert-light-danger {
    background-color: var(--alert-danger-light);
    border: 1px solid var(--alert-danger-border);
    color: #be185d;
}

.alert-light-warning {
    background-color: var(--alert-warning-light);
    border: 1px solid var(--alert-warning-border);
    color: #b45309;
}

.alert-light-info {
    background-color: var(--alert-info-light);
    border: 1px solid var(--alert-info-border);
    color: #0e7490;
}

/* ========== ROUNDED ALERTS ========== */

.rounded-pill {
    border-radius: 50px;
}

.alert.rounded-pill {
    padding: 16px 24px;
}

/* ========== CLOSE BUTTON ========== */

.btn-close,
.close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
    line-height: 1;
    color: inherit;
}

.btn-close:hover,
.close:hover {
    opacity: 1;
}

/* Para alerts con colores sólidos, el botón debe ser blanco */
.alert-dismissible.bg-primary .btn-close,
.alert-dismissible.bg-secondary .btn-close,
.alert-dismissible.bg-success .btn-close,
.alert-dismissible.bg-danger .btn-close,
.alert-dismissible.bg-warning .btn-close,
.alert-dismissible.bg-info .btn-close,
.alert-dismissible.bg-dark .btn-close {
    color: white;
}

/* ========== ICONOS EN ALERTS ========== */

.alert-icon {
    flex-shrink: 0;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== ALERT LINKS ========== */

.alert-link {
    font-weight: 700;
    text-decoration: underline;
    color: inherit;
    transition: opacity 0.2s;
}

.alert-link:hover {
    opacity: 0.8;
}

/* Links en alerts específicos */
.alert-primary .alert-link {
    color: var(--alert-primary);
}

.alert-secondary .alert-link {
    color: var(--alert-secondary);
}

.alert-success .alert-link {
    color: #047857;
}

.alert-danger .alert-link,
.alert-error .alert-link {
    color: #be185d;
}

.alert-warning .alert-link {
    color: #b45309;
}

.alert-info .alert-link {
    color: #0e7490;
}

/* ========== NOTIFY ALERTS (con botones de acción) ========== */

.alert-actions {
    margin-left: auto;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.alert-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: inherit;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.alert-action-btn:hover {
    opacity: 1;
}

/* ========== UTILIDADES ========== */

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.text-white {
    color: white;
}

/* Colores de background utilities */
.bg-primary {
    background-color: var(--alert-primary);
}

.bg-secondary {
    background-color: var(--alert-secondary);
}

.bg-success {
    background-color: var(--alert-success);
}

.bg-danger {
    background-color: var(--alert-danger);
}

.bg-warning {
    background-color: var(--alert-warning);
}

.bg-info {
    background-color: var(--alert-info);
}

.bg-light {
    background-color: var(--alert-light);
}

.bg-dark {
    background-color: var(--alert-dark);
}

/* Colores de texto */
.text-primary {
    color: var(--alert-primary);
}

.text-secondary {
    color: var(--alert-secondary);
}

.text-success {
    color: #047857;
}

.text-danger {
    color: #be185d;
}

.text-warning {
    color: #b45309;
}

.text-info {
    color: #0e7490;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .alert {
        padding: 14px 18px;
        font-size: 14px;
    }

    .alert-dismissible {
        padding-right: 45px;
    }

    .alert.rounded-pill {
        padding: 14px 20px;
    }
}

/* CARD */

.section-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.section-card,
.demo-area {
    overflow: visible;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}


/* ================= POPOVER & TOOLTIP BASE ================= */

/* ================= BASE ================= */

.popover-wrapper,
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

/* ================= POPOVER ================= */

.popover {
    position: absolute;
    z-index: 1060;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1),
    0 2px 4px -1px rgba(0, 0, 0, .06);
    max-width: 320px;
    min-width: 220px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .2s ease, transform .2s ease;
}

/* Visible */
.popover.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin: 10px;
}

/* ================= CONTENT ================= */

.popover-header {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 7px 7px 0 0;
}

.popover-body {
    padding: 12px 16px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* ================= POSITIONS ================= */

/* TOP */
.popover[data-placement="top"] {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
}

.popover.show[data-placement="top"] {
    transform: translateX(-50%) translateY(0);
}

/* RIGHT */
.popover[data-placement="right"] {
    top: 50%;
    left: 100%;
    transform: translateX(8px) translateY(-50%);
}

.popover.show[data-placement="right"] {
    transform: translateX(0) translateY(-50%);
}

/* BOTTOM */
.popover[data-placement="bottom"] {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
}

.popover.show[data-placement="bottom"] {
    transform: translateX(-50%) translateY(0);
}

/* LEFT */
.popover[data-placement="left"] {
    top: 50%;
    right: 100%;
    transform: translateX(-8px) translateY(-50%);
}

.popover.show[data-placement="left"] {
    transform: translateX(0) translateY(-50%);
}

/* ================= POPOVER ARROW (PERFECT) ================= */

/* Base flecha */
.popover::before,
.popover::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
}

/* borde */
.popover::before {
    background: #e5e7eb;
    z-index: -1;
}

/* relleno */
.popover::after {
    background: #fff;
}

/* TOP */
.popover[data-placement="top"]::before,
.popover[data-placement="top"]::after {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

/* RIGHT */
.popover[data-placement="right"]::before,
.popover[data-placement="right"]::after {
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

/* BOTTOM */
.popover[data-placement="bottom"]::before,
.popover[data-placement="bottom"]::after {
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

/* LEFT */
.popover[data-placement="left"]::before,
.popover[data-placement="left"]::after {
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}


/* ================= TOOLTIP ================= */

.tooltip {
    position: absolute;
    z-index: 1070;
    background: #1f2937;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 260px;
    min-width: 120px;
    white-space: normal;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease;
}


/* Mostrar tooltip al hover */
.tooltip-wrapper:hover .tooltip,
.tooltip-wrapper:focus-within .tooltip {
    opacity: 1;
    visibility: visible;
}

/* ================= TOOLTIP ARROWS ================= */

.tooltip::before {
    content: '';
    position: absolute;
    border-style: solid;
    border-width: 6px;
}

/* TOP */
.tooltip[data-placement="top"] {
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip[data-placement="top"]::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* RIGHT */
.tooltip[data-placement="right"] {
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip[data-placement="right"]::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #1f2937 transparent transparent;
}

/* BOTTOM */
.tooltip[data-placement="bottom"] {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip[data-placement="bottom"]::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #1f2937 transparent;
}

/* LEFT */
.tooltip[data-placement="left"] {
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip[data-placement="left"]::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1f2937;
}

/* ================= DEMO FIX ================= */
.demo-area,
.section-card {
    overflow: visible; /* 🔥 evita que el tooltip desaparezca */
}


/* SEELCT */


/**
 * tom-select.css (v2.4.3)
 * Copyright (c) contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 */
.ts-control {
    border: 1px solid #d0d0d0;
    padding: 8px 8px;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    box-shadow: none;
    border-radius: 3px;
    display: flex;
    flex-wrap: wrap;
}

.ts-wrapper.multi.has-items .ts-control {
    padding: calc(8px - 2px - 0) 8px calc(8px - 2px - 3px - 0);
}

.full .ts-control {
    background-color: #fff;
}

.disabled .ts-control, .disabled .ts-control * {
    cursor: default !important;
}

.focus .ts-control {
    box-shadow: none;
}

.ts-control > * {
    vertical-align: baseline;
    display: inline-block;
}

.ts-wrapper.multi .ts-control > div {
    cursor: pointer;
    margin: 0 3px 3px 0;
    padding: 2px 6px;
    background: #f2f2f2;
    color: #303030;
    border: 0 solid #d0d0d0;
}

.ts-wrapper.multi .ts-control > div.active {
    background: #e8e8e8;
    color: #303030;
    border: 0 solid #cacaca;
}

.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active {
    color: rgb(124.5, 124.5, 124.5);
    background: white;
    border: 0 solid white;
}

.ts-control > input {
    flex: 1 1 auto;
    min-width: 7rem;
    display: inline-block !important;
    padding: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-indent: 0 !important;
    border: 0 none !important;
    background: none !important;
    line-height: inherit !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
    box-shadow: none !important;
}

.ts-control > input::-ms-clear {
    display: none;
}

.ts-control > input:focus {
    outline: none !important;
}

.has-items .ts-control > input {
    margin: 0 4px !important;
}

.ts-control.rtl {
    text-align: right;
}

.ts-control.rtl.single .ts-control:after {
    left: 15px;
    right: auto;
}

.ts-control.rtl .ts-control > input {
    margin: 0 4px 0 -2px !important;
}

.disabled .ts-control {
    opacity: 0.5;
    background-color: #fafafa;
}

.input-hidden .ts-control > input {
    opacity: 0;
    position: absolute;
    left: -10000px;
}

.ts-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;
    border: 1px solid #d0d0d0;
    background: #fff;
    margin: 0.25rem 0 0;
    border-top: 0 none;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 3px 3px;
}

.ts-dropdown [data-selectable] {
    cursor: pointer;
    overflow: hidden;
}

.ts-dropdown [data-selectable] .highlight {
    background: rgba(125, 168, 208, 0.2);
    border-radius: 1px;
}

.ts-dropdown .option,
.ts-dropdown .optgroup-header,
.ts-dropdown .no-results,
.ts-dropdown .create {
    padding: 5px 8px;
}

.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option {
    cursor: inherit;
    opacity: 0.5;
}

.ts-dropdown [data-selectable].option {
    opacity: 1;
    cursor: pointer;
}

.ts-dropdown .optgroup:first-child .optgroup-header {
    border-top: 0 none;
}

.ts-dropdown .optgroup-header {
    color: #303030;
    background: #fff;
    cursor: default;
}

.ts-dropdown .active {
    background-color: #f5fafd;
    color: #495c68;
}

.ts-dropdown .active.create {
    color: #495c68;
}

.ts-dropdown .create {
    color: rgba(48, 48, 48, 0.5);
}

.ts-dropdown .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin: 5px 8px;
}

.ts-dropdown .spinner::after {
    content: " ";
    display: block;
    width: 24px;
    height: 24px;
    margin: 3px;
    border-radius: 50%;
    border: 5px solid #d0d0d0;
    border-color: #d0d0d0 transparent #d0d0d0 transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ts-dropdown-content {
    overflow: hidden auto;
    max-height: 200px;
    scroll-behavior: smooth;
}

.ts-wrapper.plugin-drag_drop .ts-dragging {
    color: transparent !important;
}

.ts-wrapper.plugin-drag_drop .ts-dragging > * {
    visibility: hidden !important;
}

.plugin-checkbox_options:not(.rtl) .option input {
    margin-right: 0.5rem;
}

.plugin-checkbox_options.rtl .option input {
    margin-left: 0.5rem;
}

/* stylelint-disable function-name-case */
.plugin-clear_button {
    --ts-pr-clear-button: 1em;
}

.plugin-clear_button .clear-button {
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: calc(8px - 6px);
    margin-right: 0 !important;
    background: transparent !important;
    transition: opacity 0.5s;
    cursor: pointer;
}

.plugin-clear_button.form-select .clear-button, .plugin-clear_button.single .clear-button {
    right: max(var(--ts-pr-caret), 8px);
}

.plugin-clear_button.focus.has-items .clear-button, .plugin-clear_button:not(.disabled):hover.has-items .clear-button {
    opacity: 1;
}

.ts-wrapper .dropdown-header {
    position: relative;
    padding: 10px 8px;
    border-bottom: 1px solid #d0d0d0;
    background: color-mix(#fff, #d0d0d0, 85%);
    border-radius: 3px 3px 0 0;
}

.ts-wrapper .dropdown-header-close {
    position: absolute;
    right: 8px;
    top: 50%;
    color: #303030;
    opacity: 0.4;
    margin-top: -12px;
    line-height: 20px;
    font-size: 20px !important;
}

.ts-wrapper .dropdown-header-close:hover {
    color: black;
}

.plugin-dropdown_input.focus.dropdown-active .ts-control {
    box-shadow: none;
    border: 1px solid #d0d0d0;
}

.plugin-dropdown_input .dropdown-input {
    border: 1px solid #d0d0d0;
    border-width: 0 0 1px;
    display: block;
    padding: 8px 8px;
    box-shadow: none;
    width: 100%;
    background: transparent;
}

.plugin-dropdown_input .items-placeholder {
    border: 0 none !important;
    box-shadow: none !important;
    width: 100%;
}

.plugin-dropdown_input.has-items .items-placeholder, .plugin-dropdown_input.dropdown-active .items-placeholder {
    display: none !important;
}

.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input {
    min-width: 0;
}

.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input {
    flex: none;
    min-width: 4px;
}

.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder {
    color: transparent;
}

.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder {
    color: transparent;
}

.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content {
    display: flex;
}

.ts-dropdown.plugin-optgroup_columns .optgroup {
    border-right: 1px solid #f2f2f2;
    border-top: 0 none;
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
}

.ts-dropdown.plugin-optgroup_columns .optgroup:last-child {
    border-right: 0 none;
}

.ts-dropdown.plugin-optgroup_columns .optgroup::before {
    display: none;
}

.ts-dropdown.plugin-optgroup_columns .optgroup-header {
    border-top: 0 none;
}

.ts-wrapper.plugin-remove_button .item {
    display: inline-flex;
    align-items: center;
}

.ts-wrapper.plugin-remove_button .item .remove {
    color: inherit;
    text-decoration: none;
    vertical-align: middle;
    display: inline-block;
    padding: 0 6px;
    border-radius: 0 2px 2px 0;
    box-sizing: border-box;
}

.ts-wrapper.plugin-remove_button .item .remove:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ts-wrapper.plugin-remove_button.disabled .item .remove:hover {
    background: none;
}

.ts-wrapper.plugin-remove_button .remove-single {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 23px;
}

.ts-wrapper.plugin-remove_button:not(.rtl) .item {
    padding-right: 0 !important;
}

.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove {
    border-left: 1px solid #d0d0d0;
    margin-left: 6px;
}

.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove {
    border-left-color: #cacaca;
}

.ts-wrapper.plugin-remove_button:not(.rtl).disabled .item .remove {
    border-left-color: white;
}

.ts-wrapper.plugin-remove_button.rtl .item {
    padding-left: 0 !important;
}

.ts-wrapper.plugin-remove_button.rtl .item .remove {
    border-right: 1px solid #d0d0d0;
    margin-right: 6px;
}

.ts-wrapper.plugin-remove_button.rtl .item.active .remove {
    border-right-color: #cacaca;
}

.ts-wrapper.plugin-remove_button.rtl.disabled .item .remove {
    border-right-color: white;
}

:root {
    --ts-pr-clear-button: 0px;
    --ts-pr-caret: 0px;
    --ts-pr-min: .75rem;
}

.ts-wrapper.single .ts-control, .ts-wrapper.single .ts-control input {
    cursor: pointer;
}

.ts-control:not(.rtl) {
    padding-right: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important;
}

.ts-control.rtl {
    padding-left: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important;
}

.ts-wrapper {
    position: relative;
}

.ts-dropdown,
.ts-control,
.ts-control input {
    color: #303030;
    font-family: inherit;
    font-size: 13px;
    line-height: 18px;
}

.ts-control,
.ts-wrapper.single.input-active .ts-control {
    background: #fff;
    cursor: text;
}

.ts-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

/*# sourceMappingURL=tom-select.css.map */

/* Tom Select — compacto, alineado con .form-control */
.ts-wrapper .ts-control {
    min-height: auto;
    padding: var(--form-control-padding-y) var(--form-control-padding-x);
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: var(--form-control-radius);
    box-shadow: none;
}

.ts-wrapper.focus .ts-control {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

.ts-dropdown,
.ts-control,
.ts-control input {
    font-size: var(--form-control-font);
    line-height: var(--form-control-line);
}

.ts-wrapper.multi.has-items .ts-control {
    padding: calc(var(--form-control-padding-y) - 2px) var(--form-control-padding-x);
}

.ts-wrapper.multi .ts-control > div {
    padding: 1px 5px;
    font-size: 12px;
}

/* Select2 — compacto, alineado con .form-control */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: calc((var(--form-control-padding-y) * 2) + (var(--form-control-font) * var(--form-control-line)));
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: var(--form-control-radius);
    background-color: #fff;
    transition: all 0.2s ease;
}

.select2-container .select2-selection--single {
    height: auto;
    padding: var(--form-control-padding-y) var(--form-control-padding-x);
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0 28px 0 0;
    font-family: 'Manrope', sans-serif;
    font-size: var(--form-control-font);
    line-height: var(--form-control-line);
    color: var(--color-text-dark);
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 8px;
}

.select2-container .select2-selection--multiple {
    padding: 4px 8px;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.select2-container .select2-selection--multiple .select2-selection__choice {
    margin: 0;
    padding: 1px 6px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: var(--color-text-dark);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

.select2-dropdown {
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: var(--form-control-radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: var(--form-control-font);
    font-family: 'Manrope', sans-serif;
}

.select2-container--default .select2-results__option {
    padding: 7px 12px;
    font-size: var(--form-control-font);
    font-family: 'Manrope', sans-serif;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--color-primary);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9ca3af;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.page-title {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
}

.page-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 5px 0 0 0;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.header-actions .btn,
.header-actions form .btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    gap: 6px;
}

.header-actions .btn:hover,
.header-actions form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.header-actions .btn i {
    font-size: 14px;
    line-height: 1;
}

.empty-state .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.empty-state .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.table-card {
    background: white;
    border-radius: var(--table-radius);
    box-shadow: var(--table-shadow);
    overflow: hidden;
}

.table-header {
    padding: var(--table-card-header-padding-y) var(--table-card-header-padding-x);
    border-bottom: 1px solid var(--color-border);
}

.table-header h2,
.table-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
}

.table-cell-main {
    display: flex;
    align-items: center;
    gap: var(--table-cell-gap);
}

.table-cell-icon {
    font-size: var(--table-cell-icon-size);
    color: var(--color-primary);
    flex-shrink: 0;
}

.table-cell-title {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: var(--table-font);
    line-height: 1.3;
}

.table-cell-subtitle {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 1px;
    line-height: 1.3;
}

.table .badge {
    padding: var(--table-badge-padding-y) var(--table-badge-padding-x);
    font-size: var(--table-badge-font);
    border-radius: 5px;
    line-height: 1.3;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-light {
    background-color: #f3f4f6;
    color: #4b5563;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.text-end {
    text-align: right;
}

.breadcrumb {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.form-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.cuenta-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
}


.section-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.optional-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.section-description {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.form-help {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.condicion-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.condicion-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 16px;
    align-items: end;
}

.checkbox-group, .delete-group {
    display: flex;
    align-items: center;
    padding-top: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--form-label-font);
    color: var(--color-text-dark);
}

.delete-label {
    color: var(--btn-danger);
}

.form-checkbox, .form-checkbox-destroy {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-add-condition {
    margin-top: 10px;
}

.alert-danger {
    background-color: var(--alert-danger-light);
    border-left: 4px solid var(--alert-danger);
    color: #991b1b;
}

.error-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

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

    .form-group.col-span-2 {
        grid-column: span 1;
    }

    .condicion-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-group, .delete-group {
        padding-top: 0;
    }
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.metric-label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.metric-icon {
    font-size: 20px;
    color: var(--color-primary);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.metric-footer {
    font-size: 13px;
    color: var(--color-text-muted);
}

.progress-bar-container {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}


.progress-bar-fill {
    height: 100%;
    background-color: var(--btn-primary);
    transition: width 0.3s;
}

.info-section, .conditions-section, .observations-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-dark);
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.condition-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

.condition-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.condition-icon {
    font-size: 20px;
    color: var(--color-primary);
}

.condition-name {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 14px;
}

.condition-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.condition-status {
    margin-top: 8px;
}

.observations-content {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    color: var(--color-text-dark);
    line-height: 1.6;
}

.text-muted {
    color: var(--color-text-muted);
}


/* ================= FORMULARIO TRADE _FORM ================= */


.form-container {
    max-width: 1000px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}


.card-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 16px 0;
}

.form-hint {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.checklist-item-trade {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #e5e7eb;
    transition: all 0.2s;
}


.checklist-item-header {
    margin-bottom: 10px;
}

.checkbox-wrapper-large {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-checkbox-large {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--btn-primary);
    flex-shrink: 0;
}

.checklist-item-label {
    font-size: 13px;
    color: var(--color-text-dark);
    line-height: 1.45;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.checklist-item-notes {
    margin-left: 32px;
}

/* ================= FORMULARIO TRADE INDEX ================= */

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-detail {
    font-size: 12px;
    color: var(--color-text-muted);
}

.filters-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filters-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}

.filter-control {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.date-cell div {
    font-weight: 500;
}

/* ================= FORMULARIO TRADE SHOW ================= */

.metric-detail {
    font-size: 12px;
    color: var(--color-text-muted);
}

.text-link {
    color: var(--btn-primary);
    text-decoration: none;
}


.note-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #6366f1;
    margin-top: 16px;
}

.checklist-summary {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-item {
    margin-bottom: 16px;
}

.summary-label {
    font-size: 13px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.summary-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.checklist-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item-display {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
}

.item-display-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.item-number {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--btn-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.item-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.item-content {
    flex: 1;
}

.item-description {
    font-size: 15px;
    color: var(--color-text-dark);
    line-height: 1.5;
    margin-bottom: 8px;
}

.item-notes {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin-top: 8px;
}

/* ================= FORMULARIO ESTRATEGIA SHOW ================= */

.description-content {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    color: var(--color-text-dark);
    line-height: 1.6;
}

.checklist-grid {
    display: grid;
    gap: 12px;
}

.checklist-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid var(--btn-primary);
}

.item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}


.item-descripcion {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}


/* ============================================================================
   FORMULARIO ESTRATEGIA - Clases complementarias
   ============================================================================ */

.form-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--btn-primary);
}

.checklist-item-form {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--btn-primary);
    position: relative;
}

#checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.item-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-remove-item {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: #fecaca;
}

.btn-add-item {
    width: 100%;
    justify-content: center;
}


/* ============================================================================
   GALERÍA DE SCREENSHOTS (show de trades)
   ============================================================================ */

/* Sección contenedora */
.gallery-section {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gallery-header .section-title {
    margin-bottom: 0;
    font-size: 15px;
}

.gallery-count {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Grid dinámico — thumbnails pequeños */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Cada thumbnail: tamaño fijo compacto */
.gallery-item {
    position: relative;
    width: 100px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: transform 0.15s, box-shadow 0.15s;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay con lupa al hacer hover */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 91, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 22px;
    color: white;
}

/* Numerito en esquina */
.gallery-item-num {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.45);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   LIGHTBOX
   ============================================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
    transition: opacity 0.2s;
}

.lightbox-caption {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ============================================================================
   UPLOAD ZONE (formulario de trades)
   ============================================================================ */
.upload-zone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--btn-primary);
    background: #f5f3ff;
}

.upload-zone-inner {
    padding: 32px 24px;
    text-align: center;
    pointer-events: none;
}

.upload-icon {
    font-size: 36px;
    color: #9ca3af;
    display: block;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.upload-zone:hover .upload-icon,
.upload-zone.dragover .upload-icon {
    color: var(--btn-primary);
}

.upload-text {
    font-size: 14px;
    color: #374151;
    margin-bottom: 4px;
}

.upload-link {
    color: var(--btn-primary);
    font-weight: 600;
}

.upload-hint {
    font-size: 12px;
    color: #9ca3af;
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-counter {
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* Grid de thumbnails en el formulario */
.screenshots-current { margin-bottom: 16px; }

.screenshots-current-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.screenshots-grid-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.screenshot-thumb-wrap {
    position: relative;
    width: 90px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.screenshot-thumb-wrap:hover {
    transform: translateY(-2px);
}

.screenshot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screenshot-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.screenshot-thumb-wrap:hover .screenshot-thumb-overlay {
    opacity: 1;
}

.btn-thumb-view,
.btn-thumb-delete {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.btn-thumb-view {
    background: white;
    color: var(--btn-primary);
}

.btn-thumb-view:hover {
    background: var(--btn-primary);
    color: white;
}

.btn-thumb-delete {
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
}

.btn-thumb-delete input { display: none; }

.btn-thumb-delete:hover {
    background: #dc2626;
    color: white;
}

.screenshot-delete-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(220,38,38,0.85);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.screenshot-thumb-wrap.marked-delete {
    opacity: 0.5;
    outline: 2px solid #dc2626;
}

.screenshots-preview-new { margin-top: 14px; }

/* ============================================================================
   SHOW LAYOUT (2 columnas: contenido + checklist)
   ============================================================================ */
.show-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.show-col-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.show-col-sidebar {
    position: sticky;
    top: 20px;
}

/* ============================================================================
   CHECKLIST PANEL (sidebar del show)
   ============================================================================ */
.checklist-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.checklist-panel-header {
    background: var(--btn-primary);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.checklist-panel-title {
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checklist-panel-title i { font-size: 16px; }

.checklist-panel-estrategia {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.checklist-progress-bar {
    height: 5px;
    background: #e5e7eb;
    width: 100%;
}

.checklist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.4s ease;
}

.checklist-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.checklist-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.checklist-stat.ok   { color: #10b981; }
.checklist-stat.fail { color: #ec4899; }
.checklist-stat i    { font-size: 15px; }

.checklist-percent {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.checklist-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #fde68a;
}

.checklist-alert i {
    color: #f59e0b;
    font-size: 14px;
    flex-shrink: 0;
}

.checklist-items-compact {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 560px;
    overflow-y: auto;
}

.checklist-items-compact::-webkit-scrollbar       { width: 4px; }
.checklist-items-compact::-webkit-scrollbar-track { background: #f3f4f6; }
.checklist-items-compact::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.checklist-item-compact {
    border-radius: 8px;
    padding: 8px 10px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}

.checklist-item-compact.cumplido    { background: #f0fdf4; border-left-color: #10b981; }
.checklist-item-compact.no-cumplido { background: #fff5f8; border-left-color: #ec4899; }

.checklist-item-compact-header {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.ci-number {
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--btn-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ci-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ci-texto {
    font-size: 13px;
    color: var(--color-text-dark);
    line-height: 1.4;
    flex: 1;
}

.ci-badge-ob {
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fce7f3;
    color: #ec4899;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.ci-nota {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 5px;
    margin-left: 27px;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.ci-nota i {
    color: #d1d5db;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
    .show-layout { grid-template-columns: 1fr; }
    .show-col-sidebar { position: static; }
    .checklist-items-compact { max-height: 400px; }
    .gallery-item { width: 80px; height: 58px; }
}


/* ============================================================================
   GALERÍA COMPACTA — Thumbnails pequeños con lightbox al click
   ============================================================================ */

.gallery-section {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gallery-header .section-title { margin-bottom: 0; font-size: 15px; }

.gallery-count {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Fila de thumbnails */
.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* Cada thumbnail: 110×78px fijo */
.gallery-thumb {
    position: relative;
    width: 110px;
    height: 78px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay lupa al hover */
.gallery-thumb-hover {
    position: absolute;
    inset: 0;
    background: rgba(99, 91, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-thumb:hover .gallery-thumb-hover { opacity: 1; }

.gallery-thumb-hover i {
    font-size: 22px;
    color: white;
}

/* Numerito */
.gallery-thumb-num {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Hint debajo */
.gallery-hint {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.gallery-hint i { font-size: 12px; }

/* Responsive */
@media (max-width: 768px) {
    .gallery-thumb { width: 85px; height: 60px; }
}


/* ============================================================================
   FORM-THUMB — Overlay del formulario (ojo + eliminar)
   ============================================================================ */

/* El .gallery-thumb base ya tiene width/height/border-radius/overflow */
/* Solo necesitamos el overlay específico del form con 2 botones */

.form-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-thumb.form-thumb:hover .form-thumb-overlay { opacity: 1; }

/* Ocultar el overlay lupa del show cuando es form-thumb */
.gallery-thumb.form-thumb .gallery-thumb-hover { display: none; }

/* Thumbnail marcado para eliminar */
.gallery-thumb.marked-delete {
    opacity: 0.45;
    outline: 2px solid #dc2626;
    outline-offset: -2px;
}

/* Badge "Eliminar" */
.screenshot-delete-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(220,38,38,0.88);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}


/* ============================================================================
   DASHBOARD
   ============================================================================ */

/* ── Filtro header ── */
.dash-filter {
    width: auto;
    min-width: 180px;
    font-size: 13px;
}

/* ── Grid de KPIs (4 columnas en desktop) ── */
.dash-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    min-width: 0;
}

.dash-kpi-card {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dash-kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.dash-kpi-card.primary {
    background: var(--btn-primary);
    color: white;
}

.dash-kpi-card.primary .dash-kpi-label { color: rgba(255,255,255,0.75); }
.dash-kpi-card.primary .dash-kpi-sub   { color: rgba(255,255,255,0.6); }

/* Ícono del KPI */
.dash-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--btn-primary);
    flex-shrink: 0;
}

.dash-kpi-icon.success { background: #d1fae5; color: #10b981; }
.dash-kpi-icon.danger  { background: #fce7f3; color: #ec4899; }
.dash-kpi-icon.info    { background: #dbeafe; color: #3b82f6; }
.dash-kpi-icon.warning { background: #fef3c7; color: #f59e0b; }

.dash-kpi-card.primary .dash-kpi-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Textos del KPI */
.dash-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dash-kpi-head { display: flex; align-items: center; gap: 6px; }
.pista-kpi { color: #9ca3af; font-size: 14px; line-height: 1; cursor: help; outline: none; }
.dash-kpi-card.primary .pista-kpi { color: rgba(255,255,255,0.85); }
.tooltip.is-open {
    position: fixed;
    z-index: 5000;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    max-width: 240px;
    width: max-content;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18);
}
.tooltip.is-open::before { display: none; }
.dash-lectura {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.dash-lectura i { color: var(--color-primary); font-size: 20px; margin-top: 2px; }
.dash-lectura p { margin: 2px 0 0; color: #374151; font-size: 14px; }

.dash-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dash-kpi-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: #111827;
}

.dash-kpi-value.positive { color: #10b981; }
.dash-kpi-value.negative { color: #ec4899; }
.dash-kpi-value.neutral  { color: #111827; }

.dash-kpi-card.primary .dash-kpi-value { color: white; }

.dash-kpi-sub {
    font-size: 11px;
    color: #9ca3af;
}

/* ── Cards genéricas del dashboard ── */
.dash-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    min-width: 0;
    overflow: hidden;
}

.dash-card-full { width: 100%; }

.dash-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.dash-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dash-card-title i { color: var(--btn-primary); font-size: 17px; }
.dash-card-title.success-title i { color: #10b981; }
.dash-card-title.danger-title  i { color: #ec4899; }

.dash-card-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 2px 0 0 0;
}

/* ── Chart wrap ── */
.dash-chart-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    height: 320px;        /* ← altura para equity curve y por par */
}

.dash-chart-sm {
    height: 200px;
}

/* ── Grid de gráficas secundarias (3 columnas) ── */
.dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Tabs equity curve ── */
.dash-chart-tabs {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 8px;
}

.dash-tab {
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.dash-tab.active {
    background: white;
    color: var(--btn-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Leyenda del donut ── */
.dash-donut-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 12px;
}

.dash-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dash-legend-dot.success { background: #10b981; }
.dash-legend-dot.danger  { background: #ec4899; }
.dash-legend-dot.neutral { background: #9ca3af; }

.dash-chart-wrap.dash-chart-sm {
    height: 200px;        /* ← override para charts pequeños */
}

/* Asegurar que canvas nunca desborde su contenedor */
.dash-chart-wrap canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* ── Tabla dashboard ── */
.dash-table-wrap { overflow-x: auto; }

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--table-font);
}

.dash-table th {
    padding: var(--table-padding-y) var(--table-padding-x);
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.dash-table td {
    padding: var(--table-padding-y) var(--table-padding-x);
    border-bottom: 1px solid #f9fafb;
    color: #374151;
    vertical-align: middle;
}

.dash-table tbody tr:hover { background: #fafafa; }
.dash-table tbody tr:last-child td { border-bottom: none; }

.text-right  { text-align: right; }
.text-center { text-align: center; }

/* Mini barra de win rate en tabla */
.dash-wr-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dash-mini-bar {
    width: 60px;
    height: 4px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.dash-mini-fill {
    height: 100%;
    border-radius: 4px;
}

.dash-mini-fill.success { background: #10b981; }
.dash-mini-fill.danger  { background: #ec4899; }

/* Badge en tabla */
.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.dash-badge.success { background: #d1fae5; color: #059669; }
.dash-badge.danger  { background: #fce7f3; color: #be185d; }

/* ── Dos columnas ── */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Lista de mejores/peores trades ── */
.dash-trades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-trade-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fafafa;
    transition: background 0.15s;
}

.dash-trade-row:hover { background: #f3f4f6; }

.dash-trade-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.dash-trade-rank.success { background: #d1fae5; color: #059669; }
.dash-trade-rank.danger  { background: #fce7f3; color: #be185d; }

.dash-trade-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dash-trade-par   { font-weight: 700; font-size: 13px; color: #111827; }
.dash-trade-fecha { font-size: 11px; color: #9ca3af; }

.dash-trade-result {
    font-size: 14px;
    font-weight: 700;
}

.dash-trade-result.positive { color: #10b981; }
.dash-trade-result.negative { color: #ec4899; }

.dash-trade-link {
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    transition: color 0.15s;
}

.dash-trade-link:hover { color: var(--btn-primary); }

.dash-empty {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

/* Badge en header de card */
.dash-card-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.dash-card-badge.success { background: #d1fae5; color: #059669; }
.dash-card-badge.danger  { background: #ffe4e6; color: #dc2626; }

/* Empty state mejorado */
.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 6px;
    color: #9ca3af;
}

.dash-empty-state i {
    font-size: 32px;
    margin-bottom: 4px;
    opacity: 0.5;
}

.dash-empty-state p {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

.dash-empty-state span {
    font-size: 12px;
    color: #9ca3af;
}

/* Grids internos del dashboard nunca desbordan */
.dash-kpis-grid,
.dash-charts-grid,
.dash-two-col {
    min-width: 0;
    max-width: 100%;
}

/* Cards nunca desbordan */
.dash-card,
.dash-kpi-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}


/* ── Responsive ── */
@media (max-width: 1200px) {
    .dash-kpis-grid    { grid-template-columns: repeat(4, 1fr); }
    .dash-charts-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .dash-kpis-grid    { grid-template-columns: repeat(2, 1fr); }
    .dash-charts-grid  { grid-template-columns: 1fr; }
    .dash-two-col      { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .dash-kpis-grid    { grid-template-columns: repeat(2, 1fr); }
    .dash-kpi-value    { font-size: 18px; }
}



/* ============================================================================
   MENU DROPDOWN EN NAVBAR (cuando sidebar está cerrado)
   ============================================================================ */

/* Botón hamburguesa en navbar - solo visible cuando sidebar está cerrado */
.navbar-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.navbar-menu-btn:hover {
    background: #f9fafb;
    border-color: var(--btn-primary);
    color: var(--btn-primary);
}

.navbar-menu-btn i {
    font-size: 16px;
}

/* Mostrar solo cuando sidebar está cerrado */
.sidebar-hidden .navbar-menu-btn {
    display: flex;
}

/* Dropdown del menú en navbar */
.navbar-menu-dropdown {
    position: absolute;
    top: 60px;
    left: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 240px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    padding: 8px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.navbar-menu-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Scroll suave del dropdown */
.navbar-menu-dropdown::-webkit-scrollbar { width: 6px; }
.navbar-menu-dropdown::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 8px; }
.navbar-menu-dropdown::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }

/* Secciones del dropdown */
.navbar-menu-section {
    margin-bottom: 12px;
}

.navbar-menu-section:last-child {
    margin-bottom: 0;
}

.navbar-menu-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px 4px 12px;
    margin-bottom: 2px;
}

/* Items del dropdown */
.navbar-menu-item {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-menu-item:hover {
    background: #f3f4f6;
    color: var(--btn-primary);
}

.navbar-menu-item.active {
    background: #ede9fe;
    color: var(--btn-primary);
}

.navbar-menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Separador entre secciones */
.navbar-menu-separator {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 0;
}

/* Overlay para cerrar el dropdown al hacer click afuera */
.navbar-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

.navbar-menu-overlay.active {
    display: block;
}


/* ============================================================================
   SELECTOR DE TEMA (color picker en navbar)
   ============================================================================ */

.theme-selector {
    position: relative;
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: linear-gradient(135deg,
    var(--color-primary) 0%,
    var(--color-primary) 50%,
    #f3f4f6 50%,
    #f3f4f6 100%);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.theme-btn:hover::after {
    border-color: var(--color-primary);
}

/* Dropdown de colores */
.theme-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 16px;
    min-width: 280px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.theme-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.theme-dropdown-header {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-dropdown-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-dropdown-title i {
    color: var(--color-primary);
}

.theme-reset {
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s;
}

.theme-reset:hover {
    color: var(--color-primary);
}

/* Grid de colores */
.theme-colors-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.theme-color-option {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    position: relative;
}

.theme-color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.theme-color-option.active {
    border-color: #111827;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #111827;
}

.theme-color-option.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Nombre del color seleccionado */
.theme-selected-name {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
    font-weight: 600;
}

/* Overlay */
.theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.theme-overlay.active {
    display: block;
}

/* ============================================================================
   USER DROPDOWN (Avatar con menú de usuario)
   ============================================================================ */

.user-dropdown-wrapper {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 10px;
    transition: background 0.2s;
}

.user-avatar-btn:hover {
    background: #f3f4f6;
}

.user-avatar-btn img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-avatar-arrow {
    font-size: 11px;
    color: #6b7280;
    transition: transform 0.2s;
}

.user-dropdown-wrapper.open .user-avatar-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
    position: absolute;
    top: 52px;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    min-width: 260px;
    z-index: 10001;
    padding: 8px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.user-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Header */
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 14px;
}

.user-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    object-fit: cover;
    flex-shrink: 0;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-badge-pro {
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    background: #d1fae5;
    padding: 1px 6px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.user-dropdown-email {
    font-size: 12px;
    color: #9ca3af;
}

/* Divider */
.user-dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 4px 0;
}

/* Items */
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
}

.user-dropdown-item:hover {
    background: #f3f4f6;
    color: var(--btn-primary);
}

.user-dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #6b7280;
    transition: color 0.15s;
}

.user-dropdown-item:hover i {
    color: var(--btn-primary);
}

/* Sign out - tono diferente */
.user-dropdown-signout {
    color: #dc2626 !important;
}

.user-dropdown-signout i {
    color: #dc2626 !important;
}

.user-dropdown-signout:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Overlay para cerrar */
.user-dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.user-dropdown-overlay.active {
    display: block;
}


/* ============================================================================
   DEVISE EDIT PROFILE — complementos al sistema de forms existente
   ============================================================================ */

/* Input con botón de ojo para passwords */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .form-control {
    padding-right: 44px;
}

.input-icon-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.input-icon-btn:hover {
    color: var(--btn-primary);
}

/* Hint con color de advertencia */
.form-hint-warning {
    color: #f59e0b !important;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

/* Card con acento (confirmar cambios) */
.form-card-accent {
    border-left: 3px solid var(--btn-primary);
}

/* Card de peligro */
.form-card-danger {
    border-left: 3px solid #dc2626;
    margin-top: 8px;
}

.card-title-danger {
    color: #dc2626 !important;
}

.card-title-danger i {
    color: #dc2626;
}

.danger-zone-action {
    margin-top: 16px;
}

/* Botón outline de peligro */
.btn-danger-outline {
    background: transparent;
    border: 1.5px solid #dc2626;
    color: #dc2626;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-outline:hover {
    background: #dc2626;
    color: white;
}



/* ============================================================================
   AUTH LAYOUT — Login / Register sin sidebar
   ============================================================================ */

.auth-body {
    background: #f5f7fb;
    min-height: 100vh;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Panel izquierdo ── */
.auth-panel-left {
    background: linear-gradient(145deg, var(--color-primary) 0%, #4338ca 60%, #312e81 100%);
    display: flex;
    flex-direction: column;
    padding: 40px 48px;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

/* Brand / Logo */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    z-index: 1;
}

.auth-brand-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Contenido central */
.auth-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
    padding: 32px 0;
}

/* Gráfico decorativo SVG */
.auth-chart-preview {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 16px 16px 12px;
    margin-bottom: 28px;
}

.auth-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.auth-chart-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.auth-chart-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.auth-chart-badge-up {
    background: rgba(74,222,128,0.2);
    color: #4ade80;
}

.auth-chart-period {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}

/* Título y subtítulo */
.auth-panel-title {
    color: white;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    font-family: 'Manrope', sans-serif;
}

.auth-panel-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.auth-feature-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: white;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
}

.auth-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-feature-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.auth-feature-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}

/* Footer */
.auth-panel-footer {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    z-index: 1;
}

/* ── Panel derecho ── */
.auth-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: #f5f7fb;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Card formulario */
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
    font-family: 'Manrope', sans-serif;
}

.auth-subtitle {
    font-size: 14px;
    color: #6b7280;
}

/* Auth icon badge */
.auth-icon-badge {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-icon-badge i {
    font-size: 26px;
    color: var(--btn-primary);
}

/* Label row */
.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.form-label-row .form-label {
    margin-bottom: 0;
}

.auth-link-small {
    font-size: 12px;
    color: var(--btn-primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.15s;
}

.auth-link-small:hover {
    opacity: 0.75;
}

/* Input icono izquierdo */
.input-icon-left {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.form-control-icon {
    padding-left: 34px !important;
}

/* Botón bloque */
.btn-block {
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Botón social */
.auth-social {
    margin-bottom: 20px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    background: white;
}

.btn-social:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.btn-google i {
    color: #ea4335;
    font-size: 16px;
}

/* Footer links */
.auth-footer-links {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.auth-footer-links a,
.auth-footer-link {
    display: block;
    color: var(--btn-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    transition: opacity 0.15s;
}

.auth-footer-links a:hover,
.auth-footer-link:hover {
    opacity: 0.75;
}

/* Alertas */
.auth-form-wrapper .alert {
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        padding: 24px 16px;
    }
}



/* ============================================================================
   AUTH ERRORS — Mensajes de error en formularios Devise
   ============================================================================ */

.auth-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.auth-errors-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-errors-header i {
    font-size: 16px;
    flex-shrink: 0;
}

.auth-errors-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-errors-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #b91c1c;
}

.auth-errors-list li i {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
    color: #dc2626;
}


/* ============================================================================
   LOGO con ícono de velas japonesas
   ============================================================================ */

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), #4338ca);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(99, 91, 255, 0.3);
    flex-shrink: 0;
}

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

.logo-label {
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.3px;
}


/* ============================================================================
   CALENDARIO DE TRADES — v2
   ============================================================================ */

.cal-section {
    background: white;
    border-radius: 16px;
    padding: 0;
    margin-top: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Topbar */
.cal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 16px;
}

.cal-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cal-icon-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cal-icon-badge i {
    font-size: 20px;
    color: var(--btn-primary);
}

.cal-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cal-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 2px 0 0;
}

.cal-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Stats del mes */
.cal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    border-radius: 10px;
    min-width: 80px;
}

.cal-stat-win  { background: #f0fdf4; }
.cal-stat-loss { background: #fff1f2; }

.cal-stat-num {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.cal-stat-win  .cal-stat-num { color: #16a34a; }
.cal-stat-loss .cal-stat-num { color: #dc2626; }

.cal-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 3px;
}

/* Navegación mes */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 4px;
}

.cal-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    transition: all 0.15s;
}

.cal-nav-btn:hover {
    background: white;
    color: var(--btn-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.cal-month-label {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    min-width: 150px;
    text-align: center;
}

/* Header días semana */
.cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 12px 16px 4px;
    background: #fafafa;
}

.cal-grid-header span {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

/* Grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    padding: 8px 16px 16px;
}

/* Celda base */
.cal-cell {
    min-height: 80px;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #f9fafb;
    border: 1.5px solid transparent;
    transition: all 0.15s;
    cursor: default;
}

.cal-cell-empty {
    background: transparent !important;
    border: none !important;
}

.cal-cell-future {
    opacity: 0.4;
}

.cal-cell:not(.cal-cell-empty):not(.cal-cell-future):hover {
    border-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Hoy */
.cal-cell-today {
    border-color: var(--btn-primary) !important;
    background: #ede9fe !important;
}

.cal-cell-today .cal-day-num {
    color: var(--btn-primary) !important;
    font-weight: 800 !important;
}

/* Ganador */
.cal-cell-win {
    background: #f0fdf4;
    border-color: #86efac;
}

/* Perdedor */
.cal-cell-loss {
    background: #fff1f2;
    border-color: #fca5a5;
}

/* Mixto */
.cal-cell-mixed {
    background: #fffbeb;
    border-color: #fcd34d;
}

/* Número del día */
.cal-day-num {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    line-height: 1;
}

/* Número de operaciones */
.cal-cell-trades {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
}

/* P&L */
.cal-cell-pnl {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 5px;
    margin-top: auto;
    display: inline-block;
    align-self: flex-start;
}

.cal-pnl-win   { background: #dcfce7; color: #15803d; }
.cal-pnl-loss  { background: #fee2e2; color: #dc2626; }
.cal-pnl-mixed { background: #fef9c3; color: #b45309; }

/* Footer */
.cal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
    flex-wrap: wrap;
    gap: 8px;
}

.cal-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.cal-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cal-dot-win    { background: #4ade80; }
.cal-dot-loss   { background: #f87171; }
.cal-dot-mixed  { background: #fbbf24; }
.cal-dot-today  { background: var(--btn-primary); }

.cal-footer-note {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .cal-topbar       { flex-direction: column; align-items: flex-start; }
    .cal-topbar-right { flex-wrap: wrap; }
    .cal-cell         { min-height: 52px; padding: 5px; }
    .cal-cell-pnl     { display: none; }
    .cal-cell-trades  { display: none; }
    .cal-month-label  { min-width: 110px; }
}


/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.toast-hiding {
    animation: toastOut 0.25s ease forwards;
}

/* Colores sólidos como la imagen */
.toast-success {
    background: #22c55e;
}

.toast-error {
    background: var(--btn-primary);
}

.toast-warning {
    background: #f59e0b;
}

.toast-info {
    background: var(--btn-primary);
}

/* Icono */
.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: white;
    flex-shrink: 0;
}

/* Cuerpo */
.toast-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.toast-message {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
    word-break: break-word;
}

/* Botón cerrar */
.toast-close {
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    color: white;
    padding: 4px;
    border-radius: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Barra de progreso */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear forwards;
}

/* Animaciones */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 480px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }
    .toast {
        min-width: unset;
        max-width: 100%;
    }
}


/* ============================================================================
   MÓDULO DE NOTAS
   ============================================================================ */

.notas-page {
    padding: 0;
}

/* Header */
.notas-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.notas-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    font-family: 'Manrope', sans-serif;
}

.notas-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.notas-btn-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    line-height: 1;
}

.notas-btn-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.notas-btn-new i {
    font-size: 14px;
    line-height: 1;
}

/* Filtros */
.notas-filtros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.notas-filtro-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s;
    border: 1.5px solid transparent;
}

.notas-filtro-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.notas-filtro-btn.active {
    background: var(--btn-primary);
    color: white;
    border-color: var(--btn-primary);
}

.notas-filtro-btn i {
    font-size: 15px;
}

/* Grid */
.notas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Card */
.nota-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.nota-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Colores de borde izquierdo */
.nota-color-purple { border-left-color: #635bff; }
.nota-color-pink   { border-left-color: #ec4899; }
.nota-color-cyan   { border-left-color: #06b6d4; }
.nota-color-green  { border-left-color: #10b981; }
.nota-color-orange { border-left-color: #f59e0b; }

/* Fondo sutil según color */
.nota-color-purple::before { background: rgba(99,91,255,0.04); }
.nota-color-pink::before   { background: rgba(236,72,153,0.04); }
.nota-color-cyan::before   { background: rgba(6,182,212,0.04); }
.nota-color-green::before  { background: rgba(16,185,129,0.04); }
.nota-color-orange::before { background: rgba(245,158,11,0.04); }

.nota-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nota-card-top { flex: 1; }

.nota-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.nota-categoria-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #6b7280;
}

.nota-acciones {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.nota-acciones form {
    display: inline-flex;
    margin: 0;
}

.nota-card:hover .nota-acciones {
    opacity: 1;
}

.nota-btn-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: #9ca3af;
    transition: all 0.15s;
    text-decoration: none;
    padding: 0;
}

.nota-btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nota-btn-icon.favorita {
    color: #f59e0b;
    opacity: 1 !important;
}

.nota-btn-icon.danger:hover {
    background: #fff1f2;
    color: #dc2626;
}

/* Mostrar siempre el favorito */
.nota-btn-icon.favorita {
    opacity: 1 !important;
}

.nota-titulo {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.nota-contenido {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Footer de la card */
.nota-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.nota-fecha {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.nota-fecha i { font-size: 13px; }

/* Dot de color en footer */
.nota-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.nota-color-dot-purple { background: #635bff; }
.nota-color-dot-pink   { background: #ec4899; }
.nota-color-dot-cyan   { background: #06b6d4; }
.nota-color-dot-green  { background: #10b981; }
.nota-color-dot-orange { background: #f59e0b; }

/* Color picker en el form */
.nota-color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.nota-color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.nota-color-option:hover {
    transform: scale(1.1);
}

.nota-color-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.nota-color-check {
    color: white;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s;
}

.nota-color-radio:checked ~ .nota-color-check {
    opacity: 1;
}

.nota-color-radio:checked ~ * {
    border-color: #111827;
}

.nota-color-bg-purple { background: #635bff; }
.nota-color-bg-pink   { background: #ec4899; }
.nota-color-bg-cyan   { background: #06b6d4; }
.nota-color-bg-green  { background: #10b981; }
.nota-color-bg-orange { background: #f59e0b; }

/* Empty state */
.notas-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 12px;
    text-align: center;
}

.notas-empty-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.notas-empty-icon i {
    font-size: 32px;
    color: var(--btn-primary);
}

.notas-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.notas-empty p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 8px;
}

.notas-empty .btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    gap: 6px;
    line-height: 1;
}

.notas-empty .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.notas-empty .btn i {
    font-size: 14px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .notas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .notas-grid { grid-template-columns: 1fr; }
}

/* ── Modal de nota ── */
.nota-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nota-modal.open {
    display: flex;
}

.nota-modal-box {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.nota-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}

.nota-modal-titulo {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 8px 0 6px;
}

.nota-modal-fecha {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.nota-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    flex-shrink: 0;
    transition: all 0.15s;
}

.nota-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.nota-modal-contenido {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
}

.nota-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
}

.nota-modal-footer .btn,
.nota-modal-footer input.btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    gap: 6px;
    line-height: 1;
}

.nota-modal-footer .btn:hover,
.nota-modal-footer input.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.nota-modal-footer .btn i {
    font-size: 14px;
    line-height: 1;
}


/* ── Buscador de notas ── */
.notas-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.notas-search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.notas-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
}

.notas-search-input {
    width: 100%;
    padding: 8px 36px 8px 34px;
    border: var(--form-control-border) solid #e5e7eb;
    border-radius: var(--form-control-radius);
    font-size: var(--form-control-font);
    color: #111827;
    background: white;
    transition: all 0.15s;
    outline: none;
}

.notas-search-input:focus {
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 2px rgba(99,91,255,0.1);
}

.notas-search-input::placeholder {
    color: #9ca3af;
}

.notas-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    transition: all 0.15s;
}

.notas-search-clear:hover {
    background: #e5e7eb;
    color: #111827;
}

.notas-search-count {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
}

/* Card oculta durante búsqueda */
.nota-card.hidden {
    display: none;
}

/* Mensaje sin resultados */
.notas-sin-resultados {
    display: none;
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.notas-sin-resultados i {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.notas-sin-resultados p {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 4px;
}

.notas-sin-resultados span {
    font-size: 13px;
}


/* ── NOTIFICACIONES DROPDOWN ── */
.notif-wrapper {
    position: relative;
}

.notif-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-secondary, #6b7280);
}

.notif-btn:hover {
    background: var(--bg-hover, #f3f4f6);
}

.notif-btn i {
    font-size: 18px;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #635bff;
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.notif-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 1000;
    overflow: hidden;
    animation: notifFadeIn 0.2s ease;
}

@keyframes notifFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-dropdown.open,
.notif-overlay.open {
    display: block;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.notif-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.notif-count-badge {
    background: #635bff;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

.notif-list {
    max-height: 360px;
    overflow-y: auto;
}

.notif-list::-webkit-scrollbar {
    width: 4px;
}
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f9fafb;
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-item.unread {
    background: #fafafe;
}

.notif-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.notif-icon-trade  { background: #ede9fe; color: #635bff; }
.notif-icon-win    { background: #d1fae5; color: #10b981; }
.notif-icon-loss   { background: #fce7f3; color: #ec4899; }
.notif-icon-system { background: #e0f2fe; color: #0ea5e9; }
.notif-icon-alert  { background: #fef3c7; color: #f59e0b; }

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.notif-item-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item-dot {
    width: 7px;
    height: 7px;
    background: #635bff;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.notif-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
    color: #d1d5db;
}

.notif-empty p {
    font-size: 13px;
    margin: 0;
}

.notif-footer {
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
}

.notif-footer-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #635bff;
    color: white;
    text-align: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.notif-footer-btn:hover {
    background: #4338ca;
    color: white;
}

.notif-mark-read {
    font-size: 12px;
    color: #635bff;
    cursor: pointer;
    font-weight: 500;
}

.notif-mark-read:hover {
    text-decoration: underline;
}



/* ── IA Panel ── */
.ia-panel {
    margin-top: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(99,91,255,0.08);
    border: 1px solid #ede9fe;
    overflow: hidden;
}
.ia-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #635bff 0%, #8b5cf6 100%);
    color: white;
    flex-wrap: wrap;
    gap: 12px;
}
.ia-panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ia-logo {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.ia-panel-title h3 { margin: 0; font-size: 16px; font-weight: 700; color: white; }
.ia-panel-title p  { margin: 0; font-size: 12px; color: rgba(255,255,255,0.75); }

.btn-ia-analizar {
    background: white; color: #635bff;
    border: none; padding: 10px 20px;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    transition: all 0.2s; white-space: nowrap;
}
.btn-ia-analizar:hover { background: #f5f3ff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-ia-analizar:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ia-reanalizar-header {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    transition: all 0.2s; white-space: nowrap;
}
.btn-ia-reanalizar-header:hover { background: rgba(255,255,255,0.25); }

.ia-estado { padding: 24px; }

.ia-placeholder { text-align: center; padding: 20px 0; }
.ia-placeholder > i { font-size: 48px; color: #c4b5fd; margin-bottom: 12px; display: block; }
.ia-placeholder p { color: #6b7280; margin-bottom: 16px; font-size: 14px; }
.ia-placeholder ul {
    list-style: none; padding: 0; margin: 0;
    display: inline-flex; flex-direction: column; gap: 6px; text-align: left;
}
.ia-placeholder ul li { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 6px; }
.ia-placeholder ul li i { color: #10b981; font-size: 14px; }

.ia-loading { text-align: center; padding: 20px 0; }
.ia-spinner {
    width: 40px; height: 40px;
    border: 3px solid #ede9fe; border-top: 3px solid #635bff;
    border-radius: 50%; animation: ia-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes ia-spin { to { transform: rotate(360deg); } }
.ia-loading p     { color: #635bff; font-weight: 600; margin: 0 0 4px; }
.ia-loading small { color: #9ca3af; font-size: 12px; }

.ia-error { text-align: center; padding: 20px 0; }
.ia-error > i { font-size: 36px; color: #ec4899; margin-bottom: 10px; display: block; }
.ia-error p { color: #374151; margin-bottom: 12px; }

.ia-resultado-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap; gap: 8px;
}
.ia-badge-ok {
    background: #d1fae5; color: #065f46;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 4px;
}
.ia-fecha-analisis {
    font-size: 12px; color: #9ca3af;
    display: flex; align-items: center; gap: 4px;
}

.ia-contenido { color: #374151; font-size: 14px; line-height: 1.7; }
.ia-contenido h2 {
    font-size: 15px; font-weight: 700; color: #111827;
    margin: 20px 0 8px; padding-bottom: 6px;
    border-bottom: 2px solid #f3f4f6;
}
.ia-contenido h2:first-child { margin-top: 0; }
.ia-contenido ul  { padding-left: 20px; margin: 8px 0; }
.ia-contenido li  { margin-bottom: 6px; }
.ia-contenido strong { color: #111827; }
.ia-contenido p   { margin: 6px 0; }

/* ============================================================================
   MÓDULO NOTICIAS DE MERCADO
   ============================================================================ */

.noticias-page {
    padding: 0;
}

.noticias-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.noticias-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    font-family: 'Manrope', sans-serif;
}

.noticias-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.noticias-btn-refresh,
.noticias-btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    line-height: 1;
}

.noticias-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.noticias-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.noticias-filtro-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.noticias-filtro-btn:hover,
.noticias-filtro-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(99, 91, 255, 0.06);
}

.noticias-simbolo-filtro {
    margin-bottom: 18px;
}

.noticias-simbolo-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.noticias-simbolo-select {
    min-width: 180px;
    max-width: 220px;
}

.noticias-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.noticia-card {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--table-radius);
    padding: 12px;
    box-shadow: var(--table-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.noticia-card:hover {
    border-color: rgba(99, 91, 255, 0.25);
    box-shadow: 0 2px 10px rgba(99, 91, 255, 0.08);
}

.noticia-card-image {
    flex-shrink: 0;
    width: 96px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
}

.noticia-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.noticia-card-body {
    flex: 1;
    min-width: 0;
}

.noticia-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.noticia-source {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.noticia-time {
    font-size: 11px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.noticia-headline {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
}

.noticia-headline a {
    color: #111827;
    text-decoration: none;
}

.noticia-headline a:hover {
    color: var(--color-primary);
}

.noticia-summary {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
    margin: 0 0 8px;
}

.noticia-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.noticia-link:hover {
    text-decoration: underline;
}

.noticias-empty {
    margin-top: 20px;
}

@media (max-width: 640px) {
    .noticia-card {
        flex-direction: column;
    }

    .noticia-card-image {
        width: 100%;
        height: 140px;
    }

    .noticias-simbolo-select {
        max-width: 100%;
        width: 100%;
    }
}

/* Tabs vista + navegación fecha */
.noticias-vista-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.noticias-vista-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.noticias-vista-tab:hover,
.noticias-vista-tab.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(99, 91, 255, 0.06);
}

.noticias-fecha-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--table-radius);
}

.noticias-fecha-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
    background: #f9fafb;
    font-size: 18px;
}

.noticias-fecha-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.noticias-fecha-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 220px;
}

.noticias-fecha-form {
    margin: 0;
}

.noticias-fecha-input {
    max-width: 170px;
    font-size: 13px;
    padding: 6px 10px;
}

.noticias-fecha-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.noticias-fecha-hoy {
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.noticias-calendario-form {
    width: 100%;
}

.noticias-calendario-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.noticias-filter-group {
    min-width: 140px;
}

.noticias-filter-group .form-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.noticias-calendario-card {
    margin-top: 4px;
}

.noticias-calendario-table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cal-time {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.cal-currency {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
}

.cal-event {
    font-weight: 600;
    color: #111827;
    min-width: 180px;
}

.cal-val {
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    white-space: nowrap;
}

.cal-val-estimate {
    color: #6b7280;
}

.cal-val-beat {
    color: #059669;
    background: #ecfdf5;
}

.cal-val-miss {
    color: #dc2626;
    background: #fef2f2;
}

.cal-val-match {
    color: #111827;
}

.cal-impact-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.cal-impact-low {
    background: #fef9c3;
    color: #854d0e;
}

.cal-impact-medium {
    background: #ffedd5;
    color: #c2410c;
}

.cal-impact-high {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 900px) {
    .noticias-calendario-table {
        min-width: 760px;
    }
}

.norma {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    padding: 18px 20px 16px;
    margin: 0 0 18px;
}

.norma-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.norma-kicker {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.norma-titulo {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
    color: #111827;
}

.norma-fase {
    margin-top: 2px;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.norma-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.norma-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    white-space: nowrap;
}

.norma-pill-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.norma-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.norma-tile {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 12px 10px;
    min-width: 0;
}

.norma-tile-critica {
    background: #fef2f2;
}

.norma-valor {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.norma-tile-critica .norma-valor {
    color: #b91c1c;
}

.norma-label {
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.norma-bar {
    height: 10px;
    margin-top: 10px;
    border-radius: 99px;
    background: #e7e5e4;
    overflow: hidden;
}

.norma-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
}

.norma-bar-ok span { background: #10b981; }
.norma-bar-aviso span { background: #f59e0b; }
.norma-bar-peligro span { background: #dc2626; }
.norma-bar-meta span { background: #635bff; }
.norma-bar-vacio span { background: #e7e5e4; }

.norma-queda {
    margin-top: 6px;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.norma-operar {
    margin-top: 14px;
    background: #eef2ff;
    border-radius: 12px;
    padding: 12px 14px;
}

.norma-operar-titulo {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e1b4b;
    line-height: 1.25;
}

.norma-operar-detalle {
    margin: 4px 0 0;
    color: #3730a3;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.norma-pauta {
    margin: 14px 0 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.norma-nota {
    margin: 6px 0 0;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .norma-head { flex-direction: column; }
    .norma-pills { justify-content: flex-start; }
    .norma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

.control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.control-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 16px 18px 14px;
}

.control-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.control-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.control-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 10px 0 8px;
}

.control-valor {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.control-marca,
.control-pct {
    font-size: 14px;
    font-weight: 600;
}

.control-bar {
    height: 6px;
    border-radius: 99px;
    background: #eef2f6;
    overflow: hidden;
}

.control-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
}

.control-meta {
    margin-top: 10px;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.control-dias .control-label,
.control-dias .control-marca { color: var(--color-primary); }
.control-dias .control-bar span { background: var(--color-primary); }

.control-objetivo .control-badge,
.control-objetivo .control-pct { color: #059669; background: #ecfdf3; }
.control-objetivo .control-pct { background: transparent; }
.control-objetivo .control-bar span { background: #10b981; }

.control-diaria .control-valor,
.control-diaria .control-pct,
.control-diaria .control-badge { color: #ea580c; }
.control-diaria .control-badge { background: #fff7ed; }
.control-diaria .control-bar span { background: #f97316; }

.control-total .control-valor,
.control-total .control-pct,
.control-total .control-badge { color: #e11d48; }
.control-total .control-badge { background: #fff1f2; }
.control-total .control-bar span { background: #fb7185; }

.control-peligro .control-valor,
.control-peligro .control-pct,
.control-peligro .control-badge { color: #be123c; }
.control-peligro .control-badge { background: #ffe4e6; }
.control-peligro .control-bar span { background: #e11d48; }

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

@media (max-width: 640px) {
    .control-grid { grid-template-columns: 1fr; }
}

.cuenta-tabbar {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
}

.cuenta-tab {
    border: 0;
    background: transparent;
    color: #667085;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

.cuenta-tab.is-on {
    background: var(--color-primary);
    color: #fff;
}

.pnl-panel {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 16px 18px 8px;
    margin: 0 0 18px;
}

.wr { font-weight: 700; }
.wr-rojo { color: #e11d48; }
.wr-amarillo { color: #d97706; }
.wr-verde { color: #059669; }
.wr-vacio { color: #98a2b3; }
.wr-detalle { margin-top: 2px; color: #667085; font-size: 11px; font-weight: 600; }

.cuenta-trades {
    margin: 0 0 18px;
}

.cuenta-trades-vacio {
    margin: 0;
    padding: 16px 20px 18px;
    color: #667085;
    font-size: 14px;
}

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

.pnl-leyenda {
    display: flex;
    gap: 14px;
    color: #667085;
    font-size: 13px;
}

.pnl-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    margin-right: 6px;
}

.pnl-dot-acumulado { background: #3b82f6; }
.pnl-dot-diario { background: #22c55e; }

.pnl-marco { position: relative; }

.pnl-sub {
    margin: 2px 0 0;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.pnl-dot-saldo { background: #635bff; }
.pnl-dot-objetivo { background: #059669; }
.pnl-dot-inicio { background: #98a2b3; }
.pnl-dot-suelo { background: #e11d48; }

.pnl-lectura {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 12px;
}

.pnl-stat {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}

.pnl-stat-label {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pnl-stat-valor {
    margin-top: 4px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.pnl-stat-valor.sube { color: #059669; }
.pnl-stat-valor.baja { color: #e11d48; }

.pnl-nota {
    margin: 8px 0 4px;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.pnl-grafico {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 720px) {
    .pnl-lectura { grid-template-columns: 1fr 1fr; }
    .pnl-head { flex-direction: column; align-items: flex-start; }
}

.pnl-tip {
    position: absolute;
    display: none;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #101828;
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-line;
    pointer-events: none;
    z-index: 3;
}

.cuenta-switch {
    position: relative;
}

.cuenta-switch-btn {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cuenta-switch-btn::-webkit-details-marker {
    display: none;
}

.cuenta-switch-btn:hover {
    border-color: var(--color-primary);
}

.cuenta-switch-nombre {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cuenta-switch-btn .ri-wallet-3-line {
    color: var(--color-primary);
    font-size: 16px;
}

.cuenta-switch-chevron {
    color: #98a2b3;
    transition: transform 0.15s;
}

.cuenta-switch[open] .cuenta-switch-chevron {
    transform: rotate(180deg);
}

.cuenta-switch-menu {
    position: absolute;
    top: 46px;
    left: 0;
    z-index: 10000;
    width: 320px;
    max-height: 380px;
    overflow: auto;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.cuenta-switch-head {
    padding: 6px 10px 8px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cuenta-switch-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
}

.cuenta-switch-item:hover {
    background: #f5f3ff;
}

.cuenta-switch-item.is-on {
    background: #eef2ff;
}

.cuenta-switch-item-nombre {
    font-size: 13px;
    font-weight: 700;
}

.cuenta-switch-item-meta {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.cuenta-switch-vacio {
    margin: 0;
    padding: 8px 10px 10px;
    color: #667085;
    font-size: 13px;
}

.cuenta-switch-todas {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 8px 10px;
    border-top: 1px solid #f1f5f9;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.cuenta-switch-todas:hover {
    background: #f8fafc;
    border-radius: 8px;
}

@media (max-width: 720px) {
    .cuenta-switch-btn {
        max-width: 160px;
    }

    .cuenta-switch-menu {
        width: 260px;
    }
}
