/* ================================
   VARIABLES CORPORATIVAS
   ================================ */
:root {
    --primary: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent: #0ea5e9;
    --success: #059669;
    --success-dark: #047857;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    height: 100%;
    overflow-y: auto;
    background: var(--gray-50);
    color: var(--gray-900);
}

    body.popup-open {
        overflow: hidden;
    }

/* ================================
   CONTENEDORES Y LAYOUTS
   ================================ */
.container-page {
    max-width: 900px;
    margin: auto;
    padding: 0px;
}

.scroll-container {
    max-height: 220px;
    overflow-y: auto;
}

/* TITULOS */
.page-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

/* 
   TABLAS CORPORATIVAS */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: white;
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
}

    table td, table th {
        text-align: center;
    }

thead {
    background: var(--gray-800);
    color: white;
    border-bottom: 2px solid var(--gray-700);
}

th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 15px;
    color: var(--gray-700);
}

tbody tr {
    transition: background-color 0.15s ease;
}

    tbody tr:hover {
        background: var(--gray-50);
        cursor: pointer;
    }

    tbody tr:active {
        background: var(--gray-100);
    }

/* 
   INPUTS CORPORATIVOS*/
.input-standard {
    height: 48px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin: 0;
    font-size: 15px;
    transition: all 0.2s ease;
    background: white;
    color: var(--gray-900);
    font-weight: 400;
}

    .input-standard:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    }

    .input-standard:disabled {
        background: var(--gray-100);
        cursor: not-allowed;
        color: var(--gray-500);
    }

.input-quantity {
    width: 90px !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
}

/* 
   BOTONES CORPORATIVOS */
.button-group-centered {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .button-group-centered button {
        height: 48px;
        min-width: 140px;
        padding: 0 24px;
        font-size: 15px;
        line-height: 1;
        box-sizing: border-box;
        border-radius: var(--radius);
        font-weight: 500;
    }

/* Boton Primary */
.btn-primary-gradient {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-primary-gradient:hover {
        background: var(--primary-dark);
        box-shadow: var(--shadow-md);
    }

    .btn-primary-gradient:active {
        transform: scale(0.98);
    }

/* Boton Cancelar */
.btn-cancel-gradient {
    width: auto;
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-cancel-gradient:hover {
        background: var(--gray-50);
        border-color: var(--gray-400);
    }

    .btn-cancel-gradient:active {
        transform: scale(0.98);
    }

/* Boton Success */
.btn-success-gradient {
    width: auto;
    background: var(--success);
    border: none;
    color: white;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-success-gradient:hover {
        background: var(--success-dark);
        box-shadow: var(--shadow-md);
    }

    .btn-success-gradient:active {
        transform: scale(0.98);
    }

/* Boton Danger */
.btn-danger-gradient {
    background: var(--danger);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 15px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

    .btn-danger-gradient:hover {
        background: var(--danger-dark);
        box-shadow: var(--shadow-md);
    }

/* Botones Small */
.btn-sm-edit {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

    .btn-sm-edit:hover {
        background: var(--primary-dark);
    }

.btn-sm-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

    .btn-sm-danger:hover {
        background: var(--danger-dark);
    }

.btn-sm-cancelar {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: none;
}

    .btn-sm-cancelar:hover {
        background: rgba(220, 53, 69, 0.08); /* rojo suave */
        color: var(--danger-dark);
        border-color: var(--danger-dark);
    }


/* Boton Icon */
.btn-icon-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius);
    margin: 8px 0 8px 8px;
    padding: 0 12px;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

    .btn-icon-danger:hover {
        background: var(--danger-dark);
    }

/* Boton Icon Cancelar */
.btn-icon-cancelar {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
    border-radius: var(--radius);
    margin: 8px 0 8px 8px;
    padding: 0 12px;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: none;
}

    .btn-icon-cancelar:hover {
        background: rgba(220, 53, 69, 0.08);
        color: var(--danger-dark);
        border-color: var(--danger-dark);
    }


/* Boton Action */
.btn-action {
    margin-top: 12px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action:hover {
        background: var(--primary-dark);
        box-shadow: var(--shadow-md);
    }

    .btn-action:active {
        transform: scale(0.98);
    }

    .btn-action:disabled {
        background: var(--gray-300);
        cursor: not-allowed;
        color: var(--gray-500);
        box-shadow: none;
    }

/* Boton Action Outline */
.btn-action-outline {
    margin-top: 12px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action-outline:hover {
        background: rgba(13, 110, 253, 0.08); /* azul suave */
        border-color: var(--primary-dark);
        color: var(--primary-dark);
    }

    .btn-action-outline:active {
        transform: scale(0.98);
    }

    .btn-action-outline:disabled {
        border-color: var(--gray-300);
        color: var(--gray-500);
        cursor: not-allowed;
        background: transparent;
        box-shadow: none;
    }

/* ================================
   GRUPOS DE ACCIONES
   ================================ */
.action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px 0;
}

/* ================================
   CARDS Y POPUPS CORPORATIVOS
   ================================ */
.card-content {
    margin-top: 20px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.card-header {
    margin-bottom: 0.5em;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

    .card-header h3 {
        margin: 0;
        color: var(--gray-900);
        font-size: 20px;
        font-weight: 600;
        letter-spacing: -0.025em;
    }

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.popup-overlay-high {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

.popup-content {
    background: white;
    width: 95%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    position: relative;
    animation: slideUp 0.25s ease;
}

.btn-close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 20px;
    font-weight: 400;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

    .btn-close-popup:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }

.btn-close-form {
    position: absolute;
    right: 24px;
    font-size: 20px;
    font-weight: 400;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

    .btn-close-form:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }

/* ================================
   BUSCADORES Y DROPDOWNS
   ================================ */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.4em;
}

.dropdown-menu {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
    margin-top: 4px;
}

.dropdown-item {
    padding: 10px 12px;
    border: none;
    background: white;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.8em;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background: var(--gray-50);
    }

    .dropdown-item:active {
        background: var(--gray-100);
    }

    .dropdown-item .fw-bold {
        color: var(--primary);
        font-weight: 600;
    }

/* ================================
   LISTAS CORPORATIVAS
   ================================ */
.list-scroll {
    max-height: 220px;
    overflow-y: auto;
    margin-top: 16px;
    padding: 0;
    list-style: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    transition: background 0.15s ease;
}

    .list-item:hover {
        background: var(--gray-50);
    }

    .list-item:last-child {
        border-bottom: none;
    }

    .list-item b {
        color: var(--primary);
        font-weight: 600;
    }

/* ================================
   MENSAJES Y ALERTAS
   ================================ */
.alert-error {
    background: #fef2f2;
    border: 1px solid var(--danger);
    color: #7f1d1d;
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 12px;
    text-align: center;
    font-weight: 400;
}

    .alert-error h4, .alert-error h5 {
        margin: 0;
        font-weight: 500;
        color: var(--gray-900);
    }

/* ================================
   MENÚ CORPORATIVO
   ================================ */
.menu-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.menu-header {
    text-align: center;
    margin-bottom: 48px;
}

.menu-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.menu-subtitle {
    font-size: 15px;
    color: var(--gray-600);
    font-weight: 400;
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.btn-menu {
    width: 100%;
    padding: 20px 24px;
    font-size: 17px;
    font-weight: 500;
    text-align: left;
    background: white;
    color: var(--gray-900);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    position: relative;
}

    .btn-menu.active {
        background: white;
        color: var(--gray-900);
        border: 1px solid var(--gray-300);
    }

    .btn-menu::after {
        content: '\203A';
        font-size: 24px;
        color: var(--gray-400);
        font-weight: 300;
        transition: all 0.2s ease;
    }

    .btn-menu:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
        transform: translateX(4px);
    }

        .btn-menu:hover::after {
            color: var(--primary);
            transform: translateX(4px);
        }

    .btn-menu:active {
        transform: translateX(2px);
    }

.btn-menu-cerrar {
    background: white;
    color: var(--danger);
    border-color: var(--danger);
    margin-top: 16px;
}

    .btn-menu-cerrar.active {
        background: white;
        color: var(--danger);
        border-color: var(--danger);
    }

    .btn-menu-cerrar:hover {
        background: var(--danger);
        color: white;
        border-color: var(--danger);
    }

        .btn-menu-cerrar:hover::after {
            color: white;
        }

/* ================================
   SELECCIONADOR DE PEDIDOS
   ================================ */
.popup-pedidos {
    position: fixed;
    max-height: 30em;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 95%;
    max-width: 50em;
}

.popup-pedidos-card {
    background: white;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

.popup-pedidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-800);
    color: white;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 1px solid var(--gray-700);
}

    .popup-pedidos-header .btn-close-popup {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        font-size: 20px;
        width: 32px;
        height: 32px;
    }

        .popup-pedidos-header .btn-close-popup:hover {
            background: rgba(255, 255, 255, 0.2);
        }

.popup-pedidos-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.pedidos-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pedido-card {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 16px 18px;
    padding-right: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .pedido-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
    }

    .pedido-card:active {
        transform: scale(0.99);
    }

    .pedido-card.selected {
        border-color: var(--primary);
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    }

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.pedido-numero {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}

.pedido-estado {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pedido-card.selected .pedido-estado {
    background: var(--primary);
    color: white;
}

.pedido-distribuidor {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
}

    .pedido-distribuidor strong {
        color: var(--gray-900);
        font-weight: 600;
    }

.pedido-checkbox {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.empty-message {
    text-align: center;
    color: var(--gray-400);
    padding: 48px 20px;
    font-size: 15px;
}

.popup-pedidos-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.btn-add-pedidos {
    width: 100%;
    padding: 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

    .btn-add-pedidos:hover {
        background: var(--success-dark);
        box-shadow: var(--shadow-md);
    }

    .btn-add-pedidos:active {
        transform: scale(0.98);
    }

    .btn-add-pedidos:disabled {
        background: var(--gray-300);
        cursor: not-allowed;
        color: var(--gray-500);
        box-shadow: none;
    }

/* ================================
   ANIMACIONES
   ================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   SCROLLBAR CORPORATIVO
   ================================ */
.list-scroll::-webkit-scrollbar,
.scroll-container::-webkit-scrollbar,
.popup-pedidos-body::-webkit-scrollbar {
    width: 8px;
}

.list-scroll::-webkit-scrollbar-track,
.scroll-container::-webkit-scrollbar-track,
.popup-pedidos-body::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.list-scroll::-webkit-scrollbar-thumb,
.scroll-container::-webkit-scrollbar-thumb,
.popup-pedidos-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

    .list-scroll::-webkit-scrollbar-thumb:hover,
    .scroll-container::-webkit-scrollbar-thumb:hover,
    .popup-pedidos-body::-webkit-scrollbar-thumb:hover {
        background: var(--gray-500);
    }

/* ================================
   MODAL DE CONFIRMACIÓN CORPORATIVO
   ================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    pointer-events: auto;
}
.modal-overlay {
    pointer-events: auto;
}

.modal-dialog {
    pointer-events: auto;
}

.modal-dialog {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 420px;
    width: 100%;
    padding: 32px;
    animation: slideUp 0.25s ease;
    border: 1px solid var(--gray-200);
}

.modal-icon-warning {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 50%;
    color: #d97706;
}

.modal-content-wrapper {
    text-align: center;
    margin-bottom: 32px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 12px 0;
    letter-spacing: -0.025em;
}

.modal-message {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
}

.btn-modal-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

    .btn-modal-secondary:hover {
        background: var(--gray-50);
        border-color: var(--gray-400);
    }

.btn-modal-primary {
    background: var(--gray-900);
    color: white;
    box-shadow: var(--shadow);
}

    .btn-modal-primary:hover {
        background: var(--gray-800);
        box-shadow: var(--shadow-md);
    }

.btn-modal:active {
    transform: scale(0.98);
}

.button-group-inline {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

    .button-group-inline button {
        min-width: 120px; /* que no se hagan demasiado estrechos */
        padding: 12px 14px; /* altura y anchura correctas */
        border-radius: var(--radius);
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

@media (max-width: 480px) {
    .modal-dialog {
        padding: 24px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-modal {
        width: 100%;
    }
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    th, td {
        padding: 12px 10px;
        font-size: 14px;
    }

    .action-group {
        display: flex;
        flex-direction: row; /* mantener input y botón en la misma fila */
        align-items: center; /* centrar verticalmente */
        gap: 8px; /* separación */
        width: 100%;
    }
        .action-group .input-quantity {
            width: 70px; /* o el % que quieras */
            height: 48px; /* igual altura que el botón */
            padding: 0 12px; /* solo padding horizontal */
            box-sizing: border-box;
            font-size: 16px;
            text-align: center;
        }

    .input-quantity {
        width: 90% !important;
        font-size: 16px;
    }

    .btn-action {
        width: 100% !important;
        font-size: 15px !important;
        height: 48px;
    }

    .btn-success-gradient,
    .btn-cancel-gradient,
    .btn-danger-gradient {
        width: 100% !important;
        font-size: 15px !important;
    }

    .button-group-inline {
        flex-direction: row;
    }

        .button-group-inline button {
            width: auto; 
            padding: 12px 16px;
            font-size: 14px; /* ligeramente más pequeño para móvil */
        }

    .button-group-centered {
        flex-direction: column;
        gap: 10px;
    }

        .button-group-centered button {
            width: 100%;
        }

    .popup-pedidos {
        top: 10%;
        transform: translate(-50%, 0);
        max-height: 85vh;
    }

    .menu-container {
        padding: 24px 16px;
    }

    .menu-header {
        margin-bottom: 32px;
    }

    .menu-title {
        font-size: 24px;
    }
}

/* ================================
   POPUP PEDIDOS FALTANTES
   ================================ */
@media (max-width: 768px) {
    .popup-pedidos-modal {
        top: 10% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95vw !important;
        height: auto !important;
        max-height: 90vh;
        padding: 0.5rem;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .popup-pedidos-card {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh;
        border-radius: var(--radius);
        overflow: hidden;
        font-size: 0.85rem;
    }

    .popup-pedidos-body {
        max-height: 60vh;
        overflow-y: auto;
        font-size: 0.8rem;
    }

        .popup-pedidos-body table {

            font-size: 0.75rem !important;
            min-width: 8rem !important;
            border-collapse: collapse !important;
            margin: 0.3rem 0 !important;
        }

        .popup-pedidos-body .table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .popup-pedidos-body th,
        .popup-pedidos-body td {
            padding: 0.3rem 0.6rem !important;
            line-height: 1 !important;
            white-space: nowrap !important;
        }

    .popup-pedidos-footer {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }

        .popup-pedidos-footer button {
            flex: 1; 
            padding: 8px 10px; 
            font-size: 13px; 
            height: 3.4em; 
            line-height: 1.1;
            min-width: 0; 
        }
}


/*--------------------------LOGIN--------------------------*/
/* Centrar */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Card del login */
.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

/* Animacion pro de 2000€*/
.animate-fadein {
    animation: fadeIn 0.5s ease;
}

/* Boton  */
.btn-gradient {
    background: var(--primary);
    color: white;
    font-weight: 500;
    border-radius: var(--radius);
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

    .btn-gradient:hover {
        background: var(--primary-dark);
        box-shadow: var(--shadow-md);
    }

/* Inputs centrados */
.login-card .form-control {
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--gray-300);
}

/* Alerts */
.login-card .alert {
    border-radius: var(--radius);
    padding: 12px;
    font-size: 14px;
}


/* -----------------------SELECCIONADOR DE TABLAS---------------------------*/
.row-selected {
    background: #dbeafe !important;
    border-left: 3px solid var(--primary);
}

    .row-selected:hover {
        background: #bfdbfe !important;
    }