/* ─── Fontes ─────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'ComercioSansBook';
    src: url('../fonts/ComercioSans/ComercioSans-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ComercioSansBold';
    src: url('../fonts/ComercioSans/ComercioSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    font-family: 'ComercioSansBook', system-ui, sans-serif;
    background: #060d1a;
    color: #e8f0ff;
    overflow: hidden;
}

/* ─── Background ─────────────────────────────────────────────────────────── */
#loginBg {
    position: fixed;
    inset: 0;
    background: url('../images/login_bg_001.jpg') center / cover no-repeat;
    z-index: 0;
}

#loginOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(4, 20, 55, 0.88) 0%,
        rgba(0, 50, 120, 0.75) 50%,
        rgba(4, 20, 55, 0.92) 100%
    );
    backdrop-filter: blur(2px);
}

/* ─── Wrapper centralizado ───────────────────────────────────────────────── */
#loginWrap {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
#loginCard {
    width: 100%;
    max-width: 420px;
    background: rgba(8, 28, 70, 0.72);
    border: 1px solid rgba(100, 160, 255, 0.25);
    border-radius: 24px;
    padding: 48px 40px 36px;
    box-shadow:
        0 8px 40px rgba(0, 30, 100, 0.6),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 60px rgba(0, 80, 200, 0.15);
    backdrop-filter: blur(20px);
    animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
#loginLogo {
    width: 100%;
    height: 80px;
    background: url('../images/feaduaneiros_logo.svg') center / contain no-repeat;
    margin-bottom: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* ─── Título ─────────────────────────────────────────────────────────────── */
#loginTitle {
    text-align: center;
    margin-bottom: 32px;
}

#loginTitle span {
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(150, 195, 255, 0.7);
}

/* ─── Campos ─────────────────────────────────────────────────────────────── */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(150, 195, 255, 0.6);
    margin-bottom: 8px;
    padding-left: 2px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: rgba(100, 160, 255, 0.5);
    pointer-events: none;
    flex-shrink: 0;
}

.login-input-wrap input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 160, 255, 0.2);
    border-radius: 12px;
    color: #e8f0ff;
    font-family: 'ComercioSansBook', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-input-wrap input::placeholder {
    color: rgba(150, 195, 255, 0.3);
}

.login-input-wrap input:focus {
    border-color: rgba(80, 150, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(60, 120, 255, 0.12);
}

/* Botão olho */
#togglePwd {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(100, 160, 255, 0.4);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
#togglePwd:hover { color: rgba(100, 160, 255, 0.8); }
#togglePwd svg   { width: 16px; height: 16px; }

/* ─── Mensagem de erro ───────────────────────────────────────────────────── */
#loginError {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(220, 40, 40, 0.12);
    border: 1px solid rgba(220, 80, 80, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #ff9a9a;
    margin-bottom: 20px;
    animation: shakeX 0.4s ease;
}
#loginError svg { width: 15px; height: 15px; flex-shrink: 0; }

@keyframes shakeX {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ─── Lembrar usuário ────────────────────────────────────────────────────── */
.login-remember {
    margin: 4px 0 16px;
}
.remember-label {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(180, 210, 255, 0.55);
    user-select: none;
    transition: color 0.2s;
}
.remember-label:hover { color: rgba(180, 210, 255, 0.8); }
.remember-label input[type="checkbox"] { display: none; }
.remember-check {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(100, 160, 255, 0.35);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.remember-label input:checked ~ .remember-check {
    background: rgba(40, 100, 255, 0.35);
    border-color: rgba(100, 160, 255, 0.6);
}
.remember-label input:checked ~ .remember-check::after {
    content: '';
    display: block;
    width: 9px;
    height: 5px;
    border-left: 2px solid #a0d0ff;
    border-bottom: 2px solid #a0d0ff;
    transform: rotate(-45deg) translateY(-1px);
}

/* ─── Botão Entrar ───────────────────────────────────────────────────────── */
#loginBtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a5ac8, #0d3d99);
    border: 1px solid rgba(100, 160, 255, 0.35);
    border-radius: 12px;
    color: #e8f0ff;
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow:
        0 4px 20px rgba(20, 80, 200, 0.4),
        0 0 30px rgba(40, 100, 255, 0.15);
    transition: all 0.25s;
}

#loginBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2268e0, #1148b8);
    box-shadow:
        0 6px 28px rgba(20, 80, 200, 0.55),
        0 0 40px rgba(40, 100, 255, 0.25);
    transform: translateY(-1px);
}

#loginBtn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(20, 80, 200, 0.4);
}

#loginBtn:disabled {
    opacity: 0.6;
    cursor: default;
}

#loginBtn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

#loginBtn:hover:not(:disabled) svg {
    transform: translateX(3px);
}

/* ─── Rodapé ─────────────────────────────────────────────────────────────── */
#loginFooter {
    text-align: center;
    margin-top: 28px;
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(150, 195, 255, 0.3);
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAINEL LAYOUT
═══════════════════════════════════════════════════════════════════════════ */
.painel-body {
    display: flex;
    min-height: 100vh;
    background: #070f20;
    color: #d8e8ff;
    font-family: 'ComercioSansBook', system-ui, sans-serif;
    overflow: hidden;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────── */
.painel-sidebar {
    width: 220px;
    min-width: 220px;
    height: 100vh;
    background: rgba(8, 24, 60, 0.95);
    border-right: 1px solid rgba(80, 130, 255, 0.12);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0;
    z-index: 100;
}

.sidebar-logo {
    height: 80px;
    background: url('../images/feaduaneiros_logo.svg') center / contain no-repeat;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    margin: 20px 16px 8px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(180, 210, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(60, 120, 255, 0.12); color: #c8e0ff; }
.nav-item.active { background: rgba(40, 100, 255, 0.2); color: #fff; border: 1px solid rgba(80,140,255,0.25); }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(80, 130, 255, 0.1);
}
.sidebar-user { font-size: 13px; color: rgba(180,210,255,0.5); }

/* ─── Botão Sair (canto superior direito) ─────────────────────────────── */
.btn-logout-corner {
    position: fixed;
    top: 22px;
    right: 32px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 7px 16px 7px 12px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'ComercioSansBook', sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-logout-corner:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}
.btn-logout-corner svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ─── Info de atualização automática (canto inferior direito) ─────────── */
.painel-update-info {
    position: fixed;
    bottom: 20px;
    right: 32px;
    z-index: 200;
    font-size: 11px;
    color: rgba(150, 190, 255, 0.35);
}

/* ─── Main ────────────────────────────────────────────────────────────── */
.painel-main {
    margin-left: 220px;
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
    height: 100vh;
}

.painel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-right: 130px; /* reserva espaço para o botão Sair fixo */
}

.painel-page-title {
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 22px;
    color: #e0eeff;
    margin: 0;
}

.painel-update-info {
    font-size: 12px;
    color: rgba(150,190,255,0.4);
}

/* ─── Stats cards ─────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(12, 30, 70, 0.8);
    border: 1px solid rgba(80, 130, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon--blue   { background: rgba(40,100,255,0.15); color: #6aabff; }
.stat-icon--yellow { background: rgba(255,193,50,0.15); color: #ffd060; }
.stat-icon--green  { background: rgba(50,200,120,0.15); color: #5ce0a0; }
.stat-icon--purple { background: rgba(160,80,255,0.15); color: #c080ff; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-family: 'ComercioSansBold', sans-serif; font-size: 32px; line-height: 1; color: #fff; }
.stat-label { font-size: 12px; color: rgba(150,190,255,0.5); margin-top: 4px; }

/* ─── Dashboard row ───────────────────────────────────────────────────── */
.dashboard-row {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
}

.dashboard-card {
    background: rgba(12, 30, 70, 0.8);
    border: 1px solid rgba(80, 130, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
}

.dashboard-card-header {
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(150,190,255,0.5);
    margin-bottom: 20px;
}

.chart-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.chart-wrap canvas { max-width: 240px; }

.chart-legend { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── Dashboard feed card ─────────────────────────────────────────────── */
.dashboard-card--feed { display: flex; flex-direction: column; gap: 0; }

/* Grade de fotos no dashboard */
.dash-fotos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}
.dash-foto-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(12,30,70,0.6);
    border: 1px solid rgba(80,130,255,0.1);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.dash-foto-card:hover {
    transform: translateY(-2px);
    border-color: rgba(80,150,255,0.3);
    box-shadow: 0 6px 20px rgba(0,20,80,0.4);
}
.dash-foto-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(20,50,120,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-foto-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.dash-foto-card:hover .dash-foto-img-wrap img { transform: scale(1.05); }
.dash-foto-img-wrap.dash-foto-no-img::after { content: '📷'; font-size: 20px; opacity: 0.35; }

.dash-foto-info {
    padding: 5px 7px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dash-foto-name {
    font-size: 10px;
    color: rgba(180,210,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-foto-time { font-size: 9px; color: rgba(150,190,255,0.35); }

.dash-divider {
    border: none;
    border-top: 1px solid rgba(80,130,255,0.1);
    margin: 16px 0;
}

/* Participações recentes */
.dash-participacoes { display: flex; flex-direction: column; gap: 0; }
.dash-part-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(80,130,255,0.08);
}
.dash-part-item:last-child { border-bottom: none; }
.dash-part-token {
    font-size: 12px;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}
.dash-part-time {
    font-size: 11px;
    color: rgba(180,210,255,0.55);
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0 6px;
    min-width: 155px;
}
.dash-part-score {
    font-size: 11px !important;
    padding: 3px 0 !important;
    flex-shrink: 0;
    min-width: 72px;
    text-align: center !important;
    margin: 0 4px;
}

/* Badge de status */
.dash-status-badge {
    font-size: 10px;
    font-family: 'ComercioSansBold', sans-serif;
    border-radius: 20px;
    padding: 3px 0;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    min-width: 148px;
    text-align: center;
}
.status--lido      { background: rgba(150,170,200,0.12); color: #8aabcc;                   border: 1px solid rgba(150,170,200,0.25); }
.status--jogando   { background: rgba(60,140,255,0.15);  color: #6aadff;                   border: 1px solid rgba(60,140,255,0.3);   }
.status--concluido { background: rgba(50,200,120,0.13);  color: #5cdda0;                   border: 1px solid rgba(50,200,120,0.28);  }
.status--brinde    { background: rgba(255,193,50,0.13);  color: #ffc84a;                   border: 1px solid rgba(255,193,50,0.3);   }
.status--cancelado { background: rgba(150,190,255,0.05); color: rgba(150,190,255,0.40);    border: 1px solid rgba(150,190,255,0.12); }

.dash-part-item--cancelado { opacity: 0.4; }
.dash-part-item--cancelado .token-badge,
.dash-part-item--cancelado .dash-part-time,
.dash-part-item--cancelado .quiz-score { color: rgba(150,190,255,0.40); }

/* ─── Fotos list ──────────────────────────────────────────────────────── */
.fotos-list { display: flex; flex-direction: column; gap: 12px; }
.foto-item { display: flex; align-items: center; gap: 14px; }
.foto-thumb-wrap { width: 64px; height: 43px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; }
.foto-thumb { width: 100%; height: 100%; object-fit: cover; }
.foto-no-img { font-size: 24px; }
.foto-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.foto-name { font-size: 12px; color: rgba(180,210,255,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foto-date { font-size: 11px; color: rgba(150,190,255,0.4); }
.no-data { font-size: 13px; color: rgba(150,190,255,0.35); }

/* ─── Tables ──────────────────────────────────────────────────────────── */
.table-card {
    background: rgba(12, 30, 70, 0.8);
    border: 1px solid rgba(80, 130, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
}
.table-card--wide { overflow-x: auto; }

.painel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.painel-table thead th {
    padding: 14px 16px;
    background: rgba(20, 50, 120, 0.5);
    color: rgba(150,190,255,0.6);
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(80,130,255,0.15);
    white-space: nowrap;
}
.painel-table tbody tr { border-bottom: 1px solid rgba(80,130,255,0.07); transition: background 0.15s; }
.painel-table tbody tr:hover { background: rgba(40,100,255,0.06); }
.painel-table tbody td { padding: 12px 16px; color: #c8deff; vertical-align: middle; }
.table-loading, .table-empty { text-align: center; padding: 40px; color: rgba(150,190,255,0.35); font-size: 13px; }

.token-badge {
    font-family: monospace;
    font-size: 14px;
    background: rgba(40,100,255,0.15);
    border: 1px solid rgba(80,140,255,0.2);
    border-radius: 6px;
    padding: 3px 10px;
    color: #8abcff;
    letter-spacing: 2px;
}

.td-date { white-space: nowrap; font-size: 12px; color: rgba(180,210,255,0.6); }

/* Botão entregar brinde */
.btn-deliver {
    background: rgba(50,200,120,0.12);
    border: 1px solid rgba(50,200,120,0.25);
    border-radius: 8px;
    color: #5ce0a0;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}
.btn-deliver:hover { background: rgba(50,200,120,0.25); transform: scale(1.05); }
.btn-deliver svg { width: 16px; height: 16px; }

/* Pergunta na tabela quiz */
.pergunta-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    min-width: 160px;
    max-width: 200px;
}
.pergunta-texto { font-size: 12px; color: rgba(180,210,255,0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resp-icon { width: 15px; height: 15px; flex-shrink: 0; }
.resp-icon--ok  { stroke: #5ce0a0; }
.resp-icon--nok { stroke: #ff6b6b; }

/* ─── Search ──────────────────────────────────────────────────────────── */
.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-wrap svg { position: absolute; left: 12px; width: 15px; height: 15px; color: rgba(150,190,255,0.4); pointer-events: none; }
.search-wrap input {
    padding: 9px 14px 9px 36px;
    background: rgba(102, 146, 187, 0.12);
    border: 1px solid #6692BB;
    border-radius: 10px;
    color: #c8deff;
    font-size: 13px;
    font-family: 'ComercioSansBook', sans-serif;
    outline: none;
    width: 260px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-wrap input:focus {
    border-color: #88b4d8;
    background: rgba(102, 146, 187, 0.2);
    box-shadow: 0 0 12px rgba(102,146,187,0.2);
}
.search-wrap input::placeholder { color: #6692BB; }
.search-wrap svg { color: #6692BB; }

/* ─── Botões painel ───────────────────────────────────────────────────── */
.btn-painel {
    padding: 9px 20px;
    border-radius: 10px;
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-painel--primary { background: linear-gradient(135deg,#1a5ac8,#0d3d99); color: #e8f0ff; }
.btn-painel--primary:hover { background: linear-gradient(135deg,#2268e0,#1148b8); }
.btn-painel--ghost { background: rgba(255,255,255,0.05); color: rgba(180,210,255,0.7); border: 1px solid rgba(80,130,255,0.2); }
.btn-painel--ghost:hover { background: rgba(255,255,255,0.1); }

/* ─── Modal ───────────────────────────────────────────────────────────── */
.painel-modal { background: #0d2050; border: 1px solid rgba(80,130,255,0.2); border-radius: 16px; color: #d8e8ff; }
.painel-modal .modal-header { border-bottom: 1px solid rgba(80,130,255,0.15); }
.painel-modal .modal-footer { border-top: 1px solid rgba(80,130,255,0.15); }
.painel-modal .modal-title { font-family: 'ComercioSansBold', sans-serif; font-size: 16px; }
.modal-token { font-family: monospace; font-size: 28px; letter-spacing: 6px; text-align: center; color: #8abcff; background: rgba(40,100,255,0.1); border-radius: 10px; padding: 12px; margin-top: 8px; }

/* ─── Popover dark ────────────────────────────────────────────────────── */
.bs-popover-auto .popover-body,
.popover { background: #0d2050; color: #c8deff; border: 1px solid rgba(80,130,255,0.25); font-size: 12px; max-width: 300px; }
.bs-popover-auto .popover-arrow::after,
.popover .popover-arrow::after { border-top-color: #0d2050; }

/* ─── Quiz score badge ────────────────────────────────────────────────── */
.quiz-score {
    display: inline-block;
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 13px;
    border-radius: 8px;
    padding: 3px 12px;
    white-space: nowrap;
}
.quiz-score--full    { background: rgba(50,200,120,0.15); color: #5ce0a0; border: 1px solid rgba(50,200,120,0.3); }
.quiz-score--partial { background: rgba(255,193,50,0.12); color: #ffd060; border: 1px solid rgba(255,193,50,0.3); }
.quiz-score--zero    { background: rgba(255,107,107,0.12); color: #ff8080; border: 1px solid rgba(255,107,107,0.3); }

/* ─── Topbar actions ──────────────────────────────────────────────────── */
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ─── Page title badge ────────────────────────────────────────────────── */
.page-title-badge {
    font-family: 'ComercioSansBook', sans-serif;
    font-size: 14px;
    color: rgba(150,190,255,0.45);
    margin-left: 8px;
    letter-spacing: 0;
}

/* ─── Foto grid (fotos.php) ───────────────────────────────────────────── */
.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.foto-grid-loading,
.foto-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(150,190,255,0.35);
    font-size: 14px;
}

.foto-card {
    background: rgba(12, 30, 70, 0.8);
    border: 1px solid rgba(80,130,255,0.13);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.foto-card:hover {
    transform: translateY(-3px);
    border-color: rgba(80,150,255,0.35);
    box-shadow: 0 8px 24px rgba(0,20,80,0.4);
}

.foto-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    background: rgba(20,50,120,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.foto-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-card-img-wrap.foto-card-no-img::before {
    content: '📷';
    font-size: 32px;
    opacity: 0.4;
}

.foto-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,40,120,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.foto-card-overlay svg { width: 32px; height: 32px; color: #fff; }
.foto-card:hover .foto-card-overlay { opacity: 1; }

.foto-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.foto-card-name {
    font-size: 12px;
    color: rgba(180,210,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.foto-card-date {
    font-size: 10px;
    color: rgba(150,190,255,0.35);
}

/* ─── Pagination ──────────────────────────────────────────────────────── */
.painel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
.btn-page {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(80,130,255,0.2);
    border-radius: 8px;
    color: #d8e8ff;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.btn-page:hover:not(:disabled) { background: rgba(80,130,255,0.15); border-color: rgba(80,150,255,0.4); }
.btn-page:disabled { opacity: 0.3; cursor: default; }
.btn-page svg { width: 16px; height: 16px; }
.pagination-info { font-size: 13px; color: rgba(150,190,255,0.5); }

/* ─── Modal foto ──────────────────────────────────────────────────────── */
.modal-foto-dialog {
    max-width: min(90vw, 860px);
}
.modal-foto-content {
    background: #07152e;
    border: 1px solid rgba(80,130,255,0.2);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.modal-foto-img {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #030c1c;
}
.modal-foto-caption {
    padding: 10px 16px;
    font-size: 12px;
    color: rgba(150,190,255,0.45);
    font-family: monospace;
    text-align: center;
    border-top: 1px solid rgba(80,130,255,0.1);
}
.modal-foto-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(7,21,46,0.85);
    border: 1px solid rgba(80,130,255,0.25);
    border-radius: 50%;
    color: rgba(200,220,255,0.8);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.modal-foto-close:hover { background: rgba(60,100,220,0.4); color: #fff; }
.modal-foto-close svg { width: 15px; height: 15px; }

/* ─── Estatísticas ────────────────────────────────────────────────────── */
.estat-card--full { width: 100%; }

.estat-chart-wrap {
    position: relative;
    height: 260px;
}

.chart-no-data {
    height: 260px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(150, 190, 255, 0.35);
    font-style: italic;
}

.chart-no-data--bar {
    height: 220px;
}

.dashboard-card--chart .chart-no-data {
    height: 100%;
    min-height: 180px;
}
.estat-chart-wrap--bar { height: 220px; }

/* Seletor de período */
.days-selector {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(80,130,255,0.18);
    border-radius: 10px;
    padding: 4px;
}
.btn-days {
    background: none;
    border: none;
    border-radius: 7px;
    color: rgba(150,190,255,0.5);
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-days:hover { color: rgba(180,210,255,0.8); }
.btn-days.active {
    background: rgba(60,120,255,0.25);
    color: #d8e8ff;
    box-shadow: 0 0 0 1px rgba(80,150,255,0.3);
}

/* ─── Header de card com botão à direita ──────────────────────────────── */
.dashboard-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(150,190,255,0.5);
}

/* ─── Botão exportar Excel ────────────────────────────────────────────── */
.btn-export {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(50, 180, 100, 0.1);
    border: 1px solid rgba(50, 180, 100, 0.25);
    border-radius: 9px;
    color: rgba(100, 220, 140, 0.85);
    font-family: 'ComercioSansBold', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: none;
    padding: 6px 14px 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-export:hover { background: rgba(50, 180, 100, 0.22); border-color: rgba(50, 200, 120, 0.45); color: #7deba0; }
.btn-export svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ─── Badge "Não utilizada" ───────────────────────────────────────────── */
.nao-apresentada-badge {
    display: inline-block;
    font-size: 11px;
    color: rgba(150,190,255,0.35);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(80,130,255,0.1);
    border-radius: 6px;
    padding: 2px 10px;
    font-style: italic;
}
.row-nao-apresentada { opacity: 0.6; }

.dashboard-card-sub {
    font-family: 'ComercioSansBook', sans-serif;
    font-size: 11px;
    color: rgba(150,190,255,0.35);
    letter-spacing: 0;
    text-transform: none;
    margin-left: 4px;
}

/* Tabela resumo de perguntas */
.pct-bar-wrap {
    position: relative;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    height: 18px;
    width: 120px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.pct-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.pct-label {
    position: relative;
    font-size: 11px;
    font-family: 'ComercioSansBold', sans-serif;
    color: #d8e8ff;
    width: 100%;
    text-align: center;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
