@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');





/* ============================================================
   DESIGN TOKENS — Whitelabel Adaptive
   Estes valores são sobrescritos pelo ThemeManager via :root inline.
   ============================================================ */
:root {
    --color-page-bg: #100F23;
    --color-content-bg: #040A12;
    --color-surface: #060E19;
    --color-surface-hover: #1c2438;
    --color-surface-input: #1c2438;
    --color-surface-elevated: #141d2f;
    --color-border: #141B27;
    --color-border-subtle: #1c2438;
    --color-text-heading: #FFFFFF;
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #8892b0;
    --color-text-muted: #5a6475;
    --color-text-on-accent: #040A12;
    --color-text-value: #0ff;
    --color-text-link: #0ff;
    --color-primary: #09f;
    --color-secondary: #0ff;
    --color-accent: #06B6D4;
    --color-accent-subtle: rgba(0, 255, 255, 0.1);
    --color-success: #4ade80;
    --color-danger: #fb7185;
    --color-warning: #facc15;
    --color-info: #3b82f6;
    --color-sidebar-bg: #060E19;
    --color-sidebar-text: #8892b0;
    --color-sidebar-active-text: #fff;
    --color-sidebar-active-icon: #0ff;
    --color-sidebar-hover-bg: #1c2438;
    --color-sidebar-border: rgba(0, 255, 180, 0.1);
    --color-header-bg: #060E19;
    --color-focus-ring: rgba(0, 255, 255, 0.3);
    --color-focus-border: #0ff;
    --color-row-hover: rgba(0, 255, 255, 0.1);
    --color-progress-bar: linear-gradient(90deg, #09f, #0ff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Tenta usar a cor da skin (--bg-color). Se não houver skin, usa #100F23 */
    background-color: var(--color-page-bg);

    /* Mesma lógica para o texto, caso a skin mude a cor da fonte */
    color: var(--color-text-primary);

    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;

    /* Adiciona uma transição suave se trocar de skin */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #1F1E32;
    padding: 20px;
    box-shadow: 2px 0 20px rgba(0, 255, 180, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    position: relative;
    overflow: hidden;
}

.logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-text-on-accent);
    z-index: 1;
}

.logo-text {
    z-index: 1;
}

.logo-text h3 {
    font-size: 16px;
    font-weight: 600;
}

.logo-text p {
    font-size: 12px;
    opacity: 0.8;
}

.user-info {
    background: var(--color-surface-hover);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(0, 255, 200, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.1);
}

.balance-info {
    padding: 16px;
    margin-bottom: 5px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-surface-hover);
    color: var(--color-text-value);
    transform: translateX(5px);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

.nav-icon {
    font-size: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    background: var(--color-content-bg);
}

.header {
    padding: 20px;
    background: var(--color-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.header-left p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-bar {
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--color-text-primary);
    width: 250px;
}

.search-bar:focus {
    outline: none;
    border-color: var(--color-focus-border);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

.notification {
    position: relative;
    font-size: 18px;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f00;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.btn {
    background-color: var(--color-primary);
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    color: var(--color-text-on-accent);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255, 255, 255, 0.3);
    width: 200%;
    height: 200%;
    border-radius: 50%;
    transition: transform .4s ease;
}

.btn:active:after {
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 12px;
    transform: translateY(20px);
    opacity: 0;
    animation: levitate 1s forwards;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes levitate {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card.positive {
    border: 1px solid #13271B;
    box-shadow: 0 0 20px rgba(19, 39, 27, 0.3);
}

.card.negative {
    border: 1px solid #2D1B13;
    box-shadow: 0 0 20px rgba(45, 27, 19, 0.3);
}

.card-label {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--color-text-value);
}

.card-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-change.positive {
    color: var(--color-success);
}

.card-change.negative {
    color: var(--color-danger);
}

/* Chart Section */
.chart-section {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px;
    /* box-shadow: 0 0 20px rgba(9,255,200,0.2);*/
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
}

.time-selector {
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--color-text-primary);
}

.chart-container {
    height: 300px;
}

/* Stats Grid */
.stats-section {
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: none;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.stat-percentage {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-text-value);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
}

.stat-change.positive {
    color: var(--color-success);
}

.stat-change.negative {
    color: var(--color-danger);
}

/* Transactions Table */
.transactions-section {
    background: var(--color-surface);
    border-radius: 12px;
    margin: 0 0 20px 0;
    overflow: hidden;
}

.transactions-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th {
    background: var(--color-surface-hover);
    padding: 15px;
    text-align: left;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.transactions-table td {
    padding: 15px;
    border-bottom: 1px solid var(--color-border-subtle);
}

.transactions-table tr {
    transition: all 0.3s ease;
}

.transactions-table tr:hover {
    background: var(--color-accent-subtle);
    box-shadow: none;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-text-on-accent);
}

.client-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.client-details p {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.method-pix {
    background: var(--color-secondary);
    color: var(--color-text-on-accent);
}

.method-card {
    background: #09f;
    color: white;
}

.method-boleto {
    background: #4ade80;
    color: var(--color-text-on-accent);
}

.status {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    font-size: 12px;
}

.status.approved {
    background: rgba(74, 222, 128, 0.1);
    color: var(--color-success);
    animation: check 2s infinite alternate;
}

.status.pending {
    background: rgba(255, 255, 0, 0.1);
    color: #ff0;
    animation: pendingPulse 1.2s infinite;
}

@keyframes pendingPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes check {
    0% {
        text-shadow: 0 0 5px #4ade80;
    }

    100% {
        text-shadow: 0 0 15px #4ade80;
    }
}

.action-btn {
    background: transparent;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--color-accent-subtle);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

/* Responsive */
@media (max-width: 768px) {
    input, select, textarea,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    input[type="datetime-local"],
    .form-control,
    .rq-input,
    .rq-input-glass,
    .choices__inner,
    .choices__input {
        font-size: 16px !important;
    }

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Estilos Aprimorados para Filtros --- */
.filters-container {
    padding: 20px;
    background: var(--color-surface-hover);
    border-radius: 8px;
    margin: 20px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    /* Permite que os itens quebrem para a próxima linha em telas menores */
    gap: 15px;
    align-items: flex-end;
    /* Alinha os itens na parte inferior */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
    /* Faz os grupos de input crescerem para preencher o espaço */
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-left: 5px;
}

.filter-group input,
.filter-group select {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--color-text-primary);
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--color-focus-border);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    padding-bottom: 2px;
    /* Pequeno ajuste de alinhamento vertical */
}

/* --- Ajustes Finos para Botões de Filtro --- */
.filter-buttons .btn {
    /* 1. Ajusta o tamanho vertical para alinhar com os inputs */
    padding-top: 10px;
    padding-bottom: 10px;
    height: 43px;
    /* Altura aproximada dos inputs com padding e borda */
    display: flex;
    align-items: center;
    /* 2. Garante que o texto do botão principal seja legível */
    color: var(--color-text-on-accent);
    /* Cor escura para contrastar com o fundo ciano */
    text-decoration: none;
    /* Remove o sublinhado de links com a classe .btn */
}

/* 3. Remove o sublinhado especificamente do botão Limpar ao passar o mouse */
.filter-buttons a.btn:hover {
    text-decoration: none;
}

/* --- Estilos para o Modal de Detalhes --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-surface-elevated);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    /* --- Fix Overflow --- */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
    /* Evita que o scroll sobreponha o conteúdo */
}

/* Custom scrollbar para o modal */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color, #141B27);
    border-radius: 3px;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 28px;
    cursor: pointer;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 15px;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-link.active {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

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

.detail-item span {
    color: var(--color-text-secondary);
}

.detail-item strong {
    color: var(--color-text-primary);
    font-weight: 500;
}

.detail-item textarea {
    width: 100%;
    background: var(--color-content-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 5px;
    border-radius: 4px;
    min-height: 80px;
    resize: vertical;
}

.method-icon-img {
    width: 20px;
    height: 20px;
}

/* --- Estilos para Formulários de Configuração --- */
.settings-form-group {
    margin-bottom: 20px;
    /* Espaçamento entre cada campo */
}

.settings-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    /* Espaçamento entre o label e o input */
}

.settings-form-group input[type="text"],
.settings-form-group input[type="number"],
.settings-form-group input[type="email"],
.settings-form-group input[type="password"],
.settings-form-group select {
    width: 100%;
    background: var(--color-surface-input);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--color-text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-form-group input:focus,
.settings-form-group select:focus {
    outline: none;
    border-color: var(--color-focus-border);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

.form-grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sidebar .user-info {
    background: var(--color-sidebar-bg);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 6px;
    /* A MUDANÇA PRINCIPAL: Usamos border-left em vez de border */
    border-left: 3px solid var(--color-secondary);
    /* Removemos a sombra para um visual mais limpo */
    box-shadow: none;
    /* Adicionamos uma transição suave para o hover */
    transition: all 0.3s ease;
}

.sidebar .user-info:hover {
    background: var(--color-surface-hover);
    /* Um pouco mais claro ao passar o mouse */
    transform: translateX(3px);
}

.sidebar .logo-container {
    display: flex;
    align-items: center;
    height: 60px;
    /* Altura similar ao topbar para alinhamento visual */
    padding: 0 16px;
    /* Apenas padding horizontal */
    margin-bottom: 0px;
    /* Espaço antes do card de usuário */
    margin-left: 20px;
}

.sidebar .logo-container img {
    max-height: 35px;
    /* Controla a altura da imagem dentro do container */
    width: auto;
}

/* ... (regras para .logo-container e .user-info permanecem as mesmas) ... */
.sidebar {
    width: 230px;
    background: var(--color-sidebar-bg);
    padding: 20px;
    box-shadow: 2px 0 20px var(--color-sidebar-border);
    /* --- INÍCIO DA ADIÇÃO --- */
    position: sticky;
    top: 0;
    height: 100vh;
    /* --- FIM DA ADIÇÃO --- */
}

.sidebar .nav-link {
    display: flex;
    justify-content: space-between;
    /* Alinha os itens nas extremidades */
    align-items: center;
    padding: 13px 16px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--color-sidebar-hover-bg);
    color: var(--color-sidebar-active-text);
    /* Texto ativo fica branco para maior contraste */
    transform: translateX(0);
    /* Remove o efeito de mover para o lado */
    box-shadow: none;
    /* Remove a sombra para um visual mais limpo */
}

.sidebar .nav-link span {
    flex-grow: 1;
    /* Garante que o texto ocupe o espaço disponível */
}

.sidebar .nav-link .nav-icon {
    width: 20px;
    height: 20px;
    color: var(--color-sidebar-text);
    transition: color 0.3s ease;
    flex-shrink: 0;
    /* Impede que o ícone encolha */
}

.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
    color: var(--color-sidebar-active-icon);
    /* Ícone ativo fica ciano para destaque */
}

/* --- Estilos para o Modal de Detalhes --- */
/* --- Estilos para o Modal de Detalhes (DUPLICATA REMOVIDA) --- */
/* A definição principal está na linha ~732 */

/* --- Estilos para o Input de Data Personalizado --- */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper input[type="date"] {
    /* Remove a aparência padrão do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Garante que o padding funcione corretamente */
    padding-right: 40px !important;
}

/* Remove o ícone de calendário e a seta de dropdown internos */
.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator,
.date-input-wrapper input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

/* Cria o nosso próprio ícone de calendário */
.date-input-wrapper::after {
    content: '📅';
    /* Emoji de calendário */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    /* Permite que o clique passe para o input */
}

/* --- INÍCIO DOS ESTILOS DE RESPONSIVIDADE --- */
/* Botão de abrir/fechar a sidebar */
.sidebar-toggle-btn {
    display: none;
    /* Escondido em telas grandes */
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 28px;
    cursor: pointer;
    z-index: 1100;
}

/* Estilos para telas pequenas (Mobile) */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .main-grid-layout {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        position: fixed;
        /* Fica por cima de tudo */
        left: -270px;
        /* Começa escondida fora da tela */
        top: 0;
        width: 270px;
        height: 100%;
        z-index: 1050;
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        /* Permite a rolagem vertical interna */
    }

    .sidebar.open {
        left: 0;
        /* Mostra a sidebar ao adicionar a classe 'open' */
    }

    .sidebar-toggle-btn {
        display: block;
        /* Mostra os botões em telas pequenas */
    }

    #sidebar-close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
    }

    .main-content {
        width: 100%;
    }

    /* Overlay para escurecer o conteúdo quando o menu está aberto */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Responsividade para Tabelas */
    .transactions-section {
        overflow-x: auto;
        /* Permite a rolagem horizontal */
    }

    .transactions-table {
        width: 100%;
        min-width: 800px;
        /* Força a tabela a ter uma largura mínima, causando a rolagem */
    }
}

/* --- FIM DOS ESTILOS DE RESPONSIVIDADE --- */
/* --- Estilos para Notificações (Toast) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    /* Aumentado para ficar acima do overlay do modal */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Impede que o container bloqueie cliques */
}

.toast {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease-in-out;
    pointer-events: auto;
    /* Permite interações com o toast em si (se necessário no futuro) */
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--color-success);
    /* Verde */
}

.toast.error {
    border-left-color: var(--color-danger);
    /* Vermelho */
}

.toast.info {
    border-left-color: var(--color-info);
    /* Azul */
}

/* Toggle Switch para Ativar/Desativar Loja */
.toggle-switch-small {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    transition: .4s;
    border-radius: 22px;
}

.slider-small:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-small {
    background-color: var(--color-primary);
}

input:checked+.slider-small:before {
    transform: translateX(18px);
}

/* Estilos para o Modal de Saldos */
.balance-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.balance-item {
    background-color: var(--color-content-bg);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--color-border);
}

.balance-item .label {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.balance-item .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.balance-item.available .value {
    color: var(--color-success);
}

/* Verde para disponível */
.balance-item.retained .value {
    color: var(--color-warning);
}

/* Amarelo para retido */
/* --- Estilos para Paginação --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 8px;
}

.pagination-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--color-surface-hover);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.pagination-link:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}

.pagination-link.active {
    background-color: var(--color-secondary);
    color: var(--color-text-on-accent);
    border-color: var(--color-secondary);
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
}

/* --- Estilos para o Card de Premiação --- */
.award-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.award-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 15px;
}

.award-image-container {
    background-color: var(--color-surface);
    /* Cor padrão dos cards */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.award-image-container img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    /* Limita a altura da imagem */
    object-fit: contain;
}

.award-progress-bar {
    width: 100%;
    background-color: var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    height: 12px;
    margin-top: 10px;
}

.award-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #34d399);
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
}

.award-card .progress-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.award-card .revenue-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* --- Estilos para o Topbar --- */
.client-panel .main-content {
    flex: 1;
    position: relative;
    padding-top: 24px;
    /* Espaço reduzido pois a topbar foi removida */
}

.topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-header-bg);
    /* Mesma cor da sidebar */
    padding: 15px 20px;
    z-index: 900;
}

.topbar-progress-container {
    max-width: 400px;
    margin-left: auto;
    margin-right: 0;
}

.topbar-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.topbar-text strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.topbar-progress-bar {
    width: 100%;
    background-color: var(--color-content-bg);
    border-radius: 5px;
    height: 8px;
    overflow: hidden;
}

.topbar-progress-bar-inner {
    height: 100%;
    background: var(--color-progress-bar);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

/* Ajuste de responsividade para o topbar */
@media (max-width: 992px) {
    .main-content {
        padding-top: 70px;
        /* Altura um pouco menor no mobile */
    }

    .topbar-progress-container {
        max-width: 100%;
    }
}

/* --- Estilos para Ícones de Premiação no Topbar --- */
.topbar-text .goal-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.award-icon {
    width: 18px;
    height: 18px;
}

.award-icon.bronze {
    color: #cd7f32;
}

.award-icon.silver {
    color: #c0c0c0;
}

.award-icon.gold {
    color: #ffd700;
}

.award-icon.diamond {
    color: #b9f2ff;
}

.award-icon.master {
    color: #e040fb;
}

/* Estilo para os inputs de edição nos cards */
.card-value-input {
    width: 100%;
    background-color: var(--color-surface-hover);
    border: 1px dashed var(--color-secondary);
    border-radius: 6px;
    padding: 5px 10px;
    color: var(--color-text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    /* Mesmo tamanho do valor original */
    font-weight: bold;
    text-align: left;
}

.card-value-input:focus {
    outline: none;
}

/* --- Estilos para o Modal de Notificação --- */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 22, 36, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.notification-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.notification-modal {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.notification-overlay.visible .notification-modal {
    transform: scale(1);
}

.notification-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.notification-modal-header .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-modal-header .icon.type-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.notification-modal-header .icon.type-success {
    background-color: rgba(74, 222, 128, 0.2);
    color: var(--color-success);
}

.notification-modal-header .icon.type-warning {
    background-color: rgba(250, 204, 21, 0.2);
    color: var(--color-warning);
}

.notification-modal-header h2 {
    font-size: 20px;
    margin: 0;
    color: var(--color-text-heading);
}

.notification-modal-body {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

.notification-modal-footer {
    text-align: right;
}

/* --- Estilos para Ícone e Modal de Suporte --- */
.support-icon-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-on-accent);
    cursor: pointer;
    box-shadow: 0 4px 15px var(--color-focus-ring);
    z-index: 1000;
    transition: transform 0.2s ease;
}

.support-icon-container:hover {
    transform: scale(1.1);
}

#support-managers-list .manager-item {
    display: block;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--color-surface-hover);
    color: var(--color-text-primary);
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

#support-managers-list .manager-item:hover {
    background-color: var(--color-border);
}

#support-managers-list .manager-item-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

/* --- Estilos para a Sidebar Reorganizada --- */
.nav-category {
    padding: 15px 12px 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.has-submenu>a {
    position: relative;
}

.nav-item.has-submenu>a::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-item.has-submenu.open>a::after {
    transform: translateY(-50%) rotate(-90deg);
}

.nav-submenu {
    list-style: none;
    padding-left: 25px;
    /* Indentação do submenu */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.nav-item.has-submenu.open .nav-submenu {
    max-height: 500px;
    /* Altura máxima para a animação */
}

.nav-submenu li a {
    display: block;
    padding: 10px 15px;
    color: var(--color-sidebar-text);
    border-radius: 6px;
    font-size: 13px;
    position: relative;
    padding-left: 25px;
}

.nav-submenu li a::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-border);
    border-radius: 50%;
}

.nav-submenu li a:hover {
    color: var(--color-sidebar-active-text);
    background-color: var(--color-sidebar-hover-bg);
}

.nav-submenu li a.sub-active {
    color: var(--color-sidebar-active-icon);
    font-weight: 600;
}

/* --- Estilos para a Sidebar Reorganizada --- */
.nav-category {
    padding: 15px 12px 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.has-submenu>a {
    position: relative;
}

.nav-item.has-submenu>a::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-item.has-submenu.open>a::after {
    transform: translateY(-50%) rotate(-90deg);
}

.nav-submenu {
    list-style: none;
    padding-left: 25px;
    /* Indentação do submenu */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.nav-item.has-submenu.open .nav-submenu {
    max-height: 500px;
    /* Altura máxima para a animação */
}

.nav-submenu li a {
    display: block;
    padding: 10px 15px;
    color: var(--color-sidebar-text);
    border-radius: 6px;
    font-size: 13px;
    position: relative;
    padding-left: 25px;
}

.nav-submenu li a::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-border);
    border-radius: 50%;
}

.nav-submenu li a:hover {
    color: var(--color-sidebar-active-text);
    background-color: var(--color-sidebar-hover-bg);
}

.nav-submenu li a.sub-active {
    color: var(--color-sidebar-active-icon);
    font-weight: 600;
}

/* --- Estilos para o Toggle Switch & Labels --- */
.toggle-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.toggle-switch-label:hover {
    border-color: var(--color-primary);
}

.toggle-switch-label strong,
.toggle-switch-label span {
    color: inherit;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    /* Cor de fundo quando inativo */
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--color-focus-ring);
}

input:checked+.slider:before {
    -webkit-transform: translateX(22px);
    -ms-transform: translateX(22px);
    transform: translateX(22px);
}

/* --- Estilos para Input de Arquivo Personalizado --- */
.custom-file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.custom-file-input-label {
    display: block;
    background: var(--color-primary);
    color: var(--color-text-primary);
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    text-align: center;
}

.custom-file-input-label:hover {
    background: #ffffff;
}

.custom-file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name-display {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-text-primary);
}

/* --- Estilos para Input de Data Personalizado --- */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper input[type="date"] {
    /* Remove a aparência padrão do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Garante que o padding funcione corretamente para dar espaço ao ícone */
    padding-right: 40px !important;
}

/* Remove o ícone de calendário e a seta de dropdown internos do Chrome/Edge */
.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator,
.date-input-wrapper input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

/* Cria o nosso próprio ícone de calendário usando um pseudo-elemento */
.date-input-wrapper::after {
    content: '📅';
    /* Emoji de calendário */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    /* Permite que o clique passe através do ícone para o input */
}

.status.blocked {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* --- Estilos para Navegação por Abas (Tabs) --- */
.page-tabs {
    display: flex;
    flex-wrap: wrap;
    /* Permite que as abas quebrem a linha em telas menores */
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.page-tabs a {
    padding: 10px 18px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    /* Alinha com a borda inferior */
    transition: all 0.2s ease;
}

.page-tabs a.active,
.page-tabs a:hover {
    color: var(--color-text-link);
    border-bottom-color: var(--color-text-link);
}

/* --- Estilos para Notificações (Toast) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--color-success);
    /* Verde */
}

.toast.error {
    border-left-color: var(--color-danger);
    /* Vermelho */
}

/* --- Correção de Estilo: Remove sublinhado de links com a classe .btn --- */
a.btn,
a.btn:hover {
    text-decoration: none;
}

/* --- Estilo Padrão para Textareas em Formulários --- */
.settings-form-group textarea {
    width: 100%;
    min-height: 120px;
    background: var(--color-surface-input);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--color-text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    transition: all 0.2s ease;
    resize: vertical;
}

.settings-form-group textarea:focus {
    outline: none;
    border-color: var(--color-focus-border);
    box-shadow: 0 0 10px var(--color-focus-ring);
}

.settings-form-group textarea[readonly] {
    background-color: #0f1624;
    /* Fundo mais escuro para campos de apenas leitura */
    cursor: copy;
}

/* --- INÍCIO: Estilos de Responsividade para o PAINEL ADMIN --- */
@media (max-width: 992px) {

    /* Esconde a sidebar do admin fora da tela por padrão */
    .admin-panel .sidebar {
        position: fixed;
        left: -270px;
        /* Largura da sidebar + um pouco mais */
        top: 0;
        height: 100%;
        z-index: 1050;
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    /* Mostra a sidebar quando a classe 'open' é adicionada via JS */
    .admin-panel .sidebar.open {
        left: 0;
    }

    /* Remove a margem do conteúdo principal para ocupar a tela toda */
    .admin-panel .main-content {
        margin-left: 0;
    }

    /* Mostra os botões de controle apenas em telas pequenas */
    .admin-panel .sidebar-toggle-btn {
        display: block;
    }

    /* Posiciona o botão de abrir no header */
    .admin-panel .main-content>.sidebar-toggle-btn {
        position: absolute;
        top: 20px;
        left: 20px;
    }
}

/* --- FIM: Estilos de Responsividade para o PAINEL ADMIN --- */

/* Update existing class */
.notification-modal {
    /* ... existing styles ... */
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Ensure the body takes available space if we use flex, but simple scroll is key */
.notification-modal-body {
    overflow-y: auto;
}

/* Add responsive adjustments */
@media (max-width: 768px) {
    .notification-modal {
        padding: 20px;
        width: 95%;
    }

    .notification-modal-header h2 {
        font-size: 18px;
    }
}

/* --- Estilos globais para o Flatpickr Herdar Tema do Tenant (Premium / Moderno) --- */
body .flatpickr-calendar {
    background: var(--color-surface, #141d2f) !important;
    border: 1px solid var(--color-border, #334155) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25) !important;
    color: var(--color-text-primary, #fff) !important;
    border-radius: 16px !important;
    padding: 10px !important;
    font-family: 'Inter', 'Poppins', sans-serif !important;
    width: max-content !important;
    box-sizing: content-box !important;
    max-width: calc(100vw - 24px) !important;
}

body .flatpickr-calendar.arrowTop:before,
body .flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--color-border, #334155) !important;
}

body .flatpickr-calendar.arrowBottom:before,
body .flatpickr-calendar.arrowBottom:after {
    border-top-color: var(--color-border, #334155) !important;
}

body .flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: var(--color-text-primary, #fff) !important;
    fill: var(--color-text-primary, #fff) !important;
    height: 40px !important;
}

body .flatpickr-current-month {
    font-size: 110% !important;
    padding-top: 4px !important;
}

body .flatpickr-current-month .flatpickr-monthDropdown-months,
body .flatpickr-current-month input.cur-year {
    color: var(--color-text-primary, #fff) !important;
    font-weight: 700 !important;
    background: transparent !important;
}

body .flatpickr-months .flatpickr-prev-month,
body .flatpickr-months .flatpickr-next-month {
    color: var(--color-text-primary, #fff) !important;
    fill: var(--color-text-primary, #fff) !important;
    border-radius: 8px !important;
    transition: background 0.2s ease !important;
}

body .flatpickr-months .flatpickr-prev-month:hover,
body .flatpickr-months .flatpickr-next-month:hover {
    background: var(--color-surface-hover, rgba(255, 255, 255, 0.05)) !important;
}

body .flatpickr-months .flatpickr-prev-month:hover svg,
body .flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--color-primary, #00f3ff) !important;
}

body .flatpickr-weekdays {
    background: transparent !important;
    border-bottom: 1px solid var(--color-border, #334155) !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
}

body span.flatpickr-weekday {
    color: var(--color-text-secondary, #8892b0) !important;
    opacity: 0.9 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

body .flatpickr-day {
    color: var(--color-text-primary, #fff) !important;
    border-radius: 50% !important;
    /* Estilo Apple/Airbnb - Perfeitamente redondo */
    font-weight: 500 !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
    margin: 2px 0 !important;
}

body .flatpickr-day:hover,
body .flatpickr-day:focus {
    background: var(--color-surface-hover, rgba(255, 255, 255, 0.1)) !important;
    border-color: var(--color-primary, #00f3ff) !important;
    transform: scale(1.05) !important;
}

body .flatpickr-day.selected,
body .flatpickr-day.startRange,
body .flatpickr-day.endRange,
body .flatpickr-day.selected.inRange,
body .flatpickr-day.startRange.inRange,
body .flatpickr-day.endRange.inRange,
body .flatpickr-day.selected:focus,
body .flatpickr-day.startRange:focus,
body .flatpickr-day.endRange:focus,
body .flatpickr-day.selected:hover,
body .flatpickr-day.startRange:hover,
body .flatpickr-day.endRange:hover,
body .flatpickr-day.selected.prevMonthDay,
body .flatpickr-day.startRange.prevMonthDay,
body .flatpickr-day.endRange.prevMonthDay,
body .flatpickr-day.selected.nextMonthDay,
body .flatpickr-day.startRange.nextMonthDay,
body .flatpickr-day.endRange.nextMonthDay {
    background: var(--color-primary, #00f3ff) !important;
    border-color: var(--color-primary, #00f3ff) !important;
    color: var(--color-text-on-accent, #000) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700 !important;
    transform: scale(1.05) !important;
}

/* Tratamento moderno para o range (Intervalo de datas) */
body .flatpickr-day.inRange {
    background: var(--color-accent-subtle, rgba(255, 255, 255, 0.05)) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    /* O meio do range fica quadrado para conectar os círculos */
    transform: none !important;
}

/* O primeiro dia do range */
body .flatpickr-day.startRange {
    border-radius: 50% 0 0 50% !important;
}

/* O último dia do range */
body .flatpickr-day.endRange {
    border-radius: 0 50% 50% 0 !important;
}

/* Dias vazios fora do mês */
body .flatpickr-day.prevMonthDay,
body .flatpickr-day.nextMonthDay {
    color: var(--color-text-muted, rgba(255, 255, 255, 0.3)) !important;
    font-weight: 400 !important;
}

/* =========================================
   ESTILIZAÇÃO GLOBAL DE CHECKBOXES MODERNOS
   ========================================= */
input[type="checkbox"] {
    accent-color: var(--color-primary, #00f3ff);
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s ease-in-out;
}

input[type="checkbox"]:hover {
    transform: scale(1.05);
}

input[type="checkbox"]:active {
    transform: scale(0.95);
}

/* Força o Choices.js a usar as variáveis globais da Tenant */
.choices__inner {
    background-color: var(--color-surface-input, #fff) !important;
    border: 1px solid var(--color-border, #ccc) !important;
    color: var(--color-text-primary, #000) !important;
    border-radius: 8px;
    /* mesmo raio dos seus inputs */
}

/* O campo de texto dentro do choices */
.choices__input.choices__input--cloned {
    background-color: transparent !important;
    color: var(--color-text-primary, #000) !important;
}

/* O texto fantasma (placeholder) */
.choices__input::placeholder {
    color: var(--color-text-muted, #999) !important;
    opacity: 1;
}

/* Os itens selecionados (as "tags" coloridas) */
.choices__list--multiple .choices__item {
    background-color: var(--color-primary, #007bff) !important;
    border: 1px solid var(--color-primary, #007bff) !important;
    color: #ffffff !important;
}

/* O dropdown de opções que aparece embaixo */
.choices__list--dropdown {
    background-color: var(--color-surface-elevated, #fff) !important;
    border: 1px solid var(--color-border, #ccc) !important;
}

/* O texto dentro das opções do dropdown */
.choices__list--dropdown .choices__item {
    color: var(--color-text-secondary, #333) !important;
}

/* Opção selecionada no hover */
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--color-primary, #007bff) !important;
    color: #ffffff !important;
}

/* Limitador global de altura para cards de Utmify, Webhooks e Integrações */
#utmify-credentials-list,
#webhooks-list-display,
#webhook-list,
#webhook-list-editor,
#appsell-credentials-list,
#otimizey-list-display,
#xtracky-list-display {
    max-height: 280px !important;
    overflow-y: auto !important;
    padding-right: 6px;
}
#utmify-credentials-list::-webkit-scrollbar,
#webhooks-list-display::-webkit-scrollbar,
#webhook-list::-webkit-scrollbar,
#webhook-list-editor::-webkit-scrollbar,
#appsell-credentials-list::-webkit-scrollbar,
#otimizey-list-display::-webkit-scrollbar,
#xtracky-list-display::-webkit-scrollbar {
    width: 6px;
}
#utmify-credentials-list::-webkit-scrollbar-track,
#webhooks-list-display::-webkit-scrollbar-track,
#webhook-list::-webkit-scrollbar-track,
#webhook-list-editor::-webkit-scrollbar-track,
#appsell-credentials-list::-webkit-scrollbar-track,
#otimizey-list-display::-webkit-scrollbar-track,
#xtracky-list-display::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
#utmify-credentials-list::-webkit-scrollbar-thumb,
#webhooks-list-display::-webkit-scrollbar-thumb,
#webhook-list::-webkit-scrollbar-thumb,
#webhook-list-editor::-webkit-scrollbar-thumb,
#appsell-credentials-list::-webkit-scrollbar-thumb,
#otimizey-list-display::-webkit-scrollbar-thumb,
#xtracky-list-display::-webkit-scrollbar-thumb {
    background: var(--color-primary, #09f);
    border-radius: 4px;
}