﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ============================= */
/* BASE */
/* ============================= */

* {
    box-sizing: border-box;
}

:root {
    --global-size: 16px;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    height: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    font-size: var(--global-size);
}

/* ============================= */
/* LAYOUT GENERAL */
/* ============================= */

.layout-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}
    
.page-content-container {
    height: calc(100vh - 60px);
    overflow: auto;
    padding: 8px 24px 24px 24px;
    background: transparent;
}

/* ============================= */
/* TOPBAR */
/* ============================= */

.topbar {
    height: 60px;
    width: 100%;
    background-color: var(--dxbl-layout-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* 🔥 borde visible */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

body.dxbl-theme-fluent-dark .topbar {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
}

/* ============================= */
/* AVATAR */
/* ============================= */

.avatar-container {
    width: 36px;
    height: 36px;
    cursor: pointer;
}

    .avatar-container img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }

/* ============================= */
/* MENÚ USUARIO */
/* ============================= */

.user-menu {
    position: fixed;
    top: 70px;
    right: 24px;
    width: 300px;
    background-color: var(--dxbl-popup-bg, var(--bs-body-bg));
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 24px 48px rgba(0,0,0,0.18);
    z-index: 999999;
}

body.dxbl-theme-fluent-dark .user-menu {
    border: 1px solid rgba(255,255,255,0.12);
}

.user-header-modern {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

    /* 🔥 Avatar del menú (más grande que el toggle) */
    .user-header-modern img {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name-modern {
    font-weight: 600;
}

.user-email-modern {
    font-size: 13px;
    color: var(--bs-secondary-color);
}

/* ============================= */
/* ROLE BADGE */
/* ============================= */

.role-badge {
    margin-top: 4px;
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

.role-admin {
    background-color: #e0f2fe;
    color: #1d4ed8;
}

.role-user {
    background-color: #f3f4f6;
    color: #374151;
}

.role-default {
    background-color: #fef3c7;
    color: #92400e;
}

/* ============================= */
/* ITEMS MENÚ */
/* ============================= */

.modern-item,
.logout-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
}

    .modern-item:hover {
        background: var(--bs-tertiary-bg);
    }

.logout-modern {
    color: #dc2626;
    font-weight: 600;
}

    .logout-modern:hover {
        background: #fee2e2;
    }

/* ============================= */
/* OVERLAY */
/* ============================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 999998;
}

/* ============================= */
/* ANIMACIÓN */
/* ============================= */

.animate-menu {
    animation: fadeSlideMenu 0.18s ease-out;
}

@keyframes fadeSlideMenu {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

/* ============================= */
/* SIDEBAR */
/* ============================= */

.dxbl-sidebar {
    background: #1f2937 !important;
}

    .dxbl-sidebar .dxbl-nav-link {
        color: #e5e7eb !important;
        border-radius: 6px;
        margin: 4px 8px;
    }

        .dxbl-sidebar .dxbl-nav-link.active {
            background: rgba(255,255,255,0.05) !important;
            border-left: 3px solid #2563eb;
            color: #ffffff !important;
        }

        .dxbl-sidebar .dxbl-nav-link:hover {
            background: rgba(255,255,255,0.08);
        }


/* ============================= */
/* LOGIN (AISLADO DEL LAYOUT) */
/* ============================= */

.login-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.login-card {
    width: 380px;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInLogin 0.35s ease-in-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.login-card .form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .login-card .form-control:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

.btn-login {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-login:hover {
        background: #1e40af;
        transform: translateY(-1px);
    }

@keyframes fadeInLogin {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* ===== LOGOUT PREMIUM ===== 

 ===== LOGOUT COMPACTO ===== */

.logout-container {
    padding: 12px 16px 18px 16px;
    display: flex;
    justify-content: center;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

    .logout-button:hover {
        background-color: #fecaca;
    }

 modo oscuro 
body.dxbl-theme-fluent-dark .logout-button {
    background-color: rgba(239,68,68,0.15);
    color: #f87171;
}

    body.dxbl-theme-fluent-dark .logout-button:hover {
        background-color: rgba(239,68,68,0.25);
    }

 ===== SEPARAR TOGGLE DE LA LÍNEA SUPERIOR ===== 

.user-toggle {
    margin-top: 8px; 
}

/* ===== BOTÓN HAMBURGUESA MÁS GRANDE ===== */

.menu-button .bi {
    font-size: 22px; /* prueba 22px */
}

.menu-button {
    padding: 6px 8px;
}

/* ===== USER MENU SIN TRANSPARENCIA ===== */

.user-menu {
    background-color: #ffffff !important; /* fondo blanco sólido */
    opacity: 1 !important;
    backdrop-filter: none !important;
}

body.dxbl-theme-fluent-dark .user-menu {
    background-color: #1f1f1f !important;
}

/* ===== DIVISOR MENÚ ===== */

.menu-divider {
    height: 2px;
    margin: 10px 16px;
    background-color: rgba(0, 0, 0, 0.08);
}

body.dxbl-theme-fluent-dark .menu-divider {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ===== OCULTAR LIGHT / DARK DEL THEMESWITCHER ===== */

/* Oculta grupo de botones Fluent Light / Fluent Dark */
.theme-panel .theme-mode-buttons {
    display: none !important;
}

    /* Oculta el título que está justo encima */
    .theme-panel .theme-mode-buttons,
    .theme-panel .theme-mode-buttons + .theme-title {
        display: none !important;
    }


/* =====================================================
   IMPRESIÓN ETIQUETAS (RESTAURADO)
===================================================== */

.rfid-page {
    padding-top: 8px;
    background: transparent !important;
}

.rfid-header-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    align-items: center;
    gap: 30px;
    margin-bottom: 24px;
}

.rfid-header-text h2 {
    margin: 0 0 6px 0;
    font-weight: 700;
    font-size: 26px;
}

.rfid-header-text p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.rfid-header-preview {
    width: 220px;
    height: 65px;
    background: var(--bs-body-bg);
    border-radius: 12px;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .rfid-header-preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.rfid-card {
    background: var(--bs-body-bg);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 20px;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 6px 22px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

    .rfid-card:hover {
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    }

.rfid-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.rfid-field {
    display: flex;
    flex-direction: column;
}

    .rfid-field label {
        font-weight: 500;
        margin-bottom: 6px;
    }

.rfid-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.rfid-count {
    font-size: 13px;
    color: #6b7280;
}

.rfid-print {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}


.page-toolbar {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    background-color: #f5f6f8;   /* gris claro tipo grid */
    border-bottom: 1px solid #dcdcdc;
    gap: 20px;
}

.toolbar-left h3 {
    margin: 0;
    font-weight: 600;
}

.toolbar-divider {
    width: 1px;
    height: 32px;
    background-color: #dcdcdc;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Texto compacto */
.header-text h2 {
    margin: 0;
    font-weight: 600;
}

.header-text p {
    margin: 4px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Vista previa */
.header-preview img {
    height: 110px;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Contenedor blanco completo */
.rfid-header-wrapper {
    background-color: var(--dxbl-card-bg);
    padding: 5px 35px 20px 35px;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 6px;
}


/* Texto */
.header-text h2 {
    margin: 0;
    font-weight: 600;
}

.header-text p {
    margin: 6px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Preview */
.header-preview {
    width: 150px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

    .header-preview img {
        max-width: 140px;
        max-height: 80px;
        padding: 4px;
        border-radius: 4px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

.preview-placeholder {
    width: 100%;
    height: 100%;
    background: #fafafa;
    border: 1px dashed #d0d0d0;
    border-radius: 4px;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rfid-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 20px 30px;
    border-radius: 6px;
}

.header-text h2 {
    margin: 0;
    font-weight: 600;
}

.header-text p {
    margin: 4px 0 0 0;
    font-size: 14px;
}

.header-config-preview {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 420px;
}

.header-preview {
    width: 150px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-preview img {
    max-width: 140px;
    max-height: 80px;
}

.preview-placeholder {
    font-size: 12px;
    opacity: 0.6;
}

.header-box {
    padding: 24px 32px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    margin-bottom: 14px;
}

/* Dark mode */
.dark-bg .header-box {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
}

.app-background {
    min-height: calc(100vh - 60px);
}

.light-bg {
    background-color: #f5f6f8;
}

.dark-bg {
    background-color: #1f1f1f;
}

.page-content-container {
    background: transparent;
}





/* TEXTO NORMAL BLANCO */
.menu .dxbl-treeview-item-container {
    color: #ffffff !important;
}

/* HOVER FONDO */
.menu .dxbl-treeview .dxbl-treeview-node.dxbl-state-hover {
    background-color: rgba(255,255,255,0.85) !important;
}

/* Hover directo sobre el <a> */
.menu .dxbl-treeview-item-container:hover {
    color: #000000 !important;
    background-color: rgba(255,255,255,0.85) !important;
}

.menu .dxbl-treeview-item-container {
    transition: background-color 0.2s ease, color 0.2s ease;
}


/*Flecha selector menu en blanco*/
.menu .dxbl-image {
    color: #ffffff !important;
}

/* Iconos negros cuando pasas el ratón por el item */
.menu .dxbl-treeview-item-container:hover .dxbl-image {
    color: #000000 !important;
}


/* =====================================================
   FORMULARIO TRABAJOS RFID
===================================================== */

/* =====================================================
   HEADER CARD
===================================================== */

/*.rfid-header-card {
    background-color: #ffffff;  blanco real en light 
    border: 1px solid var(--dxbl-border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
    margin-bottom: 16px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}*/

.header-box2 {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Dark mode */
.dark-bg .header-box2 {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
}



/* Toolbar sin fondo */
.rfid-header-card .dxbl-toolbar,
.rfid-header-card .dxbl-toolbar-content {
    background: transparent !important;
    border: none !important;
}

/* =====================================================
   CONTENIDO IZQUIERDA
===================================================== */

.toolbar-left-block {
    display: flex;
    align-items: center;
    gap: 18px;
}

.toolbar-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.toolbar-title {
    font-size: 18px;
    font-weight: 600;
}

.status-online-small,
.status-offline-small {
    font-size: 12px;
}

.status-online-small {
    color: #16a34a;
}

.status-offline-small {
    color: #dc2626;
}

/* =====================================================
   TOGGLE
===================================================== */

.estado-demo {
    background-color: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 12px !important;
}

    /* Hover real estilo Fluent */
    .estado-demo.dxbl-btn:hover {
        background-color: var(--dxbl-btn-hover-bg) !important;
    }


/* Icono Refrescar como imagen */
.refresh-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    /* Usamos el SVG como máscara */
    -webkit-mask: url('/images/icons/arrow-sync.svg') no-repeat center;
    mask: url('/images/icons/arrow-sync.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    background-color: currentColor; /* 🔥 clave */
}

/* Hover automático usando sistema DevExpress */
.toolbar-refresh.dxbl-btn:hover {
    background-color: var(--dxbl-btn-hover-bg);
    color: #1f2937;
}

.header-toolbar {
    background-color: transparent !important;
}

/* Dark */
html[data-bs-theme="dark"] .toolbar-refresh {
    color: #e5e7eb; /* gris claro */
}



/* =====================================================
   PANEL DASHBOARD CLIENTE
===================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

    .dashboard-card h4 {
        font-size: 32px;
        margin: 0;
    }

    .dashboard-card p {
        margin: 5px 0 0;
        color: #666;
    }

    /*Color icono Estado grid Clientes*/
.estado-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.estado-activo {
    background: #2ecc71;
}

.estado-inactivo {
    background: #b0b0b0;
}


/* =====================================================
   Colores Grid dispositivos campo Conexión
===================================================== */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-block;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

.status-never {
    background-color: #6c757d;
}



/* POPUP CLIENTES*/
.popup-modern .dxbl-popup-content {
    padding: 30px 34px;
}

.popup-body-modern {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.popup-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .popup-field label {
        font-size: 13px;
        font-weight: 500;
        color: #666;
    }

.popup-input {
    height: 40px;
    font-size: 14px;
}

.popup-field-inline {
    margin-top: 6px;
}

.popup-label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.popup-footer-modern {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
}


/* POPUP USUARIOS */
.popup-form {
    padding: 10px 10px 5px 10px;
}

.form-group-modern {
    margin-bottom: 16px;
}

    .form-group-modern label {
        display: block;
        font-weight: 600;
        font-size: 13px;
        margin-bottom: 6px;
        color: #555;
    }


/* =====================================================
   FOMULARIO IMPRESION ETIQUETAS RFID
===================================================== */
.header-toolbar .dx-toolbar-items-container {
    display: flex;
    align-items: center;
}

.toolbar-left-block {
    display: flex;
    align-items: center;
    height: 100%;
}

.toolbar-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-preview img {
    height: 70px;
    max-width: 140px;
    object-fit: contain;
}


/* Diseño etiqueta */
.header-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .header-preview img {
        height: 70px;
        max-width: 160px;
        object-fit: contain;
        background: white;
        border: 1px solid #dcdcdc;
        border-radius: 6px;
        padding: 6px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

.preview-placeholder {
    height: 70px;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #888;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
}

.header-preview img:hover {
    transform: scale(1.8);
    transition: transform 0.2s ease;
    z-index: 1000;
}

.preview-loading {
    height: 70px;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

/* POPUP SELECCION DE ARTICULOS EN FORMULARIO IMPRESION ETIQUETAS RFID */
.rfid-popup-header {
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .rfid-popup-header span {
        font-size: 13px;
        color: #6c757d;
    }

.popup-body-content {
    padding: 20px 24px 10px 24px;
}

.rfid-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rfid-popup-info {
    font-size: 14px;
    color: #6c757d;
}

.rfid-popup-actions {
    display: flex;
    align-items: center;
}

.dxbl-popup-content {
    border-radius: 10px;
}

.dxbl-modal {
    z-index: 3000 !important;
}

.dx-overlay-wrapper {
    z-index: 3000 !important;
}


/* POPUP ARTICULOS*/
.popup-form {
    display: flex;
    flex-direction: column;
}

.form-main {
    display: flex;
    gap: 30px;
}

.form-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-right {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.image-box {
    width: 160px;
    height: 160px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .image-box img {
        max-width: 100%;
        max-height: 100%;
    }

.form-row {
    display: flex;
    gap: 10px;
}

.form-field {
    flex: 1;
}


.icon-delete {
    color: #dc3545;
}

    .icon-delete:hover {
        color: #b02a37;
    }




/* =====================================================
   FOMULARIO DASHBOARD CLIENTE
===================================================== */
.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }

.card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.dashboard-card.warning h4 {
    color: #f59e0b;
}

.dashboard-card.danger h4 {
    color: #dc2626;
}




/* =====================================================
   FOMULARIO DASHBOARD SUPERADMIN
===================================================== */
.welcome-card-count {
    font-size: 28px;
    font-weight: 600;
    margin-top: 6px;
}

.welcome-card-icon {
    font-size: 64px;
    margin-bottom: 12px;
    color: var(--bs-primary);
}

.welcome-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: 0.2s;
}

    .welcome-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    }