/* ============================================
   REVIEWBR DASHBOARD - COMPLETE STYLES
   Encoding: UTF-8
   ============================================ */

/* ── RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-card: #1e1e2d;
  --bg-hover: #252535;
  
  /* Accents */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-light: rgba(99, 102, 241, 0.1);
  
  /* Status Colors */
  --status-sent: #10b981;
  --status-sent-bg: rgba(16, 185, 129, 0.1);
  --status-pending: #f59e0b;
  --status-pending-bg: rgba(245, 158, 11, 0.1);
  --status-new: #3b82f6;
  --status-new-bg: rgba(59, 130, 246, 0.1);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  /* Stats */
  --stat-orange: #f97316;
  --stat-green: #10b981;
  --stat-yellow: #eab308;
  --stat-neutral: #64748b;
  
  /* Spacing */
  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  
  /* Shadows */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Familjen Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-icon img {
  height: 60px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.brand-icon img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.business-tag {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.business-tag strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── NAVIGATION ── */
.nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.user-info {
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── ONBOARDING ── */
.onboarding-highlight {
  border: 2px solid #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  animation: pulse-green 2s infinite;
  position: relative;
  z-index: 1001;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.onboarding-tooltip {
  position: absolute;
  background: #10b981;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  bottom: calc(100% + 12px);
  left: 0;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: fadeInDown 0.3s ease;
  z-index: 1002;
}

.onboarding-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 20px;
  border: 8px solid transparent;
  border-top-color: #10b981;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── BUTTONS ── */
.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-cancel {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-submit {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-clear-filter {
  padding: 6px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  margin-left: 12px;
}

.btn-clear-filter:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── CONTENT ── */
.content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}

.stat-card.clickable {
  cursor: pointer;
  position: relative;
}

.stat-card.clickable::after {
  content: '→';
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.2s;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.stat-card.clickable:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

.stat-card.orange { border-left: 4px solid var(--stat-orange); }
.stat-card.green { border-left: 4px solid var(--stat-green); }
.stat-card.yellow { border-left: 4px solid var(--stat-yellow); }
.stat-card.neutral { border-left: 4px solid var(--stat-neutral); }

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.stat-delta {
  font-size: 12px;
  font-weight: 500;
}

.stat-delta.up { color: var(--stat-green); }
.stat-delta.warn { color: var(--stat-yellow); }
.stat-delta.neu { color: var(--text-muted); }

/* ── ACTIVE FILTER ── */
.active-filter {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 14px;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-count {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── SEARCH ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ── TABLE ── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-head {
  display: grid;
  grid-template-columns: 2fr 1fr 120px 140px 140px;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.table-body {
  max-height: 600px;
  overflow-y: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 120px 140px 140px;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.2s;
}

.table-row:hover {
  background: var(--bg-hover);
}

.table-row:last-child {
  border-bottom: none;
}

/* ── CELLS ── */
.cell-client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.client-avatar.ca-a { background: linear-gradient(135deg, #f97316, #ea580c); }
.client-avatar.ca-b { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.client-avatar.ca-c { background: linear-gradient(135deg, #10b981, #059669); }
.client-avatar.ca-d { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.client-avatar.ca-e { background: linear-gradient(135deg, #ec4899, #db2777); }

.client-name-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.client-since {
  font-size: 12px;
  color: var(--text-muted);
}

.cell-phone {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

.cell-date {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── STATUS BADGES ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-sent {
  background: var(--status-sent-bg);
  color: var(--status-sent);
}

.status-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}

.status-new {
  background: var(--status-new-bg);
  color: var(--status-new);
}

/* ── ACTION BUTTONS ── */
.cell-action {
  display: flex;
  justify-content: flex-end;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-btn svg {
  width: 14px;
  height: 14px;
}

.action-btn-sent {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--status-sent-bg);
  border: 1px solid var(--status-sent);
  border-radius: var(--radius-sm);
  color: var(--status-sent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}

.action-btn-sent svg {
  width: 14px;
  height: 14px;
}

/* ── CHECKLIST ATIVAÇÃO ── */
.checklist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.5s ease;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checklist-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.checklist-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
}

.checklist-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.checklist-item.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.completed .checklist-checkbox {
  background: #10b981;
  border-color: #10b981;
}

.completed .checklist-checkbox::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 800;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── NO RESULTS / LOADING ── */
.no-results,
.loading {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

.modal-config {
  max-width: 600px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  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-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ── FORM ── */
.form-group {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.form-group:last-of-type {
  border-bottom: none;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── CONFIG SECTIONS ── */
.config-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.config-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.user-email {
  font-size: 14px;
  color: var(--text-primary);
}

.user-plan-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── MODAL FOOTER ── */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: toastIn 0.3s ease;
}

.toast.active {
  display: flex;
}

.toast.success {
  border-left: 4px solid var(--status-sent);
}

.toast.error {
  border-left: 4px solid #ef4444;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toast.success .toast-icon {
  background: var(--status-sent-bg);
  color: var(--status-sent);
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.toast-message {
  font-size: 14px;
  color: var(--text-primary);
}

.toast.show {
  display: flex;
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── MOBILE OVERRIDES (≤768px) ── */
@media (max-width: 768px) {
  /* Scroll e Layout */
  body, .main {
    overflow-y: auto !important;
    height: auto !important;
    position: static !important;
  }
  
  .content {
    padding: 16px;
    padding-bottom: 80px; /* Espaço para o bottom nav */
  }

  /* KPIs Mobile */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .stat-card {
    padding: 12px 16px !important;
    max-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .stat-value {
    font-size: 28px !important;
    line-height: 1.2;
  }
  
  .stat-label {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background: var(--bg-secondary);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    backdrop-filter: blur(2px);
  }
  
  .sidebar-overlay.active {
    display: block;
  }

  .nav-item {
    height: 48px;
    font-size: 15px;
  }

  /* Tabela para Cards */
   .table-wrap {
     background: transparent;
     border: none;
     overflow-x: hidden !important;
   }
   
   .table-head-expanded, .table-head {
     display: none !important;
   }
   
   .table-row {
     display: flex !important;
     flex-direction: column !important;
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: 12px;
     padding: 16px !important;
     margin-bottom: 12px;
     gap: 12px !important;
     align-items: flex-start !important;
   }
   
   .table-row > span {
     width: 100%;
     display: flex;
     justify-content: space-between;
     font-size: 14px;
   }
   
   .table-row > span:first-child {
     font-size: 16px;
     border-bottom: 1px solid var(--border);
     padding-bottom: 8px;
     margin-bottom: 4px;
     font-weight: 700;
   }

   .mobile-label {
     display: inline-block !important;
     color: var(--text-secondary);
     font-weight: 600;
     font-size: 12px;
     margin-right: 8px;
   }

   .mobile-grid {
     display: grid !important;
     grid-template-columns: 1fr 1fr;
     gap: 12px;
     width: 100%;
     border-bottom: 1px solid var(--border);
     padding-bottom: 8px;
   }

   .action-btns {
     width: 100%;
     flex-direction: column;
     gap: 12px !important;
     margin-top: 8px;
   }
   
   .btn-disparo {
     width: 100%;
     justify-content: center;
   }

  /* Filtros Mobile */
  .date-filter-container {
    display: none; /* Escondido por padrão */
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
  }
  
  .btn-filter-toggle {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 16px;
  }

  /* Bottom Nav */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
  }
  
  .bottom-nav-item.active {
    color: var(--accent);
  }

  /* Tipografia */
  h1, .section-title { font-size: 18px !important; }
  p, span, div { font-size: 14px; }
  .stat-delta { font-size: 12px; }
  input, select, textarea { font-size: 16px !important; } /* Evita zoom iOS */
  button { height: 48px; font-size: 14px; }

  /* Esconder elementos mobile no desktop */
  .btn-filter-toggle, .bottom-nav, .sidebar-overlay {
    display: none;
  }
}

.btn-filter-toggle, .bottom-nav, .sidebar-overlay {
  display: none;
}

.mobile-label {
  display: none;
}

.mobile-grid {
  display: contents;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── SELECTION ── */
::selection {
  background: var(--accent);
  color: white;
}