/* =========================================================
   NOESOR - COMPONENTES REUTILIZABLES
   Botones, formularios, tarjetas, alertas, etiquetas,
   indicadores, estados, tablas y componentes de interfaz.
   Debe cargarse después de site.css y layout.css.
   ========================================================= */

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

.button {
    position: relative;
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    overflow: hidden;
    color: var(--text);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition), opacity var(--transition-fast), filter var(--transition-fast);
}

    .button::before {
        position: absolute;
        inset: 0;
        content: "";
        pointer-events: none;
        opacity: 0;
        background: linear-gradient( 120deg, transparent 20%, rgba(255, 255, 255, 0.15) 48%, transparent 76% );
        transform: translateX(-120%);
        transition: transform 0.55s ease, opacity 0.2s ease;
    }

    .button:hover:not(:disabled) {
        transform: translateY(-2px);
    }

        .button:hover:not(:disabled)::before {
            opacity: 1;
            transform: translateX(120%);
        }

    .button:active:not(:disabled) {
        transform: translateY(0);
    }

    .button:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14), 0 0 0 1px var(--cyan);
    }

    .button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
        transform: none;
        filter: grayscale(0.15);
        box-shadow: none;
    }

.button-large {
    min-height: 54px;
    padding: 0 25px;
    border-radius: 14px;
    font-size: 0.94rem;
}

.button-small {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.button-full {
    width: 100%;
}

.button-primary,
.button.primary {
    border-color: rgba(96, 165, 250, 0.28);
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

    .button-primary:hover:not(:disabled),
    .button.primary:hover:not(:disabled) {
        filter: brightness(1.08);
        box-shadow: 0 20px 48px rgba(37, 99, 235, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

.button-secondary,
.button.secondary {
    border-color: var(--border);
    color: var(--text);
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

    .button-secondary:hover:not(:disabled),
    .button.secondary:hover:not(:disabled) {
        border-color: var(--border-hover);
        background: rgba(255, 255, 255, 0.06);
        box-shadow: var(--shadow-small);
    }

.button-outline {
    border-color: rgba(96, 165, 250, 0.26);
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.04);
}

    .button-outline:hover:not(:disabled) {
        border-color: rgba(34, 211, 238, 0.42);
        color: var(--cyan-light);
        background: rgba(34, 211, 238, 0.07);
    }

.button-ghost {
    border-color: transparent;
    color: var(--text-soft);
    background: transparent;
}

    .button-ghost:hover:not(:disabled) {
        color: white;
        background: rgba(255, 255, 255, 0.045);
    }

.button-light {
    border-color: rgba(255, 255, 255, 0.4);
    color: #0b1729;
    background: white;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

    .button-light:hover:not(:disabled) {
        filter: brightness(0.96);
    }

.button-danger,
.button.danger {
    border-color: rgba(251, 113, 133, 0.3);
    color: #fecdd3;
    background: linear-gradient( 145deg, rgba(127, 29, 29, 0.32), rgba(76, 5, 25, 0.22) );
}

    .button-danger:hover:not(:disabled),
    .button.danger:hover:not(:disabled) {
        border-color: rgba(251, 113, 133, 0.52);
        background: rgba(127, 29, 29, 0.42);
        box-shadow: 0 16px 36px rgba(225, 29, 72, 0.14);
    }

.button-success,
.button.success {
    border-color: rgba(52, 211, 153, 0.3);
    color: #bbf7d0;
    background: linear-gradient( 145deg, rgba(6, 78, 59, 0.34), rgba(2, 44, 34, 0.24) );
}

    .button-success:hover:not(:disabled),
    .button.success:hover:not(:disabled) {
        border-color: rgba(52, 211, 153, 0.48);
        box-shadow: 0 16px 36px rgba(5, 150, 105, 0.14);
    }

.button-icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 11px;
}

.button-icon-small {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 9px;
}

.button-arrow,
.button-icon-symbol {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    transition: transform var(--transition-fast);
}

.button:hover:not(:disabled) .button-arrow {
    transform: translateX(3px);
}

/* =========================================================
   GRUPOS DE BOTONES
   ========================================================= */

.button-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.button-group-right {
    justify-content: flex-end;
}

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

/* =========================================================
   CAMPOS DE FORMULARIO
   ========================================================= */

.input,
.textarea,
.select,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: linear-gradient( 145deg, rgba(7, 17, 31, 0.78), rgba(11, 24, 43, 0.64) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.input,
.select,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select {
    min-height: 46px;
    padding: 0 14px;
}

.textarea,
textarea {
    min-height: 140px;
    padding: 14px;
    line-height: 1.65;
    resize: vertical;
}

    .input::placeholder,
    .textarea::placeholder,
    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
        opacity: 0.78;
    }

    .input:hover,
    .textarea:hover,
    .select:hover,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
    textarea:hover,
    select:hover {
        border-color: rgba(96, 165, 250, 0.26);
    }

    .input:focus,
    .textarea:focus,
    .select:focus,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
    textarea:focus,
    select:focus {
        border-color: var(--cyan);
        background: linear-gradient( 145deg, rgba(8, 22, 39, 0.92), rgba(11, 27, 47, 0.82) );
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    .input:disabled,
    .textarea:disabled,
    .select:disabled,
    input:disabled,
    textarea:disabled,
    select:disabled {
        cursor: not-allowed;
        opacity: 0.55;
    }

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field-label,
.field-group label {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.4;
}

.field-label-required::after {
    margin-left: 4px;
    content: "*";
    color: var(--danger);
}

.field-help {
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.field-error {
    color: #fda4af;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.5;
}

.field-success {
    color: var(--success);
    font-size: 0.76rem;
    font-weight: 650;
}

.input-with-icon {
    position: relative;
}

    .input-with-icon .input-icon {
        position: absolute;
        top: 50%;
        left: 14px;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        pointer-events: none;
        transform: translateY(-50%);
    }

    .input-with-icon input,
    .input-with-icon .input {
        padding-left: 42px;
    }

/* =========================================================
   CONTADORES Y LÍMITES
   ========================================================= */

.field-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.character-counter {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
}

    .character-counter.warning {
        color: var(--warning);
    }

    .character-counter.limit {
        color: var(--danger);
    }

/* =========================================================
   TARJETAS Y SUPERFICIES
   ========================================================= */

.card,
.surface,
.glass-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: linear-gradient( 145deg, rgba(15, 29, 50, 0.82), rgba(8, 20, 37, 0.86) );
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

    .card::before,
    .glass-card::before {
        position: absolute;
        top: 0;
        right: 16%;
        left: 16%;
        height: 1px;
        content: "";
        pointer-events: none;
        background: linear-gradient( 90deg, transparent, rgba(96, 165, 250, 0.22), rgba(34, 211, 238, 0.16), transparent );
    }

.card-hover {
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

    .card-hover:hover {
        transform: translateY(-4px);
        border-color: var(--border-hover);
        box-shadow: 0 28px 68px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(34, 211, 238, 0.025);
    }

.glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.card-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-soft);
}

    .card-header h2,
    .card-header h3,
    .card-header h4 {
        margin: 0;
    }

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-soft);
}

.card-compact .card-header {
    padding: 16px 18px;
}

.card-compact .card-body {
    padding: 18px;
}

.card-compact .card-footer {
    padding: 14px 18px;
}

.card-accent {
    overflow: hidden;
}

    .card-accent::after {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 3px;
        content: "";
        background: linear-gradient( to bottom, var(--cyan), var(--primary), var(--secondary) );
    }

.surface {
    background: rgba(255, 255, 255, 0.022);
    box-shadow: none;
}

/* =========================================================
   CABECERAS DE SECCIÓN
   ========================================================= */

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.section-header-content {
    min-width: 0;
}

.section-header h1,
.section-header h2 {
    margin-bottom: 8px;
}

.section-header p {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.65;
}

.section-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.section-divider {
    width: 100%;
    height: 1px;
    margin: 26px 0;
    border: 0;
    background: linear-gradient( 90deg, transparent, var(--border), transparent );
}

/* =========================================================
   ETIQUETAS, BADGES Y CHIPS
   ========================================================= */

.eyebrow {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan-light);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

    .eyebrow::before {
        width: 18px;
        height: 1px;
        content: "";
        background: linear-gradient( 90deg, var(--primary-light), var(--cyan) );
    }

.badge,
.chip {
    width: fit-content;
    max-width: 100%;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.2;
}

    .badge::before,
    .status-dot {
        width: 7px;
        height: 7px;
        flex: 0 0 auto;
        border-radius: 50%;
        content: "";
        background: currentColor;
        box-shadow: 0 0 10px currentColor;
    }

    .badge-neutral::before,
    .chip::before {
        display: none;
    }

.badge-primary {
    border-color: rgba(96, 165, 250, 0.28);
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.1);
}

.badge-cyan {
    border-color: rgba(34, 211, 238, 0.26);
    color: var(--cyan-light);
    background: rgba(34, 211, 238, 0.08);
}

.badge-success {
    border-color: rgba(52, 211, 153, 0.25);
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.08);
}

.badge-warning {
    border-color: rgba(251, 191, 36, 0.25);
    color: #fde68a;
    background: rgba(251, 191, 36, 0.08);
}

.badge-danger {
    border-color: rgba(251, 113, 133, 0.25);
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.08);
}

.chip {
    padding: 7px 11px;
    font-weight: 650;
}

    .chip:hover {
        border-color: var(--border-hover);
        color: white;
    }

/* =========================================================
   TEXTO AUXILIAR
   ========================================================= */

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

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

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

.text-cyan {
    color: var(--cyan-light);
}

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

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

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

.gradient-text {
    color: transparent;
    background: var(--gradient-brand);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================================
   ALERTAS Y MENSAJES
   ========================================================= */

.alert {
    position: relative;
    padding: 15px 16px 15px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.55;
}

    .alert::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 3px;
        content: "";
        background: currentColor;
    }

.alert-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 1rem;
    line-height: 1;
}

.alert-content {
    min-width: 0;
    flex: 1;
}

.alert-title {
    display: block;
    margin-bottom: 3px;
    color: inherit;
    font-weight: 800;
}

.alert.error,
.alert-danger {
    border-color: rgba(251, 113, 133, 0.28);
    color: #fecdd3;
    background: rgba(127, 29, 29, 0.22);
}

.alert.success,
.alert-success {
    border-color: rgba(52, 211, 153, 0.28);
    color: #bbf7d0;
    background: rgba(6, 78, 59, 0.22);
}

.alert.warning,
.alert-warning {
    border-color: rgba(251, 191, 36, 0.28);
    color: #fde68a;
    background: rgba(120, 53, 15, 0.22);
}

.alert.info,
.alert-info {
    border-color: rgba(34, 211, 238, 0.25);
    color: #a5f3fc;
    background: rgba(8, 47, 73, 0.24);
}

/* =========================================================
   MÉTRICAS Y ESTADÍSTICAS
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient( 145deg, rgba(15, 29, 50, 0.76), rgba(8, 20, 37, 0.84) );
}

    .stat-card::after {
        position: absolute;
        top: -30px;
        right: -30px;
        width: 90px;
        height: 90px;
        border-radius: 50%;
        content: "";
        pointer-events: none;
        background: rgba(37, 99, 235, 0.08);
        filter: blur(8px);
    }

.stat-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    color: var(--text);
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-description {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.74rem;
    line-height: 1.45;
}

/* =========================================================
   PROGRESO
   ========================================================= */

.progress-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 8px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.progress-bar {
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient( 90deg, var(--primary), var(--cyan), var(--secondary) );
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.26);
    transition: width 0.5s ease;
}

/* =========================================================
   PESTAÑAS
   ========================================================= */

.tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.tab-item {
    min-height: 38px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 9px;
    color: var(--text-muted);
    background: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

    .tab-item:hover {
        color: var(--text);
        background: rgba(255, 255, 255, 0.035);
    }

    .tab-item.active {
        color: white;
        background: linear-gradient( 135deg, rgba(37, 99, 235, 0.2), rgba(34, 211, 238, 0.08) );
        box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
    }

/* =========================================================
   TABLAS
   ========================================================= */

.table-container {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    overflow-x: auto;
    background: rgba(7, 17, 31, 0.44);
}

.data-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

    .data-table th {
        padding: 13px 16px;
        border-bottom: 1px solid var(--border);
        color: var(--text-muted);
        background: rgba(255, 255, 255, 0.025);
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-align: left;
        text-transform: uppercase;
    }

    .data-table td {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-soft);
        color: var(--text-soft);
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .data-table tbody tr {
        transition: background-color var(--transition-fast);
    }

        .data-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.025);
        }

        .data-table tbody tr:last-child td {
            border-bottom: 0;
        }

/* =========================================================
   ESTADOS VACÍOS
   ========================================================= */

.empty-state {
    padding: 48px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px dashed rgba(96, 165, 250, 0.2);
    border-radius: var(--radius-medium);
    text-align: center;
    background: radial-gradient( circle at 50% 0%, rgba(37, 99, 235, 0.08), transparent 45% ), rgba(255, 255, 255, 0.018);
}

.empty-state-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 17px;
    color: var(--cyan-light);
    background: linear-gradient( 145deg, rgba(37, 99, 235, 0.12), rgba(34, 211, 238, 0.05) );
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
    font-size: 1.5rem;
}

.empty-state h2,
.empty-state h3 {
    margin: 0;
    color: var(--text);
}

.empty-state p {
    max-width: 620px;
    margin: 11px auto 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.65;
}

.empty-state .button-group {
    margin-top: 22px;
}

/* =========================================================
   CARGA
   ========================================================= */

.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 650;
}

.loading-spinner {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--cyan);
    border-right-color: var(--primary-light);
    border-radius: 50%;
    animation: noesor-spin 0.75s linear infinite;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(3, 9, 20, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* =========================================================
   SKELETONS
   ========================================================= */

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
}

    .skeleton::after {
        position: absolute;
        inset: 0;
        content: "";
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.07), transparent );
        transform: translateX(-100%);
        animation: noesor-skeleton 1.5s ease-in-out infinite;
    }

.skeleton-text {
    width: 100%;
    height: 12px;
}

.skeleton-text-small {
    width: 55%;
    height: 10px;
}

.skeleton-title {
    width: 70%;
    height: 24px;
}

.skeleton-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

/* =========================================================
   LISTAS
   ========================================================= */

.clean-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

    .clean-list > li {
        margin: 0;
        padding: 0;
    }

.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

    .list-item:hover {
        border-color: var(--border-hover);
        background: rgba(255, 255, 255, 0.035);
        transform: translateX(2px);
    }

/* =========================================================
   INDICADORES DE ESTADO
   ========================================================= */

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.status-success .status-dot {
    color: var(--success);
    background: var(--success);
}

.status-warning .status-dot {
    color: var(--warning);
    background: var(--warning);
}

.status-danger .status-dot {
    color: var(--danger);
    background: var(--danger);
}

.status-info .status-dot {
    color: var(--cyan);
    background: var(--cyan);
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.toolbar {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient( 145deg, rgba(15, 29, 50, 0.64), rgba(8, 20, 37, 0.72) );
}

.toolbar-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

/* =========================================================
   MENÚS Y DROPDOWNS
   ========================================================= */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    min-width: 210px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(8, 20, 37, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dropdown-item {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 9px;
    color: var(--text-soft);
    background: transparent;
    font-size: 0.8rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

    .dropdown-item:hover {
        color: white;
        background: rgba(255, 255, 255, 0.045);
    }

    .dropdown-item.danger {
        color: #fda4af;
    }

/* =========================================================
   MODALES
   ========================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 9, 20, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal {
    width: min(100%, 620px);
    max-height: calc(100vh - 48px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: auto;
    background: linear-gradient( 145deg, rgba(15, 29, 50, 0.98), rgba(7, 17, 31, 0.98) );
    box-shadow: var(--shadow-large);
}

.modal-header,
.modal-body,
.modal-footer {
    padding: 20px 22px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-soft);
}

    .modal-header h2,
    .modal-header h3 {
        margin: 0;
    }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-soft);
}

/* =========================================================
   DIVISORES
   ========================================================= */

.divider {
    width: 100%;
    height: 1px;
    margin: 20px 0;
    border: 0;
    background: var(--border-soft);
}

.divider-gradient {
    background: linear-gradient( 90deg, transparent, rgba(96, 165, 250, 0.22), rgba(34, 211, 238, 0.18), transparent );
}

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

.tooltip {
    position: relative;
}

    .tooltip::after {
        position: absolute;
        right: 50%;
        bottom: calc(100% + 9px);
        z-index: 200;
        min-width: max-content;
        max-width: 240px;
        padding: 7px 9px;
        border: 1px solid var(--border);
        border-radius: 8px;
        content: attr(data-tooltip);
        color: var(--text);
        background: var(--background-elevated);
        box-shadow: var(--shadow-small);
        font-size: 0.7rem;
        font-weight: 650;
        line-height: 1.35;
        text-align: center;
        opacity: 0;
        pointer-events: none;
        transform: translate(50%, 4px);
        transition: opacity var(--transition-fast), transform var(--transition-fast);
    }

    .tooltip:hover::after,
    .tooltip:focus-visible::after {
        opacity: 1;
        transform: translate(50%, 0);
    }

/* =========================================================
   UTILIDADES DE DISTRIBUCIÓN
   ========================================================= */

.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

.wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 6px;
}

.gap-2 {
    gap: 10px;
}

.gap-3 {
    gap: 16px;
}

.gap-4 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes noesor-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes noesor-skeleton {
    100% {
        transform: translateX(100%);
    }
}

@keyframes noesor-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.fade-in {
    animation: noesor-fade-in 0.35s ease both;
}

/* =========================================================
   AJUSTES RESPONSIVOS BÁSICOS DEL SISTEMA DE COMPONENTES
   Los cambios generales finales se manejarán en responsive.css.
   ========================================================= */

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

    .section-header {
        flex-direction: column;
    }

    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

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

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

    .button-group,
    .toolbar,
    .toolbar-group {
        align-items: stretch;
    }

        .button-group .button {
            flex: 1;
        }

    .card-header,
    .card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-footer {
        justify-content: flex-start;
    }

    .modal-backdrop {
        padding: 14px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 18px;
    }
}
