/* ==============================================================================
   PORTARIA SCANNER & CONTROLE DE ACESSO — ESTILOS MOBILE-FIRST
   ============================================================================== */

.portaria-body {
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    padding-bottom: 2rem;
}

.portaria-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portaria-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portaria-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #1e293b;
    margin-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.stat-item {
    text-align: center;
    background: #0f172a;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #334155;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1.2;
}

.stat-lbl {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Barra de Lotação */
.lotacao-bar-container {
    padding: 0 1.25rem 1rem 1.25rem;
}

.lotacao-bar {
    height: 10px;
    background: #334155;
    border-radius: 9999px;
    overflow: hidden;
}

.lotacao-fill {
    height: 100%;
    width: 0%;
    background: #10b981;
    transition: width 0.4s ease, background 0.4s ease;
}

/* Scanner de Câmera */
.scanner-wrapper {
    background: #1e293b;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 0 1.25rem 1.25rem 1.25rem;
    border: 2px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#reader {
    width: 100%;
    background: #000000;
}

/* Card de Resultado da Leitura */
.resultado-card {
    margin: 0 1.25rem 1.25rem 1.25rem;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    animation: slideUp 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
    from { transform: translateY(15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.resultado-sucesso {
    background: #064e3b;
    border: 2px solid #10b981;
    color: #ecfdf5;
}

.resultado-aviso {
    background: #78350f;
    border: 2px solid #f59e0b;
    color: #fffbeb;
}

.resultado-erro {
    background: #7f1d1d;
    border: 2px solid #ef4444;
    color: #fef2f2;
}

.resultado-nome {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.resultado-info {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.btn-operacao {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-checkin { background: #10b981; color: #ffffff; }
.btn-checkout { background: #f59e0b; color: #ffffff; }
.btn-reentrada { background: #0284c7; color: #ffffff; }

/* Entrada Manual e Contingência */
.manual-input-box {
    margin: 0 1.25rem 1.5rem 1.25rem;
    display: flex;
    gap: 0.5rem;
}

.manual-input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #475569;
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.manual-input:focus {
    outline: none;
    border-color: #38bdf8;
}

/* Feed Recente */
.recent-feed {
    margin: 0 1.25rem;
    background: #1e293b;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid #334155;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #334155;
    font-size: 0.88rem;
}

.feed-item:last-child {
    border-bottom: none;
}
