/* Estilos reutilizados de inventario.html y partials/sidebar.html del restaurante. */

        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f7f6; margin: 0; display: flex; height: 100vh; overflow: hidden; }
        
        /* SIDEBAR UNIFICADO */
        .sidebar { background-color: #1a1f33; color: #8e95a5; width: 260px; display: flex; flex-direction: column; overflow-y: auto; z-index: 100; }
        .brand { color: white; font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; gap: 12px; padding: 25px; border-bottom: 1px solid #252b45; margin-bottom: 15px; }
        .section-title { font-size: 0.65rem; font-weight: bold; color: #5c617a; text-transform: uppercase; letter-spacing: 1px; margin: 15px 0 5px 25px; }
        .nav-link-custom { display: flex; align-items: center; gap: 15px; padding: 12px 25px; color: #8e95a5; text-decoration: none; font-size: 0.9rem; transition: 0.2s; border-radius: 8px; margin: 0 15px 5px 15px; }
        .nav-link-custom.active { background-color: #5d5fef; color: white; }
        .nav-link-custom:hover:not(.active) { color: white; background-color: #252b45; }
        .nav-link-custom i { width: 20px; text-align: center; font-size: 1.1rem; }

        /* CONTENIDO PRINCIPAL */
        .main-wrapper { flex: 1; display: flex; flex-direction: column; background-color: #f4f7f6; overflow: hidden; }
        
        /* Barra Superior */
        .top-header-container { padding: 20px 30px 0 30px; }
        .top-header { background: white; padding: 15px 25px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
        .header-title { font-weight: 600; font-size: 1.1rem; color: #2c3142; margin: 0; }
        
        /* Perfil de Usuario */
        .admin-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; color: inherit; }
        .admin-text { text-align: right; line-height: 1.2; }
        .admin-name { font-weight: 700; font-size: 0.85rem; color: #111827; margin: 0; }
        .admin-role { font-size: 0.75rem; color: #8e95a5; margin: 0; }
        .admin-avatar { width: 38px; height: 38px; background-color: #f472b6; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1rem; }
        .profile-chevron { color: #6b7280; font-size: 0.8rem; margin-left: 2px; }

        /* Cuerpo del contenido */
        .content-body { padding: 30px; flex: 1; overflow-y: auto; }
        
        /* Títulos de Página */
        .page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
        .page-title h2 { font-weight: 700; color: #2c3142; margin-bottom: 5px; font-size: 1.8rem; display: flex; align-items: center; gap: 10px; }
        .page-title p { color: #8e95a5; font-size: 0.9rem; margin: 0; }
        
        /* Botones superiores */
        .header-actions { display: flex; gap: 12px; align-items: center; }
        .btn-kardex { background-color: #2c3142; color: white; border-radius: 20px; padding: 8px 20px; border: none; font-weight: 600; font-size: 0.9rem; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
        .btn-kardex:hover { background-color: #1a1f33; color: white; }
        .btn-nuevo { background-color: #5d5fef; color: white; border-radius: 20px; padding: 8px 20px; border: none; font-weight: 600; font-size: 0.9rem; box-shadow: 0 4px 10px rgba(93, 95, 239, 0.2); transition: 0.2s; display: flex; align-items: center; gap: 8px; }
        .btn-nuevo:hover { background-color: #4b4cbf; color: white; }

        /* Contenedor de Tabla y Tabla */
        .table-container { background: white; border-radius: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
        .table { margin-bottom: 0; }
        .table thead th { border-bottom: 2px solid #f3f4f6; color: #6b7280; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 15px; border-top: none; }
        .table tbody td { vertical-align: middle; padding: 15px 10px; color: #111827; font-size: 0.9rem; font-weight: 500; border-bottom: 1px solid #f3f4f6; }
        
        /* Estilos específicos de la tabla de Inventario */
        .img-producto { width: 45px; height: 45px; border-radius: 8px; object-fit: cover; border: 1px solid #e3e6f0; }
        .badge-categoria { background-color: #f3f4f6; color: #4b5563; font-size: 0.7rem; font-weight: 700; padding: 5px 10px; border-radius: 6px; border: 1px solid #e5e7eb; }
        .precio-azul { color: #5d5fef; font-weight: 700; font-size: 0.95rem; }
        .stock-box { border: 1px solid #10b981; color: #10b981; font-weight: 600; border-radius: 6px; padding: 3px 8px; font-size: 0.85rem; display: inline-block; }
        .estado-activo { color: #10b981; font-weight: 700; font-size: 0.75rem; }
        
        .btn-accion { color: #8e95a5; background: none; border: none; font-size: 1.1rem; cursor: pointer; transition: 0.2s; padding: 0 6px; }
        .btn-accion:hover { color: #5d5fef; }
        .btn-accion.edit:hover { color: #3b82f6; }
        .btn-accion.delete:hover { color: #ef4444; }

        /* Alertas */
        .alerta-exito { background-color: #ffffff; border-left: 4px solid #10b981; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; align-items: center; padding: 12px 20px; margin-bottom: 20px; }
        .alerta-icono { color: #10b981; font-size: 1.2rem; margin-right: 12px; }
        .alerta-texto { color: #2c3142; font-size: 0.9rem; margin: 0; flex-grow: 1; }
        .alerta-cerrar { background: none; border: none; color: #8e95a5; cursor: pointer; }

        /* Switch personalizado POS */
        .switch-pos { background-color: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; padding: 15px; display: flex; align-items: flex-start; gap: 15px; }
        .extras-box { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; }
        .extra-row { display: grid; grid-template-columns: 1fr 150px 38px; gap: 10px; align-items: center; margin-bottom: 8px; }
        .extra-row:last-child { margin-bottom: 0; }
        .btn-extra-add { border: 1px dashed #5d5fef; color: #5d5fef; background: #f3f4ff; border-radius: 8px; padding: 8px 12px; font-weight: 800; font-size: 0.85rem; }
        .btn-extra-remove { width: 38px; height: 38px; border: 0; border-radius: 8px; color: #ef4444; background: #fee2e2; display: inline-flex; align-items: center; justify-content: center; }
    

    :root {
        --sidebar-desktop-width: clamp(218px, 13.5vw, 260px);
        --app-bg: #f4f7f6;
        --panel-bg: #ffffff;
        --panel-border: #e2e8f0;
        --panel-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
        --text-main: #1e293b;
        --text-soft: #64748b;
        --brand-primary: #5d5fef;
        --brand-primary-dark: #4b4dd0;
    }

    body {
        background-color: var(--app-bg) !important;
    }

    .sidebar {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
    }

    .sidebar-menu {
        flex: 1 1 auto;
        min-height: 0;
        padding-bottom: 14px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .brand.brand-with-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        padding: 20px 18px;
        min-height: 108px;
        margin-bottom: 15px;
        border-bottom: 1px solid #252b45;
    }

    .main-wrapper {
        background-color: var(--app-bg) !important;
    }

    .top-header-container {
        padding: 20px 30px 0 30px !important;
        flex: 0 0 auto;
    }

    .top-header {
        min-height: 68px !important;
        background: var(--panel-bg) !important;
        border: 1px solid var(--panel-border) !important;
        border-radius: 12px !important;
        padding: 14px 24px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-shadow: var(--panel-shadow) !important;
    }

    .header-title {
        margin: 0 !important;
        color: var(--text-main) !important;
        font-size: 1.08rem !important;
        font-weight: 800 !important;
        letter-spacing: 0 !important;
        line-height: 1.15 !important;
    }

    .admin-profile {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        text-decoration: none !important;
        color: inherit !important;
        min-width: 245px !important;
        justify-content: flex-end !important;
    }

    .admin-text {
        text-align: right !important;
        line-height: 1.08 !important;
        min-width: 126px !important;
    }

    .admin-name {
        color: #0f172a !important;
        font-weight: 900 !important;
        font-size: 0.82rem !important;
        margin: 0 !important;
    }

    .admin-role {
        color: var(--text-soft) !important;
        font-weight: 500 !important;
        font-size: 0.76rem !important;
        margin: 4px 0 0 0 !important;
    }

    .admin-avatar {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        background-color: #f472b6 !important;
        color: #ffffff !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
    }

    .admin-profile .fa-chevron-down,
    .admin-profile .fa-angle-down,
    .profile-chevron {
        color: #334155 !important;
        font-size: 0.82rem !important;
        margin-left: 4px !important;
        flex-shrink: 0 !important;
    }

    .content-body {
        padding: 30px !important;
    }

    .page-header,
    .page-head {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        gap: 18px !important;
        margin-bottom: 22px !important;
    }

    .page-title h2,
    .content-body > .d-flex h2 {
        color: var(--text-main) !important;
        font-size: clamp(1.48rem, 1.35vw, 1.8rem) !important;
        font-weight: 850 !important;
        line-height: 1.18 !important;
        margin: 0 0 6px 0 !important;
        letter-spacing: 0 !important;
    }

    .page-title p,
    .content-body > .d-flex p {
        color: var(--text-soft) !important;
        font-size: 0.92rem !important;
        font-weight: 500 !important;
        margin: 0 !important;
    }

    .table-container,
    .section-card,
    .report-card,
    .reserva-card {
        background: var(--panel-bg) !important;
        border: 1px solid var(--panel-border) !important;
        border-radius: 14px !important;
        box-shadow: var(--panel-shadow) !important;
    }

    .table-container {
        padding: 20px !important;
    }

    .table thead th,
    .table-custom th,
    .table-container th {
        color: #10233f !important;
        font-size: 0.78rem !important;
        font-weight: 850 !important;
        text-transform: uppercase !important;
        letter-spacing: 0 !important;
    }

    .table tbody td,
    .table-custom td,
    .table-container td {
        color: #1f2937 !important;
        font-size: 0.9rem !important;
    }

    .btn-nuevo {
        background-color: var(--brand-primary) !important;
        color: #ffffff !important;
        border: 0 !important;
        border-radius: 10px !important;
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
        font-weight: 750 !important;
        box-shadow: 0 6px 14px rgba(93, 95, 239, 0.22) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .btn-nuevo:hover {
        background-color: var(--brand-primary-dark) !important;
        color: #ffffff !important;
        transform: translateY(-1px);
    }

    .metric-card,
    .kpi-card {
        border-radius: 14px !important;
        box-shadow: var(--panel-shadow) !important;
    }

    .brand-logo-main {
        display: block;
        width: clamp(138px, 68%, 178px);
        max-width: 88%;
        max-height: 78px;
        height: auto;
        object-fit: contain;
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
    }

    @media (min-width: 1025px) {
        .sidebar {
            width: var(--sidebar-desktop-width) !important;
            min-width: var(--sidebar-desktop-width) !important;
            max-width: var(--sidebar-desktop-width) !important;
            flex: 0 0 var(--sidebar-desktop-width) !important;
            height: 100vh !important;
            overflow: hidden !important;
        }

        .brand.brand-with-logo {
            height: clamp(96px, 9.5vh, 128px) !important;
            min-height: clamp(96px, 9.5vh, 128px) !important;
            padding: clamp(14px, 1.4vw, 24px) clamp(12px, 1.2vw, 18px) !important;
            margin-bottom: clamp(8px, 1vh, 14px) !important;
        }

        .brand-logo-main {
            width: clamp(132px, 70%, 180px) !important;
            max-height: clamp(58px, 7vh, 82px) !important;
        }

        .nav-link-custom {
            margin: 0 clamp(10px, 1vw, 15px) 5px clamp(10px, 1vw, 15px) !important;
            padding: clamp(9px, 1vh, 12px) clamp(15px, 1.35vw, 25px) !important;
            gap: clamp(10px, 0.9vw, 15px) !important;
            font-size: clamp(0.8rem, 0.78vw, 0.9rem) !important;
        }

        .section-title {
            margin: clamp(10px, 1.2vh, 15px) 0 5px clamp(18px, 1.5vw, 25px) !important;
        }

        .top-header-container {
            padding: 16px 22px 0 22px !important;
        }

        .content-body {
            padding: 22px !important;
        }

        .page-title h2 {
            font-size: 1.55rem !important;
        }

        .table-container {
            padding: 18px !important;
        }
    }

    @media (min-width: 1025px) and (max-width: 1366px) {
        :root {
            --sidebar-desktop-width: 216px;
        }

        .brand.brand-with-logo {
            height: 92px !important;
            min-height: 92px !important;
            padding: 12px 10px !important;
        }

        .brand-logo-main {
            width: 128px !important;
            max-height: 56px !important;
        }

        .nav-link-custom {
            padding: 9px 13px !important;
            font-size: 0.78rem !important;
        }
    }

    @media (min-width: 1025px) and (max-height: 760px) {
        .brand.brand-with-logo {
            height: 84px !important;
            min-height: 84px !important;
            padding: 10px !important;
            margin-bottom: 6px !important;
        }

        .brand-logo-main {
            width: 122px !important;
            max-height: 52px !important;
        }

        .nav-link-custom {
            padding-top: 8px !important;
            padding-bottom: 8px !important;
            margin-bottom: 3px !important;
        }

        .section-title {
            margin-top: 8px !important;
        }
    }

    @media (max-width: 1024px) {
        .top-header-container,
        .content-body {
            padding: 14px !important;
        }

        .top-header {
            min-height: 60px !important;
            padding: 12px 14px !important;
        }

        .header-title {
            font-size: 1rem !important;
        }

        .page-header,
        .page-head {
            flex-direction: column !important;
            align-items: stretch !important;
        }

        .page-title h2,
        .content-body > .d-flex h2 {
            font-size: 1.35rem !important;
        }

        .table-container {
            overflow-x: auto !important;
        }
    }
