/* assets/css/style.css - Premium Mobile-First Design para MercaUno */
:root {
    --naranja-primario: #FF6B35;
    --naranja-hover: #E85A2A;
    --naranja-accion: #F97316;
    --azul-primario: #004E89;
    --azul-profundo: #004E89;
    --blanco: #ffffff;
    --azul-claro: #1A659E;
    --verde-exito: #059669; /* Darker green for white text contrast */
    --verde-esmeralda: #118AB2;
    --rojo-alerta: #EF476F;
    --fondo-app: #F8FAFC;
    --fondo-card: #FFFFFF;
    --gris-texto: #475569;
    --gris-claro: #E2E8F0;
    --gris-oscuro: #1E293B;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    background-color: var(--fondo-app);
    color: var(--gris-oscuro);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* Espacio para navegación inferior + área segura Android API 35 */
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Forzar tipografía en elementos de formulario y encabezados que a veces no heredan */
input, select, textarea, button, option, optgroup,
h1, h2, h3, h4, h5, h6, .logo-text h1 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Typography */
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 700; }

/* Header */
header {
    background: linear-gradient(135deg, var(--naranja-primario) 0%, var(--naranja-accion) 100%);
    color: white;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px)); /* Respetar notch en Android API 35 */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container h1 {
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Bottom Navigation (Mobile First) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ranking-result-card {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}
.ranking-result-card.best-option {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.ranking-result-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gris-texto);
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.25rem;
    padding: 0.5rem;
    width: 25%;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--border-radius-sm);
}

.bottom-nav-btn i { font-size: 1.25rem; }
.bottom-nav-btn.active { color: var(--naranja-primario); }

/* Buttons */
.btn-primary {
    background: var(--naranja-primario);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary:active { transform: scale(0.98); }

/* Cards */
.glass-card {
    background: var(--fondo-card);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gris-claro);
    transition: box-shadow 0.3s ease;
}

.login-box {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Forms & Inputs */
.control-input, .control-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gris-claro);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.control-input:focus, .control-select:focus {
    outline: none;
    border-color: var(--naranja-primario);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-box {
    background-color: var(--fondo-card);
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gris-claro);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gris-texto);
    cursor: pointer;
}

/* Tab contents */
.modal-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--azul-primario);
    margin-bottom: 1rem;
    text-align: center;
}
.modal-body {
    font-size: 0.95rem;
    color: var(--gris-texto);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.4;
}
.btn-modal {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    width: 100%;
}
.btn-modal-confirm {
    background: var(--naranja-accion);
    color: white;
}
.btn-modal-confirm:hover {
    background: var(--naranja-hover);
}
.btn-modal-cancel {
    background: var(--gris-claro);
    color: var(--gris-texto);
}
.btn-modal-cancel:hover {
    background: #e2e8f0;
}
#modal-buttons {
    display: flex;
    gap: 0.5rem;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* Responsive tables to cards */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.styled-table th, .styled-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gris-claro);
}
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.product-list::-webkit-scrollbar {
    width: 6px;
}

.product-list::-webkit-scrollbar-thumb {
    background: var(--azul-claro);
    border-radius: 3px;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scanLine { 0% { top: 10%; } 50% { top: 90%; } 100% { top: 10%; } }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }

/* ===================================================
   COMPARADOR LAYOUT - NATIVO ANTIGRAVITY 2.0
   - Móvil/Tablet (<992px): una columna, catálogo completo
   - Laptop/Desktop (≥992px): dos columnas con catálogo fijo a la izquierda
   =================================================== */

/* Layout base para móvil y tableta (<992px) */
.comparador-grid {
    display: block;
}

#catalog-top {
    width: 100%;
}

/* Altura adaptativa del catálogo para móviles y tabletas */
#catalog-list {
    max-height: 45vh;
    overflow-y: auto;
}

#back-to-catalog-link {
    display: none; /* Se activa via JS cuando hay resultados en móvil */
}

#results-fab {
    display: none;
}

/* Ajustes específicos para tabletas (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    #catalog-list {
        max-height: 50vh;
    }
}

/* ---- PORTÁTIL Y DESKTOP: ≥992px (Breakpoint Nativo Antigravity 2.0) ---- */
@media (min-width: 992px) {
    .comparador-grid {
        display: grid;
        grid-template-columns: 1.2fr 1.8fr;
        gap: 2rem;
        align-items: start;
    }
    /* Catálogo fijo a la izquierda mientras los resultados se desplazan a la derecha */
    #catalog-top {
        position: sticky;
        top: 76px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }
    /* En pantallas grandes el catálogo ocupa la altura disponible */
    #catalog-list {
        max-height: calc(100vh - 340px);
        overflow-y: auto;
    }
    /* Ocultar elementos auxiliares de navegación móvil */
    #back-to-catalog-link {
        display: none !important;
    }
    #results-fab {
        display: none !important;
    }
    #tab-reportes.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}


.header-nav { display: none; }

.header-nav .tab-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--blanco);
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.header-nav .tab-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.header-nav .tab-btn.active {
    background: var(--blanco);
    color: var(--naranja-primario);
    border-color: var(--blanco);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .bottom-nav { display: none !important; }
    body { padding-bottom: 0; }
    .header-nav { display: flex; gap: 1rem; }
    .auth-bar { display: flex; } /* Show in desktop for demo if needed */
}

/* Scannner */
#scanner-reader {
    width: 100%;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

#scanner-reader video {
    width: 100% !important;
    height: auto !important;
    border-radius: var(--border-radius-sm);
}
#custom-modal { z-index: 10000 !important; }

/* CRUD Tables */
.crud-table, .matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.crud-table th, .matrix-table th {
    background: var(--naranja-primario);
    color: white;
    padding: 0.75rem;
    text-align: left;
}

.crud-table td, .matrix-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gris-claro);
}

/* Responsive Table to Card */
@media (max-width: 767px) {
    .crud-table thead, .matrix-table thead {
        display: none;
    }
    
    .crud-table, .crud-table tbody, .crud-table tr, .crud-table td,
    .matrix-table, .matrix-table tbody, .matrix-table tr, .matrix-table td {
        display: block;
        width: 100%;
    }
    
    .crud-table tr, .matrix-table tr {
        margin-bottom: 1rem;
        background: #fff;
        border: 1px solid var(--gris-claro);
        border-radius: var(--border-radius-sm);
        padding: 0.5rem;
        box-shadow: var(--shadow-sm);
    }
    
    .crud-table td, .matrix-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid var(--gris-claro);
    }
    
    .crud-table td:last-child, .matrix-table td:last-child {
        border-bottom: none;
    }
    
    .crud-table td::before, .matrix-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--gris-texto);
    }
}

/* ===================================================
   SISTEMA DE DISEÑO DEL PANEL DE ADMINISTRACIÓN (POPPINS)
   =================================================== */

#tab-admin {
    font-family: 'Poppins', sans-serif !important;
}

/* Titles: 24px - 28px Bold */
#tab-admin h2, #tab-admin .admin-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: var(--gris-oscuro);
    margin-bottom: 1.5rem;
}

/* Subtitles: 18px - 20px Medium */
#tab-admin h3, #tab-admin h4, #tab-admin .admin-subtitle {
    font-size: 18px !important;
    font-weight: 500 !important;
    color: var(--azul-primario);
    margin-bottom: 1rem;
}

/* Layout */
.admin-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    margin-top: 1rem;
}

/* Sidebar */
.admin-sidebar {
    width: 100%;
    flex-shrink: 0;
    background: var(--fondo-card);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gris-claro);
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--gris-claro);
}

.admin-sidebar-icon {
    font-size: 1.75rem;
    color: var(--naranja-primario);
}

.admin-sidebar-header h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.admin-badge {
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: var(--naranja-primario);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Buttons nav */
.admin-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 150px;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--gris-texto);
    font-size: 14px !important;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
}

.admin-nav-btn:hover {
    background: var(--fondo-app);
    color: var(--azul-primario);
    transform: translateX(3px);
}

.admin-nav-btn.active {
    background: rgba(255, 107, 53, 0.08);
    color: var(--naranja-primario);
    font-weight: 600;
    border-bottom: 3px solid var(--naranja-primario);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

/* Content Area */
.admin-content-area {
    flex-grow: 1;
    min-width: 0;
}

/* Collapsible Sidebar Styles */
.admin-sidebar {
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.admin-sidebar.collapsed {
    width: 76px;
    padding: 1.5rem 0.5rem;
}

.admin-sidebar.collapsed .admin-header-text,
.admin-sidebar.collapsed .admin-nav-btn span {
    display: none;
}

.admin-sidebar.collapsed .admin-sidebar-header {
    justify-content: center;
    border-bottom: none;
    flex-direction: column;
    gap: 1rem;
}

.admin-sidebar.collapsed #sidebar-toggle {
    margin-left: 0 !important;
}

.admin-sidebar.collapsed .admin-nav-btn {
    justify-content: center;
    padding: 0.8rem 0;
}

.admin-sidebar.collapsed .admin-nav-btn i {
    font-size: 1.25rem;
    margin: 0;
}

/* Inner Tabs for Catalog */
.catalog-tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gris-claro);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.catalog-tab-btn {
    background: transparent;
    border: none;
    color: var(--gris-texto);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-tab-btn:hover {
    background: rgba(0,0,0,0.03);
    color: var(--azul-primario);
}

.catalog-tab-btn.active {
    color: var(--naranja-primario);
    background: rgba(255, 107, 53, 0.08);
    box-shadow: inset 0 -2px 0 var(--naranja-primario);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.admin-subtab-content {
    display: none;
}

.admin-subtab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Cards */
.admin-card {
    background: var(--fondo-card);
    border-radius: var(--border-radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gris-claro);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gris-claro);
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-card-header h3 {
    margin: 0 !important;
}

/* Filters Bar */
.admin-filters-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--fondo-app);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gris-claro);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px !important;
}

.filter-group label {
    font-weight: 600;
    color: var(--gris-texto);
}

.filter-select {
    padding: 0.4rem 2rem 0.4rem 0.75rem !important;
    font-size: 14px !important;
    height: 38px !important;
    margin-bottom: 0 !important;
    border-radius: 6px !important;
    border: 1px solid var(--gris-claro) !important;
    background-color: white !important;
}

.search-group {
    flex-grow: 1;
    position: relative;
}

#user-search-input {
    width: 100%;
    height: 38px !important;
    padding: 0.5rem 1rem 0.5rem 2.25rem !important;
    border: 1px solid var(--gris-claro) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    background-color: white !important;
    outline: none;
}

#user-search-input:focus,
.table-controls input[type="text"]:focus,
.admin-filters-bar input[type="text"]:focus,
.admin-filters-bar select:focus {
    border-color: var(--naranja-primario) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* Resaltar bordes de los campos de búsqueda y filtros para que no se pierdan en el fondo blanco */
#user-search-input,
.table-controls input[type="text"],
.admin-filters-bar input[type="text"],
.admin-filters-bar select,
.filter-select {
    border: 2px solid var(--naranja-primario) !important;
}

.table-controls input[type="text"],
.admin-filters-bar input[type="text"] {
    margin-bottom: 0 !important;
    height: 38px !important;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--gris-texto);
    pointer-events: none;
}

/* Premium Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px !important;
    text-align: left;
}

.admin-table th {
    background-color: var(--fondo-app);
    color: var(--gris-texto);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--gris-claro);
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gris-claro);
    color: var(--gris-oscuro);
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

/* Badges for status and roles */
.badge-role {
    font-size: 12px;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: capitalize;
    display: inline-block;
}
.badge-role.administrador { background: rgba(239, 71, 111, 0.1); color: #EF476F; }
.badge-role.verificador { background: rgba(17, 138, 178, 0.1); color: #118AB2; }
.badge-role.reportes { background: rgba(0, 78, 137, 0.1); color: #004E89; }
.badge-role.comprador { background: rgba(5, 150, 105, 0.1); color: #059669; }

.badge-status {
    font-size: 12px;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}
.badge-status.activo { background: rgba(5, 150, 105, 0.1); color: #059669; }
.badge-status.inactivo { background: rgba(226, 232, 240, 0.8); color: #64748b; }

/* Homogeneous Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem !important;
    font-size: 12px !important;
    font-weight: 600;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action i {
    font-size: 11px;
}

/* Guardar / Crear / Aceptar: Verde o Naranja corporativo */
.btn-success, .btn-action.btn-confirm, .btn-modal-confirm {
    background-color: var(--verde-exito) !important;
    color: white !important;
}
.btn-success:hover, .btn-action.btn-confirm:hover, .btn-modal-confirm:hover {
    background-color: #047857 !important;
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.2);
}

/* Modificar / Editar: Advertencia o secundario */
.btn-warning, .btn-action.btn-edit {
    background-color: #d97706 !important; /* Amber-600 */
    color: white !important;
}
.btn-warning:hover, .btn-action.btn-edit:hover {
    background-color: #b45309 !important;
    box-shadow: 0 4px 6px rgba(217, 119, 6, 0.2);
}

/* Rechazar / Cancelar / Eliminar: Alerta o gris */
.btn-danger, .btn-action.btn-delete {
    background-color: var(--rojo-alerta) !important;
    color: white !important;
}
.btn-danger:hover, .btn-action.btn-delete:hover {
    background-color: #dc2626 !important;
    box-shadow: 0 4px 6px rgba(239, 71, 111, 0.2);
}

.btn-secondary, .btn-modal-cancel {
    background-color: var(--gris-claro) !important;
    color: var(--gris-texto) !important;
}
.btn-secondary:hover, .btn-modal-cancel:hover {
    background-color: #cbd5e1 !important;
}

/* Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gris-claro);
    border-radius: 6px;
    background-color: white;
    color: var(--gris-texto);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--naranja-primario);
    color: var(--naranja-primario);
}

.page-btn.active {
    background-color: var(--naranja-primario);
    border-color: var(--naranja-primario);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Controls Custom Textarea */
.control-textarea {
    width: 100%;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--gris-claro) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background-color: white !important;
    color: var(--gris-oscuro);
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

.control-textarea:focus {
    border-color: var(--naranja-primario) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Responsive queries for administrative panel */
@media (max-width: 991px) {
    .admin-dashboard-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 1rem;
    }
    
    .admin-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-nav-btn {
        white-space: nowrap;
        width: auto;
        padding: 0.6rem 1rem;
    }
    
    .admin-nav-btn.active {
        border-left: none;
        border-bottom: 3px solid var(--naranja-primario);
        border-radius: 0;
    }
}

.btn-logout-clean:hover {
    background-color: #fff1f2 !important;
    color: #e11d48 !important;
    border-color: #fecdd3 !important;
}
