/* admin/admin.css - Estilos del Panel ERP y Responsive Móvil */
:root {
    --bg-color: #F8F9FA;
    --text-main: #1A1A1A;
    --accent-gold: #D4AF37;
    --accent-color: #C58F84;
    --border-color: #E5E5E5;
    --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Lato', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; }

.admin-wrapper { max-width: 1350px; margin: 1.5rem auto; padding: 0 1rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; background: var(--white); padding: 1rem 1.5rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 1.5rem; }
.logo-text { font-size: 1.5rem; font-weight: 700; color: var(--text-main); text-transform: uppercase; letter-spacing: 1px; }

/* Pestañas (Navegación) */
.admin-nav { display: flex; gap: 0.5rem; background: var(--white); padding: 0.8rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 1.5rem; overflow-x: auto; flex-wrap: wrap; }
.admin-tab-btn { flex: 1; min-width: 140px; padding: 12px 15px; border: none; background: #F1F3F5; color: #495057; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; text-align: center; }
.admin-tab-btn i { margin-right: 6px; }
.admin-tab-btn.active, .admin-tab-btn:hover { background: var(--text-main); color: var(--white); }

/* Contenedores */
.admin-content-pane { display: none; background: var(--white); padding: 2rem; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.admin-content-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Botones */
.btn-primary, .btn-secondary, .btn-danger { border: none; padding: 10px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.3s; display: inline-block; text-align: center;}
.btn-primary { background: var(--text-main); color: var(--white); }
.btn-primary:hover { background: var(--accent-gold); }
.btn-secondary { background: #E9ECEF; color: var(--text-main); }
.btn-secondary:hover { background: #DEE2E6; }
.btn-danger { background: #DC3545; color: var(--white); padding: 6px 12px; border-radius: 4px; }
.btn-danger:hover { background: #BB2D3B; }

/* Tablas Responsivas */
.table-responsive { overflow-x: auto; margin-top: 1rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 800px; }
th, td { padding: 12px; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; vertical-align: middle; }
th { background: #F8F9FA; font-weight: 700; color: #495057; }

.status-toggle { padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; cursor: pointer; display: inline-block; }
.status-active { background: #D1E7DD; color: #0F5132; }
.status-inactive { background: #FFF3CD; color: #664D03; }

/* Modales */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; justify-content: center; align-items: center; padding: 1rem; backdrop-filter: blur(3px); }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--white); padding: 2rem; border-radius: 12px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #888; }

/* Formularios */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 0.85rem; }
.form-control { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.9rem; outline: none; }
.form-control:focus { border-color: var(--accent-gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.size-toggle-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 5px; }
.size-toggle-btn { flex: 1; min-width: 90px; padding: 10px; border-radius: 6px; font-weight: 700; cursor: pointer; text-align: center; border: 2px solid transparent; transition: all 0.25s ease; }
.size-toggle-btn.enabled { background: #D1E7DD; color: #0F5132; border-color: #198754; }
.size-toggle-btn.disabled { background: #E9ECEF; color: #888888; border-color: #CED4DA; text-decoration: line-through; }

.alert-box { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; display: none; }
.alert-warning { background: #FFF3CD; border-left: 4px solid #FFC107; color: #664D03; }
.alert-success { background: #D1E7DD; border-left: 4px solid #198754; color: #0F5132; }

/* ==========================================================================
   ADAPTACIÓN A CELULARES (RESPONSIVE ADMIN)
   ========================================================================== */
@media (max-width: 768px) {
    /* Cabecera Apilada */
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .admin-header div {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .admin-header .btn-secondary, .admin-header .btn-primary {
        width: 100%;
        margin: 0 !important;
    }

    /* Pestañas deslizables táctiles */
    .admin-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
    }
    .admin-tab-btn {
        flex: 0 0 auto;
        padding: 10px 15px;
    }

    .admin-content-pane {
        padding: 1.5rem 1rem;
    }

    /* Formularios de 1 columna */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Botones de tamaño de perfume apilados */
    .size-toggle-group {
        flex-direction: column;
    }
    .size-toggle-btn {
        width: 100%;
    }

    .modal-content {
        padding: 1.5rem;
    }
}