/* =====================================================
   UnoByRealMadrid - Admin Modern Theme Override
   Aplicado sobre el template base para modernizar
   el aspecto de todas las pantallas del backend.
   Compatible con tema claro y oscuro.
   ===================================================== */

/* === Override de variables del tema oscuro === */
:root[bd-theme=bd-theme-dark] {
    --clr-text-label: #e2e8f0;
    --clr-text-body: #cbd5e1;
    --clr-text-muted: #a1a8b8;
    --clr-heading-primary: #f1f5f9;
}

/* === Cards === */
.card__wrapper {
    border-radius: 16px !important;
    padding: 28px !important;
    transition: box-shadow 0.2s ease;
}
.card__wrapper:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* === Form Inputs === */
.form-control,
.form-control-sm,
.form-select {
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}
.form-control:focus,
.form-control-sm:focus,
.form-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
}
.form-control:read-only {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Labels === */
.form__input-title label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 6px !important;
    display: block;
}

/* === Tables === */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    color: #6366f1 !important;
    font-size: 0.78rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid rgba(99,102,241,0.15) !important;
    white-space: nowrap;
}
.table tbody td {
    padding: 12px 16px !important;
    vertical-align: middle !important;
    font-size: 0.88rem;
}
.table tbody tr {
    transition: background 0.15s ease;
}
.table tbody tr:hover {
    background: rgba(99,102,241,0.05) !important;
}

/* === Buttons === */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    font-size: 0.88rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.2) !important;
    letter-spacing: 0.01em;
    color: #fff !important;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.35) !important;
}
.btn-primary i {
    margin-right: 6px;
}

.btn-outline-primary {
    border-color: rgba(99,102,241,0.4) !important;
    color: #6366f1 !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
}
.btn-outline-primary:hover {
    background: rgba(99,102,241,0.1) !important;
    color: #4f46e5 !important;
}

/* === Row spacing in forms === */
.card__wrapper .row {
    margin-bottom: 12px;
}
.card__wrapper .row:last-child {
    margin-bottom: 0;
}

/* === Horizontal rule in forms === */
.card__wrapper hr {
    margin: 20px 0 !important;
}

/* === Breadcrumb === */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
}
.breadcrumb-item a {
    color: #6366f1 !important;
    text-decoration: none;
}

/* === Sidebar refinements === */
.sidebar__menu-item {
    border-radius: 10px !important;
    margin: 2px 8px !important;
    padding: 10px 14px !important;
    transition: all 0.15s ease !important;
}
.sidebar__menu-item:hover {
    background: rgba(99,102,241,0.08) !important;
}
.sidebar__menu-label {
    font-weight: 500 !important;
    font-size: 0.88rem !important;
}

/* === DataTables override === */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 10px !important;
    padding: 8px 14px !important;
}
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px !important;
}

/* === Badge improvements === */
.badge {
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
}

/* === Scrollbar global === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: rgba(99,102,241,0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99,102,241,0.35);
}

/* === Page title / header === */
.app__slide-wrapper h4,
.app__slide-wrapper h3 {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

/* === Responsive improvements === */
@media (max-width: 768px) {
    .card__wrapper {
        padding: 20px 16px !important;
    }
    .btn-primary {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
    }
}

/* =====================================================
   SOLO TEMA OSCURO - colores de texto claros
   ===================================================== */
:root[bd-theme=bd-theme-dark] .form-control,
:root[bd-theme=bd-theme-dark] .form-control-sm,
:root[bd-theme=bd-theme-dark] .form-select {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #f8fafc !important;
}
:root[bd-theme=bd-theme-dark] .form-control:focus,
:root[bd-theme=bd-theme-dark] .form-select:focus {
    background: rgba(255,255,255,0.08) !important;
}
:root[bd-theme=bd-theme-dark] .form__input-title label {
    color: #f1f5f9 !important;
}
:root[bd-theme=bd-theme-dark] .table tbody td {
    color: #e2e8f0 !important;
    border-bottom-color: rgba(255,255,255,0.04) !important;
}
:root[bd-theme=bd-theme-dark] .table thead th {
    color: #818cf8 !important;
}
:root[bd-theme=bd-theme-dark] .breadcrumb-item.active {
    color: #cbd5e1 !important;
}
:root[bd-theme=bd-theme-dark] .breadcrumb-item a {
    color: #818cf8 !important;
}
:root[bd-theme=bd-theme-dark] .btn-outline-primary {
    color: #818cf8 !important;
}
:root[bd-theme=bd-theme-dark] .btn-outline-primary:hover {
    color: #a5b4fc !important;
}
:root[bd-theme=bd-theme-dark] .card__wrapper {
    border-color: rgba(255,255,255,0.06) !important;
    background: rgba(255,255,255,0.02) !important;
}
:root[bd-theme=bd-theme-dark] .card__wrapper hr {
    border-color: rgba(255,255,255,0.08) !important;
}
:root[bd-theme=bd-theme-dark] .main-sidebar {
    border-right-color: rgba(255,255,255,0.04) !important;
}
:root[bd-theme=bd-theme-dark] .dataTables_wrapper .dataTables_filter input {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #f8fafc !important;
}
:root[bd-theme=bd-theme-dark] .dataTables_wrapper .dataTables_length select {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #f8fafc !important;
}
:root[bd-theme=bd-theme-dark] .dataTables_wrapper .dataTables_info,
:root[bd-theme=bd-theme-dark] .dataTables_wrapper .dataTables_length label,
:root[bd-theme=bd-theme-dark] .dataTables_wrapper .dataTables_filter label {
    color: #cbd5e1 !important;
}
:root[bd-theme=bd-theme-dark] select option {
    background: #1e293b !important;
    color: #f8fafc !important;
}
:root[bd-theme=bd-theme-dark] .preloader {
    background: #0a0e27 !important;
}
