:root {
    --bg: #1a1a1d;
    --bg-card: #222226;
    --bg-hover: #2a2a2e;
    --texto: #d4d4d6;
    --texto-muted: #6b6b70;
    --borda: #2e2e32;
    --destaque: #52525b;
    --destaque-hover: #3f3f46;
    --sucesso: #4ade80;
    --aviso: #facc15;
    --sombra: 0 1px 3px rgba(0,0,0,0.25);
    --radius: 8px;
    --trans: 0.15s ease;
}

.tema-claro {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f0;
    --texto: #27272a;
    --texto-muted: #71717a;
    --borda: #e4e4e7;
    --destaque: #52525b;
    --destaque-hover: #3f3f46;
    --sombra: 0 1px 3px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--texto);
    min-height: 100vh;
    line-height: 1.5;
    transition: background-color var(--trans), color var(--trans);
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tela-login {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card-login {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--sombra);
}

@media (max-width: 480px) {
    .card-login {
        padding: 20px;
        max-width: 100%;
    }
}

.card-login h1 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--texto);
}

.card-login .subtitulo {
    margin: 0 0 20px;
    color: var(--texto-muted);
    font-size: 0.9rem;
}

.card-login .erro-login {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 6px;
    font-size: 0.9rem;
}

.card-login .erro-login.bloqueio {
    background: rgba(239, 68, 68, 0.08);
}

.card-login form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campo-chave {
    position: relative;
    display: flex;
    align-items: center;
}

.campo-chave input {
    padding-right: 44px;
    width: 100%;
}

.card-login .btn-olho {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    background: none;
    color: var(--texto-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--trans), background-color var(--trans);
}

.card-login .btn-olho:hover {
    color: var(--texto);
    background: var(--bg-hover);
}

.card-login .btn-olho .icone-olho.oculto {
    display: none;
}

.card-login input {
    padding: 10px 14px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    background: var(--bg);
    color: var(--texto);
    font-size: 0.95rem;
    transition: border-color var(--trans);
}

.card-login input:focus {
    outline: none;
    border-color: var(--texto-muted);
}

.card-login button[type="submit"] {
    padding: 10px 18px;
    background: var(--destaque);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--trans);
}

.card-login button[type="submit"]:hover {
    background: var(--destaque-hover);
}

.login-ip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--borda);
    color: var(--texto-muted);
    font-size: 0.85rem;
}

.login-ip .icone-ip {
    flex-shrink: 0;
    color: var(--texto-muted);
    opacity: 0.9;
}

.cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--borda);
    position: sticky;
    top: 0;
    z-index: 10;
}

.cabecalho-titulo {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--texto);
}

.cabecalho-direita {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-bemvindo {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-bemvindo-card {
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--sombra);
    text-align: center;
}

.modal-bemvindo-titulo {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--texto);
}

.modal-bemvindo-texto {
    margin: 0 0 24px;
    color: var(--texto-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-bemvindo-texto strong {
    color: var(--sucesso, #4ade80);
}

.modal-bemvindo-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    background: var(--destaque);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--trans);
}

.modal-bemvindo-btn:hover {
    background: var(--destaque-hover);
}

.perfil-adm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.perfil-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--borda);
    color: var(--texto-muted);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perfil-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.perfil-nome {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto);
}

.perfil-cargo {
    font-size: 0.75rem;
    color: var(--texto-muted);
}

.acoes-cabecalho {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icone {
    width: 36px;
    height: 36px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    background: var(--bg);
    color: var(--texto-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
}

.btn-icone:hover {
    background: var(--bg-hover);
    border-color: var(--texto-muted);
    color: var(--texto);
}

.btn-icone#btn-tema::after {
    content: '';
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.tema-claro .btn-icone#btn-tema::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
}

.btn-icone#btn-atualizar::after {
    content: '';
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 21h5v-5'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 21h5v-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn-sair {
    padding: 6px 12px;
    color: var(--texto-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: color var(--trans), background var(--trans);
}

.btn-sair:hover {
    color: var(--texto);
    background: var(--bg-hover);
}

.btn-tokens {
    padding: 6px 12px;
    color: var(--texto-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--borda);
    background: var(--bg);
    transition: color var(--trans), background var(--trans), border-color var(--trans);
}

.btn-tokens:hover {
    color: var(--texto);
    background: var(--bg-hover);
}

.tokens-admin-conteudo {
    padding: 24px;
    max-width: 900px;
}

.tokens-admin-conteudo h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.tokens-lista {
    margin-bottom: 32px;
}

.tabela-tokens {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    overflow: hidden;
}

.tabela-tokens th,
.tabela-tokens td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--borda);
}

.tabela-tokens th {
    font-weight: 600;
    color: var(--texto);
    background: var(--bg-hover);
}

.tabela-tokens tr:last-child td {
    border-bottom: none;
}

.tabela-tokens code {
    font-size: 0.85rem;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.celula-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.form-toggle {
    margin: 0;
    display: inline-block;
}

.btn-toggle {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background var(--trans), color var(--trans);
}

.btn-ativar {
    background: rgba(74, 222, 128, 0.2);
    color: var(--sucesso, #4ade80);
}

.btn-ativar:hover {
    background: rgba(74, 222, 128, 0.35);
}

.btn-desativar {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.btn-desativar:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-resetar-chave {
    background: var(--bg-hover);
    color: var(--texto-muted);
}

.btn-resetar-chave:hover {
    background: var(--destaque);
    color: #fff;
}

.tokens-criar .form-criar-token {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 400px;
}

.tokens-criar .form-campo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tokens-criar .form-campo label {
    font-size: 0.9rem;
    color: var(--texto-muted);
}

.tokens-criar .form-campo input {
    padding: 8px 12px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    background: var(--bg);
    color: var(--texto);
    font-size: 0.95rem;
}

.tokens-criar .form-criar-token button {
    padding: 8px 16px;
    background: var(--destaque);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-start;
}

.tokens-criar .form-criar-token button:hover {
    background: var(--destaque-hover);
}

.aviso-token-novo {
    padding: 16px 20px;
    margin-bottom: 24px;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius);
    color: var(--texto);
}

.aviso-token-novo p {
    margin: 0 0 8px;
}

.aviso-token-novo p:last-of-type {
    margin-bottom: 0;
}

.aviso-token-erro {
    padding: 12px 20px;
    margin-bottom: 24px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    color: #dc2626;
    font-size: 0.95rem;
}

.token-chave-exibir {
    font-size: 0.9rem;
    color: var(--texto-muted);
}

.token-chave-valor {
    display: block;
    margin-top: 8px;
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.9rem;
    word-break: break-all;
    user-select: all;
}

.painel-layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--borda);
    padding: 16px 0;
    overflow-y: auto;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 70px);
}

.menu-categorias {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.categoria-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 6px;
    background: transparent;
    transition: background var(--trans);
}

.categoria-row:hover {
    background: var(--bg-hover);
}

.categoria-row:hover .btn-reset-cat {
    opacity: 1;
}

.categoria-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--texto);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background var(--trans);
}

.btn-reset-cat {
    width: 32px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 0 6px 6px 0;
    background: transparent;
    color: var(--texto-muted);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--trans), color var(--trans), background var(--trans);
}

.btn-reset-cat:hover {
    color: var(--texto);
    background: rgba(239, 68, 68, 0.15);
}

.btn-reset-cat::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    margin: 0 auto;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center/contain no-repeat;
}

.categoria-item.ativo {
    background: var(--bg-hover);
    font-weight: 500;
}

.categoria-row:has(.categoria-item.ativo) {
    background: var(--bg-hover);
}

.categoria-icone {
    grid-row: 1 / -1;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--borda);
    opacity: 0.9;
}

.categoria-icone-consulta {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-recarga {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2v10l4-4'/%3E%3Cpath d='M12 22V12l-4 4'/%3E%3Cpath d='M4.93 4.93l7.07 7.07'/%3E%3Cpath d='M16.24 7.76l-4.24 4.24'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2v10l4-4'/%3E%3Cpath d='M12 22V12l-4 4'/%3E%3Cpath d='M4.93 4.93l7.07 7.07'/%3E%3Cpath d='M16.24 7.76l-4.24 4.24'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-cassino {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M12 8v8'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M12 8v8'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-aviso {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-erro {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-aluguel {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-pagamentos {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-usuario {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-avaliacao {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-cloud {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-fidelidade {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-anuncios {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-renovou {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-grupos {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-indicacao {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-icone-cupom {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-item[data-tipo=""] .categoria-icone {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E") center/contain no-repeat;
    background: currentColor;
}

.categoria-nome {
    grid-column: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.categoria-total {
    grid-column: 3;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--texto-muted);
}

.categoria-barra {
    grid-column: 2 / -1;
    height: 4px;
    border-radius: 2px;
    background: var(--borda);
    overflow: hidden;
}

.categoria-barra-fill {
    display: block;
    height: 100%;
    background: var(--texto-muted);
    border-radius: 2px;
    transition: width var(--trans);
}

.categoria-item.ativo .categoria-barra-fill {
    background: var(--texto);
}

.painel-conteudo {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    min-width: 0;
}

.painel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar-esquerda {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-direita {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.busca-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.busca-wrap .busca-icone {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--texto-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.input-busca {
    width: 260px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    background: var(--bg);
    color: var(--texto);
    font-size: 0.9rem;
    transition: border-color var(--trans);
}

.input-busca::placeholder {
    color: var(--texto-muted);
}

.input-busca:focus {
    outline: none;
    border-color: var(--destaque);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.busca-navegacao {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: 6px;
    white-space: nowrap;
}

.busca-contador {
    font-size: 0.85rem;
    color: var(--texto-muted);
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.btn-busca-nav {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--texto-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--trans);
}

.btn-busca-nav:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--texto);
}

.btn-busca-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-notificacao.resultado-busca-ativo {
    border-color: var(--destaque);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(59, 130, 246, 0.05);
}

.texto-destacado {
    background: rgba(250, 204, 21, 0.4);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

.btn-reset-todas {
    padding: 6px 12px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    background: var(--bg);
    color: var(--texto-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
}

.btn-reset-todas:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.contador {
    color: var(--texto-muted);
    font-size: 0.85rem;
}

.db-admin {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-db {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--borda);
    cursor: pointer;
    background: var(--bg-card);
    color: var(--texto-muted);
    transition: border-color var(--trans), color var(--trans);
}

.btn-db:hover {
    border-color: var(--texto-muted);
    color: var(--texto);
}

.form-upload-db {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-upload-db input[type="file"] {
    font-size: 0.8rem;
    color: var(--texto-muted);
    max-width: 160px;
}

.btn-db-upload {
    background: var(--destaque);
    color: #fff;
    border-color: var(--destaque);
}

.btn-db-upload:hover {
    background: var(--destaque-hover);
    border-color: var(--destaque-hover);
}

.db-admin-msg {
    font-size: 0.8rem;
    color: var(--texto-muted);
}

.db-admin-msg.sucesso {
    color: var(--sucesso);
}

.db-admin-msg.erro {
    color: #dc2626;
}

.lista-notificacoes {
    position: relative;
}

.estado-carregando,
.estado-vazio {
    padding: 40px 20px;
    text-align: center;
    color: var(--texto-muted);
    font-size: 0.9rem;
}

.oculto {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay:not(.oculto) {
    display: flex;
}

.modal-confirma {
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--sombra);
}

.modal-titulo {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--texto);
}

.modal-texto {
    margin: 0 0 20px;
    color: var(--texto-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-texto strong {
    color: var(--texto);
}

.modal-botoes {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
}

.btn-modal-nao {
    border: 1px solid var(--borda);
    background: var(--bg);
    color: var(--texto);
}

.btn-modal-nao:hover {
    background: var(--bg-hover);
}

.btn-modal-sim {
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.btn-modal-sim:hover {
    background: rgba(239, 68, 68, 0.35);
}

.lista-notificacoes .itens {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-notificacao {
    background: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: border-color var(--trans);
}

.item-notificacao:hover {
    border-color: var(--texto-muted);
}

.item-notificacao .cabecalho-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.item-notificacao .tipo {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texto-muted);
}

.item-notificacao .data {
    font-size: 0.8rem;
    color: var(--texto-muted);
}

.item-notificacao .corpo {
    font-size: 0.9rem;
}

.item-notificacao .linha {
    margin: 3px 0;
}

.item-notificacao .resultado {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.item-notificacao .resultado.encontrado {
    background: rgba(74, 222, 128, 0.15);
    color: var(--sucesso);
}

.item-notificacao .resultado.nao_encontrado {
    background: rgba(250, 204, 21, 0.15);
    color: var(--aviso);
}

.item-notificacao .texto-muted {
    color: var(--texto-muted);
}

.item-notificacao .mensagem-formatada {
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--borda);
    font-size: 0.9rem;
    line-height: 1.5;
}

.grafico-resumo {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--borda);
}

.grafico-titulo {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--texto);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grafico-itens {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grafico-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grafico-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.grafico-label {
    color: var(--texto-muted);
    font-weight: 500;
}

.grafico-valor {
    color: var(--texto);
    font-weight: 600;
}

.grafico-barra-container {
    width: 100%;
    height: 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    overflow: hidden;
}

.grafico-barra {
    height: 100%;
    background: var(--destaque);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.grafico-barra-consulta {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.grafico-barra-recarga {
    background: linear-gradient(90deg, #10b981, #059669);
}

.grafico-barra-cassino {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.grafico-barra-aviso {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.grafico-barra-erro {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

@media (max-width: 1024px) {
    .cabecalho {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        height: auto;
        padding: 12px 16px;
    }
    
    .cabecalho-direita {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .acoes-cabecalho {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-tokens,
    .btn-sair {
        width: 100%;
        text-align: center;
    }
    
    .painel-toolbar {
        flex-direction: column;
        gap: 12px;
    }
    
    .toolbar-esquerda,
    .toolbar-direita {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .busca-wrap {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .input-busca {
        width: 100%;
    }
    
    .busca-navegacao {
        width: 100%;
        justify-content: center;
    }
    
    .db-admin {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .form-upload-db {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-db {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .painel-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--borda);
        padding: 12px;
        position: static;
        max-height: none;
    }
    
    .grafico-resumo {
        display: none;
    }
    .menu-categorias {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .categoria-row {
        display: contents;
    }
    .categoria-item {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        padding: 10px 12px;
    }
    .btn-reset-cat {
        display: none;
    }
    .categoria-barra {
        grid-column: 1 / -1;
    }
    .cabecalho-direita {
        flex-wrap: wrap;
    }
    .perfil-info {
        display: none;
    }
}

@media (max-width: 640px) {
    .cabecalho {
        padding: 10px 14px;
    }
    .painel-conteudo {
        padding: 14px 16px;
    }
    .item-notificacao {
        padding: 12px;
    }
}
