.queue-widget {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.queue-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.queue-toolbar button {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    background: white;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    transition: all 0.2s ease;
}

.queue-toolbar button:hover,
.queue-toolbar button.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
    transform: translateY(-1px);
}

.queue-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.queue-summary-card {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
}

.queue-summary-card span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.queue-summary-card strong {
    color: #5b5fa8;
    font-size: 1.4rem;
}

.queue-track {
    display: grid;
    grid-template-columns: repeat(8, minmax(58px, 1fr));
    gap: 0.55rem;
    margin: 1.2rem 0;
}

.queue-slot {
    min-height: 92px;
    border-radius: 18px;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.3rem;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.queue-slot.active {
    border-color: #5b5fa8;
    background: rgba(91, 95, 168, 0.08);
}

.queue-slot.front {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.queue-slot.end {
    border-color: #e6004f;
    box-shadow: 0 0 0 3px rgba(230, 0, 79, 0.12);
}

.queue-slot.empty {
    background: #f8fafc;
    color: #94a3b8;
}

.queue-index {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 800;
}

.queue-value {
    font-size: 1.5rem;
    color: #0f172a;
    font-weight: 900;
}

.queue-marker {
    min-height: 1rem;
    font-size: 0.7rem;
    color: #475569;
    text-align: center;
    font-weight: 800;
}

.queue-explanation {
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.queue-explanation h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
}

.queue-explanation p {
    margin: 0;
}

@media (max-width: 760px) {
    .queue-track {
        grid-template-columns: repeat(4, minmax(58px, 1fr));
    }
}
