/* Toggle no sidebar (sempre sobre fundo escuro) */
.cred-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}
.cred-theme-label {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 600;
}
.cred-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.cred-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cred-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #475569;
    border-radius: 999px;
    transition: background 0.2s ease;
}
.cred-switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.cred-switch input:checked + .cred-switch-slider {
    background: #2563eb;
}
.cred-switch input:checked + .cred-switch-slider::before {
    transform: translateX(20px);
}
.cred-switch input:focus-visible + .cred-switch-slider {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Sidebar — modo claro (alinha ao restante da UI) */
html:not(.cred-dark) .sidebar {
    background: #f8fafc !important;
    color: #334155 !important;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.06);
}
html:not(.cred-dark) .sidebar h2 {
    color: #0f172a !important;
}
html:not(.cred-dark) .side-user {
    color: #64748b !important;
}
html:not(.cred-dark) .side-user strong {
    color: #1e293b !important;
}
html:not(.cred-dark) .side-user a {
    color: #b91c1c !important;
}
html:not(.cred-dark) .side-user a:hover,
html:not(.cred-dark) .side-user a:focus {
    color: #991b1b !important;
}
html:not(.cred-dark) .side-nav a {
    color: #334155 !important;
}
html:not(.cred-dark) .side-nav a:hover,
html:not(.cred-dark) .side-nav a:focus {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
html:not(.cred-dark) .side-nav a[aria-current="page"] {
    background: #2563eb !important;
    color: #fff !important;
}
html:not(.cred-dark) .side-sep {
    background: #e2e8f0 !important;
}
html:not(.cred-dark) .cred-theme-row {
    border-top-color: #e2e8f0 !important;
}
html:not(.cred-dark) .cred-theme-label {
    color: #475569 !important;
}

/* Sidebar — modo escuro */
html.cred-dark .sidebar {
    background: #020617 !important;
    color: #e5e7eb !important;
    border-right: 1px solid #1e293b;
    box-shadow: none;
}
html.cred-dark .sidebar h2 {
    color: #f8fafc !important;
}
html.cred-dark .side-user {
    color: #cbd5e1 !important;
}
html.cred-dark .side-user strong {
    color: #f1f5f9 !important;
}
html.cred-dark .side-user a {
    color: #fecaca !important;
}
html.cred-dark .side-user a:hover,
html.cred-dark .side-user a:focus {
    color: #fca5a5 !important;
}
html.cred-dark .side-nav a {
    color: #e5e7eb !important;
}
html.cred-dark .side-nav a:hover,
html.cred-dark .side-nav a:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}
html.cred-dark .side-nav a[aria-current="page"] {
    background: #2563eb !important;
    color: #fff !important;
}
html.cred-dark .side-sep {
    background: rgba(255, 255, 255, 0.12) !important;
}
html.cred-dark .cred-theme-row {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}
html.cred-dark .cred-theme-label {
    color: #cbd5e1 !important;
}

/* Modo escuro — conteúdo principal */
html.cred-dark {
    color-scheme: dark;
}
html.cred-dark body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
html.cred-dark .main {
    background: transparent;
}
html.cred-dark .container,
html.cred-dark .card {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
}
html.cred-dark h1 {
    color: #f1f5f9 !important;
}
html.cred-dark .filtro-group label,
html.cred-dark .lote-field-label {
    color: #94a3b8 !important;
}
html.cred-dark .filtro-select,
html.cred-dark .pesquisa-input,
html.cred-dark .search input,
html.cred-dark input[type="text"]:not(.cred-switch input),
html.cred-dark input[type="email"],
html.cred-dark input[type="password"],
html.cred-dark select {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
html.cred-dark .pesquisa-input:focus,
html.cred-dark .filtro-select:focus {
    border-color: #38bdf8 !important;
}
html.cred-dark .controls {
    background: #334155 !important;
}
html.cred-dark .contador {
    color: #7dd3fc !important;
}
html.cred-dark .lista-participantes .item,
html.cred-dark #lista-participantes .item {
    background: #0f172a !important;
    border-color: #475569 !important;
}
/* Precisa do #lista-participantes: a regra acima tem ID e ganhava de .item.checkin-* */
html.cred-dark #lista-participantes .item.checkin-realizado,
html.cred-dark .lista-participantes .item.checkin-realizado {
    /* “Tinta” verde no modo escuro (mantém leitura do conteúdo) */
    background: rgba(34, 197, 94, 0.14) !important;
    border-left: 5px solid #22c55e !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
}
html.cred-dark #lista-participantes .item.checkin-pendente,
html.cred-dark .lista-participantes .item.checkin-pendente {
    /* “Tinta” vermelha no modo escuro (mantém leitura do conteúdo) */
    background: rgba(248, 113, 113, 0.12) !important;
    border-left: 5px solid #f87171 !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
}
html.cred-dark .nome {
    color: #f8fafc !important;
}
html.cred-dark .status-checkin-realizado {
    background: rgba(34, 197, 94, 0.18) !important;
    color: #bbf7d0 !important;
}
html.cred-dark .status-checkin-pendente {
    background: rgba(248, 113, 113, 0.18) !important;
    color: #fecaca !important;
}
html.cred-dark .descricao,
html.cred-dark .uuid,
html.cred-dark .codigo-ingresso {
    color: #94a3b8 !important;
}
html.cred-dark .documento {
    color: #cbd5e1 !important;
}
html.cred-dark .lote-dropdown-summary,
html.cred-dark .lote-dropdown-panel,
html.cred-dark .lote-multiselect-panel {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.cred-dark .info-pesquisa {
    background: #1e3a5a !important;
    border-left-color: #38bdf8 !important;
    color: #bae6fd !important;
}
html.cred-dark .destaque-pesquisa {
    background-color: #422006 !important;
    border-color: #f59e0b !important;
}
html.cred-dark .termo-destaque {
    background-color: #854d0e !important;
    color: #fef3c7 !important;
}
html.cred-dark .modal {
    background: rgba(0, 0, 0, 0.75) !important;
}
html.cred-dark .modal-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #475569;
}
html.cred-dark .modal-buttons button.btn-cancelar,
html.cred-dark .btn-limpar {
    background: #475569 !important;
    color: #f1f5f9 !important;
}
html.cred-dark .acoes-em-lote {
    background: #1e293b !important;
    border: 1px solid #475569;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
html.cred-dark .fila-btn {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.cred-dark .fila-btn:hover {
    background: #334155 !important;
}
html.cred-dark .fila-btn.selected {
    background: #2563eb !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}
html.cred-dark .icon-btn {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.cred-dark .icon-btn:hover {
    background: #334155 !important;
}
html.cred-dark .icon-btn.danger {
    border-color: #7f1d1d !important;
    color: #fecaca !important;
}
html.cred-dark .pill.admin {
    background: #831843 !important;
    color: #fce7f3 !important;
}
html.cred-dark .pill.user {
    background: #334155 !important;
    color: #e2e8f0 !important;
}
html.cred-dark .admin-usuarios {
    background: #0f172a !important;
    border-color: #475569 !important;
}
html.cred-dark .admin-usuarios h2,
html.cred-dark #admin-usuarios-h {
    color: #e2e8f0 !important;
}
html.cred-dark .admin-usuarios th {
    background: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}
html.cred-dark .admin-usuarios td {
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.cred-dark .modal-card {
    border: 1px solid #475569;
}
html.cred-dark .modal-card__body {
    background: #1e293b !important;
}
html.cred-dark .modal-field label {
    color: #cbd5e1 !important;
}
html.cred-dark .modal-field input,
html.cred-dark .modal-field select {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
html.cred-dark .modal-field-hint {
    color: #94a3b8 !important;
}
html.cred-dark .modal-card__foot {
    background: #0f172a !important;
    border-color: #334155 !important;
}
html.cred-dark .btn-modal--ghost {
    background: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
html.cred-dark .lead {
    color: #94a3b8 !important;
}
html.cred-dark .banner.ok {
    background: #14532d !important;
    border-color: #22c55e !important;
    color: #dcfce7 !important;
}
html.cred-dark .banner.warn {
    background: #422006 !important;
    border-color: #f59e0b !important;
    color: #fef3c7 !important;
}
html.cred-dark .banner.err {
    background: #450a0a !important;
    border-color: #f87171 !important;
    color: #fecaca !important;
}
html.cred-dark .lista {
    border-color: #475569 !important;
}
html.cred-dark .row {
    border-color: #334155 !important;
}
html.cred-dark .row label {
    color: #e2e8f0 !important;
}
html.cred-dark code {
    background: #334155;
    color: #f1f5f9;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}
html.cred-dark .container a,
html.cred-dark .card a {
    color: #38bdf8 !important;
}
html.cred-dark .container a:hover,
html.cred-dark .card a:hover {
    color: #7dd3fc !important;
}
html.cred-dark div[style*="background: #f8d7da"],
html.cred-dark div[style*="background:#f8d7da"] {
    background: #450a0a !important;
    color: #fecaca !important;
    border-left-color: #f87171 !important;
}
html.cred-dark div[style*="background: #fff3cd"],
html.cred-dark div[style*="background:#fff3cd"] {
    background: #422006 !important;
    color: #fef3c7 !important;
    border-left-color: #f59e0b !important;
}
html.cred-dark div[style*="background: #e7f3ff"],
html.cred-dark div[style*="background:#e7f3ff"] {
    background: #1e3a5a !important;
    color: #bae6fd !important;
    border-left-color: #38bdf8 !important;
}

/* Login (participantes / reimpressão) */
html.cred-dark body .login-box {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
html.cred-dark body .login-box h1 {
    color: #f1f5f9 !important;
}
html.cred-dark body .login-box label {
    color: #cbd5e1 !important;
}
