/* =========================
   STARLINK STYLE GRID
========================= */

.sl-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #fed7aa; /* orange-200 */
    border-radius: 10px;
    overflow: visible;
    font-size: 14px;
}

/* HEADER */
.sl-grid thead tr {
    background: #fff7ed; /* orange-50 */
}

.sl-grid thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #c2410c; /* orange-700 */
    border-bottom: 1px solid #fdba74; /* orange-300 */
    letter-spacing: .04em;
}

/* FILAS */
.sl-grid tbody tr {
    transition: background .15s ease;
}

.sl-grid tbody tr:hover {
    background: #fff7ed; /* orange-50 */
}

.sl-grid tbody td {
    padding: 14px 16px;
    color: #374151; /* gray-700 */
    border-bottom: 1px solid #ffedd5; /* orange-100 */
}

/* ÚLTIMA FILA */
.sl-grid tbody tr:last-child td {
    border-bottom: none;
}

/* TEXTO SUTIL PARA IDS */
.sl-grid tbody td:nth-child(3) {
    color: #6b7280; /* gray-500 */
}

/* =========================
   PAGER (ya lo tienes)
========================= */

.sl-pager {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 18px;
    list-style: none;
}

.sl-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: #f97316; /* orange-500 */
    background: #fff;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    transition: all .15s ease;
}

.sl-page:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;
}

.sl-pager .active .sl-page {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}

.sl-pager .disabled .sl-page {
    opacity: .35;
    cursor: not-allowed;
}


   /* =========================
    DARK MODE
    ========================= */

    .dark .sl-grid {
        background: #18181b; /* zinc-900 */
        border: 1px solid #27272a; /* zinc-800 */
    }

    /* HEADER */
    .dark .sl-grid thead tr {
        background: #1f1f23; /* zinc-800 */
    }

    .dark .sl-grid thead th {
        color: #fb923c; /* orange-400 */
        border-bottom: 1px solid #3f3f46; /* zinc-700 */
    }

    /* FILAS */
    .dark .sl-grid tbody tr:hover {
        background: #1f1f23; /* zinc-800 */
    }

    .dark .sl-grid tbody td {
        color: #e4e4e7; /* zinc-200 */
        border-bottom: 1px solid #27272a; /* zinc-800 */
    }

    /* TEXTO SUTIL */
    .dark .sl-grid tbody td:nth-child(3) {
        color: #a1a1aa; /* zinc-400 */
    }

    /* =========================
    PAGER DARK
    ========================= */

    .dark .sl-page {
        background: #18181b;
        border: 1px solid #27272a;
        color: #fb923c; /* orange-400 */
    }

    .dark .sl-page:hover {
        background: #1f1f23;
        border-color: #fb923c;
        color: #f97316;
    }

    .dark .sl-pager .active .sl-page {
        background: #f97316;
        color: #ffffff;
        border-color: #f97316;
    }

    .dark .sl-pager .disabled .sl-page {
        opacity: .35;
    }


    /* =========================
    DARK MODE
    ========================= */

    .dark .starlink-btn {
        background: #18181b; /* zinc-900 */
        border: 1px solid #27272a; /* zinc-800 */
        color: #fb923c; /* orange-400 */
    }

    .dark .starlink-btn:hover {
        background: #1f1f23; /* zinc-800 */
    }

    .dark .starlink-menu {
        background: #18181b;
        border: 1px solid #27272a;
        box-shadow: none;
    }

    .dark .starlink-menu a.primary {
        color: #e4e4e7; /* zinc-200 */
    }

    .dark .starlink-menu a.primary:hover {
        background: #1f1f23;
        color: #fb923c;
    }

    .dark .starlink-menu a.danger {
        color: #f87171; /* red-400 */
    }

    .dark .starlink-menu a.danger:hover {
        background: #2a1a1a;
    }


/* Input con error */
.has-error input,
.has-error select,
.has-error textarea {
    border-color: #dc2626; /* rojo suave */
    background-color: #fef2f2; /* rojo muy tenue */
}

/* Mensaje de error sutil */
.has-error .help-block {
    color: #dc2626;
    font-size: 0.75rem; /* text-xs */
    margin-top: 4px;
}

.has-error:not(.has-success) input:focus {
    border-color: #dc2626;
}


.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
}


.switch-wrapper {
    position: relative;
    width: 42px;
    height: 22px;
    display: inline-block;
    cursor: pointer;
}

.switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch {
    position: absolute;
    inset: 0;
    background-color: #e5e7eb;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.switch::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    border-radius: 9999px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ON */
.switch-input:checked + .switch {
    background-color: #f97316;
}

.switch-input:checked + .switch::before {
    transform: translateX(20px);
}

/* Quita estilo nativo */
.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Flecha custom */
.select-arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #9ca3af; /* gris */
}

.custom-select:focus + .select-arrow {
    border-top-color: #f97316;
}


/* botón tres puntitos */
.starlink-btn {
    background: transparent;
    border: none;
    color: #fb923c; /* naranja */
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
}

.starlink-btn:hover {
    background: rgba(251,146,60,0.12);
}

/* menú */
.starlink-menu {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 170px;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px 0;
    box-shadow: 0 20px 35px rgba(0,0,0,0.18);
    z-index: 9999;
    border: 1px solid #fde6d4;
}

/* items */
.starlink-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #374151; /* gris oscuro */
    text-decoration: none;
    transition: background 0.15s ease;
}

.starlink-menu a:hover {
    background: #fff7ed; /* naranja muy suave */
    color: #c2410c;
}

/* acción principal */
.starlink-menu a.primary {
    font-weight: 500;
}

/* peligro */
.starlink-menu a.danger {
    color: #dc2626;
}

.starlink-menu a.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* oculto */
.hidden {
    display: none;
}



.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.confirm-modal {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    animation: modalIn 0.15s ease-out;
}

.confirm-modal h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
}

.confirm-modal p {
    font-size: 14px;
    color: #4b5563;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.btn-cancel {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #f3f4f6;
}

.btn-danger {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: #f97316;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.btn-danger:hover {
    background: #ea580c;
}

.hidden {
    display: none !important;
    pointer-events: none;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Contenedor principal del campo */
.select2-container .select2-selection {
  border: 1px solid #d1d5db !important;   /* gris */
  border-radius: 0.5rem;       /* rounded-lg */
  padding: 0.5rem 0.75rem;     /* px-3 py-2 */
  font-size: 0.875rem;         /* text-sm */
  width: 100%;
  outline: none;
  margin-top: 0.4rem;
}

.select2-container .select2-selection:focus {
  border-color: #fb923c !important;       /* naranja */
  box-shadow: 0 0 0 2px #fb923c !important;
}

/* Texto dentro del select */
.select2-container .select2-selection__rendered {
  color: #374151 !important;              /* gris oscuro */
}

/* Flecha */
.select2-container .select2-selection__arrow {
  height: 100%;
  right: 0.5rem;
  color: #9ca3af !important;              /* gris claro */
}

/* Dropdown (lista de opciones) */
.select2-container .select2-dropdown {
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 10000 !important;
}

.select2-container--open .select2-dropdown {
    z-index: 10000 !important;
}

.select2-container {
    z-index: 10000 !important;
}

.select2-container .select2-results__option {
  padding: 0.5rem 0.75rem;
}

.select2-container .select2-results__option--highlighted {
  background-color: #fb923c !important;   /* naranja */
  color: white;
}

