:root {
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.3);
    --accent: #10b981;
    --error: #f43f5e;
    --warn: #f59e0b;
    --sidebar-w: 270px;
    
    /* Default Dark Theme Variables */
    --bg-main: #020617;
    --card-bg: #0f172a;
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: #1e293b;
    --glass: rgba(15, 23, 42, 0.8);
    --hover-bg: rgba(255, 255, 255, 0.05);
}

body.light-mode {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.15);
    --text-main: #0f172a;
    --text-muted: #475569;
    --input-bg: #ffffff;
    --glass: rgba(255, 255, 255, 0.97);
    --hover-bg: rgba(0, 0, 0, 0.03);
}

/* ====== TEMA CLARO - AMPLO ====== */

body.light-mode {
    background: #f8fafc !important;
}

/* Textos */
body.light-mode .summary-card-body .count,
body.light-mode .summary-card-body .value,
body.light-mode .finance-val,
body.light-mode .finance-count,
body.light-mode .panel-title,
body.light-mode .stat-value,
body.light-mode td,
body.light-mode h3,
body.light-mode h4,
body.light-mode .modal-title {
    color: #1e293b !important;
}

body.light-mode .summary-card-body .value,
body.light-mode .finance-count,
body.light-mode .stat-label {
    opacity: 0.85;
    color: #475569 !important;
}

body.light-mode .summary-card-header {
    filter: brightness(0.92);
}

body.light-mode .summary-card-venc,
body.light-mode .summary-card-finance {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Sidebar */
body.light-mode .sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.03);
}

body.light-mode .nav-item {
    color: #64748b;
}

body.light-mode .nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-mode .nav-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: #0369a1;
}

/* ===== TABELAS - LINHAS BEM VISÍVEIS ===== */
body.light-mode th {
    color: #0f172a;
    font-weight: 800;
    border-bottom: 2px solid #94a3b8 !important;
}

body.light-mode tr {
    border-bottom: 1px solid #cbd5e1 !important;
}

body.light-mode tbody tr:hover {
    background: rgba(56, 189, 248, 0.06) !important;
}

/* ===== INPUTS, SELECTS, DROPDOWNS ===== */
body.light-mode .input-icon-group {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

body.light-mode .input-icon-group .icon-box {
    background: #f1f5f9;
    border-right: 1px solid #cbd5e1;
    color: #64748b;
}

body.light-mode .input-icon-group input,
body.light-mode .input-icon-group select,
body.light-mode .input-icon-group textarea {
    color: #0f172a !important;
}

body.light-mode .input-icon-group input::placeholder,
body.light-mode .input-icon-group textarea::placeholder {
    color: #94a3b8 !important;
}

body.light-mode select,
body.light-mode .custom-select {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

body.light-mode select option {
    background: #ffffff;
    color: #0f172a;
}

/* Searchbar */
body.light-mode #client-search {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode #client-search::placeholder {
    color: #94a3b8 !important;
}

body.light-mode #status-filter {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode .filter-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
}

body.light-mode .filter-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

body.light-mode .filter-btn.active {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

/* Código de usuário */
body.light-mode td code {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #0369a1 !important;
}

/* ===== CARDS E PAINÉIS ===== */
body.light-mode .card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

body.light-mode .panel-creds {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* ===== MODAIS - BORDAS FORTES ===== */
body.light-mode .modal-overlay {
    background: rgba(0,0,0,0.25);
}

body.light-mode .modal-content,
body.light-mode .modal-body {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12) !important;
}

/* Abas do modal */
body.light-mode .modal-tab-btn {
    color: #64748b;
    border-bottom-color: transparent;
}

body.light-mode .modal-tab-btn.active {
    color: #0369a1;
}

/* Switches */
body.light-mode .switch-premium .slider {
    background-color: #cbd5e1;
    border-color: #94a3b8;
}

/* Badges */
body.light-mode .panel-tag {
    background: rgba(56, 189, 248, 0.12);
    color: #0369a1;
}

/* Botão de Sair */
body.light-mode .logout-btn-premium {
    background: rgba(0,0,0,0.02) !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .logout-btn-premium:hover {
    background: rgba(244, 63, 94, 0.06) !important;
}

/* Config sidebar */
body.light-mode .config-nav-btn {
    color: #475569 !important;
}

body.light-mode .config-nav-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Timeline Cards */
body.light-mode .timeline-item.card h4 {
    color: #0f172a !important;
}

/* Bot Status */
body.light-mode .bot-status {
    border-top: 1px solid #e2e8f0;
}

/* Seção label (MENU, etc) */
body.light-mode .nav-section-label {
    color: #94a3b8;
}


* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: radial-gradient(circle at top right, #0f172a 0%, #020617 100%);
}

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

.sidebar {
    width: var(--sidebar-w); background: var(--glass); backdrop-filter: blur(12px);
    border-right: 1px solid var(--card-border); display: flex; flex-direction: column;
    padding: 1.5rem 0.85rem; position: fixed; height: 100vh; z-index: 100;
    overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.logo {
    display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 700;
    margin-bottom: 1.75rem; padding: 0 0.4rem; background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap; letter-spacing: -0.2px;
}
.logo img { width: 30px !important; height: 30px !important; filter: drop-shadow(0 0 10px var(--primary-glow)); }

.nav-section-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    padding: 0.6rem 0.75rem 0.35rem;
    opacity: 0.5;
}

nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.nav-item {
    background: transparent; border: none; color: var(--text-muted); padding: 0.7rem 0.9rem;
    border-radius: 10px; display: flex; align-items: center; gap: 0.85rem; font-size: 0.88rem;
    font-weight: 500; cursor: pointer; transition: all 0.25s ease; position: relative;
}
.nav-item i { font-size: 1.15rem; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-main); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.08));
    color: var(--primary); font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.bot-status { margin-top: auto; padding: 1.5rem 0.5rem 0; border-top: 1px solid var(--card-border); }
.status-indicator { 
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; 
    color: var(--text-muted); font-weight: 600; padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.02); border-radius: 8px; margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.03); justify-content: center;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--error); }
.connected .dot { background: var(--accent); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }

.logout-container { margin-top: 0.25rem; }
.logout-btn {
    width: 100%; 
    background: linear-gradient(to right, rgba(244, 63, 94, 0.05), rgba(244, 63, 94, 0.01)); 
    color: #cbd5e1; 
    border: 1px solid rgba(244, 63, 94, 0.15); 
    padding: 0.8rem 1rem; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
    font-size: 0.85rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.logout-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.2), transparent);
    transition: 0.6s ease;
}
.logout-btn i { font-size: 1.25rem; color: var(--error); transition: 0.3s; }
.logout-btn:hover { 
    background: rgba(244, 63, 94, 0.15); 
    color: #fff; 
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.3);
    transform: translateY(-2px);
}
.logout-btn:hover::before { left: 100%; }
.logout-btn:hover i { transform: scale(1.1) translateX(-2px); color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }

.content { margin-left: var(--sidebar-w); padding: 1.5rem 2.5rem; width: 100%; }
header { margin-bottom: 1.5rem; }
header h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.25rem; }
header p { font-size: 0.9rem; color: var(--text-muted); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: slideUpFade 0.4s ease; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & Stats - Mais compactos */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card { background: var(--card-bg); border-radius: 20px; padding: 1.25rem; border: 1px solid var(--card-border); transition: all 0.3s ease; }
.stat-card { display: flex; align-items: center; gap: 1rem; }
.stat-card i { font-size: 1.5rem; background: rgba(255, 255, 255, 0.03); padding: 0.75rem; border-radius: 12px; border: 1px solid var(--card-border); }
.color-whatsapp { color: #10b981; } .color-panels { color: #38bdf8; }
.stat-label { text-transform: uppercase; font-size: 0.65rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.2rem; }
.stat-value { font-size: 1.4rem; font-weight: 700; }

.terminal-container {
    background: #020617; border-radius: 18px; padding: 1.75rem; font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem; height: 400px; overflow-y: auto; border: 1px solid rgba(255,255,255,0.05);
}
.log-line { margin-bottom: 0.75rem; padding: 0.5rem 1rem; border-radius: 8px; border-left: 3px solid transparent; }
.log-line.success { border-left-color: var(--accent); } .log-line.error { border-left-color: var(--error); }

/* Panel Grid & Cards Premium */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.panel-card {
    background: var(--card-bg); border-radius: 28px; padding: 2.25rem !important; border: 1px solid var(--card-border);
    display: flex; flex-direction: column; gap: 1.5rem; position: relative; transition: all 0.3s ease;
}
.panel-header-top { display: flex; justify-content: space-between; align-items: center; }
.panel-icon-box {
    width: 60px; height: 60px; background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
    color: var(--primary); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
    border: 1px solid rgba(56, 189, 248, 0.1);
}
.panel-tag { background: rgba(56, 189, 248, 0.1); color: var(--primary); padding: 0.4rem 1rem; border-radius: 12px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.panel-title { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.panel-url { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; opacity: 0.7; }
.panel-creds { background: rgba(2, 6, 23, 0.4); padding: 1.5rem; border-radius: 20px; font-size: 0.85rem; color: var(--text-muted); border: 1px solid var(--card-border); }
.panel-creds strong { color: var(--primary); }

.icon-btn {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-muted);
    width: 44px; height: 44px; border-radius: 14px; cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.icon-btn:hover { background: var(--primary); color: var(--bg-dark); transform: translateY(-2px); box-shadow: 0 10px 20px var(--primary-glow); }
.icon-btn.delete:hover { background: var(--error); color: white; box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3); }

.add-panel-card {
    background: transparent; border: 2px dashed rgba(255, 255, 255, 0.1); border-radius: 28px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    cursor: pointer; min-height: 250px; transition: all 0.3s ease; color: var(--text-muted);
}
.add-panel-card:hover { border-color: var(--primary); color: var(--primary); background: rgba(56, 189, 248, 0.02); }
.add-panel-card i { font-size: 3rem; }

/* Modals - Compacto */
.modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(12px); z-index: 2000; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal.active { display: flex; }

/* Feedback visual para campos clicáveis no perfil do cliente */
#profile-info-list span[onclick]:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}
.modal-content { 
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 28px; 
    padding: 2.5rem; width: 100%; max-width: 550px; position: relative; animation: slideUpModal 0.5s ease;
}

/* Modal de Comprovante EspecÃ­fico */
.image-view-card {
    max-width: 600px !important;
    padding: 0 !important; /* Removemos o padding para a imagem aproveitar as bordas */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    overflow-y: auto; /* Permite rolar o comprovante para baixo */
    max-height: 90vh !important; /* Limita apenas a altura do card */
    background: transparent !important;
    border: none !important;
}

#modal-receipt-img {
    width: 100% !important;
    height: auto !important; /* Deixamos ela livre para ser comprida */
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    background: #fff;
    margin-bottom: 20px;
}

.close-btn {
    position: fixed; /* BotÃ£o fica sempre visÃ­vel no canto superior direito */
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
.close-btn:hover { transform: scale(1.1) rotate(90deg); }

.image-wrapper { width: 100%; }

/* .modal-content h2 { display: none; } */

.custom-input, .custom-select, input, select, textarea {
    width: 100%;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    color: #f8fafc !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}
.custom-input:focus, .custom-select:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    background: #161e2e !important;
    box-shadow: 0 0 15px var(--primary-glow) !important;
}

.input-label-premium {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-icon-group {
    display: flex;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}
.input-icon-group:focus-within { border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
.input-icon-group .icon-box {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}
.input-icon-group input { border: none !important; background: transparent !important; }

.form-row { margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 1rem; margin-top: 1.75rem; width: 100%; }
.btn { flex: 1; padding: 0.9rem; border-radius: 12px; border: none; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn.primary { background: var(--primary); color: var(--bg-dark); }
.btn.secondary { background: rgba(255,255,255,0.05); color: white; }

/* Novo Design do Modal de Clientes */
.modal-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.modal-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.modal-tab-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.input-icon-group {
    display: flex;
    align-items: stretch;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: 0.3s;
}

.input-icon-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.input-icon-group .icon-box {
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-icon-group input, 
.input-icon-group select, 
.input-icon-group textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    color: white;
    outline: none;
    width: 100%;
}

.input-icon-group textarea {
    min-height: 80px;
    resize: vertical;
}

.input-label-premium {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Switches Premium */
.switch-premium {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.switch-premium .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.05);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.1);
}

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

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

.switch-premium input:checked + .slider:before {
    transform: translateX(20px);
    background-color: var(--bg-dark);
}

.filter-group {
    transition: all 0.3s ease;
}
.filter-group:hover {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

.filter-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 600;
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Switches Customizados */
.switch-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}

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

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

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

.switch-label {
    font-size: 0.95rem;
    color: var(--text-main);
}

.alert-note {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: var(--warn);
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}


/* Dashboard Table - Professional Edge */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: auto; }
th { text-align: left; padding: 1rem 0.8rem; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; border-bottom: 2px solid rgba(255, 255, 255, 0.05); font-weight: 600; white-space: nowrap; }
td { 
    background: transparent; padding: 1rem 0.8rem; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem; vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8fafc;
    transition: all 0.2s ease;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(56, 189, 248, 0.03) !important; }

/* Coluna Info - permitir quebra e limitar largura */
td:nth-child(6) { max-width: 280px; white-space: normal; word-break: break-word; }

/* Remover regras de bordas arredondadas antigas dos td */
td:first-child { max-width: 180px; }
td:last-child { width: 60px; text-align: center; }

/* Column Widths Refined - Legibilidade */
.col-contato { width: 180px; font-weight: 600; color: #ffffff !important; }
.col-usuario { width: 120px; text-align: left; opacity: 0.9; }
.col-zap { width: 110px; color: var(--primary); }
.col-servidor { width: 80px; }
.col-valor { width: 85px; font-weight: 600; text-align: left; }
.col-venc { width: 100px; color: var(--text-muted); }
.col-status { width: 105px; }
.col-pendencia { width: 110px; text-align: center; }
.col-recibo { width: 155px; text-align: center; }

.status-badge { padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.65rem; font-weight: 700; display: inline-block; white-space: nowrap; }
.status-badge.sucesso { background: rgba(16, 185, 129, 0.1); color: var(--accent); }
.status-badge.erro { background: rgba(244, 63, 94, 0.1); color: var(--error); }
.status-badge.aviso { background: rgba(245, 158, 11, 0.1); color: var(--warn); }
.status-badge.info { background: rgba(56, 189, 248, 0.1); color: var(--primary); }

.alerta-badge {
    background: var(--warn); color: #000; padding: 2px 8px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease;
}
.alerta-badge:hover { transform: scale(1.1); filter: brightness(1.1); }

.input-desc { display: block; font-size: 0.6rem; color: var(--text-muted); margin-top: 4px; line-height: 1.2; }

.col-actions { display: flex; gap: 4px; justify-content: flex-end; }

.receipt-link { 
    background: rgba(56, 189, 248, 0.08); color: var(--primary); width: 26px; height: 26px;
    border-radius: 6px; border: 1px solid rgba(56, 189, 248, 0.15); cursor: pointer; 
    transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center;
}
.receipt-link:hover { background: var(--primary); color: var(--bg-dark); transform: scale(1.1); }

.icon-btn {
    width: 28px; height: 28px; font-size: 0.9rem;
}

.search-bar { margin-bottom: 0.8rem !important; }
.search-bar input { padding: 0.5rem 0.5rem 0.5rem 2.8rem !important; font-size: 0.85rem; }
.receipt-link:hover { background: var(--primary); color: var(--bg-dark); transform: scale(1.1); }

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #0f172a 0%, #020617 100%);
    color: var(--text-main);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.6s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 1rem;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form .input-group {
    margin-bottom: 1.5rem;
}

.login-form .input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-wrapper {
    position: relative;
}

.login-form input {
    padding-left: 3rem !important;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    border: none;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--primary-glow);
    filter: brightness(1.1);
}

.login-error {
    color: var(--error);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

/* Estilos Adicionais para Clientes */
.custom-select {
    width: 100%; 
    background: rgba(0,0,0,0.2); 
    border: 1px solid var(--card-border); 
    padding: 0.8rem 1rem; 
    border-radius: 12px; 
    color: white;
    outline: none;
}
.custom-select option { background: var(--card-bg); color: white; }

.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }

#clients-table td { padding: 1rem; }
.col-actions { display: flex; gap: 0.5rem; justify-content: center; }

/* Botão oculto por padrão (estilo hamburger) */
.mobile-only-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 2rem 0.5rem; }
    .sidebar .logo span, .nav-item span, .bot-status .status-text, .logout-btn span, .nav-section-label { display: none; }
    .content { margin-left: 80px; }
    .nav-item { justify-content: center; padding: 0.7rem; }
    .nav-item i { margin: 0; }
}

@media (max-width: 768px) {
    :root {
        --sidebar-w: 100%;
    }

    .app-container { flex-direction: column; }

    .mobile-only-btn { display: flex; }

    /* Sidebar Mobile (Overlay) */
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        width: 280px;
        height: 100vh;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
        z-index: 9999;
    }

    .sidebar.active {
        left: 0;
    }

    .content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    header { margin-bottom: 1.5rem; }
    header h1 { font-size: 1.5rem; }

    /* Grid Layouts para 1-2 Colunas */
    .summary-row {
        grid-template-columns: 1fr 1fr !important;
    }

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

    .profile-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Tabelas Responsivas (Scroll Horizontal) */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    table {
        min-width: 700px;
    }

    /* Modais Full Screen Mobile */
    .modal-content {
        padding: 1.5rem;
        border-radius: 20px;
        width: 95vw !important;
        max-height: 90vh !important;
        margin: 0;
    }

    .modal-tabs {
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .modal-tab-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        white-space: nowrap;
    }

    .form-row {
        flex-direction: column;
        gap: 0 !important;
    }

    .modal-actions {
        flex-direction: column;
    }

    .summary-card-finance {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .summary-row {
        grid-template-columns: 1fr !important;
    }
}


/* Novos Cartões de Dashboard */
.dashboard-grid { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 2rem; width: 100%; }
.dashboard-section-title { font-size: 0.9rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; text-align: center; margin-bottom: 1.5rem; position: relative; }
.dashboard-section-title::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }

.summary-row { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; gap: 0.75rem !important; width: 100% !important; margin-bottom: 1rem; }
.summary-card-venc { background: rgba(255,255,255,0.03) !important; border: 1px solid rgba(255,255,255,0.05) !important; border-radius: 10px !important; overflow: hidden !important; transition: 0.3s !important; display: block !important; }
.summary-card-venc:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); }

.summary-card-header { padding: 0.6rem 1rem !important; display: flex !important; justify-content: space-between !important; align-items: center !important; font-size: 0.85rem !important; font-weight: 700 !important; color: #fff !important; }
.summary-card-header i { font-size: 1.1rem !important; margin-right: 0.4rem; }
.summary-card-header .percent { font-size: 0.75rem !important; opacity: 0.8 !important; font-weight: 600 !important; }

.summary-card-body { padding: 1rem !important; display: flex !important; justify-content: space-between !important; align-items: baseline !important; }
.summary-card-body .count { font-size: 1.6rem !important; font-weight: 800 !important; color: #fff !important; }
.summary-card-body .value { font-size: 0.9rem !important; font-weight: 600 !important; color: rgba(255, 255, 255, 0.7) !important; }

/* Cores dos Cartões de Vencimento */
.venc-ativos .summary-card-header { background: rgba(16, 185, 129, 0.25) !important; color: #10b981 !important; }
.venc-vencidos .summary-card-header { background: rgba(244, 63, 94, 0.25) !important; color: #f43f5e !important; }
.venc-ontem .summary-card-header { background: rgba(225, 29, 72, 0.25) !important; color: #fb7185 !important; }
.venc-hoje .summary-card-header { background: rgba(245, 158, 11, 0.25) !important; color: #f59e0b !important; }
.venc-amanha .summary-card-header { background: rgba(202, 138, 4, 0.25) !important; color: #facc15 !important; }
.venc-em-2-dias .summary-card-header { background: rgba(37, 99, 235, 0.25) !important; color: #60a5fa !important; }

/* Faturamento e Lucro */
.summary-card-finance { background: rgba(255,255,255,0.03) !important; border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.05) !important; overflow: hidden !important; display: block !important; }
.summary-card-finance-header { padding: 0.6rem !important; background: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; text-align: center !important; font-size: 0.75rem !important; font-weight: 700 !important; display: flex !important; justify-content: center !important; align-items: center !important; gap: 0.5rem !important; border-bottom: 1px solid rgba(16, 185, 129, 0.1) !important; }
.summary-card-finance-body { padding: 1rem !important; }
.finance-main-row { display: flex !important; justify-content: space-around !important; margin-bottom: 0.75rem !important; }
.finance-main-row div { text-align: center !important; }
.finance-label { font-size: 0.6rem !important; color: var(--text-muted) !important; text-transform: uppercase !important; margin-bottom: 2px !important; display: block !important; }
.finance-val { font-size: 1.1rem !important; font-weight: 800 !important; color: #fff !important; }
.finance-count { font-size: 0.7rem !important; color: var(--text-muted) !important; display: block !important; }

.profit-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; border-top: 1px solid rgba(255,255,255,0.05) !important; padding-top: 0.75rem !important; }
.profit-item { text-align: center !important; font-size: 0.85rem !important; font-weight: 700 !important; }
.profit-item.plus { color: #10b981 !important; }
.profit-item.minus { color: #f43f5e !important; }



/* Modo Privacidade (Eye Icon) */
.privacy-blurred {
    filter: blur(10px) !important;
    user-select: none !important;
    pointer-events: none !important;
    opacity: 0.6;
    transition: filter 0.3s ease;
}
/* Navegação de Submenu */
.nav-submenu {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}
.submenu-item {
    margin-left: 0.5rem !important;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.8rem !important;
    opacity: 0.8;
}
.submenu-item.active {
    background: rgba(56, 189, 248, 0.08) !important;
    color: var(--primary) !important;
}
/* Configurações Internas (Sistema) */
.config-nav-btn {
    transition: all 0.2s ease;
}
.config-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
}
.config-nav-btn.active-highlight {
    background: rgba(56, 189, 248, 0.1) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}
.sub-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.sub-tab-content.active {
    display: block;
}
.timeline-item {
    position: relative;
}
.timeline-item ul li {
    margin-bottom: 0.5rem;
}
/* Estilos de Botão de Alternância de Visibilidade de Senha */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    z-index: 10;
}
}
/* Navegação de Submenu */
.nav-submenu {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}
.submenu-item {
    margin-left: 0.5rem !important;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.8rem !important;
    opacity: 0.8;
}
.submenu-item.active {
    background: rgba(56, 189, 248, 0.08) !important;
    color: var(--primary) !important;
}
/* Configurações Internas (Sistema) */
.config-nav-btn {
    transition: all 0.2s ease;
}
.config-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
}
.config-nav-btn.active-highlight {
    background: rgba(56, 189, 248, 0.1) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}
.sub-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.sub-tab-content.active {
    display: block;
}
.timeline-item {
    position: relative;
}
.timeline-item ul li {
    margin-bottom: 0.5rem;
}
/* Estilos de Botão de Alternância de Visibilidade de Senha */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    z-index: 10;
}
.password-toggle:hover {
    color: var(--primary);
}
.user-status-badge { padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; }
.user-status-badge.admin { background: rgba(56, 189, 248, 0.1); color: var(--primary); }
.user-status-badge.user { background: rgba(16, 185, 129, 0.1); color: var(--accent); }
.user-status-badge.pending { background: rgba(245, 158, 11, 0.1); color: var(--warn); }

.premium-swal { border-radius: 16px !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important; z-index: 99999 !important; }
.swal2-container { z-index: 99999 !important; }

/* ==========================================
   MODAL DE COBRANÇAS PREMIUM
   ========================================== */

/* Estilos de Abas (Segmented Control) */
#cobranca-modal .tab-btn.active {
    background: var(--primary) !important;
    color: var(--bg-main) !important;
    box-shadow: 0 4px 12px var(--primary-glow);
}

#cobranca-modal .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

/* Seletores de Dias (Custom Buttons) */
.days-selector {
    padding: 0.5rem;
}

.day-check {
    position: relative;
    cursor: pointer;
}

.day-check input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.day-check span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-check:hover span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.day-check input:checked + span {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

/* Multi-selects com Scroll Customizado */
.custom-scrollbar::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.2);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Grupo de Filtros Select Multiple */
.filter-group select {
    background: rgba(0,0,0,0.3) !important;
    font-size: 0.82rem !important;
    border: 1px solid var(--card-border) !important;
    outline: none !important;
    cursor: pointer;
}

.filter-group select option {
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    background: #1e293b;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.filter-group select option:checked {
    background: var(--primary-glow) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.1);
}

/* Switch Premium Tuning */
.switch-premium {
    display: flex;
    align-items: center;
}
.switch-premium .slider:hover {
    border-color: var(--primary);
}
