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

:root {
    --sidebar-bg: #0d1b2a;
    --sidebar-hover: rgba(6, 182, 212, 0.12);
    --sidebar-text: #64748b;
    --sidebar-text-active: #ffffff;
    --bg-main: #0f1e2e;
    --header-bg: #0d1b2a;
    --text-primary: #e2e8f0;
    --text-secondary: #64748b;
    --primary-color: #06b6d4;
    --primary-hover: #0891b2;
    --border-color: rgba(255,255,255,0.07);
    --card-bg: #162032;
    --column-bg: #111c2b;
    --accent-cyan: #06b6d4;
    --accent-green: #22c55e;
    --accent-purple: #a78bfa;
    --accent-orange: #f59e0b;
}

/* Dark Mode toggle — mantido por compatibilidade, mas o padrão já é dark */
body.dark-theme {
    --bg-main: #0a1221;
    --header-bg: #091019;
    --card-bg: #111d2c;
    --column-bg: #0c1624;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255,255,255,0.06);
    --sidebar-bg: #060e18;
}

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

body, html {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #0a1520;
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Scrollbars Premium */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4B5563; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6B7280; }


.layout { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 210px;
    flex-shrink: 0; /* WebApp sidebar no resize */
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.92) 0%, rgba(9, 21, 35, 0.92) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
    border-right: 1px solid rgba(6,182,212,0.15);
    overflow-y: auto;
}
.sidebar-header { padding: 22px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 22px; color: var(--accent-cyan); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1.1rem; color: #e2e8f0; }
.logo-text span { font-size: 0.75rem; color: var(--sidebar-text); }

.sidebar-menu { flex: 1; padding: 15px 0; overflow-y: auto; }
.menu-section {
    padding: 0 16px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--sidebar-text);
    margin-bottom: 8px;
    margin-top: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
    margin: 1px 0;
}
.menu-item:hover {
    background: rgba(6, 182, 212, 0.08);
    color: #e2e8f0;
    border-left-color: rgba(6,182,212,0.4);
}
.menu-item.active {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border-left-color: #06b6d4;
    font-weight: 600;
}
.sidebar-footer { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.05); }

/* Main Wrapper */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Top Header */
.top-header {
    height: 62px;
    background: #0d1b2a;
    border-bottom: 1px solid rgba(6,182,212,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    z-index: 5;
}
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 7px 14px;
    border-radius: 8px;
    width: 260px;
    transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: rgba(6,182,212,0.5); }
.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-size: 0.88rem;
    color: #e2e8f0;
}
.search-bar input::placeholder { color: #64748b; }
.user-profile { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-icon { font-size: 1.2rem; cursor: pointer; transition: 0.2s; user-select: none; position: relative; color: #94a3b8; }
.header-icon:hover { transform: scale(1.1); color: #e2e8f0; }
.avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: white;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
}
.avatar:hover { transform: scale(1.05); box-shadow: 0 0 12px rgba(6,182,212,0.4); }

/* Notificações */
.badge { position: absolute; top: -5px; right: -8px; background: #ef4444; color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; min-width: 18px; text-align: center; }
.notificacoes-panel { position: absolute; top: 40px; right: -20px; width: 300px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index: 2000; overflow: hidden; display: flex; flex-direction: column; }
.notif-header { padding: 12px 15px; background: #0d1b2a; color: #e2e8f0; font-size: 0.9rem; font-weight: 500; }
.notif-lista { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.notif-item { padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.85rem; color: #cbd5e1; cursor: pointer; transition: 0.2s;}
.notif-item:hover { background: rgba(6,182,212,0.05); }
.notif-item:last-child { border-bottom: none; }
.notif-empty { padding: 20px; text-align: center; color: #64748b; font-size: 0.85rem; }

body.dark-theme .notif-item:hover { background: rgba(255,255,255,0.04); }

/* Content Area */
.content-area { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px; }
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.page-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.3px;
}
.header-actions { display: flex; gap: 10px; align-items: center; }

.btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}
.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 0 15px rgba(6,182,212,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    box-shadow: 0 0 20px rgba(6,182,212,0.5);
    transform: translateY(-1px);
}
.btn-outline {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #94a3b8;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }

/* Metrics */
.metrics-container {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.metric-card {
    flex: 1;
    min-width: 120px;
    background: #162032;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.metric-card:hover { transform: translateY(-2px); }
.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(6,182,212,0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.metric-info span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
}
.metric-info h3 {
    font-size: 1.7rem;
    color: #f1f5f9;
    margin-top: 2px;
    font-weight: 700;
    line-height: 1;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 12px;
    height: calc(100vh - 300px);
    min-height: 400px;
    overflow-x: auto;
    padding-bottom: 8px; /* Espaço para o scrollbar */
}
/* Estilizando o scrollbar do kanban */
.kanban-board::-webkit-scrollbar { height: 8px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.kanban-column {
    flex: 1;
    min-width: 260px; /* Evita que as colunas fiquem esmagadas */
    display: flex;
    flex-direction: column;
    background: rgba(13, 27, 42, 0.7);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}
.column-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(22, 32, 50, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.column-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.kanban-cards {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.kanban-cards::-webkit-scrollbar { width: 4px; }
.kanban-cards::-webkit-scrollbar-track { background: transparent; }
.kanban-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.card {
    background: #1a2d42;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 14px;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
    border-left: 3px solid var(--primary-color);
}
.card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.3); }
.card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; color: var(--text-primary); }
.card-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.card-actions { display: flex; justify-content: flex-end; border-top: 1px solid var(--border-color); padding-top: 8px; }
.btn-icon { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; transition: 0.2s; opacity: 0.7; }
.btn-icon:hover { opacity: 1; transform: scale(1.1); }

/* Modals */
.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); align-items: center; justify-content: center; z-index: 1000; }
.modal-content {
    background: #162032;
    border: 1px solid rgba(6,182,212,0.15);
    padding: 28px;
    border-radius: 12px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-large { width: 620px; }
.modal-content h2 { margin-bottom: 20px; font-size: 1.15rem; color: #e2e8f0; font-weight: 700; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    outline: none;
    color: #e2e8f0;
    background: rgba(255,255,255,0.04);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: #06b6d4; background: rgba(6,182,212,0.05); }
option { background-color: #0f172a; color: #e2e8f0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.revisao-lista { max-height: 300px; overflow-y: auto; margin-bottom: 20px; }
.revisao-item { display: flex; gap: 10px; margin-bottom: 10px; }

/* WhatsApp Status */
.whatsapp-container { background: #162032; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 28px; max-width: 500px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);}
.status-badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.status-badge.checking { background: rgba(100,116,139,0.2); color: #94a3b8; }
.status-badge.waiting { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-badge.connected { background: rgba(34,197,94,0.15); color: #22c55e; }

/* Configurações & Toggle Switch */
.settings-container { display: flex; flex-direction: column; gap: 14px; max-width: 620px; }
.setting-card {
    background: #162032;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: 0.2s;
}
.setting-card:hover { border-color: rgba(6,182,212,0.2); }
.setting-info h3 { font-size: 1rem; margin-bottom: 5px; color: #e2e8f0; }
.setting-info p { font-size: 0.88rem; color: #64748b; line-height: 1.4; }

/* The switch - the box around the slider */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; box-shadow: 0 2px 4px rgba(0,0,0,0.2);}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Calculadora Flutuante */
.calculadora-panel {
    position: fixed;
    top: 68px;
    right: 24px;
    width: 280px;
    background: #162032;
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 2000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.calc-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: #0d1b2a; color: #e2e8f0; }
.calc-header h3 { font-size: 0.9rem; font-weight: 500; margin: 0; }
.close-calc { cursor: pointer; font-size: 0.8rem; opacity: 0.8; transition: 0.2s;}
.close-calc:hover { opacity: 1; transform: scale(1.1); }
.calc-display { padding: 20px 15px; text-align: right; background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.06); }
#calc-history { min-height: 1.2rem; font-size: 0.85rem; color: #64748b; margin-bottom: 5px; }
#calc-result { font-size: 2.2rem; font-weight: 600; color: #e2e8f0; word-break: break-all; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.04); }
.calc-btn { border: none; background: #1a2d42; color: #e2e8f0; padding: 15px 0; font-size: 1.2rem; font-weight: 500; cursor: pointer; transition: 0.1s; outline: none; }
.calc-btn:hover { background: #1e3550; }
.calc-btn:active { background: #243f60; }
.calc-btn.operator { color: #06b6d4; font-weight: 600; background: #162032; }
.calc-btn.operator:hover { background: #1e3550; }
.calc-btn.equal { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }
.calc-btn.equal:hover { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.calc-btn.zero { grid-column: span 2; }

/* Agenda & Tarefas (Kanban Avançado) */
.kanban-board { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; height: calc(100vh - 250px); min-height: 500px; }
.kanban-column { flex: 1; min-width: 300px; background: var(--bg-main); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--border-color); }
.column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color); }
.column-header h3 { font-size: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.column-header .badge { font-size: 0.75rem; color: white; padding: 2px 8px; border-radius: 12px; }

.kanban-cards { 
    flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 2px; min-height: 100px; 
}
.tarefa-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; cursor: grab; transition: all 0.2s; position: relative; }
.tarefa-card:hover { border-color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.tarefa-card:active { cursor: grabbing; }

.tarefa-tag { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; }
.tag-empresa { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.tag-pessoal { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.tag-financeiro { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.tag-estoque { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.tag-default { background: rgba(100, 116, 139, 0.1); color: #64748b; }

.tarefa-prioridade { position: absolute; top: 15px; right: 15px; width: 10px; height: 10px; border-radius: 50%; }
.prio-alta { background: #ef4444; box-shadow: 0 0 5px #ef4444; }
.prio-media { background: #eab308; }
.prio-baixa { background: #22c55e; }

.tarefa-titulo { font-weight: bold; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 5px; }
.tarefa-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tarefa-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 10px; font-size: 0.8rem; color: var(--text-secondary); }
.tarefa-data { display: flex; align-items: center; gap: 5px; }
.tarefa-actions { display: flex; gap: 10px; }
.tarefa-action-btn { cursor: pointer; opacity: 0.6; transition: 0.2s; }
.tarefa-action-btn:hover { opacity: 1; color: var(--primary-color); transform: scale(1.1); }
.tarefa-action-btn.wa:hover { color: #25D366; }

/* Progress bar for tasks */
.tarefa-progress { margin-top: 10px; margin-bottom: 10px; }
.progress-bar-bg { width: 100%; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s; }
.progress-text { font-size: 0.7rem; color: var(--text-secondary); text-align: right; margin-top: 2px; }

.minicalendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-header { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.cal-day { padding: 8px 0; font-size: 0.9rem; border-radius: 4px; background: var(--bg-main); cursor: pointer; border: 1px solid transparent; }
.cal-day:hover { border-color: var(--primary-color); }
.cal-day.today { background: var(--primary-color); color: white; font-weight: bold; }
.cal-day.has-task { position: relative; }
.cal-day.has-task::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: #ef4444; border-radius: 50%; }
.cal-empty { background: transparent; }
.cal-title-month { grid-column: span 7; font-weight: bold; padding-bottom: 10px; color: var(--text-primary); text-transform: capitalize; }

/* Importação Inteligente */
.import-card { flex: 1; background: var(--bg-main); border: 2px dashed var(--border-color); border-radius: 8px; padding: 30px 20px; text-align: center; cursor: pointer; transition: 0.3s; }
.import-card:hover { border-color: var(--primary-color); background: rgba(37, 99, 235, 0.05); transform: translateY(-3px); }
.import-card h3 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 8px; }
.import-card p { font-size: 0.85rem; color: var(--text-secondary); }
.import-preview-input { width: 100%; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-primary); padding: 6px; border-radius: 4px; font-size: 0.9rem; outline: none; }
.import-preview-input:focus { border-color: var(--primary-color); }
.table-row { border-bottom: 1px solid var(--border-color); }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 15px; }
/* Calendario Gigante (Agenda) */
.large-calendar { gap: 15px; }
.large-calendar .cal-day { padding: 40px 10px; font-size: 1.3rem; border-radius: 8px; transition: all 0.2s; }
.large-calendar .cal-day:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10; border-color: var(--primary-color); }
.large-calendar .cal-header { font-size: 1rem; padding-bottom: 15px; border-bottom: 2px solid var(--border-color); text-transform: uppercase; letter-spacing: 1px; }
.large-calendar .cal-title-month { font-size: 1.8rem; padding-bottom: 25px; color: var(--primary-color); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; text-align: center; }
.large-calendar .cal-day.has-task::after { width: 8px; height: 8px; bottom: 8px; }

/* === RESPONSIVIDADE (MOBILE) === */
.mobile-menu-btn { display: none; background: transparent; border: none; font-size: 1.6rem; color: var(--text-primary); cursor: pointer; padding: 8px; margin-right: 10px; }
.close-sidebar-btn { display: none; }

@media (max-width: 768px) {
    /* ---- Header ---- */
    .mobile-menu-btn { display: block; }
    .close-sidebar-btn { display: block; }
    .top-header { padding: 0 12px; height: 56px; }
    .user-profile { margin-left: auto; gap: 10px; }
    .search-bar { display: none; } /* Oculta barra de pesquisa do topo no mobile */
    
    /* ---- Sidebar ---- */
    .sidebar { position: fixed; top: 0; left: -260px; height: 100vh; width: 260px; box-shadow: 4px 0 20px rgba(0,0,0,0.6); z-index: 1000; transition: left 0.3s ease; }
    .sidebar.open { left: 0; }
    .sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 900; display: none; cursor: pointer; }
    .sidebar-overlay.active { display: block; }
    .menu-item { padding: 13px 16px; font-size: 0.95rem; }

    /* ---- Content ---- */
    .content-area { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px; }

    /* ---- Métricas: grid 2 colunas no mobile ---- */
    .metrics-container { 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        gap: 10px; 
    }
    .metric-card { padding: 14px 12px; gap: 10px; }
    .metric-icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .metric-info h3 { font-size: 1.4rem; }
    .metric-info span { font-size: 0.65rem; }

    /* ---- Kanban: deslize horizontal (swipe) ---- */
    .kanban-board { 
        flex-direction: row; 
        overflow-x: auto; 
        overflow-y: hidden;
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch;
        padding-bottom: 16px; 
        height: calc(100vh - 220px);
        gap: 12px;
    }
    .kanban-board::-webkit-scrollbar { height: 4px; }
    .kanban-board::-webkit-scrollbar-thumb { background: rgba(6,182,212,0.5); border-radius: 4px; }
    .kanban-column { 
        flex: 0 0 88vw;
        scroll-snap-align: start; 
        height: 100%;
    }

    /* ---- Kanban Cards: mais espaço para tocar ---- */
    .card-modern { padding: 14px; }
    .card-nome-modern { font-size: 1rem; }
    .phone-text { font-size: 1rem; }
    .card-info-row { font-size: 0.8rem; }
    .btn-acoes { padding: 8px 14px; font-size: 0.85rem; }
    .card-chat-icon { font-size: 1.3rem; }
    .btn-icon { font-size: 1.3rem; padding: 4px; }

    /* ---- Filtros ---- */
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .header-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
    .header-actions .btn { flex: 1; min-width: 120px; padding: 10px 8px; font-size: 0.82rem; }
    
    /* ---- Filtro kanban em coluna ---- */
    #filtro-kanban { font-size: 1rem !important; padding: 10px 14px !important; }

    /* ---- Modais como bottom-sheet apenas em telas muito pequenas ---- */
    .modal-large { width: 100% !important; }

    /* ---- Calculadora ocupa tela inteira embaixo ---- */
    .calculadora-panel { width: 100%; right: 0; left: 0; top: auto; bottom: 0; border-radius: 16px 16px 0 0; }

    /* ---- Notificações ---- */
    .notificacoes-panel { right: -10px; width: calc(100vw - 30px); }

    /* ---- Tabelas ---- */
    .table-responsive { font-size: 0.82rem; }
    table td, table th { padding: 8px 10px !important; }

    /* ---- Botões gerais ---- */
    .btn { font-size: 0.9rem; }
    .form-control { font-size: 1rem; padding: 12px 14px; }
}

/* Modern Kanban Card Design */
.card-modern {
    background: #1e293b;
    border: none;
    border-left: 4px solid #06b6d4;
    border-radius: 8px;
    padding: 12px;
    color: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-modern:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-nome-modern {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.card-actions-icons {
    display: flex;
    gap: 8px;
    color: #64748b;
}

.card-actions-icons i {
    cursor: pointer;
    transition: color 0.2s;
}

.card-actions-icons i:hover {
    color: #f1f5f9;
}

.badge-bairro {
    display: inline-block;
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.card-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.phone-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #f8fafc;
}

.badge-more {
    background: #22c55e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    cursor: pointer;
}

.card-info-row {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 3px;
}

.card-bottom-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    border-top: 1px solid #334155;
    padding-top: 12px;
}

.card-bottom-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-chat-icon {
    color: #c4b5fd;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.card-chat-icon:hover {
    color: #a78bfa;
}

.checkbox-sem-wpp {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Dropdown Ações */
.dropdown-acoes-container {
    position: relative;
}

.btn-acoes {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #e2e8f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.btn-acoes:hover {
    background: rgba(255,255,255,0.1);
}

.dropdown-menu-acoes {
    position: fixed;
    background: #1a2d42;
    border: 1px solid rgba(6,182,212,0.3);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.dropdown-menu-acoes button {
    background: transparent;
    border: none;
    color: #cbd5e1;
    text-align: left;
    padding: 8px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-menu-acoes button:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}


.main-content {
    position: relative;
    z-index: 1;
}


/* ================= CAMPEONATO DE VENDAS ================= */
#secao-campeonato {
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
#secao-campeonato table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--bg-card, #2a3b4c);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
#secao-campeonato th {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}
#secao-campeonato td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-primary, #e2e8f0);
}
#secao-campeonato tr:hover td {
    background: rgba(255,255,255,0.02);
}
#secao-campeonato .glass-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(0,0,0,0.2));
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
}
﻿
/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 32px);
}

.toast {
    padding: 0.9rem 1.4rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease forwards, fadeOut 0.3s ease 3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 380px;
}

.toast.success { background: #10b981; }
.toast.error   { background: #ef4444; }
.toast.info    { background: #3b82f6; }
.toast.warning { background: #f59e0b; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (max-width: 768px) {
    .toast-container { top: 8px; right: 8px; left: 8px; max-width: 100%; }
    .toast { max-width: 100%; font-size: 0.85rem; }
}
