/* Gate check-in alerts — staff toast + reception display */
.gate-checkin-card {
    position: relative;
    border-radius: 0.875rem;
    overflow: hidden;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px -16px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.04);
    animation: gate-alert-slide-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gate-checkin-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 5px;
    background: var(--gate-accent, #10b981);
}

.gate-checkin-card--compact {
    max-width: 24rem;
    width: 100%;
}

.gate-checkin-card--hero {
    max-width: 44rem;
    width: 100%;
    background: #fff;
    border: none;
    box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.55);
}

.gate-checkin-card--hero::before {
    width: 6px;
}

.gate-checkin-card__inner {
    position: relative;
    padding: 1rem 1.15rem 1rem 1rem;
}

@media (min-width: 640px) {
    .gate-checkin-card__inner {
        padding: 1.1rem 1.25rem 1.15rem 1.15rem;
    }
    .gate-checkin-card--hero .gate-checkin-card__inner {
        padding: 1.5rem 1.75rem 1.5rem 1.5rem;
    }
}

.gate-alert-success {
    --gate-accent: #10b981;
}

.gate-alert-warning {
    --gate-accent: #f59e0b;
}

.gate-alert-denied {
    --gate-accent: #ef4444;
}

.gate-checkin-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gate-accent);
}

.gate-checkin-card__source {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.gate-checkin-card__close {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.gate-checkin-card__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gate-checkin-card__avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.gate-checkin-card--hero .gate-checkin-card__avatar {
    width: 4.25rem;
    height: 4.25rem;
    font-size: 1.85rem;
    border-radius: 1rem;
}

.gate-checkin-card__name {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.gate-checkin-card--hero .gate-checkin-card__name {
    font-size: 1.85rem;
}

.gate-checkin-card__branch {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.gate-checkin-card__panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.gate-checkin-card__panel-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.gate-checkin-card__debt-amount {
    font-size: 1.35rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.gate-checkin-card__debt-amount--ok {
    color: #059669;
}

.gate-checkin-card__debt-amount--due {
    color: #dc2626;
}

.gate-checkin-card__debt-hint {
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.gate-checkin-card__debt-hint--due {
    color: #b91c1c;
}

.gate-checkin-card__debt-hint--ok {
    color: #64748b;
}

.gate-checkin-card__deny {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #991b1b;
}

.gate-checkin-card__chip {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.18rem 0.45rem;
    border-radius: 9999px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.gate-checkin-card__btn {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.42rem 0.8rem;
    border-radius: 0.55rem;
    transition: transform 0.12s, background 0.12s;
}

.gate-checkin-card__btn:active {
    transform: scale(0.97);
}

.gate-checkin-card__btn--primary {
    background: #0f172a;
    color: #fff;
}

.gate-checkin-card__btn--primary:hover {
    background: #1e293b;
}

.gate-checkin-card__btn--accent {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.gate-checkin-card__progress {
    height: 3px;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 0.85rem;
}

.gate-checkin-card__progress-bar {
    height: 100%;
    background: var(--gate-accent, #10b981);
    transition: width 0.1s linear;
}

@keyframes gate-alert-slide-in {
    from {
        opacity: 0;
        transform: translateY(-0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gate-display-bg {
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.dark .gate-display-bg {
    background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 55%, #020617 100%);
}

.gate-display-idle {
    animation: gate-idle-pulse 3s ease-in-out infinite;
}

@keyframes gate-idle-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.gate-checkin-host {
    pointer-events: none;
}

.gate-checkin-host > * {
    pointer-events: auto;
}

/* ── Gate display (reception screen) ── */

.gate-display-root {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.gate-display-api-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    border-bottom: 1px solid rgba(245, 158, 11, 0.35);
}

.dark .gate-display-api-warning {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-bottom-color: rgba(245, 158, 11, 0.25);
}

.gate-display-session-lost {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gate-display-session-lost-card {
    text-align: center;
    max-width: 28rem;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.dark .gate-display-session-lost-card {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.gate-display-fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.6);
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    outline: none;
}

.gate-display-fs-btn:focus {
    outline: none;
    box-shadow: none;
}

.gate-display-fs-btn:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.55);
    outline-offset: 2px;
}

.gate-display-fs-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border-color: rgba(16, 185, 129, 0.45);
}

.dark .gate-display-fs-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
}

.dark .gate-display-fs-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.gate-display-page {
    height: 100%;
    animation: gate-display-page-in 0.45s ease-out;
}

@keyframes gate-display-page-in {
    from {
        opacity: 0;
        transform: translateX(-0.75rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gate-display-grid {
    display: grid;
    gap: 0.75rem;
    height: 100%;
    align-content: stretch;
}

.gate-display-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.dark .gate-display-col {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.gate-display-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: rgba(241, 245, 249, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    flex-shrink: 0;
}

.dark .gate-display-col-header {
    background: rgba(255, 255, 255, 0.06);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.gate-display-col-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.gate-display-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .gate-display-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.gate-display-row:last-child {
    border-bottom: none;
}

.gate-display-row--priority {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-right: 3px solid #10b981;
}

.dark .gate-display-row--priority {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.06) 100%);
}

.gate-display-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.gate-display--compact .gate-display-col-header {
    padding: 0.4rem 0.625rem;
}

.gate-display--compact .gate-display-row {
    padding: 0.3rem 0.625rem;
    gap: 0.4rem;
}

.gate-display--compact .gate-display-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
}

.gate-display--compact .gate-display-member-name {
    font-size: 0.8rem;
    line-height: 1.2;
}

.gate-display--compact .gate-display-duration {
    font-size: 0.7rem;
}

.gate-display-page-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.gate-display-page-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.45);
    transition: background 0.2s, transform 0.2s;
}

.gate-display-page-dot--active {
    background: #10b981;
    transform: scale(1.25);
}

.dark .gate-display-page-dot--active {
    background: #34d399;
}
