/* ========================================
   DIRECTSEND - SISTEMA DE DESIGN OFICIAL
   ======================================== */

/* ========================================
   1. DESIGN TOKENS (HSL) - PADRÃO ESCURO ABSOLUTO
   ======================================== */

:root {
    /* Variáveis Base - Modo Escuro como Padrão */
    --background: 228 15% 10%;
    --foreground: 210 20% 95%;
    --card: 228 15% 14%;
    --card-foreground: 210 20% 95%;
    --primary: 145 63% 49%;
    --primary-foreground: 0 0% 100%;
    --secondary: 228 15% 18%;
    --secondary-foreground: 210 20% 85%;
    --muted: 228 12% 20%;
    --muted-foreground: 215 15% 55%;
    --border: 228 12% 20%;
    --input: 228 12% 22%;
    --ring: 145 63% 49%;

    /* Login Background */
    --login-bg: 228 20% 6%;
    --sidebar-bg: 228 20% 7%;

    /* Tokens Adicionais de Design */
    --accent: 260 60% 55%;
    --destructive: 0 72% 51%;
    --info: 199 89% 48%;
    --warning: 45 93% 47%;

    /* Raios de Borda */
    --radius: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;
}

/* Nota: O tema claro foi removido conforme solicitação URGENTE. */

/* ========================================
   2. RESET E BASE
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: hsl(228 15% 10%);
    /* azulado escuro */
    color: hsl(210 20% 95%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Cores de Texto Globais - REGRA ABSOLUTA DE CONTRASTE */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: hsl(210, 20%, 95%) !important;
    font-weight: 700;
}

p,
.page-description {
    color: hsl(215, 15%, 75%) !important;
    /* Conteúdo legível */
}

label,
.form-label {
    color: hsl(210, 20%, 90%) !important;
    /* Labels Brancos */
    font-weight: 500;
}

small,
.text-muted,
.form-text,
.text-helper {
    color: hsl(215, 15%, 65%) !important;
    /* Auxiliares */
}

::placeholder {
    color: hsl(215, 15%, 45%) !important;
    /* Placeholder */
}

/* Exceções e Cabeçalhos Coloridos */
.text-white {
    color: #FFFFFF !important;
}

/* Cabeçalhos Verdes/Teal (Regra 2) */
.card-header.bg-gradient-primary,
.card-header.bg-success,
.modal-header.bg-success {
    color: #FFFFFF !important;
}

.card-header.bg-gradient-primary *,
.modal-header.bg-success * {
    color: #FFFFFF !important;
}

/* Cabeçalho Amarelo (Regra 2) */
.card-header.bg-warning,
.card-header-batch-control,
.card-header-business-hours {
    background: hsl(45, 93%, 47%) !important;
    color: hsl(0, 0%, 10%) !important;
}

.card-header.bg-warning *,
.card-header-batch-control *,
.card-header-business-hours * {
    color: hsl(0, 0%, 10%) !important;
}

/* ========================================
   3. TELA DE LOGIN - DESIGN OFICIAL ESCURO
   ======================================== */
.login-screen {
    background-color: hsl(228 20% 6%) !important;
    background-image:
        linear-gradient(hsl(145 63% 49% / 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsl(145 63% 49% / 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Blobs Decorativos - Regra Login */
.login-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: hsl(145 63% 49%);
    border-radius: 50%;
    filter: blur(80px);
    /* Requisitado 80px */
    opacity: 0.05;
    z-index: 1;
    animation: pulse-blob 8s ease-in-out infinite alternate;
}

@keyframes pulse-blob {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.04;
    }

    100% {
        transform: translate(20px, 20px) scale(1.1);
        opacity: 0.06;
    }
}

.blob-1 {
    top: -200px;
    left: -200px;
}

.blob-2 {
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Card de Login */
.login-card {
    background: hsl(228, 15%, 12%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-2xl);
    border: 1px solid hsl(228, 12%, 20% / 0.3);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 480px;
    /* Mais largo conforme pedido */
    position: relative;
    z-index: 10;
    margin-top: 6vh;
    /* Deslocar levemente para baixo para equilíbrio visual */
}

/* Títulos */
.login-card h2 {
    color: hsl(210, 20%, 95%, 0.4) !important;
    text-align: center;
    font-weight: 700 !important;
    font-style: italic !important;
    font-size: 1.5rem !important;
    /* Exato conforme requisitado */
    margin-bottom: 0.75rem;
}

.login-card p {
    color: hsl(215, 15%, 55%) !important;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Labels */
.login-card .form-label {
    color: hsl(210, 20%, 95%) !important;
    font-weight: 700 !important;
}

.login-card .form-label i {
    color: hsl(145, 63%, 49%) !important;
}

/* Inputs da Tela de Login */
.login-card .form-control {
    background: hsl(228, 15%, 10% / 0.6) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-xl);
    padding: 0.875rem 1.25rem;
}

.login-card .form-control::placeholder {
    color: hsl(215, 15%, 45%) !important;
}

/* Input APIKEY com font-mono */
#loginAPIKEY {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Checkbox */
.login-card .form-check {
    margin-bottom: 1.5rem;
}

.login-card .form-check-label {
    color: hsl(var(--foreground) / 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    background-color: hsl(var(--background) / 0.6);
    border: 2px solid hsl(var(--border));
    cursor: pointer;
}

.login-card .form-check-input:checked {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

.login-card .form-check-input:focus {
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}

/* Botão Entrar - Gradiente WhatsApp Premium */
.btn-login {
    background: linear-gradient(135deg, hsl(145, 63%, 49%) 0%, hsl(145, 63%, 38%) 100%) !important;
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    padding: 1.25rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px hsl(145 63% 49% / 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-login:hover::after {
    left: 120%;
}

.btn-login:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px hsl(145 63% 49% / 0.5);
    filter: brightness(1.1);
}

.btn-login:active {
    transform: translateY(0) scale(1);
}

/* Rodapé Login */
.login-card small {
    color: hsl(215, 15%, 55%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.login-card small i {
    color: hsl(145, 63%, 49%) !important;
}

/* ========================================
   4. SIDEBAR - DESIGN OFICIAL ESCURO
   ======================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: hsl(228 20% 7%) !important;
    border-right: 1px solid hsl(228 12% 15%) !important;
    z-index: 50;
    transition: width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Header da Sidebar */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.sidebar-header img {
    max-height: 28px;
    width: auto;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header img {
    max-height: 24px;
}

.sidebar-header h3 {
    color: hsl(var(--foreground));
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

/* Navegação */
.sidebar-nav {
    padding: 1rem 0.75rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: hsl(215, 15%, 65%) !important;
    /* Inativo */
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: hsl(228, 12%, 20% / 0.3);
    color: hsl(var(--foreground));
}

.nav-link.active {
    background: hsl(145, 63%, 49%, 0.15) !important;
    color: hsl(145, 63%, 49%) !important;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

/* Badge Counter */
.badge-counter {
    background: hsl(var(--destructive));
    color: white;
    border-radius: 10px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

.sidebar.collapsed .badge-counter {
    display: none;
}

/* MODAL E-MAIL DARK MODE */
.modal-content {
    background: hsl(228, 15%, 12%) !important;
    color: #FFFFFF !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
}

.modal-header,
.modal-footer {
    border-color: hsl(228, 12%, 20%) !important;
}

.modal-body .form-control {
    background: hsl(228, 15%, 10%) !important;
    color: hsl(210, 20%, 95%) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
}

.modal-body .form-control:focus {
    background: hsl(228, 15%, 8%) !important;
    border-color: hsl(145, 63%, 49%) !important;
    color: #FFFFFF !important;
}

.modal-body .form-label {
    color: hsl(210, 20%, 95%) !important;
    font-weight: 600;
}

.btn-close {
    filter: invert(1) brightness(200%);
}

/* Footer da Sidebar */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 0.75rem;
    border-top: 1px solid hsl(228 12% 15%);
    background: hsl(228 20% 7%) !important;
}

/* ========================================
   5. MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: hsl(var(--background));
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* Header Superior */
.top-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: hsl(228, 20%, 8%) !important;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    padding: 1rem 1.5rem;
}

.top-header h4,
#pageTitle {
    color: hsl(215, 15%, 55%) !important;
    /* Cinza */
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Badge de Instâncias */
#activeInstancesCount {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border) / 0.3);
    border-radius: var(--radius-xl);
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--primary));
}

/* Seções de Conteúdo */
.content-section {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

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

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.content-header h2 {
    color: hsl(var(--foreground));
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.content-header p {
    color: hsl(var(--foreground) / 0.7);
    margin: 0;
    font-size: 1rem;
}

/* ========================================
   6. CARDS/SEÇÕES - PADRÃO ESCURO
   ======================================== */
.card {
    background: hsl(228, 15%, 14%) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px hsl(0 0% 0% / 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px hsl(0 0% 0% / 0.3);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid hsl(228, 12%, 20%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(160, 60%, 38%) 100%);
    color: white;
}

/* ========================================
   7. FORMULÁRIOS
   ======================================== */
/* INPUTS/SELECTS em todas as telas */
.form-control,
.form-select {
    background: hsl(228, 15%, 10%) !important;
    /* Ou 228 12% 12% */
    border: 1px solid hsl(228, 12%, 20%) !important;
    color: hsl(210, 20%, 95%) !important;
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsl(145, 63%, 49%, 0.4) !important;
}

.form-label {
    color: hsl(210, 20%, 95%) !important;
    /* Labels Brancos */
    font-weight: 500;
}

/* ========================================
   8. BOTÕES
   ======================================== */
.btn {
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-whatsapp,
.btn-success {
    background: linear-gradient(135deg, hsl(145, 63%, 49%) 0%, hsl(145, 63%, 38%) 100%);
    color: white;
    box-shadow: 0 4px 15px hsl(var(--primary) / 0.2);
}

.btn-whatsapp:hover,
.btn-success:hover {
    box-shadow: 0 6px 20px hsl(var(--primary) / 0.3);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(210, 20%, 95%) !important;
}

.btn-outline-light:hover {
    background: hsl(var(--muted) / 0.3);
}

/* Saída - Vermelho */
#logoutBtn {
    border: 1px solid hsl(0, 72%, 51%) !important;
    color: hsl(0, 72%, 51%) !important;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid hsl(var(--destructive));
    color: hsl(var(--destructive));
}

.btn-outline-danger:hover {
    background: hsl(var(--destructive) / 0.1);
}

/* ========================================
   9. ANIMAÇÕES
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

#scheduledTableBody td {
    color: hsl(210, 20%, 95%) !important;
    background: hsl(228, 15%, 12%) !important;
}

#scheduledTableBody tr:hover td {
    background: hsl(228, 15%, 16%) !important;
}

.table-history td,
.table-history td span:not(.badge),
.table-history td strong,
.table td {
    /* General fix for tables in content sections */
    color: hsl(210, 20%, 95%) !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {

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

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

/* ========================================
   10. UTILITÁRIOS
   ======================================== */
.text-muted {
    color: hsl(var(--foreground) / 0.6) !important;
}

.bg-light {
    background: hsl(var(--muted)) !important;
}

.mobile-toggle {
    display: none;
}

/* ========================================
   11. RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   12. ELEMENTOS ESPECÍFICOS
   ======================================== */
.whatsapp-preview {
    background-image: url('./img/black.jpg');
    background-size: cover;
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    box-shadow: 0 8px 32px hsl(0 0% 0% / 0.3);
}

.contact-item {
    background: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid hsl(var(--primary));
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: hsl(var(--primary) / 0.15);
    transform: translateX(4px);
}

.file-upload-area {
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    background: hsl(var(--card));
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--card) / 0.8);
}

/* Scrollbar Customizada - PADRÃO ESCURO */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(228, 15%, 10%) !important;
}

::-webkit-scrollbar-thumb {
    background: hsl(228, 12%, 25%) !important;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(145, 63%, 49%, 0.5) !important;
}

/* ========================================
   13. PAINEL INTERNO - DESIGN SYSTEM
   ======================================== */

/* Tokens Adicionais para Painel Interno */
:root {
    --input-bg: 228 12% 22%;
    --text-secondary: 215 15% 55%;
    --info: 199 89% 48%;
    --warning: 45 93% 47%;
}

/* ========================================
   14. STAT CARDS (DASHBOARD) - LAYOUT ESPECÍFICO
   ======================================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Stat Cards - 4 colunas */
.card {
    background: hsl(228, 15%, 14%);
    border: 1px solid hsl(228, 12%, 20%);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px hsl(0 0% 0% / 0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px hsl(0 0% 0% / 0.3);
}

.card-body.text-center {
    padding: 1.5rem;
}

/* Ícones dos Stat Cards com cores específicas */
.card-body i.bi-people {
    color: hsl(145, 63%, 49%) !important;
    /* Verde - Contatos */
    font-size: 2rem !important;
}

.card-body i.bi-send {
    color: hsl(145, 63%, 49%) !important;
    /* Verde - Mensagens Enviadas */
    font-size: 2rem !important;
}

.card-body i.bi-check-circle {
    color: hsl(145, 63%, 49%) !important;
    /* Verde - Sucessos */
    font-size: 2rem !important;
}

.card-body i.bi-x-circle {
    color: hsl(0, 72%, 51%) !important;
    /* Vermelho - Erros */
    font-size: 2rem !important;
}

/* Valores dos cards - Branco */
.card-body h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: hsl(210, 20%, 95%) !important;
    /* Branco */
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Labels dos cards - Cinza */
.card-body small {
    font-size: 0.875rem;
    color: hsl(215, 15%, 55%) !important;
    /* Cinza */
    font-weight: 500;
}

/* Grid responsivo */
@media (max-width: 1200px) {

    .dashboard-stats,
    .row .col-lg-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .dashboard-stats,
    .row .col-lg-3 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   15. TABELAS - REGRAS DE CONTRASTE ESCURO (Regras: Tabelas)
   ======================================== */
.table-container {
    background: hsl(228, 15%, 12%) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: hsl(228, 15%, 18%) !important;
    color: hsl(215, 15%, 55%) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid hsl(228, 12%, 20%);
}

.table tbody tr {
    background: hsl(228, 15%, 12%) !important;
    border-bottom: 1px solid hsl(228, 12%, 20%) !important;
}

.table tbody td {
    color: hsl(210, 20%, 85%) !important;
    padding: 0.75rem 1rem;
}

.table tbody tr:hover {
    background: hsl(228, 15%, 16%) !important;
}

/* ========================================
   16. BADGES / TAGS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.badge.badge-success,
.bg-success {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.badge.badge-error,
.bg-danger {
    background: hsl(var(--destructive) / 0.15);
    color: hsl(var(--destructive));
}

.badge.badge-info {
    background: hsl(var(--info) / 0.15);
    color: hsl(var(--info));
}

.badge.badge-warning {
    background: hsl(var(--warning) / 0.15);
    color: hsl(var(--warning));
}

.badge.badge-neutral {
    background: hsl(var(--muted));
    color: hsl(var(--text-secondary));
}

.badge.badge-version {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
    font-size: 0.625rem;
}

/* ========================================
   17. BARRAS DE PROGRESSO
   ======================================== */
.progress {
    height: 12px;
    background: hsl(var(--muted));
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, hsl(145, 63%, 49%) 0%, hsl(145, 63%, 38%) 100%);
    border-radius: 9999px;
    transition: width 1000ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   18. INPUTS APRIMORADOS
   ======================================== */
.form-control,
.form-select {
    background: hsl(var(--input-bg) / 0.6);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-xl);
    color: hsl(var(--foreground));
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: hsl(var(--primary) / 0.5);
    background: hsl(var(--input-bg) / 0.8);
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
}

.form-control::placeholder {
    color: hsl(var(--text-secondary) / 0.5);
}

.form-control:disabled,
.form-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   19. BOTÕES SECUNDÁRIOS E DESTRUTIVOS
   ======================================== */
.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(210 20% 85%);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-xl);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: hsl(var(--secondary) / 0.8);
    transform: translateY(-1px);
}

.btn-danger,
.btn-destructive {
    background: transparent;
    color: hsl(var(--destructive) / 0.9);
    border: 1px solid hsl(var(--destructive) / 0.3);
    border-radius: var(--radius-xl);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-danger:hover,
.btn-destructive:hover {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border-color: hsl(var(--destructive) / 0.5);
}

.btn-ghost {
    background: transparent;
    color: hsl(var(--text-secondary));
    border: none;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: hsl(var(--muted) / 0.3);
    color: hsl(var(--foreground));
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   20. NAVEGAÇÃO SIDEBAR APRIMORADA
   ======================================== */
/* Navegação Sidebar - Layout Específico */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: hsl(215, 15%, 55%);
    /* Cinza - Links inativos */
    text-decoration: none;
    border-radius: var(--radius-xl);
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-link:hover {
    background: hsl(228, 12%, 20% / 0.3);
    color: hsl(210, 20%, 95%);
}

.nav-link.active {
    background: hsl(145, 63%, 49% / 0.15);
    /* Verde a 15% */
    color: hsl(145, 63%, 49%) !important;
    /* Verde - Link ativo */
    box-shadow: 0 1px 3px hsl(var(--primary) / 0.1);
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.nav-link.active i {
    color: hsl(145, 63%, 49%) !important;
}

/* ========================================
   21. HEADER SUPERIOR STICKY - LAYOUT ESPECÍFICO
   ======================================== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: hsl(228, 15%, 10% / 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    padding: 1rem 1.5rem;
}

/* Título da página - Branco */
.top-header h4,
#pageTitle {
    color: hsl(210, 20%, 95%) !important;
    /* Branco */
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Ícone do servidor - Verde */
.top-header i.bi-server {
    color: hsl(145, 63%, 49%) !important;
}

/* Badge de Instâncias Ativas - Verde */
#activeInstancesCount {
    background: hsl(145, 63%, 49% / 0.15) !important;
    color: hsl(145, 63%, 49%) !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
}

/* Texto "Instâncias Ativas:" */
.top-header span:not(#activeInstancesCount) {
    color: hsl(210, 20%, 95%);
}

.header-top-row,
.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-top-row {
    margin-bottom: 0.75rem;
}

/* Botão Tema */
#themeToggle {
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(210, 20%, 95%);
    border-radius: var(--radius-xl);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#themeToggle:hover {
    background: hsl(var(--muted) / 0.3);
}

/* Botão Sair - Vermelho */
#logoutBtn {
    background: transparent;
    border: 1px solid hsl(0, 72%, 51% / 0.3);
    color: hsl(0, 72%, 51%);
    border-radius: var(--radius-xl);
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

#logoutBtn:hover {
    background: hsl(0, 72%, 51% / 0.1);
    border-color: hsl(0, 72%, 51% / 0.5);
}

#logoutBtn i {
    color: hsl(0, 72%, 51%);
}

/* ========================================
   22. CARDS COM HEADER COLORIDO
   ======================================== */
.card-header.bg-gradient-primary {
    background: linear-gradient(135deg, hsl(145, 63%, 42%) 0%, hsl(160, 60%, 38%) 100%);
    color: white;
    border-bottom: none;
}

.card-header.bg-gradient-primary h5,
.card-header.bg-gradient-primary h6 {
    color: white;
    margin: 0;
}

/* ========================================
   23. ALERTAS E NOTIFICAÇÕES
   ======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-info {
    background: hsl(var(--info) / 0.1);
    border-color: hsl(var(--info) / 0.3);
    color: hsl(var(--info));
}

.alert-warning {
    background: hsl(var(--warning) / 0.1);
    border-color: hsl(var(--warning) / 0.3);
    color: hsl(var(--warning));
}

.alert-success {
    background: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary) / 0.3);
    color: hsl(var(--primary));
}

.alert-danger {
    background: hsl(var(--destructive) / 0.1);
    border-color: hsl(var(--destructive) / 0.3);
    color: hsl(var(--destructive));
}

/* ========================================
   24. LISTA DE CONTATOS
   ======================================== */
#contactsList {
    background: hsl(var(--background)) !important;
    border: 1px solid hsl(var(--border) / 0.3) !important;
    border-radius: var(--radius);
    padding: 1rem;
}

.contact-item {
    background: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid hsl(var(--primary));
    transition: all 0.3s ease;
    color: hsl(var(--foreground));
}

.contact-item:hover {
    background: hsl(var(--primary) / 0.15);
    transform: translateX(4px);
}

/* ========================================
   25. TABS / NAVEGAÇÃO POR ABAS
   ======================================== */
.nav-tabs {
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: hsl(var(--text-secondary));
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted) / 0.2);
}

.nav-tabs .nav-link.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
    background: transparent;
}

/* ========================================
   26. SCROLLBAR APRIMORADA
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
    background: hsl(228 12% 25%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(228 12% 35%);
}

/* ========================================
   27. UTILITÁRIOS DE TEXTO
   ======================================== */
.text-primary {
    color: hsl(var(--primary)) !important;
}

.text-secondary {
    color: hsl(var(--text-secondary)) !important;
}

.text-muted {
    color: hsl(var(--text-secondary) / 0.7) !important;
}

.text-success {
    color: hsl(var(--primary)) !important;
}

.text-danger {
    color: hsl(var(--destructive)) !important;
}

.text-info {
    color: hsl(var(--info)) !important;
}

.text-warning {
    color: hsl(var(--warning)) !important;
}

/* ========================================
   28. ANIMAÇÕES ADICIONAIS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* ========================================
   29. RESPONSIVIDADE MOBILE
   ======================================== */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .top-header {
        padding: 0.75rem 1rem;
    }

    .header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========================================
   30. ESTADOS DE LOADING
   ======================================== */
.loading-spinner {
    border: 3px solid hsl(var(--muted));
    border-top-color: hsl(var(--primary));
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg,
            hsl(var(--muted)) 0%,
            hsl(var(--muted) / 0.5) 50%,
            hsl(var(--muted)) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   31. BOTÃO DE TEMA NA SIDEBAR
   ======================================== */
.theme-toggle-sidebar {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 0.75rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-xl);
    color: hsl(var(--foreground));
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: hsl(var(--muted) / 0.5);
}

.theme-toggle-btn i {
    font-size: 1.125rem;
}

.sidebar.collapsed .theme-toggle-btn span {
    display: none;
}

/* ========================================
   32. PAINEL "DICAS DE SEGURANÇA" E MODAIS (Regra #4 & #5)
   ======================================== */

/* Estilos de Modal - Regra #4 */
.modal-content {
    background: hsl(228, 15%, 12%) !important;
    border: 1px solid hsl(var(--border) / 0.5) !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, hsl(145, 63%, 49%) 0%, hsl(145, 63%, 38%) 100%) !important;
    color: #FFFFFF !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
}

.modal-header * {
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

.modal-body {
    padding: 1.5rem !important;
}

/* Itens de lista em Modais - Regra #4 */
.modal-list-item,
.modal-body li,
.card-body li {
    color: hsl(210, 20%, 80%) !important;
    font-size: 14px !important;
    margin-bottom: 0.5rem;
}

/* Ícones de Título nas Dicas */
.bi-shield-check.text-success {
    color: hsl(145, 63%, 49%) !important;
}

.bi-clock.text-warning {
    color: hsl(45, 93%, 47%) !important;
}

.bi-robot.text-primary {
    color: hsl(260, 60%, 65%) !important;
}

/* Roxo */

/* Crachás de Versão - Regra #4 */
.badge-version {
    background: hsl(145, 63%, 49%) !important;
    color: #FFFFFF !important;
    border-radius: 9999px !important;
    padding: 0.25rem 0.625rem !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.version-date {
    color: hsl(215, 15%, 55%) !important;
    font-size: 11px;
}

/* Painel de Dicas Lateral - Regra #5 */
.tips-panel {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-xl);
    overflow: hidden;
}

/* Legend Info Box - Regra #5 */
.legend-info-box {
    background: hsl(199, 89%, 48%, 0.08) !important;
    color: hsl(199, 89%, 70%) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    margin-bottom: 1rem !important;
    border: 1px solid hsl(199, 89%, 48%, 0.1) !important;
}

/* Red Header for Critical Limits - Regra #5 */
.card-header-critical {
    background: hsl(0, 72%, 51%) !important;
    color: #FFFFFF !important;
}

.card-header-critical * {
    color: #FFFFFF !important;
}

/* Yellow Header - Regra #5 repeats Regra #2/6 */
.card-header-warning-custom {
    background: hsl(45, 93%, 47%) !important;
    color: hsl(0, 0%, 10%) !important;
}

/* Checkmark items - Regra #5 */
.check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(210, 20%, 85%) !important;
}

.check-item i {
    color: hsl(145, 63%, 49%) !important;
}

/* Footer Buttons - Regra #5 */
.modal-footer .btn-secondary {
    background: hsl(228, 12%, 30%) !important;
    color: white !important;
}

.modal-footer .btn-primary {
    background: hsl(145, 63%, 49%) !important;
    color: white !important;
}

.tips-panel .card-header {
    background: linear-gradient(135deg, hsl(175, 70%, 40%), hsl(145, 63%, 42%));
    color: hsl(0, 0%, 100%) !important;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.tips-panel .list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    padding: 1rem 1.5rem;
    color: hsl(210, 20%, 95%);
    font-size: 16px;
}

.tips-panel .btn-view-all {
    background: transparent;
    border: 1px solid hsl(145, 63%, 49%);
    color: hsl(145, 63%, 49%);
    border-radius: var(--radius-xl);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin: 1rem 1.5rem;
    width: calc(100% - 3rem);
}

.tips-panel .btn-view-all:hover {
    background: hsl(145, 63%, 49%);
    color: white;
}

/* ========================================
   33. AVISOS - REGRAS DE LEGIBILIDADE (Regra #3)
   ======================================== */

/* Aviso de Horário Comercial (Info) - Azul */
.alert-business-hours,
.alert-info-custom,
.alert-info {
    background: hsl(199, 89%, 48%, 0.1) !important;
    border: 1px solid hsl(199, 89%, 48%, 0.3) !important;
    border-radius: 12px;
    padding: 12px 16px;
    color: hsl(199, 89%, 70%) !important;
}

.alert-info-custom i,
.alert-info i {
    color: hsl(199, 89%, 48%) !important;
}

.alert-info-custom p,
.alert-info p {
    color: hsl(199, 89%, 70%) !important;
}

/* Aviso de Agendamento (Warning) - Amarelo */
.alert-scheduling,
.alert-warning-custom,
.alert-warning {
    background: hsl(45, 93%, 47%, 0.1) !important;
    border: 1px solid hsl(45, 93%, 47%, 0.3) !important;
    border-radius: 12px;
    padding: 12px 16px;
    color: hsl(45, 93%, 70%) !important;
}

.alert-warning-custom i,
.alert-warning i {
    color: hsl(45, 93%, 47%) !important;
}

.alert-warning-custom p,
.alert-warning p {
    color: hsl(45, 93%, 70%) !important;
}

/* Box de Sucesso - Verde */
.alert-success-custom,
.alert-success {
    background: hsl(145, 63%, 49%, 0.1) !important;
    border: 1px solid hsl(145, 63%, 49%, 0.3) !important;
    border-radius: 12px;
    padding: 12px 16px;
    color: hsl(145, 63%, 70%) !important;
}

.alert-success-custom p,
.alert-success p {
    color: hsl(145, 63%, 70%) !important;
}

.alert strong {
    font-weight: 700;
}

/* ========================================
   34. CABEÇALHOS COLORIDOS DAS SEÇÕES
   ======================================== */

/* Controle de Lote - Amarelo (Regra #6) */
.card-header-batch-control {
    background: hsl(45, 93%, 47%) !important;
    color: hsl(0, 0%, 10%) !important;
    border-radius: 12px 12px 0 0;
}

/* Horário Comercial - Amarelo */
.card-header-business-hours {
    background: hsl(45, 93%, 47%) !important;
    color: hsl(0, 0%, 10%) !important;
    border-radius: 12px 12px 0 0;
}

/* Agendamento - Cinza Escuro */
.card-header-scheduling {
    background: hsl(228, 15%, 18%) !important;
    color: hsl(0, 0%, 100%) !important;
    border-radius: 12px 12px 0 0;
}

.card-header-batch-control *,
.card-header-business-hours * {
    color: hsl(0, 0%, 10%) !important;
}

.card-header-scheduling * {
    color: #FFFFFF !important;
}

/* ========================================
   35. REGRAS DE LEGIBILIDADE
   ======================================== */

/* Labels de campos - Branco */
.form-label,
label {
    color: hsl(210, 20%, 95%) !important;
    font-weight: 500;
}

/* Textos auxiliares/helpers - Cinza claro (65%) */
.form-text,
.text-helper,
small.text-muted {
    color: hsl(215, 15%, 65%) !important;
}

/* Garantir contraste em todos os textos informativos */
.info-text {
    color: hsl(199, 89%, 70%);
}

.warning-text {
    color: hsl(45, 93%, 70%);
}

.success-text {
    color: hsl(145, 63%, 70%);
}

.danger-text {
    color: hsl(0, 72%, 70%);
}

/* ========================================
   36. REGRAS DE LEGIBILIDADE POR TELA (Regras #6 a #9)
   ======================================== */

/* Regra #6 — TELA DE EDIÇÃO DA CAMPANHA */
.campaign-edit-label,
.btn-text-label,
.action-label,
#campanha-section .form-label {
    color: hsl(210, 20%, 95%) !important;
    font-weight: 600 !important;
}

.rich-text-area {
    width: 100% !important;
    /* Forçar 100% da largura */
    min-height: 250px !important;
    background: hsl(228, 15%, 8%) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
    color: #FFFFFF !important;
    padding: 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}

.format-info,
.format-info strong,
.format-info em,
.char-counter {
    color: hsl(210, 20%, 95%) !important;
    /* Branco Puro */
    font-size: 0.9rem !important;
}

.rich-text-toolbar {
    background: hsl(228, 15%, 12%) !important;
    border: 1px solid hsl(228, 12%, 20%) !important;
    border-bottom: none !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    padding: 0.75rem !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.toolbar-btn {
    background: hsl(228, 15%, 18%) !important;
    border: 1px solid hsl(228, 12%, 25%) !important;
    color: hsl(210, 20%, 95%) !important;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: hsl(145, 63%, 49%) !important;
    color: #FFFFFF !important;
    border-color: hsl(145, 63%, 49%) !important;
    transform: translateY(-1px);
}

.toolbar-btn i {
    font-size: 1rem;
}

.toolbar-btn span {
    font-weight: 500;
}

.badge-button-num {
    background: hsl(145, 63%, 49%) !important;
    color: #FFFFFF !important;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.formatting-helper-text {
    color: hsl(215, 15%, 70%) !important;
}

/* Regra #7 — TELA DE PROGRESSO */
.status-label,
.time-remaining-label {
    color: hsl(210, 20%, 85%) !important;
}

.active-config-title {
    color: hsl(145, 63%, 60%) !important;
    font-weight: 600;
}

.active-config-text,
.next-send-text {
    color: hsl(145, 63%, 70%) !important;
}

.table-hours th {
    color: hsl(215, 15%, 55%) !important;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.table-hours td {
    color: hsl(210, 20%, 85%) !important;
}

/* Regra #8 — TELA DE RESULTADOS / RELATÓRIO */
.results-stat-label,
.performance-label {
    color: hsl(210, 20%, 95%) !important;
    /* Branco Puro */
    font-weight: 600;
    font-size: 0.95rem;
}

.results-stat-value,
.performance-value {
    color: hsl(210, 20%, 95%) !important;
    /* Branco Puro */
    font-weight: 800;
    font-size: 1.5rem;
}

/* Regra #9 — TELA DO HISTÓRICO */
.table-history {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-history th {
    color: hsl(215, 15%, 65%) !important;
    text-transform: uppercase;
    font-size: 11px !important;
    padding: 1rem !important;
    border: none !important;
}

.table-history td {
    color: hsl(210, 20%, 95%) !important;
    /* Texto Branco Puro */
    background: hsl(228, 15%, 12%) !important;
    /* Fundo Dark */
    padding: 1.25rem 1rem !important;
    border-bottom: 1px solid hsl(228, 12%, 20%) !important;
    vertical-align: middle;
}

.table-history tbody tr {
    background-color: transparent !important;
}

.table-history tr:hover td {
    background: hsl(228, 15%, 16%) !important;
}

.table-history td,
.table-history td span:not(.badge),
.table-history td strong {
    color: hsl(210, 20%, 95%) !important;
    /* Forçar Texto Branco Puro no Histórico */
}

.table-history .view-details-btn {
    border-color: hsl(199, 89%, 48%) !important;
    color: hsl(199, 89%, 48%) !important;
    background: transparent !important;
}

.table-history .generate-report-btn {
    border-color: hsl(145, 63%, 49%) !important;
    color: hsl(145, 63%, 49%) !important;
    background: transparent !important;
}

.table-history .view-details-btn:hover {
    background: hsl(199, 89%, 48%) !important;
    color: white !important;
}

.table-history .generate-report-btn:hover {
    background: hsl(145, 63%, 49%) !important;
    color: white !important;
}

.cell-date-time {
    color: #FFFFFF !important;
    font-weight: 700;
}

/* Forçar Colunas do Histórico */
.table-history td:nth-child(1),
.table-history td:nth-child(2),
.table-history td:nth-child(3) {
    color: #FFFFFF !important;
    font-weight: 600;
}

.badge-instance,
.badge-rate {
    background: hsl(145, 63%, 49%) !important;
    color: #FFFFFF !important;
    font-size: 0.75rem;
}

/* ========================================
   FIM DO ARQUIVO - TEMA ESCURO ABSOLUTO
   ======================================== */