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

:root {
    --bg: #f4f6f9;
    --white: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-muted: #6b7280;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --blue: #3b82f6;
    --green: #16a34a;
    --orange: #ea580c;
    --red: #dc2626;
    --cyan: #0891b2;
    --purple: #7c3aed;
    --pink: #db2777;
    --teal: #0d9488;
    --indigo: #1d4ed8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Celebration */
#celebration-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

.celebration-box {
    position: relative;
    z-index: 1001;
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.celebration-emoji {
    font-size: 64px;
    margin-bottom: 12px;
    animation: bounce 0.6s infinite alternate;
}

.celebration-box h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1d4ed8, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.celebration-box p {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn   { from { transform: scale(0.5); opacity: 0 } to { transform: scale(1); opacity: 1 } }
@keyframes bounce  { from { transform: translateY(0) } to { transform: translateY(-10px) } }

/* Setup Overlay */
.setup-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: #f4f6f9;
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.setup-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.setup-box h2 { font-size: 20px; margin-bottom: 12px; }
.setup-box > p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.setup-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.setup-step { display: flex; align-items: flex-start; gap: 14px; font-size: 14px; }
.step-num {
    width: 28px; height: 28px; flex-shrink: 0;
    background: var(--primary); color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.setup-note { font-size: 12px; color: var(--text-muted); text-align: center; padding-top: 16px; border-top: 1px solid var(--border); }

/* Sync indicator */
.sync-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.3s;
}
.sync-indicator.ok      { background: var(--green); }
.sync-indicator.syncing { background: var(--orange); animation: pulse 1s infinite; }
.sync-indicator.error   { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
    gap: 12px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.logo-img { height: 28px; width: auto; display: block; }

.logo-crm-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 10px;
    margin-left: 2px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.date-display { color: var(--text-muted); font-size: 14px; }

/* Period Filter */
.period-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 57px;
    z-index: 49;
}

.period-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.period-group { display: flex; gap: 4px; }

.period-btn {
    padding: 5px 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.period-btn:hover { border-color: var(--primary); color: var(--primary); }
.period-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.custom-range {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 60;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.custom-range.visible { display: flex; }
.custom-range input[type="date"] {
    background: var(--white); border: 1px solid var(--border);
    color: var(--text); padding: 4px 10px;
    border-radius: 8px; font-size: 13px; outline: none;
    cursor: pointer;
}
.custom-range input[type="date"]:focus { border-color: var(--primary); }
.custom-range-sep { font-size: 12px; color: var(--text-muted); }
.btn-apply-range {
    padding: 4px 14px; background: var(--primary); border: none;
    color: white; border-radius: 8px; font-size: 13px;
    font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.btn-apply-range:hover { background: var(--primary-hover); }
body.dark-mode .custom-range input[type="date"] { background: var(--white); border-color: var(--border); color: var(--text); }

/* Layout */
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: 20px;
}
.container:first-of-type { margin-top: 24px; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
    cursor: pointer;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(29,78,216,0.12); transform: translateY(-1px); border-color: rgba(29,78,216,0.25); }

.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon.blue, .stat-icon.red, .stat-icon.cyan, .stat-icon.green,
.stat-icon.purple, .stat-icon.orange, .stat-icon.teal, .stat-icon.indigo {
    background: rgba(29,78,216,0.07);
    color: var(--primary);
}

.stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { display: block; font-size: 24px; font-weight: 700; }

/* Goals */
.goals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.goal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px !important;
}

.goal-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.goal-icon.green  { background: #f0fdf4; color: var(--green); }
.goal-icon.purple { background: #f5f3ff; color: var(--purple); }

.goal-info { flex: 1; }

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

.goal-title { font-size: 13px; font-weight: 600; }
.goal-count { font-size: 13px; font-weight: 700; color: var(--text-muted); }

.goal-track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.goal-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.green-fill  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.purple-fill { background: linear-gradient(90deg, #7c3aed, #a855f7); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 600; }

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-body { padding: 20px; }

.chart-container { height: 260px; }
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* Tables */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
    text-align: left;
    padding: 9px 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: #fafbfc;
    white-space: nowrap;
}

td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-quente { background: #fef2f2; color: #dc2626; }
.badge-morno  { background: #fff7ed; color: #ea580c; }
.badge-frio   { background: #ecfeff; color: #0891b2; }
.badge-novo, .badge-contato { background: #f1f5f9; color: #64748b; }
.badge-qualificado, .badge-proposta, .badge-negociacao { background: #eef2ff; color: #1e40af; }
.badge-fechado   { background: #f0fdf4; color: #16a34a; }
.badge-perdido   { background: #f3f4f6; color: #9ca3af; }
.badge-agendada  { background: #eef2ff; color: #1e40af; }
.badge-realizada { background: #f0fdf4; color: #16a34a; }
.badge-cancelada { background: #f3f4f6; color: #9ca3af; }
.badge-remarcada { background: #f1f5f9; color: #64748b; }

/* Clientes Fechados — highlight row */
tr.row-fechado td { background: #f0fdf4 !important; }
tr.row-fechado:hover td { background: #dcfce7 !important; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f3f4f6; }
.btn-danger { background: var(--red); color: white; }

.btn-icon {
    padding: 5px; background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    border-radius: 6px; transition: all 0.15s;
}
.btn-icon:hover { background: #f3f4f6; color: var(--text); }

.btn-fechar {
    padding: 4px 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-fechar:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}
.badge-fechado-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-activity {
    padding: 4px 8px;
    background: #eef2ff;
    border: none;
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-activity:hover { background: var(--primary); color: white; }

.action-btns { display: flex; gap: 2px; align-items: center; }

/* Filters */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 180px;
}
.search-box input { background: none; border: none; color: var(--text); font-size: 13px; outline: none; width: 100%; }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }

select {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer; outline: none;
}
select:focus { border-color: var(--primary); }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 760px; }

.modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; }
.modal-subtitle { font-size: 13px; color: var(--text-muted); display: block; margin-top: 2px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; line-height: 1; flex-shrink: 0; }
.modal-close:hover { color: var(--text); }

.modal-actions {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 24px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { padding: 0 24px; margin-bottom: 8px; }
.form-grid .form-group { padding: 0; }

.form-group label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.08); }

/* Activity Modal */
.activity-modal-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    min-height: 440px;
}

.activity-timeline-wrapper {
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    max-height: 520px;
}

.activity-form-wrapper {
    padding: 20px;
    background: #fafbfc;
}
.activity-form-wrapper h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.activity-form-wrapper .form-group { padding: 0; margin-bottom: 12px; }

/* Activity Timeline */
.activity-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}
.activity-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 34px;
    bottom: -4px;
    width: 2px;
    background: var(--border);
}

.activity-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    position: relative;
    z-index: 1;
}
.dot-ligacao  { background: #eff6ff; }
.dot-email    { background: #f5f3ff; }
.dot-reuniao  { background: #f0fdf4; }
.dot-proposta { background: #fff7ed; }
.dot-followup { background: #ecfeff; }
.dot-nota     { background: #fafbfc; border: 1px solid var(--border); }

.activity-content { flex: 1; }
.activity-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 3px;
}
.activity-type-label { font-size: 12px; font-weight: 600; }
.activity-date-label { font-size: 11px; color: var(--text-muted); }
.activity-desc-text { font-size: 13px; color: var(--text); line-height: 1.4; }

.activity-delete {
    background: none; border: none;
    color: #d1d5db; cursor: pointer;
    font-size: 16px; line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
}
.activity-delete:hover { color: var(--red); background: #fef2f2; }

/* Meeting List */
.meeting-list { display: flex; flex-direction: column; gap: 8px; }

.meeting-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.meeting-date-box {
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0; color: white;
}
.meeting-date-box .day { font-size: 17px; font-weight: 700; line-height: 1; }
.meeting-date-box .month { font-size: 9px; text-transform: uppercase; opacity: 0.85; }

.meeting-info-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.meeting-info-time { font-size: 12px; color: var(--text-muted); }

/* Empty state */
.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); }
.empty-state p { font-size: 13px; }

/* Section title for Clientes Fechados */
.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 2px;
}

/* Closed client card */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.client-card {
    background: var(--white);
    border: 1px solid #bbf7d0;
    border-left: 4px solid var(--green);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
    cursor: pointer;
}
.client-card:hover { box-shadow: 0 4px 12px rgba(22,163,74,0.12); }

.client-card-name { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.client-card-company { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.client-card-footer { display: flex; align-items: center; justify-content: space-between; }
.client-card-value { font-size: 13px; color: var(--green); font-weight: 600; }
.client-card-date { font-size: 11px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .activity-modal-body { grid-template-columns: 1fr; }
    .activity-form-wrapper { border-top: 1px solid var(--border); }
    .activity-timeline-wrapper { border-right: none; max-height: 280px; }
}
@media (max-width: 600px) {
    .header { padding: 10px 16px; }
    .period-bar { padding: 8px 16px; }
    .container { padding: 0 12px; }
    .form-grid { grid-template-columns: 1fr; }
    .goals-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== TEMA: BOTÃO ========== */
.theme-btn { font-size: 17px; padding: 5px 7px; line-height: 1; }

/* ========== SIDEBAR ========== */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.sidebar {
    position: fixed; top: 0; left: 0;
    width: 256px; height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--border);
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-logo { height: 22px; width: auto; }
.sidebar-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 22px; cursor: pointer; line-height: 1;
    padding: 2px 6px; border-radius: 6px;
}
.sidebar-close:hover { background: var(--bg); color: var(--text); }

.sidebar-section {
    padding: 14px 10px 8px;
    border-bottom: 1px solid var(--border);
}
.sidebar-section:last-of-type { border-bottom: none; }

.sidebar-section-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 8px; margin-bottom: 4px;
}

.sidebar-nav-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 10px;
    background: none; border: none; border-radius: 8px;
    color: var(--text); font-size: 13px; font-weight: 500;
    cursor: pointer; text-align: left;
    transition: background 0.15s;
}
.sidebar-nav-btn:hover { background: var(--bg); color: var(--primary); }
.sidebar-nav-btn svg { flex-shrink: 0; color: var(--text-muted); }
.sidebar-nav-btn:hover svg { color: var(--primary); }

.sidebar-action-btn {
    display: block; width: 100%;
    padding: 9px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; text-align: center;
    transition: all 0.15s; margin-bottom: 6px;
}
.sidebar-action-primary { background: var(--primary); border: none; color: white; }
.sidebar-action-primary:hover { background: var(--primary-hover); }
.sidebar-action-secondary {
    background: none; border: 1px solid var(--border); color: var(--text);
}
.sidebar-action-secondary:hover { background: var(--bg); }

.sidebar-theme-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 10px;
    background: none; border: none; border-radius: 8px;
    color: var(--text); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background 0.15s;
}
.sidebar-theme-btn:hover { background: var(--bg); }

.sidebar-footer {
    margin-top: auto; padding: 14px 16px;
    font-size: 11px; color: var(--text-muted);
    border-top: 1px solid var(--border);
    text-align: center;
}

.hamburger-btn { margin-right: 6px; }

/* Sidebar dark mode */
body.dark-mode .sidebar-logo { filter: brightness(0) invert(1); }
body.dark-mode .sidebar-nav-btn:hover,
body.dark-mode .sidebar-action-secondary:hover,
body.dark-mode .sidebar-theme-btn:hover { background: #252840; }
body.dark-mode .sidebar-action-secondary { border-color: var(--border); }
body.dark-mode .sidebar-close:hover { background: #252840; }

/* ========== DARK MODE ========== */
body.dark-mode {
    --bg: #0f1117;
    --white: #1a1d2e;
    --border: #2a2d3e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
}

body.dark-mode .setup-overlay { background: var(--bg); }
body.dark-mode .setup-box { background: var(--white); border-color: var(--border); }

body.dark-mode .header,
body.dark-mode .period-bar { background: var(--white); border-color: var(--border); }

body.dark-mode .stat-card,
body.dark-mode .card { background: var(--white); border-color: var(--border); }
body.dark-mode .stat-card:hover { border-color: rgba(29,78,216,0.4); }

body.dark-mode .client-card { background: var(--white); border-color: var(--border); border-left-color: var(--green); }

body.dark-mode th { background: #151726; color: var(--text-muted); border-color: var(--border); }
body.dark-mode td { border-color: var(--border); color: var(--text); }
body.dark-mode tr:hover td { background: #1f2235; }
body.dark-mode tr.row-fechado td { background: rgba(22,163,74,0.08) !important; }
body.dark-mode tr.row-fechado:hover td { background: rgba(22,163,74,0.14) !important; }

body.dark-mode .period-btn { background: var(--white); border-color: var(--border); color: var(--text-muted); }
body.dark-mode .period-btn:hover { border-color: var(--primary); color: var(--primary); }
body.dark-mode .period-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

body.dark-mode select { background: var(--white); border-color: var(--border); color: var(--text); }
body.dark-mode .search-box { background: var(--white); border-color: var(--border); }
body.dark-mode .search-box input { color: var(--text); background: transparent; }

body.dark-mode .btn-secondary { background: var(--white); border-color: var(--border); color: var(--text); }
body.dark-mode .btn-secondary:hover { background: #252840; }
body.dark-mode .btn-icon { color: var(--text-muted); }
body.dark-mode .btn-icon:hover { background: #252840; color: var(--text); }

body.dark-mode .goal-track { background: #252840; }

body.dark-mode .activity-form-wrapper { background: #151726; }
body.dark-mode .activity-timeline-wrapper { border-right-color: var(--border); }

body.dark-mode .meeting-item { background: #1f2235; border-color: var(--border); }

body.dark-mode .modal-overlay { background: rgba(0,0,0,0.7); }
body.dark-mode .modal { background: var(--white); border-color: var(--border); }
body.dark-mode .modal-header,
body.dark-mode .modal-actions { border-color: var(--border); }

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #252840;
    border-color: var(--border);
    color: var(--text);
}

body.dark-mode .celebration-box { background: var(--white); }

body.dark-mode .logo-img { filter: brightness(0) invert(1); }
body.dark-mode .section-label { color: var(--text-muted); }
body.dark-mode .empty-state p { color: var(--text-muted); }
body.dark-mode .card-header h3 { color: var(--text); }
body.dark-mode .date-display { color: var(--text-muted); }
body.dark-mode strong { color: var(--text); }
