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

:root {
  --bg: #08080f;
  --surface: #12121c;
  --surface-2: #1a1a28;
  --surface-3: #22222e;
  --card: #1a1a28;
  --card-hover: #22222e;
  --border: rgba(201, 168, 76, 0.08);
  --text: #e8e8ee;
  --text-secondary: #9a9aac;
  --text-muted: #6b6b80;
  --accent: #c9a84c;
  --accent-light: #d4b45e;
  --accent-hover: #d4b45e;
  --accent-dark: #b8943f;
  --accent-glow: rgba(201, 168, 76, 0.15);
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #b8943f;
  --gold-gradient: linear-gradient(135deg, #c9a84c, #e8d5a3, #c9a84c);
  --white: #f0f0f0;
  --status-negociacao: #c9a84c;
  --status-fechado: #3b82f6;
  --status-produzido: #8b5cf6;
  --status-pago: #34d399;
  --status-postado: #15803d;
  --status-recusa: #f43f5e;
  --status-followup: #f59e0b;
  --status-proposta: #06b6d4;
  --danger: #f43f5e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --transition: 0.2s ease;
}

html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== GLOBAL TRANSITIONS ==================== */
*:not(input):not(textarea):not(select) { transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 168, 76, 0.5); }

/* ==================== LOGIN SCREEN ==================== */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: #08080f;
  background-image: radial-gradient(ellipse at 50% 40%, rgba(201,168,76,0.06) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.05) 0%, rgba(201,168,76,0.02) 40%, transparent 70%);
  pointer-events: none;
}
.login-box {
  background: rgba(18, 18, 28, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 60px rgba(201, 168, 76, 0.05), 0 25px 50px rgba(0,0,0,0.5);
  animation: loginFadeIn 0.6s ease;
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-box .logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-box .logo h1 {
  font-family: 'Sora', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c9a84c 0%, #e8d5a3 50%, #c9a84c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 6px;
  text-transform: uppercase;
}
.login-box .logo .brand-accent {
  color: var(--accent);
}
.login-box .logo p {
  font-size: 13px;
  color: rgba(201, 168, 76, 0.6);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 8px;
}
.login-box .logo .brand-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  margin: 24px auto 0;
  border-radius: 2px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aac' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #c9a84c, #b8943f);
  color: #08080f;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.2);
  width: 100%;
  transition: all 0.3s ease;
}
.btn-primary:hover { background: linear-gradient(135deg, #d4b45e, #c9a84c); box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3); transform: translateY(-1px); }
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--card-hover); border-color: var(--text-muted); }
.btn-gold {
  background: var(--gold);
  color: #1a1a24;
}
.btn-gold:hover { background: var(--gold-dark); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--card-hover); color: var(--text); }
.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 12px;
  display: none;
}

/* ==================== FIRST LOGIN OVERLAY ==================== */
.first-login-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8,8,15,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.first-login-overlay.active { display: flex; }
.first-login-box {
  background: rgba(18, 18, 28, 0.8);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 24px;
  padding: 44px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 60px rgba(201, 168, 76, 0.05), 0 25px 50px rgba(0,0,0,0.5);
  animation: loginFadeIn 0.5s ease;
}
.first-login-box h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--text);
}
.first-login-box p.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.first-login-box .form-group { margin-bottom: 16px; }
.first-login-box .btn-gold { width: 100%; margin-top: 8px; }

/* Wizard — barra de progresso */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}
.wizard-step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.wizard-step-indicator.active {
  border-color: var(--gold);
  color: var(--gold);
}
.wizard-step-indicator.completed {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}
.wizard-step-line {
  width: 48px;
  height: 2px;
  background: var(--text-muted);
  opacity: 0.3;
  transition: all 0.3s ease;
}
.wizard-step-line.active {
  background: var(--gold);
  opacity: 1;
}

/* Wizard — animação de troca de step */
.wizard-step {
  animation: wizardFadeIn 0.3s ease;
}
@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Wizard — linha de botões (voltar + continuar) */
.wizard-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.wizard-btn-row .btn-secondary { flex: 1; }
.wizard-btn-row .btn-gold { flex: 2; }

/* Wizard — tela final (step 3) */
.wizard-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.12);
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}
.wizard-tip {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.wizard-tip-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 6px;
}

/* Wizard — select estilizado */
.first-login-box select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b80' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.first-login-box select:focus {
  border-color: var(--gold);
}

/* ==================== EDIT WORKSPACE MODAL ==================== */
.edit-ws-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.edit-ws-overlay.active { display: flex; }
.edit-ws-box {
  background: #12121c;
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 0 80px rgba(201, 168, 76, 0.05), 0 25px 50px rgba(0,0,0,0.5);
  animation: loginFadeIn 0.4s ease;
}
.edit-ws-box h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text);
}
.edit-ws-box .form-group { margin-bottom: 14px; }
.edit-ws-box .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ==================== WORKSPACE SELECTOR ==================== */
.workspace-screen {
  display: none;
  min-height: 100vh;
  padding: 60px 20px 40px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.workspace-screen::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, rgba(201,168,76,0.02) 30%, transparent 60%);
  pointer-events: none;
}
.workspace-screen.active { display: flex; flex-direction: column; align-items: center; }
.workspace-screen .ws-header {
  text-align: center;
  margin-bottom: 16px;
  animation: wsFadeInUp 0.5s ease;
}
.workspace-screen .ws-header h1 {
  font-family: 'Sora', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.workspace-screen .ws-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}
.workspace-screen .ws-user-info {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: wsFadeInUp 0.5s ease 0.1s both;
}
.workspace-screen .ws-user-info .avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #c9a84c, #e8d5a3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #08080f;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(201,168,76,0.3);
}
.workspace-screen .ws-user-info span {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}
.workspace-screen .ws-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--transition);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.workspace-screen .ws-logout:hover { color: var(--danger); border-color: var(--danger); }
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
@keyframes wsFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wsCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.workspace-card {
  background: rgba(18,18,28,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 28px 28px 28px 32px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-left: 4px solid transparent;
  animation: wsCardIn 0.45s ease both;
  display: flex;
  align-items: center;
  gap: 16px;
}
.workspace-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(201, 168, 76, 0.15);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.05);
}
.workspace-card .ws-card-content {
  flex: 1;
  min-width: 0;
}
.workspace-card .ws-instagram {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.workspace-card .ws-name {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}
.workspace-card .ws-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 0.35s ease;
  flex-shrink: 0;
  opacity: 0.5;
}
.workspace-card:hover .ws-arrow {
  transform: translateX(4px);
  opacity: 1;
}
.ws-branding {
  text-align: center;
  margin-top: 48px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.4;
  animation: wsFadeInUp 0.5s ease 0.6s both;
}

/* ==================== APP LAYOUT ==================== */
.app { display: none; min-height: 100vh; }
.app.active { display: flex; flex-direction: column; }

/* Top Nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topnav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topnav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity var(--transition);
}
.topnav-brand:hover { opacity: 0.8; }
.workspace-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all var(--transition);
}
.workspace-pill:hover { opacity: 0.85; transform: scale(1.02); }
.workspace-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  opacity: 0.7;
}
.topnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.4rem;
  align-items: center;
  justify-content: center;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.user-badge .avatar {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}
.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  transition: color var(--transition);
}
.logout-btn:hover { color: var(--danger); }

/* Desktop nav tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-tab:hover { color: var(--text); background: var(--card); }
.nav-tab.active { color: var(--accent); background: rgba(201,168,76,0.1); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.mobile-nav.open { display: block; }
.mobile-nav-inner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-inner .nav-tab {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font-size: 0.95rem;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==================== DASHBOARD ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: rgba(18, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(201, 168, 76, 0.15); box-shadow: 0 0 20px rgba(201, 168, 76, 0.05); }
.stat-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.stat-card .value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.stat-card .sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card.highlight {
  border-color: rgba(201, 168, 76, 0.15);
  background: rgba(18, 18, 28, 0.6);
}
.stat-card.gold-highlight {
  border-color: rgba(201, 168, 76, 0.15);
  background: rgba(18, 18, 28, 0.6);
}

/* ==================== VENDEDOR DASHBOARD ==================== */
.vendedor-panel {
  max-width: 900px;
  margin: 0 auto;
}
.vendedor-header {
  text-align: center;
  margin-bottom: 24px;
}
.vendedor-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 4px;
}
.vendedor-header .vendedor-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.vendedor-view-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.vendedor-view-btn {
  padding: 8px 20px;
  border: 1px solid #3b82f6;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #3b82f6;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.vendedor-view-btn.active {
  background: #3b82f6;
  color: white;
}
.vendedor-view-btn:hover:not(.active) {
  background: rgba(59,130,246,0.1);
}
.vendedor-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.vendedor-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.vendedor-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.vendedor-stat-card .vsc-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.vendedor-stat-card .vsc-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.vendedor-stat-card .vsc-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.vendedor-stat-card.blue-highlight {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, var(--card) 100%);
}
.vendedor-clients-section {
  margin-top: 24px;
}
.vendedor-clients-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.vendedor-client-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.vendedor-client-card:hover {
  background: var(--card-hover);
  border-color: #3b82f6;
  transform: translateX(3px);
}
.vendedor-client-card .vcc-info {
  flex: 1;
  min-width: 0;
}
.vendedor-client-card .vcc-empresa {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vendedor-client-card .vcc-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.vendedor-client-card .vcc-valor {
  font-weight: 700;
  font-size: 1rem;
  color: #3b82f6;
  white-space: nowrap;
}
.vendedor-client-card .vcc-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.vendedor-wa-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}
.vendedor-wa-btn:hover {
  transform: scale(1.1);
}
.vendedor-followup-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.vendedor-followup-badge.overdue {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  animation: pulseOverdue 1.5s ease-in-out infinite;
}
@keyframes pulseOverdue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.followup-alert-banner {
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: pulseOverdue 2s ease-in-out infinite;
}
.followup-alert-banner .alert-icon { font-size: 1.3rem; }
.followup-alert-banner .alert-text { color: #f43f5e; font-weight: 600; font-size: 0.88rem; }
.vendedor-followup-badge.today {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}
.vendedor-followup-badge.upcoming {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}
@media (max-width: 768px) {
  .vendedor-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== HISTORICO ==================== */
.historico-year-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.historico-year-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.historico-year-btn:hover { background: var(--card-hover); color: var(--text); }
.historico-year-btn.active {
  background: var(--gold);
  color: #08080f;
  border-color: var(--gold);
}
.historico-chart-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.historico-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 320px;
  position: relative;
  padding-bottom: 40px;
  padding-left: 60px;
  min-width: 600px;
}
.historico-chart-grid {
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.historico-chart-gridline {
  border-bottom: 1px solid rgba(46,46,58,0.5);
  position: relative;
  height: 0;
}
.historico-chart-gridline .grid-label {
  position: absolute;
  left: -60px;
  top: -8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 55px;
  text-align: right;
}
.historico-month-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}
.historico-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  flex: 1;
  width: 100%;
  justify-content: center;
}
.historico-bar {
  width: 45%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s;
  animation: barGrow 0.8s ease-out forwards;
  transform-origin: bottom;
}
.historico-bar:hover { opacity: 0.85; }
.historico-bar.bar-volume {
  background: linear-gradient(180deg, #e0b85a, #d4a853);
}
.historico-bar.bar-faturamento {
  background: linear-gradient(180deg, #5ce070, #4cd964);
}
.historico-bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.historico-bar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.historico-bar:hover .historico-bar-tooltip { display: block; }
.historico-month-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  text-align: center;
}
@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.historico-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
}
.historico-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.historico-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.historico-table-container {
  margin-bottom: 24px;
}
.historico-table-container table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.82rem;
}
.historico-table-container th {
  background: var(--surface);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}
.historico-table-container td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.historico-table-container tr:last-child td {
  border-bottom: none;
}
.historico-table-container tr.total-row {
  background: rgba(201,168,76,0.08);
  font-weight: 700;
}
.historico-comparison {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.historico-comparison .pct-up { color: #4cd964; font-weight: 700; }
.historico-comparison .pct-down { color: var(--danger); font-weight: 700; }

@media (max-width: 768px) {
  .historico-chart { height: 240px; min-width: 500px; }
  .historico-bar { max-width: 20px; }
  .historico-bar-value { font-size: 0.5rem; top: -14px; }
  .historico-table-container { overflow-x: auto; }
  .historico-table-container table { min-width: 700px; }
}

/* Progress bar */
.progress-container { margin-bottom: 24px; }
.progress-bar-outer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.progress-header .label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.progress-header .pct {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.progress-track {
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a84c, #e8d5a3) !important;
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Status mini cards */
.status-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.status-mini-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  border-top: 2px solid var(--border);
}
.status-mini-card .count {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
}
.status-mini-card .status-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Remuneration card */
.remuneration-card {
  background: rgba(18, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.remuneration-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.remuneration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.remuneration-row:last-child { border-bottom: none; }
.remuneration-row .r-label { color: var(--text-secondary); font-size: 0.9rem; }
.remuneration-row .r-value { font-weight: 600; font-size: 0.95rem; }
.remuneration-row.total { padding-top: 14px; }
.remuneration-row.total .r-label { color: var(--gold); font-weight: 600; }
.remuneration-row.total .r-value { color: var(--gold); font-size: 1.2rem; font-weight: 700; }
.remuneration-row.best .r-label { color: var(--status-pago); }
.remuneration-row.best .r-value { color: var(--status-pago); }

/* Period nav */
.period-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.period-nav .period-label {
  font-size: 1rem;
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}
.period-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.period-nav button:hover { background: var(--gold); border-color: var(--gold); color: #08080f; }

/* ==================== CLIENTS VIEW ==================== */
.clients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.clients-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.view-toggle {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle button {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.view-toggle button.active { background: var(--gold); color: #08080f; }

/* Search/filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-bar input, .filter-bar select {
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: rgba(201, 168, 76, 0.5); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1); }
.filter-bar input { flex: 1; min-width: 200px; }
.filter-bar select {
  appearance: none;
  cursor: pointer;
  min-width: 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aac' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* KANBAN VIEW */
.kanban-wrapper {
  position: relative;
}
.kanban-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  margin-bottom: 4px;
}
.kanban-scroll-top-inner {
  height: 1px;
}
.kanban-container {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 400px;
}
.kanban-column {
  flex: 0 0 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}
.kanban-column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.kanban-column-header .col-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-column-header .col-title .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban-column-header .col-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--card);
  padding: 2px 8px;
  border-radius: 10px;
}
.kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-card {
  background: rgba(18, 18, 28, 0.7);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  touch-action: pan-y;
}
.kanban-card:hover { border-color: rgba(201, 168, 76, 0.15); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.kanban-card .kc-empresa {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  padding-right: 24px;
}
.kanban-card .kc-recorrente {
  display: inline-block;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
}
.kanban-card .kc-segmento {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.kanban-card .kc-valor {
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
}
.kanban-card .kc-pacote {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.kanban-card .kc-origem {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
}
.kanban-card .kc-dates {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* LIST VIEW */
.list-view { display: none; }
.list-view.active { display: block; }
.kanban-container.active { display: flex; }
.kanban-container { display: none; }

.list-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.list-table th {
  background: var(--surface);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.list-table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.list-table tr { cursor: pointer; transition: background var(--transition); }
.list-table tbody tr:hover { background: rgba(201, 168, 76, 0.03); }
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* FAB button */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #b8943f);
  border: none;
  color: #08080f;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 50;
}
.fab:hover { background: linear-gradient(135deg, #d4b45e, #c9a84c); transform: scale(1.05); box-shadow: 0 6px 25px rgba(201,168,76,0.4); }

/* ==================== MODAL ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #12121c;
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  padding: 0;
  box-shadow: 0 0 80px rgba(201, 168, 76, 0.05), 0 25px 50px rgba(0,0,0,0.5);
  margin-top: 40px;
  margin-bottom: 40px;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--card);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: white; }
.modal-body {
  padding: 24px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-footer .btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  margin-right: auto;
}
.modal-footer .btn-danger:hover { background: var(--danger); color: white; }

/* ==================== SETTINGS ==================== */
.settings-section {
  background: rgba(18, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}
.settings-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 20px;
}
.settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* ==================== REMUNERATION TOGGLE BLOCKS ==================== */
.rem-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: all 0.3s ease;
}
.rem-block.disabled {
  opacity: 0.55;
}
.rem-block.disabled .rem-block-fields,
.rem-block.disabled .rem-block-desc {
  opacity: 0.4;
  pointer-events: none;
}
.rem-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rem-block-header h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}
.rem-block-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}
.rem-block-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.rem-block-fields .form-group { margin-bottom: 0; }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--surface-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(201, 168, 76, 0.3);
  border-color: var(--gold);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

/* ==================== ADMIN PANEL ==================== */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-create-btn {
  width: 100%;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(212,168,83,0.25);
  transition: all var(--transition);
}
.admin-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,168,83,0.35);
}
.admin-color-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  vertical-align: middle;
}
.admin-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.admin-status-badge.ativo {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}
.admin-status-badge.inativo {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { border-left: 3px solid var(--status-pago); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Google Calendar link */
.gcal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(66,133,244,0.12);
  border: 1px solid rgba(66,133,244,0.3);
  border-radius: var(--radius-sm);
  color: #4285f4;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  margin-top: 12px;
  transition: all var(--transition);
}
.gcal-link:hover { background: rgba(66,133,244,0.22); }

/* ==================== VISAO GERAL ==================== */
.visaogeral-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}
.visaogeral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.visaogeral-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.visaogeral-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.visaogeral-card .vg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.visaogeral-card .vg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.visaogeral-card .vg-name {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.visaogeral-card .vg-instagram {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.visaogeral-card .vg-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.visaogeral-card .vg-stat {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.visaogeral-card .vg-stat strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  margin-top: 2px;
}
.visaogeral-card .vg-progress {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.visaogeral-card .vg-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.visaogeral-card .vg-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.visaogeral-totals {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 3px solid var(--gold);
}
.visaogeral-totals h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.visaogeral-totals .vg-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.visaogeral-totals .vg-total-item {
  text-align: center;
}
.visaogeral-totals .vg-total-item .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.visaogeral-totals .vg-total-item .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* ==================== GRAVACOES DA SEMANA ==================== */
.gravacoes-section {
  background: rgba(18, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.gravacoes-section .gravacoes-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gravacoes-dia {
  margin-bottom: 16px;
}
.gravacoes-dia:last-child { margin-bottom: 0; }
.gravacoes-dia .dia-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.gravacao-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(46,46,58,0.3);
}
.gravacao-item:last-child { border-bottom: none; }
.gravacao-item .gi-horario {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-light);
  min-width: 100px;
}
.gravacao-item .gi-empresa {
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.gravacao-item .gi-endereco {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gravacao-item .gi-waze {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(51,122,255,0.12);
  color: #33b5e5;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition);
}
.gravacao-item .gi-waze:hover { background: rgba(51,122,255,0.22); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-tabs { display: none; }
  .main-content { padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card .value { font-size: 1.3rem; }
  .stat-card { padding: 14px; }
  .kanban-column { flex: 0 0 85vw; min-width: 240px; }
  .kanban-card { padding: 14px; }
  .kanban-card .card-empresa { font-size: 0.88rem; }
  .kanban-card div[style*="font-size:0.72rem"] { font-size: 0.78rem !important; }
  .modal { margin-top: 10px; max-height: 92vh; }
  .modal-body { max-height: 70vh; }
  .modal-body .form-row { grid-template-columns: 1fr; }
  .user-badge span.user-name-text { display: none; }
  .clients-header { flex-direction: column; align-items: stretch; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select { min-width: auto; }
  .period-nav .period-label { font-size: 0.85rem; min-width: 160px; }
  .status-cards-row { grid-template-columns: repeat(3, 1fr); }
  .followup-alert-banner { padding: 10px 12px; }
  .followup-alert-banner .alert-text { font-size: 0.82rem; }
  .vendedor-followup-badge { font-size: 0.72rem !important; padding: 2px 6px; }
  .topnav-brand { font-size: 0.95rem; }
  .workspace-grid { grid-template-columns: 1fr; max-width: 100%; }
  .workspace-screen { padding: 32px 16px 24px; }
  .workspace-screen .ws-header h1 { font-size: 1.6rem; }
  .workspace-card { padding: 22px 20px 22px 24px; }
  .parcela-row { grid-template-columns: 1fr 1fr; }
  .parcela-row input[type="number"] { grid-column: 1; }
  .parcela-row input[type="date"] { grid-column: 2; }
  .parcela-row select { grid-column: 1; }
  .parcela-row .parcela-remove { grid-column: 2; justify-self: end; }
}
@media (max-width: 420px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .status-cards-row { grid-template-columns: repeat(2, 1fr); }
  .login-box { padding: 32px 24px; }
}

/* ==================== PARCELAS FORM ==================== */
.parcelas-section {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--bg);
}
.parcelas-section .parcelas-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.parcela-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.parcela-row input, .parcela-row select {
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition);
}
.parcela-row input:focus, .parcela-row select:focus {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}
.parcela-row select {
  appearance: none;
  cursor: pointer;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aac' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.parcela-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.parcela-remove:hover { background: var(--danger); color: white; }
.btn-add-parcela {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
}
.btn-add-parcela:hover { border-color: var(--gold); color: var(--gold); }
.parcela-status-pago {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--status-pago);
}
.parcela-status-pendente {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--danger);
}

/* ==================== COBRANCAS DASHBOARD ==================== */
.cobrancas-section {
  background: rgba(18, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.cobrancas-section .cobrancas-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cobranca-category {
  margin-bottom: 16px;
}
.cobranca-category .cat-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cobranca-category .cat-total {
  font-weight: 700;
  font-size: 0.82rem;
}
.cobranca-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition);
}
.cobranca-card:hover { border-color: var(--text-muted); }
.cobranca-card.atrasado {
  background: rgba(239,68,68,0.04);
  border-color: rgba(239,68,68,0.12);
}
.cobranca-card.alerta {
  background: rgba(245,158,11,0.04);
  border-color: rgba(245,158,11,0.12);
}
.cobranca-card .cc-info {
  flex: 1;
  min-width: 0;
}
.cobranca-card .cc-empresa {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.cobranca-card .cc-details {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cobranca-card .cc-valor {
  font-weight: 700;
  color: var(--white);
}
.cobranca-card .cc-dias {
  font-weight: 600;
}
.cobranca-card .cc-dias.atrasado { color: #e57373; }
.cobranca-card .cc-dias.alerta { color: rgba(245,158,11,0.6); }
.cobranca-card .cc-dias.normal { color: var(--text-secondary); }
.btn-pago {
  padding: 5px 12px;
  background: var(--status-pago);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-pago:hover { background: #16a34a; transform: scale(1.05); }
.cobranca-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  padding: 8px 0;
}

/* hidden util */
.hidden { display: none !important; }
.page { display: none; }
.page.active { display: block; }
@media print {
  body > *:not(#propostaOverlay) { display: none !important; }
  #propostaOverlay { position: static !important; height: auto !important; overflow: visible !important; background: #0a0a14 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  #propostaOverlay .no-print { display: none !important; }
  #propostaContent { min-height: auto !important; background: #0a0a14 !important; }
}
