/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --primary: #ff90ff;
    --primary-hover: #ff66ff;
    --bg-color: #ffc1ff;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #16a34a;
    --danger: #dc2626;
    --tr-color: #ffeeff;

    /* Colores centralizados por género */
    --masculino-bg: #60c7ff;
    --masculino-text: #000000;
    --femenino-bg: #ffaaff;
    --femenino-text: #000000;
    --unisex-bg: #ffcc00;
    --unisex-text: #000000;

    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 30px;
}

/* Utilitario de Ocultado Global */
.hidden {
    display: none !important;
}

/* ==========================================================================
   ENCABEZADO Y NAVEGACIÓN (NAVBAR)
   ========================================================================== */
.navbar {
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
    box-shadow: 0px 2px 10px black;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
}

.btn-logout {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-logout:hover {
    background-color: #fecaca;
    transform: translateY(-1px);
}

.btn-logout:active {
    transform: translateY(0);
}

.view-tabs {
    display: flex;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3px;
    gap: 4px;
}

.view-tab-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-tab-btn:hover {
    color: var(--text-main);
}

.view-tab-btn.active {
    background-color: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

/* ==========================================================================
   CONTENEDOR Y BUSCADOR
   ========================================================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0.5rem;
}

.search-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.25rem;
}

@media (min-width: 500px) {
    .search-section {
        flex-direction: row;
    }
}

.search-box {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--card-bg);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
}

/* ==========================================================================
   BARRA DE RESUMEN DE TOTALES (VISTA EMPLEADO)
   ========================================================================== */
.stats-summary-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px 0;
    padding: 12px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.15s ease;
}

.stat-pill:hover {
    transform: translateY(-1px);
}

.stat-pill strong {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Estilos de total y géneros utilizando las variables globales de :root */
.stat-pill.stat-total {
    background-color: #f1f5f9;
    color: var(--text-main);
    border: 4px solid #cbd5e1;
}

.stat-pill.stat-unisex {
    background-color: var(--unisex-bg);
    color: var(--unisex-text);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.stat-pill.stat-femenino {
    background-color: var(--femenino-bg);
    color: var(--femenino-text);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.stat-pill.stat-masculino {
    background-color: var(--masculino-bg);
    color: var(--masculino-text);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   TARJETAS DE PERFUMES Y INSIGNIAS (BADGES)
   ========================================================================== */
.perfume-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .perfume-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit-perfume {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-edit-perfume:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.btn-delete-perfume {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.btn-delete-perfume:hover {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge-masculino {
    background-color: var(--masculino-bg);
    color: var(--masculino-text);
}

.badge-femenino {
    background-color: var(--femenino-bg);
    color: var(--femenino-text);
}

.badge-unisex {
    background-color: var(--unisex-bg);
    color: var(--unisex-text);
}

.perfume-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.perfume-brand {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Controles de Cantidad (Tarjeta Empleado) */
.card-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.btn-qty {
    width: 42px;
    height: 42px;
    background-color: var(--primary);
    border: 1px solid var(--primary-hover);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.btn-qty:active {
    background-color: var(--primary-hover);
}

.input-qty {
    width: 55px;
    height: 42px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    border: 1px solid var(--primary-hover);
    border-radius: 8px;
    outline: none;
}

.btn-save {
    flex: 1;
    height: 42px;
}

/* ==========================================================================
   BOTONES Y FORMULARIOS GENERALES
   ========================================================================== */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #99c4fc;
    color: var(--text-main);
}

.btn-block {
    width: 100%;
}

.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 500px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Botón (X) para vaciar contenido de inputs */
.input-clearable-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-clearable-wrapper input {
    width: 100%;
    padding-right: 32px !important;
}

.btn-clear-input {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #cbd5e1;
    color: #334155;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 5;
}

.btn-clear-input:hover {
    background: #94a3b8;
    color: #0f172a;
}

.btn-clear-input.hidden {
    display: none !important;
}

/* ==========================================================================
   PANEL ADMINISTRACIÓN / COMPRAS
   ========================================================================== */
.admin-toolbar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: var(--shadow);
}

@media (min-width: 600px) {
    .admin-toolbar {
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }
}

.toolbar-info h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.toolbar-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toolbar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1ebc57;
}

.btn-telegram {
    background-color: #229ed9;
    color: white;
}

.btn-telegram:hover {
    background-color: #1c87ba;
}

/* Filtros Admin */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
    background: var(--card-bg);
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.filter-tabs-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.filter-tab.active {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

.filter-selects-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-select {
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: white;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--primary);
}

/* Tabla de Pedidos */
.table-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 5px 2px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    text-align: center;
}

.admin-table th {
    background-color: #f1f5f9;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    text-align: left;
    width: 40%;
    min-width: 150px;
}

.admin-table td:nth-child(1) .perfume-name,
.admin-table td:nth-child(1) .perfume-sub {
    text-align: left;
}

.admin-table tr:nth-child(even) {
    background-color: var(--tr-color);
}

.perfume-name {
    display: block;
    color: var(--text-main);
}

.perfume-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stock-badge {
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.stock-good {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.stock-low {
    background: #fef08a;
    color: #854d0e;
    border: 1px solid #fde047;
}

.stock-out {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.input-qty-admin {
    width: 60px;
    padding: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.btn-remove-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
}

.btn-remove-item:hover {
    opacity: 1;
}

/* Sección Productos Extras */
.extra-items-section {
    background: white;
    border: 1px dashed var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.extra-items-section h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.extra-item-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extra-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
    justify-content: center;
}

/* ==========================================================================
   MODALES Y VENTANAS FLOTANTES
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 200;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 450px;
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

#whatsapp-text-preview,
#telegram-text-preview,
.modal-body textarea {
    width: 100%;
    padding: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    background-color: #f8fafc;
    box-sizing: border-box;
    outline: none;
}

#whatsapp-text-preview:focus,
#telegram-text-preview:focus,
.modal-body textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-instruction {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Pantalla de Login (Overlay) */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    animation: loginFadeIn 0.3s ease-out;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

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

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.login-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-error {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   PIES DE PÁGINA Y NOTIFICACIONES DE VERSIÓN
   ========================================================================== */
.login-version-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-version-footer strong {
    color: var(--text-main);
}

.view-footer {
    margin-top: 40px;
    padding: 20px 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-version-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-version-info strong {
    color: var(--text-main);
}

.btn-check-update {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-check-update:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-check-update:active {
    transform: translateY(0);
}

.btn-check-update-link {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 2px 6px;
    transition: opacity 0.2s ease;
}

.btn-check-update-link:hover {
    opacity: 0.8;
}

.btn-spin-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Toast flotante de versión */
.version-update-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background-color: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}

/* ==========================================================================
   ANIMACIONES Y UTILIDADES
   ========================================================================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    gap: 12px;
}

.loading-text {
    margin: 0;
    font-weight: 500;
}

.spinner-ring {
    width: 38px;
    height: 38px;
    border: 3.5px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   FORMATO DE IMPRESIÓN (PDF)
   ========================================================================== */
@media print {

    .navbar,
    .search-section,
    .stats-summary-bar,
    .filters-bar,
    .admin-toolbar,
    .extra-items-section,
    .btn-remove-item,
    .modal,
    .view-footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .table-container {
        border: none;
        box-shadow: none;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 0;
        border-bottom: 1px solid #ccc;
    }

    .input-qty-admin {
        border: none;
        background: transparent;
    }

    body::before {
        content: "LISTA DE PEDIDO DE PERFUMES";
        font-size: 18pt;
        font-weight: bold;
        display: block;
        margin-bottom: 15pt;
        text-align: center;
    }
}

/* ==========================================================================
   ESTILOS DE SECCIÓN DE SUPER ADMINISTRADOR & LOGS
   ========================================================================== */
.superadmin-subnav {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.superadmin-subtab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.superadmin-subtab:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.4);
}

.superadmin-subtab.active {
    background-color: var(--card-bg);
    color: #6b21a8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.superadmin-subpanel {
    display: none;
}

.superadmin-subpanel.active {
    display: block;
}

.panel-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: var(--card-bg);
    padding: 12px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-action-bar h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Badges de Roles de Usuario */
.badge-role {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-role-super {
    background-color: #6b21a8;
    color: #ffffff;
}

.badge-role-admin {
    background-color: #2563eb;
    color: #ffffff;
}

.badge-role-user {
    background-color: #64748b;
    color: #ffffff;
}

/* Badges e Insignias de Logs */
.log-level-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.log-level-info {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.log-level-warn {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde047;
}

.log-level-crit {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Stats Pills para Logs */
.stat-log-info {
    border: 4px solid #0284c7;
}

.stat-log-warn {
    border: 4px solid #d97706;
}

.stat-log-crit {
    border: 4px solid #dc2626;
}

/* Barra de Filtros de Logs */
.logs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.logs-filter-bar .search-box {
    flex: 1;
    min-width: 200px;
}

/* Botones Pequeños de Acción en Tablas */
.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: normal;
}

/* Anulación de tamaño rígido (30% / 180px) para la primera columna en sección Super Admin y Logs */
.superadmin-subpanel .admin-table th:nth-child(1),
.superadmin-subpanel .admin-table td:nth-child(1),
.logs-table th:nth-child(1),
.logs-table td:nth-child(1) {
    width: auto !important;
    min-width: auto !important;
    text-align: center;
}

.logs-table td:nth-child(4) {
    text-align: left;
}