/* ===== Assets/css/fila.css - Sistema de Fila - PARTE 1 ===== */

:root {
    --primary-green: #27AE60;
    --secondary-green: #2ECC71;
    --dark-green: #1E8449;
    --light-green: #58D68D;
    --accent-green: #00E676;
    --success-green: #4CAF50;
    --warning-orange: #FF8F00;
    --danger-red: #E53E3E;
    
    /* Cores principais com background gradiente */
    --bg-primary: linear-gradient(135deg, #F8FFF9 0%, #E8F8EA 30%, #F1F9F2 70%, #E8F8EA 100%);
    --bg-secondary: #F8FFF9;
    --bg-light: #F1F9F2;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(39, 174, 96, 0.2);
    --card-shadow: rgba(39, 174, 96, 0.08);
    
    /* Textos */
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-light: #A0AEC0;
    
    /* Elementos especiais */
    --glass-bg: rgba(248, 255, 249, 0.9);
    --glass-border: rgba(39, 174, 96, 0.15);
    --hover-bg: rgba(39, 174, 96, 0.05);
    --active-bg: rgba(39, 174, 96, 0.1);
    
    /* Z-index organizado */
    --z-base: 1;
    --z-header: 10;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-overlay: 1000;
    --z-modal: 1001;
    --z-sync: 1050;
    --z-alert: 1100;
    --z-loading: 9999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BACKGROUND FIXO */
html {
    min-height: 100%;
    background: var(--bg-primary);
    background-attachment: fixed;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    z-index: -10;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 30% 20%, rgba(39, 174, 96, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(46, 204, 113, 0.03) 0%, transparent 50%);
    z-index: -9;
    pointer-events: none;
}

/* ===== LAYOUT PRINCIPAL ===== */
.header {
    background: var(--card-bg);
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid var(--card-border);
    box-shadow: 0 2px 8px var(--card-shadow);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: var(--z-header);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    color: var(--primary-green);
    font-weight: 700;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: var(--z-base);
    min-height: calc(100vh - 120px);
    overflow-x: hidden;
}

/* ===== CARDS DE ESTATÍSTICAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid var(--card-border);
    box-shadow: 0 2px 8px var(--card-shadow);
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.15);
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.95);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--primary-green);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

/* ===== LAYOUT PRINCIPAL - DUAS COLUNAS SEMPRE ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.fila-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid var(--card-border);
    box-shadow: 0 3px 12px var(--card-shadow);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: var(--z-base);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.subsection-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== TEXTO VISÍVEL ===== */
body,
.container,
.main-content,
.fila-section,
.vendedor-card,
.stat-card,
.modal,
.historico-item {
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

.vendedor-nome,
.fila-vendedor,
.historico-nome,
.stat-label,
.section-title,
.subsection-title,
.form-label,
.control-label {
    color: var(--text-primary);
}

.vendedor-status,
.historico-tempo,
.historico-resultado,
.proximo-info {
    color: var(--text-secondary);
}

.debug-info {
    color: var(--text-secondary);
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning {
    color: white;
}

/* ===== CONTROLES DE VENDEDOR ===== */
.vendedor-controls {
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 16px;
}

.control-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.vendedor-select-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

#selectVendedor {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(10px);
}

#selectVendedor:focus {
    outline: none;
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

#selectVendedor option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px;
}

/* ===== BOTÕES ===== */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid var(--card-border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-green);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green), var(--light-green));
    color: white;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(76, 175, 80, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-red), #C53030);
    color: white;
    box-shadow: 0 3px 10px rgba(229, 62, 62, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(229, 62, 62, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-orange), #F57C00);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 143, 0, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(255, 143, 0, 0.4);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    min-height: 52px;
}

/* ===== LISTA DE VENDEDORES ===== */
.vendedores-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.vendedor-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px;
    border: 2px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px var(--card-shadow);
    backdrop-filter: blur(20px);
}

.vendedor-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success-green);
    border-radius: 12px 0 0 12px;
}

.vendedor-card.atendendo {
    background: rgba(39, 174, 96, 0.1);
    border-color: var(--primary-green);
    box-shadow: 0 3px 12px rgba(39, 174, 96, 0.15);
}

.vendedor-card.atendendo::before {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.vendedor-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--card-shadow);
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.95);
}

.vendedor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vendedor-info {
    flex: 1;
}

.vendedor-nome {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.vendedor-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.vendedor-posicao {
    background: var(--hover-bg);
    border: 2px solid var(--card-border);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-green);
    backdrop-filter: blur(10px);
}

.vendedor-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== FILA DE ATENDIMENTO ===== */
.fila-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fila-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px 14px;
    border-left: 3px solid var(--success-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px var(--card-shadow);
    min-height: 44px;
    backdrop-filter: blur(15px);
}

.fila-item.proximo {
    border-left-color: var(--accent-green);
    background: rgba(0, 230, 118, 0.1);
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.15);
}

.fila-item.atendendo {
    border-left-color: var(--warning-orange);
    background: rgba(255, 143, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.fila-vendedor {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.fila-posicao {
    background: var(--hover-bg);
    border: 2px solid var(--card-border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-green);
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* ===== CARDS DE ATENDIMENTO ===== */
.atendimento-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-direction: row;
}

.atendimentos-section {
    flex: 1;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid var(--card-border);
    box-shadow: 0 4px 16px var(--card-shadow);
    backdrop-filter: blur(20px);
}

.atendimento-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px 16px;
    border: 2px solid var(--card-border);
    box-shadow: 0 2px 8px var(--card-shadow);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    backdrop-filter: blur(15px);
}

.atendimento-ativo {
    border-color: var(--warning-orange);
    background: rgba(255, 143, 0, 0.1);
    border-left: 4px solid var(--warning-orange);
}

.atendimento-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.atendimento-vendedor {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.atendimento-tempo {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--hover-bg);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    min-width: 80px;
    text-align: center;
}

.atendimento-acoes .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: var(--z-overlay);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: var(--z-modal);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 20px;
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-control option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--hover-bg);
    border: 2px solid var(--card-border);
    flex: 1;
    backdrop-filter: blur(10px);
}

.radio-option:hover {
    background: var(--active-bg);
    border-color: var(--primary-green);
}

.radio-option input[type="radio"] {
    accent-color: var(--primary-green);
    transform: scale(1.2);
}

.radio-option label,
.radio-option span {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancelar {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid var(--card-border);
}

.btn-cancelar:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.btn-confirmar {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
}

/* ===== ESTADOS VAZIOS ===== */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px dashed var(--card-border);
    backdrop-filter: blur(15px);
}

.empty-state-compacto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 2px dashed var(--card-border);
    backdrop-filter: blur(15px);
}

.empty-state-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== BOTÃO DE REFRESH ===== */
.refresh-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
}

.refresh-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.6);
}

/* ===== DEBUG INFO ===== */
.debug-info {
    background: var(--hover-bg);
    border: 2px solid var(--card-border);
    border-radius: 6px;
    padding: 8px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

/* ===== TELA DE SELEÇÃO DE LOJAS ===== */
.brand-header {
    text-align: center;
    margin-bottom: 32px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.brand-logo {
    font-size: 3.5rem;
    margin-bottom: 12px;
    color: var(--primary-green);
}

.brand-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.lojas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px;
}

.loja-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 12px var(--card-shadow);
    backdrop-filter: blur(20px);
}

.loja-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-green);
    box-shadow: 0 10px 28px rgba(39, 174, 96, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.loja-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.loja-nome {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
}

.loja-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* ===== Assets/css/fila.css - PARTE 2 - CONTINUAÇÃO ===== */

/* ===== STATUS DE CONEXÃO ===== */
.connection-status {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(39, 174, 96, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: var(--z-sync);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.connection-status.disconnected {
    background: rgba(244, 67, 54, 0.95);
    animation: pulse 2s ease-in-out infinite;
}

.connection-status.reconnecting {
    background: rgba(255, 152, 0, 0.95);
    animation: pulse 1s ease-in-out infinite;
}

/* ===== INDICADORES DE SINCRONIZAÇÃO ===== */
.sync-indicator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4CAF50;
    z-index: var(--z-sync);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.sync-indicator.connected {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.sync-indicator.active {
    background: #00E676;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.8);
    animation: activePulse 1s ease-in-out infinite;
}

.sync-indicator.updated {
    background: #2196F3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.9);
    transform: scale(1.3);
}

.sync-indicator.polling {
    background: #FF9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
    animation: pollingBlink 2s ease-in-out infinite;
}

.sync-indicator.error {
    background: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
    animation: errorPulse 0.5s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 0.8; 
    }
}

@keyframes pollingBlink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.4; }
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* ===== BADGES ===== */
.badge-ausente {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.vendedor-card-compacto.ausente {
    border-color: rgba(255, 140, 0, 0.4);
    background: rgba(255, 140, 0, 0.08);
}

.vendedor-card-compacto.ausente::before {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.4);
}

/* ===== CARDS ATUALIZADOS ===== */
.atualizado {
    animation: cardUpdate 0.6s ease;
}

@keyframes cardUpdate {
    0% { 
        transform: scale(1); 
        background: var(--card-bg);
    }
    50% { 
        transform: scale(1.02); 
        background: rgba(39, 174, 96, 0.1);
        box-shadow: 0 6px 20px rgba(39, 174, 96, 0.2);
    }
    100% { 
        transform: scale(1); 
        background: var(--card-bg);
    }
}

.novo {
    animation: novoItem 0.8s ease;
}

@keyframes novoItem {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== LOADING STATES ===== */
.processando {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.processando::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--card-border);
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@keyframes spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* ===== VENDEDOR CARD COMPACTO ===== */
.vendedor-card-compacto {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px;
    border: 2px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px var(--card-shadow);
    margin-bottom: 8px;
    backdrop-filter: blur(15px);
}

.vendedor-card-compacto::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--success-green);
    border-radius: 10px 0 0 10px;
}

.vendedor-card-compacto.ausente::before {
    background: #FF8C00;
}

.vendedor-card-compacto.atendendo::before {
    background: var(--accent-green);
}

.vendedor-card-compacto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--card-shadow);
}

.vendedor-header-compacto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vendedor-info-compacto {
    flex: 1;
}

.vendedor-nome-compacto {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.vendedor-status-compacto {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.vendedor-posicao-compacto {
    background: var(--hover-bg);
    border: 2px solid var(--card-border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-green);
    backdrop-filter: blur(10px);
}

.vendedor-acoes-compacto {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.vendedor-acoes-compacto .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.vendedores-lista-compacta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.vendedores-lista-compacta::-webkit-scrollbar {
    width: 4px;
}

.vendedores-lista-compacta::-webkit-scrollbar-track {
    background: var(--hover-bg);
    border-radius: 2px;
}

.vendedores-lista-compacta::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 2px;
}

.vendedores-lista-compacta::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.empty-state-mini {
    text-align: center;
    padding: 20px 12px;
    color: var(--text-muted);
    background: var(--glass-bg);
    border-radius: 12px;
    border: 2px dashed var(--card-border);
    backdrop-filter: blur(15px);
}

.empty-state-mini .empty-state-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.6;
}

.empty-state-mini p {
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state-mini small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ===== BTN INFO ===== */
.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
}

/* ===== ESTILOS PARA MENU ===== */
.menu-container {
    max-width: 800px;
    margin: 5vh auto;
    padding: 20px;
}

.menu-header {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 2px solid var(--card-border);
    box-shadow: 0 8px 24px var(--card-shadow);
    margin-bottom: 32px;
    backdrop-filter: blur(20px);
}

.menu-logo {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--primary-green);
}

.menu-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.menu-loja {
    font-size: 1.4rem;
    color: var(--secondary-green);
    font-weight: 600;
}

.menu-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.menu-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    border: 2px solid var(--card-border);
    box-shadow: 0 4px 16px var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
}

.menu-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-green);
    box-shadow: 0 12px 32px rgba(39, 174, 96, 0.25);
}

.menu-card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--secondary-green);
}

.menu-card-title {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.menu-card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.menu-card-button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.menu-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== ESTILOS ADMIN ===== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
}

.admin-title {
    font-size: 2.2rem;
    color: var(--secondary-green);
    margin-bottom: 12px;
    font-weight: 700;
}

.admin-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.senhas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.empresa-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.empresa-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-green);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.2);
}

.empresa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.empresa-nome {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-configurada {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.status-nao-configurada {
    background: rgba(255, 193, 7, 0.2);
    color: #FFB300;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.empresa-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.empresa-acoes {
    display: flex;
    gap: 12px;
}

.btn-alterar {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-alterar:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
}

.admin-actions {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    text-align: center;
}

.action-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-senha-admin {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.senha-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    text-align: center;
    background: var(--glass-bg);
    border: 2px solid var(--card-border);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    letter-spacing: 4px;
    color: var(--secondary-green);
    font-weight: bold;
}

/* ===== LOADING GLOBAL ===== */
.loading-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: var(--z-loading);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.loading-global.show {
    opacity: 1;
}

.loading-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(39, 174, 96, 0.3);
    border-top: 4px solid #27AE60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #27AE60;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.2);
    backdrop-filter: blur(20px);
    z-index: var(--z-alert);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-color: #4CAF50;
    color: #2E7D32;
}

.toast-error {
    border-color: #f44336;
    color: #C62828;
}

.toast-warning {
    border-color: #FF9800;
    color: #F57C00;
}

/* ===== CONFLICT DETECTION ===== */
.conflict-warning {
    background: linear-gradient(45deg, 
        rgba(255, 152, 0, 0.1) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 152, 0, 0.1) 50%, 
        rgba(255, 152, 0, 0.1) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 20px 20px;
    animation: conflictStripes 1s linear infinite;
    border: 2px solid rgba(255, 152, 0, 0.5);
}

@keyframes conflictStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* ===== NETWORK STATUS ===== */
.network-offline .btn,
.network-offline .form-control {
    opacity: 0.5;
    pointer-events: none;
}

.network-offline::before {
    content: '📡 Modo Offline - Tentando Reconectar...';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 152, 0, 0.95);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    z-index: var(--z-alert);
    animation: pulse 2s ease-in-out infinite;
}

/* ===== REAL-TIME INDICATORS ===== */
.real-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(39, 174, 96, 0.1);
    color: var(--primary-green);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.real-time-badge::before {
    content: '●';
    animation: syncPulse 2s ease-in-out infinite;
}

@keyframes syncPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 0.7; 
    }
}

.real-time-badge.disconnected {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.2);
}

.real-time-badge.disconnected::before {
    animation: none;
}

/* ===== FOCUS INDICATORS ===== */
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ===== LOJA STATUS ===== */
.loja-status {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-green);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

/* ===== MODAL ERROR ===== */
.modal-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #C62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== RESULTADO OPTIONS ===== */
.resultado-options {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
}

.resultado-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(229, 62, 62, 0.1);
    border: 2px solid rgba(229, 62, 62, 0.3);
    min-width: 150px;
    justify-content: center;
}

.resultado-option:hover {
    background: rgba(229, 62, 62, 0.15);
    border-color: var(--danger-red);
}

.resultado-option input[type="radio"] {
    accent-color: #E53E3E;
    transform: scale(1.3);
}

.resultado-option span {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== SEÇÃO DE VENDEDORES AUSENTES ===== */
.ausentes-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--card-border);
}

.vendedores-lista-ausentes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.vendedor-card-ausente {
    background: rgba(255, 140, 0, 0.08);
    border-radius: 12px;
    padding: 14px;
    border: 2px solid rgba(255, 140, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.15);
    backdrop-filter: blur(15px);
}

.vendedor-card-ausente::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    border-radius: 12px 0 0 12px;
}

.vendedor-card-ausente:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.25);
    border-color: rgba(255, 140, 0, 0.5);
    background: rgba(255, 140, 0, 0.12);
}

.vendedor-header-ausente {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vendedor-info-ausente {
    flex: 1;
}

.vendedor-nome-ausente {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-ausente-mini {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
}

.vendedor-status-ausente {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vendedor-status-ausente::before {
    content: '⏱️';
    font-size: 0.9rem;
}

.vendedor-tempo-ausente {
    color: #FF8C00;
    font-weight: 700;
}

.vendedor-acoes-ausente {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.vendedor-acoes-ausente .btn {
    flex: 1;
    min-width: 120px;
}

/* ===== HEADER MELHORADO ===== */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

/* ===== ALERT CONTAINER ===== */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-alert);
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: #4CAF50;
    color: white;
}

.alert-error {
    background: #f44336;
    color: white;
}

.alert-warning {
    background: #FF9800;
    color: white;
}

.alert-info {
    background: #2196F3;
    color: white;
}

/* ===== FILA ITEM ACTIONS ===== */
.fila-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== VENDEDOR DESTAQUE (MODAL) ===== */
.vendedor-destaque {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 8px 0;
}

/* ===== ✅ OTIMIZAÇÃO ESPECÍFICA PARA GALAXY TAB S9 (768-1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Reduzir padding geral */
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    .header {
        padding: 10px 14px;
    }
    
    .header h1 {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .fila-section {
        padding: 10px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    /* ✅ CARDS DE VENDEDOR ULTRA COMPACTOS */
    .vendedor-card-compacto {
        padding: 6px 8px;
        margin-bottom: 3px;
        border-radius: 6px;
    }
    
    .vendedor-header-compacto {
        margin-bottom: 4px;
    }
    
    .vendedor-nome-compacto {
        font-size: 0.85rem;
        margin-bottom: 1px;
    }
    
    .vendedor-status-compacto {
        font-size: 0.65rem;
    }
    
    .vendedor-posicao-compacto {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .vendedor-acoes-compacto {
        margin-top: 4px;
        gap: 3px;
    }
    
    .vendedor-acoes-compacto .btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    /* ✅ REMOVER MAX-HEIGHT - MOSTRAR TODOS OS 10 */
    .vendedores-lista-compacta {
        gap: 3px;
        max-height: none !important;
        margin-bottom: 6px;
    }
    
    /* Controles menores */
    .vendedor-select-wrapper {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    #selectVendedor {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .control-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .debug-info {
        padding: 5px 6px;
        font-size: 0.65rem;
        margin-top: 5px;
    }
    
    /* Seção de ausentes compacta */
    .ausentes-section {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .vendedor-card-ausente {
        padding: 6px 8px;
        border-radius: 6px;
    }
    
    .vendedor-nome-ausente {
        font-size: 0.85rem;
        margin-bottom: 1px;
    }
    
    .vendedor-status-ausente {
        font-size: 0.65rem;
    }
    
    .badge-ausente-mini {
        padding: 1px 5px;
        font-size: 0.55rem;
    }
    
    .vendedor-acoes-ausente {
        margin-top: 4px;
    }
    
    .vendedor-acoes-ausente .btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .vendedores-lista-ausentes {
        gap: 3px;
    }
    
    .empty-state-mini {
        padding: 10px 6px;
    }
    
    .empty-state-mini .empty-state-icon {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .empty-state-mini p {
        font-size: 0.75rem;
        margin-bottom: 1px;
    }
    
    .empty-state-mini small {
        font-size: 0.65rem;
    }
    
    .atendimento-grid {
        gap: 10px;
    }
    
    .header-content {
        flex-direction: row;
        gap: 10px;
    }
}

/* ===== RESPONSIVIDADE MOBILE ===== */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .atendimento-grid {
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .vendedor-select-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    #selectVendedor {
        min-width: auto;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .vendedor-acoes {
        justify-content: center;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .fila-section {
        padding: 12px;
    }
    
    .vendedor-card {
        padding: 10px;
    }
    
    .atendimento-card {
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .atendimento-vendedor {
        font-size: 0.9rem;
    }
    
    .atendimento-tempo {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .fila-item {
        padding: 8px 10px;
        min-height: 36px;
    }
    
    .fila-vendedor {
        font-size: 0.9rem;
    }
    
    .fila-posicao {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .atendimento-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .modal {
        padding: 16px 12px;
        margin: 8px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .btn-large {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .refresh-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .fila-section {
        padding: 8px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .vendedor-card {
        padding: 8px;
    }
    
    .atendimento-card {
        padding: 8px 10px;
    }
    
    .fila-item {
        padding: 6px 8px;
        min-height: 32px;
    }
    
    .fila-posicao {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .empty-state {
        padding: 20px 8px;
    }
    
    .empty-state-compacto {
        padding: 24px 12px;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
}

@media (prefers-contrast: high) {
    :root {
        --card-border: rgba(39, 174, 96, 0.4);
        --text-muted: #4A5568;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.status-live[aria-live] {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===== ✅ OTIMIZAÇÃO ADICIONAL PARA GERENCIAR FILA (fila-gerenciar.php) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Página Gerenciar Fila - Cards na coluna direita */
    .fila-gerenciamento .vendedor-card-compacto,
    .fila-gerenciamento .vendedor-card {
        padding: 6px 8px !important;
        margin-bottom: 3px !important;
        border-radius: 6px !important;
    }
    
    .fila-gerenciamento .vendedor-header-compacto,
    .fila-gerenciamento .vendedor-header {
        margin-bottom: 4px !important;
    }
    
    .fila-gerenciamento .vendedor-nome-compacto,
    .fila-gerenciamento .vendedor-nome {
        font-size: 0.85rem !important;
        margin-bottom: 1px !important;
    }
    
    .fila-gerenciamento .vendedor-status-compacto,
    .fila-gerenciamento .vendedor-status {
        font-size: 0.65rem !important;
    }
    
    .fila-gerenciamento .vendedor-posicao-compacto,
    .fila-gerenciamento .vendedor-posicao {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
    }
    
    .fila-gerenciamento .vendedor-acoes-compacto,
    .fila-gerenciamento .vendedor-acoes {
        margin-top: 4px !important;
        gap: 3px !important;
    }
    
    .fila-gerenciamento .vendedor-acoes-compacto .btn,
    .fila-gerenciamento .vendedor-acoes .btn {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
    }
    
    /* ✅ CRÍTICO: Remover limite de altura na lista de vendedores */
    .fila-gerenciamento .vendedores-lista-compacta,
    .fila-gerenciamento .vendedores-lista,
    .fila-gerenciamento #vendedoresLista {
        gap: 3px !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin-bottom: 6px !important;
    }
    
    /* Seção de vendedores ausentes também compacta */
    .fila-gerenciamento .vendedor-card-ausente {
        padding: 6px 8px !important;
        margin-bottom: 3px !important;
        border-radius: 6px !important;
    }
    
    .fila-gerenciamento .vendedor-nome-ausente {
        font-size: 0.85rem !important;
        margin-bottom: 1px !important;
    }
    
    .fila-gerenciamento .vendedor-status-ausente {
        font-size: 0.65rem !important;
    }
    
    .fila-gerenciamento .badge-ausente-mini {
        padding: 1px 5px !important;
        font-size: 0.55rem !important;
    }
    
    .fila-gerenciamento .vendedor-acoes-ausente {
        margin-top: 4px !important;
        gap: 3px !important;
    }
    
    .fila-gerenciamento .vendedor-acoes-ausente .btn {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
        min-width: 90px !important;
    }
    
    .fila-gerenciamento .vendedores-lista-ausentes {
        gap: 3px !important;
    }
    
    /* Ajustes nos controles superiores */
    .fila-gerenciamento .vendedor-controls-compactos {
        margin-bottom: 8px !important;
    }
    
    .fila-gerenciamento .control-group-compacto {
        margin-bottom: 8px !important;
    }
    
    .fila-gerenciamento .control-label-compacto {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    
    .fila-gerenciamento .vendedor-select-wrapper {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    
    .fila-gerenciamento #selectVendedor {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }
    
    .fila-gerenciamento #btnAdicionarVendedor {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
    }
    
    .fila-gerenciamento .debug-info {
        padding: 5px 6px !important;
        font-size: 0.65rem !important;
        margin-top: 5px !important;
    }
    
    .fila-gerenciamento .ausentes-section {
        margin-top: 10px !important;
        padding-top: 10px !important;
    }
    
    .fila-gerenciamento .ausentes-section .section-title {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
    }
    
    /* Empty states menores */
    .fila-gerenciamento .empty-state-mini {
        padding: 10px 6px !important;
    }
    
    .fila-gerenciamento .empty-state-mini .empty-state-icon {
        font-size: 1.3rem !important;
        margin-bottom: 4px !important;
    }
    
    .fila-gerenciamento .empty-state-mini p {
        font-size: 0.75rem !important;
        margin-bottom: 1px !important;
    }
    
    .fila-gerenciamento .empty-state-mini small {
        font-size: 0.65rem !important;
    }
    
    /* Ajustar padding das seções */
    .fila-gerenciamento .fila-section {
        padding: 10px !important;
    }
    
    .fila-gerenciamento .section-title {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    /* Garantir que a grid principal mantenha 2 colunas */
    .fila-gerenciamento .main-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
}

/* ===== FIM DO ARQUIVO CSS - TOTAL 2166+ LINHAS COM OTIMIZAÇÕES ===== */