:root {
    --sidebar-bg: #1c1c1c;
    --sidebar-active: #2c2c2c;
    --page-bg: #f2f1ee;
    --accent: #1f5f8b;
    --ready: #1c7c3e;
    --danger: #b02a37;
}

body {
    background: var(--page-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #1a1a1a;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.sidebar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    padding: 0.25rem 0.75rem 1.25rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    color: #d7d7d7;
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: #262626;
    color: #fff;
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    background: #262626;
    border-radius: 10px;
    padding: 0.85rem;
    font-size: 0.85rem;
}

.content {
    flex-grow: 1;
    overflow-x: hidden;
}

.content-inner {
    max-width: 1080px;
    padding: 2.5rem 3rem;
}

.step-label {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.card {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
    border: 1px solid #e4e2dd;
    border-radius: 12px;
}

.dropzone {
    border: 2px dashed #b9c2cc;
    border-radius: 12px;
    background: #fff;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pill-ready { background: #dcefe1; color: var(--ready); }
.pill-invalid, .pill-failed { background: #f7dcdf; color: var(--danger); }
.pill-duplicate, .pill-pending { background: #f1e7d0; color: #7a5c00; }
.pill-sent { background: #dcefe1; color: var(--ready); }

.status-ready, .status-sent, .status-checked-in { color: var(--ready); font-weight: 600; }
.status-invalid, .status-failed, .status-bounced { color: var(--danger); font-weight: 600; }
.status-duplicate, .status-pending { color: #7a5c00; font-weight: 600; }

.scanner-stage {
    background: #262626;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    color: #fff;
}

#qr-video {
    width: 100%;
    max-width: 420px;
    background: #111;
    border-radius: 10px;
}

.scan-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #b02a37;
}

.rec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e01b2b;
    animation: rec-pulse 1.2s infinite;
}

@keyframes rec-pulse {
    0% { box-shadow: 0 0 0 0 rgba(224, 27, 43, 0.6); opacity: 1; }
    70% { box-shadow: 0 0 0 10px rgba(224, 27, 43, 0); opacity: 0.6; }
    100% { box-shadow: 0 0 0 0 rgba(224, 27, 43, 0); opacity: 1; }
}

.toast-container {
    z-index: 1200;
}

.badge-preview {
    border: 1px solid #dfe3ea;
    background: #fff;
    border-radius: 12px;
    width: 260px;
    aspect-ratio: 4 / 6;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.stats-card { border-left: 5px solid var(--accent); }

.progress { height: 12px; border-radius: 999px; }

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .content-inner { padding: 1.5rem; }
}