/* ===== EMB DASHBOARD STYLES ===== */
.emb-vendor-events {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.emb-dashboard-header {
    background: linear-gradient(135deg, #D10459 0%, #D10459 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.emb-dashboard-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.emb-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
}

.emb-tabs-modern {
    background: #ffffff;
}

.emb-tabs-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    gap: 8px;
}

.emb-tab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.emb-tab-item:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.8);
}

.emb-tab-active {
    color: #6366f1;
    background: white;
    border-bottom-color: #6366f1;
    box-shadow: 0 -2px 8px rgba(99, 102, 241, 0.1);
}

.emb-tab-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.emb-tab-active .emb-tab-icon {
    transform: scale(1.1);
}

.emb-tab-text {
    font-weight: 600;
}

.emb-tab-badge {
    background: #ef4444;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    animation: pulse 2s infinite;
}

.emb-tab-indicator {
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    border-radius: 3px 3px 0 0;
}

.emb-tabs-content {
    padding: 32px;
    background: white;
    min-height: 400px;
}

.emb-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #D10459, #D10459);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.emb-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.emb-add-event-btn {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.btn-icon {
    font-size: 18px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.emb-tab-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.emb-tab-item:hover::before {
    opacity: 1;
}

.emb-tab-active::before {
    opacity: 1;
}

.notice {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.notice-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

@media (max-width: 768px) {
    .emb-dashboard-header {
        padding: 20px;
    }
    
    .emb-dashboard-header h2 {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .emb-tabs-nav {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    
    .emb-tab-item {
        justify-content: center;
        padding: 16px 20px;
        border-bottom: 1px solid #e2e8f0;
        border-left: 4px solid transparent;
    }
    
    .emb-tab-active {
        border-left-color: #6366f1;
        border-bottom-color: #e2e8f0;
    }
    
    .emb-tab-indicator {
        display: none;
    }
    
    .emb-tabs-content {
        padding: 20px;
    }
}

/* CORRECCIÓN PARA TEXTO VISIBLE - Agregar al final de emb-dashboard.css */
.emb-vendor-events,
.emb-dashboard,
.emb-form-container,
.emb-vendor-dashboard,
.emb-tabs-content,
.emb-tab-content,
.emb-dashboard * {
    color: #333333 !important;
}

/* Específicamente para el dashboard de pedidos */
.emb-vendor-dashboard h2,
.emb-vendor-dashboard h3,
.emb-vendor-dashboard h4,
.emb-vendor-dashboard p,
.emb-vendor-dashboard span,
.emb-vendor-dashboard div,
.emb-vendor-dashboard table,
.emb-vendor-dashboard th,
.emb-vendor-dashboard td {
    color: #333333 !important;
}

/* Para las tablas de pedidos */
.emb-orders-table,
.emb-orders-table th,
.emb-orders-table td,
.emb-orders-table tr {
    color: #333333 !important;
}

/* Para las estadísticas */
.stats-grid,
.stat-card,
.stat-number,
.stat-label {
    color: #333333 !important;
}

.stat-number {
    color: #2271b1 !important;
}

/* Para los botones de navegación */
.emb-vendor-nav a {
    color: #333333 !important;
}

.emb-vendor-nav a:hover,
.emb-vendor-nav a.active {
    color: white !important;
}

/* ===== FILTROS ===== */
.emb-vendor-dashboard form,
.emb-vendor-dashboard select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2271b1;
}

.stat-label {
    font-size: 0.9em;
    color: #6b7280;
}

/* ===== TABLA DE PEDIDOS ===== */
.emb-orders-table-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.emb-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.emb-orders-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.emb-orders-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.emb-orders-table tr:hover td {
    background: #f9fafb;
}

/* ===== BOTONES ACCIONES ===== */
.order-actions a.button {
    background: #3b82f6;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.order-actions a.button:hover {
    background: #2563eb;
}
/* ===== RESPONSIVE DEL DASHBOARD ===== */
@media (max-width: 768px) {
    .emb-dashboard-header { 
        padding: 20px; 
    }
    
    .emb-dashboard-header h2 { 
        font-size: 24px; 
        flex-direction: column; 
        gap: 8px; 
    }
    
    .emb-tabs-nav { 
        flex-direction: column; 
        padding: 0; 
        gap: 0; 
    }
    
    .emb-tab-item { 
        justify-content: center; 
        padding: 16px 20px; 
        border-bottom: 1px solid #e2e8f0; 
        border-left: 4px solid transparent; 
    }
    
    .emb-tab-active { 
        border-left-color: #6366f1; 
        border-bottom-color: #e2e8f0; 
    }
    
    .emb-tab-indicator { 
        display: none; 
    }
    
    .emb-tabs-content { 
        padding: 20px; 
    }
    
    /* Botón principal en móvil */
    .emb-primary-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 20px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .emb-tabs-content { 
        padding: 15px; 
    }
    
    .emb-dashboard-header h2 { 
        font-size: 20px; 
    }
    
    .emb-subtitle {
        font-size: 14px;
    }
}
/* ===== EMB QR DASHBOARD STYLES ===== */
.emb-qr-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.emb-qr-dashboard h2 {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.emb-qr-dashboard h3 {
    color: #374151;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
}

.emb-qr-dashboard h4 {
    color: #4b5563;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
}

/* Filtro de eventos */
.event-filter {
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 20px;
}

.event-filter form {
    margin: 0;
}

.event-filter label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.event-filter select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 250px;
}

.event-filter button,
.event-filter a {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-filter button[type="submit"] {
    background: #3b82f6;
    color: white;
}

.event-filter button[type="submit"]:hover {
    background: #2563eb;
}

.event-filter a {
    background: #6b7280;
    color: white;
    display: inline-flex;
    align-items: center;
}

.event-filter a:hover {
    background: #4b5563;
}

/* Grid de estadísticas QR */
.qr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.qr-stats-grid > div {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Barra de progreso */
.emb-qr-dashboard .progress-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.emb-qr-dashboard .progress-bar h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.emb-qr-dashboard .progress-track {
    background: #f3f4f6;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.emb-qr-dashboard .progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.emb-qr-dashboard .progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Tabla de transacciones QR */
.emb-qr-dashboard table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.emb-qr-dashboard th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.emb-qr-dashboard td {
    padding: 15px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.emb-qr-dashboard tr:hover {
    background: #f9fafb;
}

/* Detalles expandibles */
.emb-qr-dashboard .transaction-details {
    background: #f9fafb;
}

.emb-qr-dashboard .qr-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.emb-qr-dashboard .qr-detail-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
}

.emb-qr-dashboard .qr-detail-item img {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-shrink: 0;
}

.emb-qr-dashboard .qr-detail-content {
    flex: 1;
}

.emb-qr-dashboard .qr-type {
    font-weight: bold;
    margin-bottom: 5px;
    color: #374151;
}

.emb-qr-dashboard .qr-status {
    margin-bottom: 8px;
    font-weight: 600;
}

.emb-qr-dashboard .qr-status.used {
    color: #059669;
}

.emb-qr-dashboard .qr-status.pending {
    color: #dc2626;
}

.emb-qr-dashboard .qr-product-name {
    font-size: 0.8em;
    color: #6b7280;
    margin-bottom: 8px;
}

/* Botones de acción QR */
.emb-qr-dashboard button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.emb-qr-dashboard .btn-details {
    background: #3b82f6;
    color: white;
    margin-right: 8px;
}

.emb-qr-dashboard .btn-details:hover {
    background: #2563eb;
}

.emb-qr-dashboard .btn-validate-all {
    background: #10b981;
    color: white;
}

.emb-qr-dashboard .btn-validate-all:hover {
    background: #059669;
}

.emb-qr-dashboard .btn-validate-single {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8em;
}

.emb-qr-dashboard .btn-validate-single.used {
    background: #6b7280;
}

.emb-qr-dashboard .btn-validate-single.pending {
    background: #10b981;
}

.emb-qr-dashboard .btn-validate-single:hover {
    opacity: 0.9;
}

/* Estados de transacción */
.transaction-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-complete {
    color: #059669;
    background: #d1fae5;
}

.status-partial {
    color: #d97706;
    background: #fef3c7;
}

.status-pending {
    color: #dc2626;
    background: #fecaca;
}

/* ===== RESPONSIVE QR DASHBOARD ===== */
@media (max-width: 768px) {
    .emb-qr-dashboard {
        padding: 15px;
    }
    
    .emb-qr-dashboard h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .emb-qr-dashboard h3 {
        font-size: 1.2rem;
    }
    
    .emb-qr-dashboard h4 {
        font-size: 1rem;
    }
    
    .event-filter {
        padding: 15px !important;
    }
    
    .event-filter > div {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .event-filter select {
        min-width: auto;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .event-filter > div > div:last-child {
        display: flex;
        gap: 10px;
    }
    
    .event-filter button,
    .event-filter a {
        flex: 1;
        justify-content: center;
    }
    
    .qr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .qr-stats-grid > div {
        padding: 15px 10px;
    }
    
    .emb-qr-dashboard table {
        font-size: 0.8rem;
    }
    
    .emb-qr-dashboard th,
    .emb-qr-dashboard td {
        padding: 10px 8px;
    }
    
    .emb-qr-dashboard .qr-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .emb-qr-dashboard .qr-detail-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .emb-qr-dashboard .qr-detail-item img {
        width: 60px;
        height: 60px;
    }
    
    .transaction-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .transaction-actions button {
        width: 100%;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .emb-qr-dashboard {
        padding: 10px;
    }
    
    .emb-qr-dashboard h2 {
        font-size: 1.3rem;
    }
    
    .qr-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .emb-qr-dashboard table {
        font-size: 0.75rem;
    }
}
/* Contadores de progreso por transacción */
.transaction-progress {
    margin-bottom: 8px;
}

.progress-counts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.progress-validated {
    color: #059669;
    font-weight: 600;
}

.progress-pending {
    color: #dc2626;
    font-weight: 600;
}

.progress-bar-mini {
    background: #f3f4f6;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill-mini {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-counter {
    text-align: center;
    margin-top: 6px;
}

.counter-number {
    font-size: 1.1rem;
    font-weight: 800;
}

.counter-percent {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 4px;
}

/* Estados mejorados */
.status-complete .counter-number { color: #059669; }
.status-partial .counter-number { color: #d97706; }
.status-pending .counter-number { color: #dc2626; }

/* Botones de acción en columna */
.transaction-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Efectos para botones del dashboard QR */
.emb-qr-dashboard button {
    transition: all 0.3s ease;
}

.emb-qr-dashboard button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.emb-qr-dashboard button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Estados de carga */
.emb-qr-dashboard button.loading {
    position: relative;
    color: transparent;
}

.emb-qr-dashboard button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Efectos de éxito/error */
.validation-success {
    animation: successPulse 0.5s ease;
}

.validation-error {
    animation: errorShake 0.5s ease;
}

@keyframes successPulse {
    0% { background: #10b981; }
    50% { background: #059669; transform: scale(1.05); }
    100% { background: #10b981; }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}