/* ===================================
   VARIABLES Y RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-blue: #3b82f6;
    --accent-dark: #2563eb;
    --text-gray: #4b5563;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e2e8f0;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    --contenedor-enviado: #10b981;
    --contenedor-enviado-light: #d1fae5;
    --contenedor-devuelto: #dc2626;
    --contenedor-devuelto-light: #fee2e2;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-gray);
    padding-bottom: 80px;
}

/* ===================================
   HEADER
   =================================== */
.header {
    background: var(--bg-white);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn {
    background: none;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:active {
    background: var(--primary-blue);
    color: white;
}

/* ===================================
   MAIN CONTENT
   =================================== */
.main-content {
    padding: 1rem;
}

.welcome-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.welcome-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===================================
   ACTION CARDS
   =================================== */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:active {
    transform: scale(0.95);
    border-color: var(--primary-blue);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.action-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.action-subtitle {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Color variants */
.action-card.peticiones { color: var(--primary-blue); }
.action-card.reparto { color: var(--success-green); }
.action-card.repostaje { color: var(--warning-orange); }
.action-card.fabricacion { color: #8b5cf6; }
.action-card.objetivos { color: #f59e0b; }
.action-card.fichaje { color: #e11d48; }
.action-card.gps { color: #06b6d4; }
.action-card.reparto-general { color: #6366f1; }

/* ===================================
   WORK SECTION
   =================================== */
.work-section {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.section-header {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.work-list {
    max-height: 400px;
    overflow-y: auto;
}

.work-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.work-item:last-child {
    border-bottom: none;
}

.work-item:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ===================================
   MODALS
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===================================
   BOTTOM NAVIGATION
   =================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 1rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
}

.nav-item {
    text-decoration: none;
    color: var(--text-gray);
    text-align: center;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--primary-blue);
}

.nav-item i {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* ===================================
   FICHAJE
   =================================== */
.btn-fichaje {
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 120px;
    justify-content: center;
}

.btn-fichaje.entrada {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-fichaje.entrada:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

.btn-fichaje.salida {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-fichaje.salida:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
}
/* ========================================
   GESTIÓN DE CONTENEDORES - PERSONAL TRABAJADOR
   Versión mejorada con estilo premium
   ======================================== */

/* Variables de colores */
:root {
    --primary-blue: #3b82f6;
    --accent-dark: #2563eb;
    --success-green: #10b981;
    --danger-red: #dc2626;
    --text-light: #1f2937;
    --text-gray: #6b7280;
    --border-light: #e5e7eb;
    --contenedor-enviado: #10b981;
    --contenedor-enviado-light: #d1fae5;
    --contenedor-devuelto: #dc2626;
    --contenedor-devuelto-light: #fee2e2;
}

/* ========================================
   MODAL OVERLAY Y ESTRUCTURA
   ======================================== */

#modalContenedores {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 0;
    animation: fadeIn 0.2s ease-out;
}

#modalContenedores[style*="display: flex"] {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estructura base del modal */
#modalContenedores .modal-content {
    background: white;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================
   HEADER
   ======================================== */

#modalContenedores .modal-header {
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-dark));
    color: white;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
    z-index: 10;
}

#modalContenedores .modal-header h3 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

#modalContenedores .close-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.375rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

#modalContenedores .close-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

/* ========================================
   BODY
   ======================================== */

#modalContenedores .modal-body {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background: #f9fafb;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

#modalContenedores .modal-body::-webkit-scrollbar {
    width: 6px;
}

#modalContenedores .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#modalContenedores .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-dark));
    border-radius: 10px;
}

/* ========================================
   INFO DEL PEDIDO
   ======================================== */

.pedido-info-header {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pedido-info-header > div:first-child {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
}

.pedido-info-header > div:last-child {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 600;
    background: #f0f9ff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    width: fit-content;
}

/* ========================================
   TABS
   ======================================== */

.tabs-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tabs-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f8fafc;
    padding: 0.5rem;
}

.tab-btn {
    padding: 0.875rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.tab-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-btn.active i {
    transform: scale(1.05);
}

.tab-btn[data-tab="enviados"].active {
    background: linear-gradient(135deg, var(--success-green), #059669);
}

.tab-btn[data-tab="devueltos"].active {
    background: linear-gradient(135deg, var(--danger-red), #b91c1c);
}

.tab-content {
    display: none;
    padding: 1rem;
    animation: fadeInContent 0.3s ease-out;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   LISTA DE CONTENEDORES
   ======================================== */

#listaContenedoresEnviados,
#listaContenedoresDevueltos {
    margin-bottom: 1rem;
    min-height: 0;
}

.contenedor-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #9ca3af;
    background: white;
    border-radius: 12px;
    border: 2px dashed var(--border-light);
}

.contenedor-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.3;
    display: block;
}

.contenedor-empty p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================
   CONTENEDOR CARD
   ======================================== */

.contenedor-item-wrapper {
    margin-bottom: 0.75rem;
    animation: slideInCard 0.3s ease-out;
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contenedor-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    border-radius: 12px;
    background: white;
    border-left: 4px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    gap: 0.75rem;
}

.contenedor-card.enviado {
    border-left-color: var(--contenedor-enviado);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.03) 0%, white 100%);
}

.contenedor-card.devuelto {
    border-left-color: var(--contenedor-devuelto);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.03) 0%, white 100%);
}

.contenedor-card:active {
    transform: scale(0.98);
}

.contenedor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.contenedor-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contenedor-card.enviado .contenedor-icon {
    background: linear-gradient(135deg, var(--contenedor-enviado-light), #a7f3d0);
    color: var(--contenedor-enviado);
}

.contenedor-card.devuelto .contenedor-icon {
    background: linear-gradient(135deg, var(--contenedor-devuelto-light), #fecaca);
    color: var(--contenedor-devuelto);
}

.contenedor-details {
    flex: 1;
    min-width: 0;
}

.contenedor-numero {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.125rem;
    letter-spacing: -0.025em;
}

.contenedor-tipo {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contenedor-producto {
    font-size: 0.8125rem;
    color: var(--primary-blue);
    margin-top: 0.25rem;
    font-weight: 500;
}

.btn-eliminar-contenedor {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: var(--danger-red);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.btn-eliminar-contenedor:active {
    transform: scale(0.92);
}

/* ========================================
   PANEL DE ENTRADA
   ======================================== */

.entrada-panel {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.entrada-botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-metodo {
    padding: 0.875rem;
    border: 2px solid var(--border-light);
    background: linear-gradient(135deg, #fafbfc, #ffffff);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: var(--text-gray);
    min-height: 80px;
    font-size: 0.875rem;
}

.btn-metodo:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.btn-metodo i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.btn-metodo span {
    font-size: 0.875rem;
}

/* ========================================
   ENTRADA MANUAL
   ======================================== */

.entrada-manual-form {
    display: none;
    padding-top: 0.875rem;
    animation: fadeInContent 0.3s ease-out;
}

.entrada-inputs-simple {
    display: flex;
    gap: 0;
    margin-bottom: 0.875rem;
}

.entrada-inputs-simple input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.entrada-inputs-simple input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.entrada-inputs-simple input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.btn-agregar {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.btn-agregar.enviado {
    background: linear-gradient(135deg, var(--success-green), #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-agregar.enviado:active {
    transform: scale(0.97);
}

.btn-agregar.devuelto {
    background: linear-gradient(135deg, var(--danger-red), #b91c1c);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-agregar.devuelto:active {
    transform: scale(0.97);
}

/* ========================================
   QR READER
   ======================================== */

.qr-reader-container {
    display: none;
}

.qr-reader-container.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: #000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.qr-camera-wrapper {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#qrReaderCameraEnviados,
#qrReaderCameraDevueltos {
    width: 100%;
    border-radius: 12px;
}

.btn-cerrar-qr-fullscreen {
    position: fixed !important;
    top: 1.5rem;
    right: 1.5rem;
    width: 54px;
    height: 54px;
    background: rgba(239, 68, 68, 0.95) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    font-size: 1.75rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 100001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-cerrar-qr-fullscreen:active {
    transform: scale(0.92) rotate(90deg) !important;
}

.qr-instructions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    text-align: center;
    z-index: 100000;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(16, 185, 129, 0.3);
    animation: slideUpInstructions 0.5s ease-out;
}

@keyframes slideUpInstructions {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.qr-instructions i {
    font-size: 1.75rem;
    color: var(--success-green);
    display: block;
    margin-bottom: 0.625rem;
}

.instruction-text {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.instruction-subtext {
    font-size: 0.8125rem;
    opacity: 0.9;
    color: var(--success-green);
}

/* ========================================
   FOOTER - SIEMPRE VISIBLE
   ======================================== */

#modalContenedores .modal-footer {
    flex: 0 0 auto;
    padding: 0.875rem 1rem;
    padding-bottom: max(0.875rem, env(safe-area-inset-bottom));
    background: white;
    border-top: 2px solid var(--border-light);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.modal-footer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.btn-cancelar,
.btn-guardar {
    padding: 0.9375rem 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 50px;
    white-space: nowrap;
}

.btn-cancelar {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid var(--border-light);
}

.btn-cancelar:active {
    background: #e5e7eb;
    transform: scale(0.97);
}

.btn-guardar {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-guardar:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

/* Iconos más pequeños en móvil */
.btn-cancelar i,
.btn-guardar i {
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE - TABLETS (768px+)
   ======================================== */

@media (min-width: 768px) {
    #modalContenedores {
        padding: 1.5rem;
    }

    #modalContenedores .modal-content {
        width: 90%;
        max-width: 700px;
        height: auto;
        max-height: 90vh;
        border-radius: 20px;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
        animation: slideUp 0.3s ease-out;
    }

    #modalContenedores .modal-header {
        padding: 1.5rem;
        border-radius: 20px 20px 0 0;
    }

    #modalContenedores .modal-header h3 {
        font-size: 1.25rem;
    }

    #modalContenedores .close-btn {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    #modalContenedores .close-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: rotate(90deg) scale(1.05);
    }

    #modalContenedores .modal-body {
        padding: 1.5rem;
    }

    .pedido-info-header {
        padding: 1.25rem;
        flex-direction: row;
    }

    .tabs-header {
        padding: 0.625rem;
    }

    .tab-btn {
        padding: 1rem;
        font-size: 0.9375rem;
    }

    .tab-content {
        padding: 1.5rem;
    }

    .btn-metodo {
        min-height: 100px;
        padding: 1.25rem;
    }

    .btn-metodo:hover {
        border-color: var(--primary-blue);
        background: linear-gradient(135deg, #eff6ff, #dbeafe);
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    }

    .btn-metodo i {
        font-size: 2rem;
    }

    .btn-metodo:hover i {
        transform: scale(1.1) rotate(-5deg);
    }

    .contenedor-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateX(4px);
    }

    .contenedor-card:hover .contenedor-icon {
        transform: rotate(-5deg) scale(1.05);
    }

    .btn-eliminar-contenedor:hover {
        background: linear-gradient(135deg, #fecaca, #fca5a5);
        transform: scale(1.05) rotate(-5deg);
    }

    .btn-agregar.enviado:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }

    .btn-agregar.devuelto:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    }

    #modalContenedores .modal-footer {
        padding: 1.25rem 1.5rem;
        border-radius: 0 0 20px 20px;
    }

    .modal-footer-buttons {
        justify-content: flex-end;
        grid-template-columns: auto auto;
        gap: 1rem;
    }

    .btn-cancelar,
    .btn-guardar {
        min-width: 150px;
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }

    .btn-cancelar:hover {
        background: #e5e7eb;
        transform: translateY(-1px);
    }

    .btn-guardar:hover {
        background: linear-gradient(135deg, var(--accent-dark), #1d4ed8);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

    .btn-cerrar-qr-fullscreen {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        top: 2rem;
        right: 2rem;
    }

    .btn-cerrar-qr-fullscreen:hover {
        background: rgba(220, 38, 38, 0.95) !important;
        transform: scale(1.1) rotate(90deg) !important;
    }

    .qr-instructions {
        bottom: 3rem;
        padding: 1.5rem 2rem;
    }

    .qr-instructions i {
        font-size: 2rem;
    }

    .instruction-text {
        font-size: 1rem;
    }

    .instruction-subtext {
        font-size: 0.875rem;
    }
}

/* ========================================
   RESPONSIVE - DESKTOP (1025px+)
   ======================================== */

@media (min-width: 1025px) {
    #modalContenedores .modal-content {
        max-width: 750px;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

.btn-cancelar:focus,
.btn-guardar:focus,
.tab-btn:focus,
.btn-metodo:focus,
.btn-agregar:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.entrada-inputs-simple input:focus {
    outline: none;
}

/* ========================================
   UTILIDADES
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}