:root {
  --ink: #373737;
  --muted: #6f6f6f;
  --line: #e4e1e2;
  --paper: #fff;
  --canvas: #f7f5f6;
  --green: #cf0a2c;
  --green-dark: #a90725;
  --brand-red: #cf0a2c;
  --brand-red-dark: #a90725;
  --brand-red-soft: #fff0f3;
  --brand-charcoal: #353535;
}

body { background: var(--canvas); color: var(--ink); }

.sidebar {
  background: linear-gradient(180deg, #333 0%, #242424 100%);
  color: #f5f5f5;
}

.brand {
  min-height: 112px;
  margin: -8px 0 14px;
  padding: 8px;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: contain;
}

.nav-item { color: #d0cccd; }
.nav-item:hover,
.nav-item.active { background: #4a292f; color: #fff; }
.nav-glyph { border-color: #777; }
.nav-item.active .nav-glyph { border-color: var(--brand-red); background: var(--brand-red); color: #fff; }
.sidebar-bottom .profile { border-color: #555; }
.profile small,
.more { color: #aaa; }
.avatar,
.lead-avatar,
.queue-avatar { background: #f8e3e7; color: #9d0b26; }

.primary-button {
  border-color: var(--brand-red);
  background: var(--brand-red);
  box-shadow: 0 5px 14px rgb(207 10 44 / 18%);
}
.primary-button:hover { border-color: var(--brand-red-dark); background: var(--brand-red-dark); }
.icon-button { color: var(--brand-red); }
.secondary-button:hover,
.filter-button:hover { border-color: #d9a7b0; color: var(--brand-red-dark); }
.plain-button:hover { color: var(--brand-red); }

.summary-card.featured { border-color: #f0cbd2; background: var(--brand-red-soft); }
.summary-card span { color: #a80a26; }
.filter-count { background: #f8e3e7; color: #a80a26; }
.view-tabs { background: #ece9ea; }
.view-tabs button.selected { color: var(--brand-red-dark); }
.search:focus-within { border-color: #da8797; box-shadow: 0 0 0 3px #fbe7eb; }

.lead-meta span,
.phone { background: #f7f3f4; }
.lead-card:hover,
.lead-table tbody tr:hover { background: #fff8f9; }
.lead-list-controls { display: flex; align-items: center; gap: 8px; }
.archived-lead { background: #faf8f8; color: #777; }
.archived-lead .lead-avatar { filter: grayscale(1); opacity: .75; }
.restore-lead { height: 32px; color: var(--brand-red-dark); }
#archiveLeadBtn { margin-right: auto; }
#restoreLeadBtn { margin-right: auto; }
.report-export-hint { margin: -8px 0 18px; color: var(--muted); font-size: 10px; }
#exportExcelBtn:disabled { cursor: wait; opacity: .65; }
.add-card:hover { border-color: #d98c9a; color: var(--brand-red); }

.login-screen {
  background:
    radial-gradient(circle at 18% 16%, rgb(207 10 44 / 26%), transparent 33%),
    linear-gradient(145deg, #4a4a4a 0%, #222 72%);
}
.login-card { border-top: 5px solid var(--brand-red); }
.login-brand { display: flex; justify-content: center; padding-bottom: 24px; }
.login-brand img { display: block; width: min(270px, 85%); max-height: 180px; object-fit: contain; }
.login-card input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: #d66b7d; box-shadow: 0 0 0 3px #fbe7eb; }
.form-error { color: var(--brand-red-dark); }

.modal-backdrop { background: rgb(35 25 27 / 72%) !important; }
.modal h2 { color: var(--brand-charcoal) !important; }
.toast { background: var(--brand-charcoal) !important; box-shadow: 0 12px 30px rgb(30 30 30 / 24%) !important; }

.queue-tabs button.selected { border-color: var(--brand-red); background: var(--brand-red-soft); color: var(--brand-red-dark); }
.queue-tabs button.selected b { background: var(--brand-red); }
.queue-ticket.unread { border-left-color: var(--brand-red); }
.unread-count,
.nav-queue-count { background: var(--brand-red); }
.queue-state.service { background: #f8e3e7; color: #9d0b26; }
.queue-online-dot { background: #29a66f; }

.wa-call-button { border-color: var(--brand-red); color: var(--brand-red-dark); }
.wa-call-button:hover { background: var(--brand-red-soft); }
.wa-file-button { border-color: #e1b9c0; background: #fff6f7; color: var(--brand-red-dark); }
.wa-file-button:hover { background: #fbe7eb; }

.day-card > header span { background: #f8e3e7; color: var(--brand-red-dark); }
.event-card.tarefa { border-color: var(--brand-red); }
.funnel-bar select:focus { border-color: var(--brand-red); }
.google-calendar-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; padding:14px 16px; border:1px solid #e2e5e4; border-radius:14px; background:#fff; box-shadow:0 7px 22px #2525250b; }
.google-calendar-bar > div { display:flex; align-items:center; gap:11px; }
.google-calendar-bar span span { display:grid; gap:3px; }
.google-calendar-bar strong { font:700 13px Arial; color:#353535; }
.google-calendar-bar small { font:11px Arial; color:#777; }
.google-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:linear-gradient(135deg,#4285f4 0 25%,#34a853 25% 50%,#fbbc05 50% 75%,#ea4335 75%); color:#fff; font:800 17px Arial; }
.google-sync-option { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid #dfe5e3; border-radius:10px; background:#f8faf9; }
.google-sync-option input { width:18px; height:18px; accent-color:var(--brand-red); }
.google-sync-option span { display:grid; gap:2px; }
.google-sync-option b { font:700 12px Arial; }
.google-sync-option small { font:11px Arial; color:#777; }
.meet-badge { display:inline-flex; width:max-content; margin-top:7px; padding:3px 7px; border-radius:999px; background:#e8f0fe; color:#1967d2; font:700 9px Arial; }
.meet-link { display:block; padding:11px 13px; border-radius:9px; background:#e8f0fe; color:#1967d2; text-decoration:none; font:700 12px Arial; }
.google-sync-error { margin:0; padding:9px; border-radius:8px; background:#fff3f3; color:#9b1c1c; font:11px Arial; }

@media (max-width: 900px) {
  .brand { min-height: 54px; margin: 0 0 14px; padding: 4px; }
  .brand-logo { width: 46px; height: 46px; object-fit: cover; object-position: center 24%; }
}
