/* Genesis tokens — GoldCRM designs */
:root {
  --primary: #fbaa1a;
  --primary-hover: #e09410;
  --secondary: #20970b;
  --whatsapp: #25d366;
  --whatsapp-bg: rgba(37, 211, 102, 0.16);
  --whatsapp-border: #25d366;
  --whatsapp-text: #0f7a3a;

  --call: #fbaa1a;
  --call-bg: rgba(251, 170, 26, 0.18);
  --call-border: #fbaa1a;
  --call-text: #9a6200;

  --neutral: #9c9c9c;
  --background: #fafafa;
  --surface: #ffffff;
  --text-primary: #0a0a0a;
  --text-secondary: #6b6b6b;
  --border: #e8e8ec;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;

  --font-display: "General Sans", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, monospace;

  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 26px;
  --text-3xl: 34px;
  --text-4xl: 40px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-btn-hover: 0 4px 12px rgba(251, 170, 26, 0.35);
  --focus-ring: 0 0 0 3px rgba(251, 170, 26, 0.2);

  /* Spacing between panels / KPI cards / section boxes */
  --space-box: 32px;
  /* Very faint lift for surface boxes */
  --shadow-box: 0 1px 2px rgba(10, 10, 10, 0.04), 0 4px 12px rgba(10, 10, 10, 0.03);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.display,
.headline,
.section-heading,
.subhead {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.section-heading {
  font-size: var(--text-3xl);
  letter-spacing: -0.04em;
}

.subhead {
  font-size: var(--text-2xl);
}

.body-text {
  font-size: var(--text-md);
}

.small {
  font-size: var(--text-sm);
}

.caption {
  font-size: var(--text-xs);
}

.overline {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

/* Dot grid (only decorative element per DESIGN.md) */
.dot-grid {
  background-color: var(--background);
  background-image: radial-gradient(circle, #d4d4d8 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Buttons — vertically centered text on every variant */
.btn,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transform: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease,
    box-shadow 200ms ease;
}

.btn[hidden],
a.btn[hidden],
button.btn[hidden] {
  display: none !important;
}

.btn span,
a.btn span,
button.btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

.btn:hover,
a.btn:hover,
button.btn:hover {
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-primary);
  border-color: transparent;
  height: 48px; min-height: 48px;
  padding: 0 24px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-btn-hover);
  color: var(--text-primary);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-btn-hover);
}

.btn-block {
  width: 100%;
  height: 48px; min-height: 48px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-md {
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
}

.btn-secondary:hover {
  background: var(--gray-100);
  box-shadow: none;
}

/* Primary + md in topbars/forms: keep 40px so rows align */
.btn.btn-primary.btn-md,
a.btn.btn-primary.btn-md,
button.btn.btn-primary.btn-md {
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
}

.card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-box);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field[hidden] {
  display: none !important;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.4;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.input::placeholder {
  color: var(--neutral);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.input-error {
  border-color: var(--error);
}

.field-error {
  font-size: var(--text-xs);
  color: var(--error);
  margin: 0;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  border-radius: var(--radius-full);
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(44px, 10vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin: 0;
}

.brand-tagline {
  margin: 0 auto;
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 28ch;
}

.auth-card {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 480px) {
  .auth-card {
    padding: 40px 32px;
  }
}

.auth-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-card-header h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
}

.auth-card-header p {
  margin: 0;
  font-size: var(--text-md);
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 500;
}

.link-muted {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary);
}

.link-muted:hover {
  color: var(--primary-hover);
}

.hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--neutral);
}

/* SaaS app shell: sidebar + topbar + content */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--background);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 16px;
  background: var(--surface);
  border-right: none;
  box-shadow: 2px 0 12px rgba(10, 10, 10, 0.03);
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.sidebar-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.sidebar-nav a .nav-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  color: var(--primary);
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav a .nav-ico * {
  stroke: var(--primary);
  fill: none;
}

.sidebar-nav a:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.sidebar-nav a:hover .nav-ico,
.sidebar-nav a:hover .nav-ico *,
.sidebar-nav a.active .nav-ico,
.sidebar-nav a.active .nav-ico * {
  color: var(--primary);
  stroke: var(--primary);
}

.sidebar-nav a.active {
  background: rgba(251, 170, 26, 0.16);
  color: var(--text-primary);
}

.panel.panel-reminders {
  background: rgba(251, 170, 26, 0.08);
}

.panel.panel-matches {
  background: rgba(37, 211, 102, 0.08);
}

.panel.panel-matches .panel-header a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-hover);
  text-decoration: none;
}

.panel.panel-matches .panel-header a:hover {
  text-decoration: underline;
}

.match-panel-hint {
  margin: 0;
  padding: 0 20px 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.match-list {
  display: flex;
  flex-direction: column;
}

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.match-row:first-child {
  border-top: none;
}

.match-row:hover {
  background: rgba(255, 255, 255, 0.55);
}

.match-row-main {
  min-width: 0;
}

.match-name {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

.match-meta {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.match-empty {
  margin: 0;
  padding: 8px 20px 20px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}

.panel.panel-reminders .panel-header {
  align-items: center;
}

.panel.panel-reminders .panel-header .btn {
  align-self: center;
}

.panel.panel-reminders .reminder-row {
  background: transparent;
}

.panel.panel-reminders .reminder-row.is-overdue {
  background: #fff8f8;
}

.sidebar-footer {
  padding: 8px;
  border-top: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sidebar-user {
  min-width: 0;
}

.sidebar-user-name {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-meta {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  width: 40px;
  height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--text-primary);
  place-items: center;
  padding: 0;
  margin: 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.page-subtitle {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field {
  display: block;
  box-sizing: border-box;
  width: 240px;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: normal;
  -webkit-appearance: none;
  appearance: none;
}

.search-field::-webkit-search-decoration,
.search-field::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-field::placeholder {
  color: var(--neutral);
  opacity: 1;
}

.topbar-search {
  position: relative;
}

.topbar-search .contact-search-results {
  min-width: 280px;
  right: 0;
  left: auto;
}

.topbar-actions .search-field {
  height: 44px;
  line-height: normal;
  padding: 0 14px;
}

@media (max-width: 700px) {
  .topbar-search {
    display: none;
  }
}

.content {
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: var(--space-box);
  width: 100%;
  max-width: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
}

.segmented button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-box);
}

.kpi-grid-channels {
  grid-template-columns: repeat(2, 1fr);
}

.kpi-grid-channels .kpi-card {
  padding: 28px 28px 24px;
  min-height: 168px;
}

.kpi-grid-channels .kpi-label {
  margin-bottom: 12px;
}

.kpi-grid-channels .kpi-value {
  margin-bottom: 4px;
}

.kpi-grid-channels .kpi-wins {
  margin-top: 14px;
}

.kpi-grid-channels .kpi-hint {
  margin-top: 12px;
}

.tracker-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.tracker-split .panel-call {
  outline: 2px solid color-mix(in srgb, var(--call-text) 18%, transparent);
}

.tracker-split .panel-whatsapp {
  outline: 2px solid color-mix(in srgb, var(--whatsapp-text) 18%, transparent);
}

.tracker-split .panel-call .panel-header h2,
.tracker-split .panel-call .panel-header h3 {
  color: var(--call-text);
}

.tracker-split .panel-whatsapp .panel-header h2,
.tracker-split .panel-whatsapp .panel-header h3 {
  color: var(--whatsapp-text);
}

.tracker-period {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tracker-period-heading {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.tracker-split .panel-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.tracker-split .panel-header {
  padding: 20px 24px;
}

.tracker-split .data-table th,
.tracker-split .data-table td {
  padding: 14px 18px;
}

.tracker-split .data-table-even th,
.tracker-split .data-table-even td {
  padding-left: 16px;
  padding-right: 16px;
}

.kpi-card {
  position: relative;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-box);
}

.kpi-top {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary);
}

.kpi-label {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.kpi-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.kpi-hint {
  margin: 8px 0 0;
  font-size: var(--text-xs);
  color: var(--neutral);
}

.kpi-wins {
  margin: 10px 0 0;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
}

.kpi-call .kpi-wins {
  color: var(--call-text);
  opacity: 0.85;
}

.kpi-whatsapp .kpi-wins {
  color: var(--whatsapp-text);
  opacity: 0.85;
}

.panel {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-box);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: none;
}

.panel-header h2 {
  margin: 0;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--primary);
}

.panel-ico * {
  stroke: var(--primary);
  fill: none;
}

.panel-ico-bell {
  transform-origin: 50% 0%;
  animation: bell-rattle 6s linear infinite;
}

@keyframes bell-rattle {
  /* Active rattle for first 2s of each 6s cycle */
  0%,
  33.33%,
  100% {
    transform: rotate(0deg) translateX(0);
  }
  2.5% {
    transform: rotate(22deg) translateX(1px);
  }
  5% {
    transform: rotate(-20deg) translateX(-1px);
  }
  7.5% {
    transform: rotate(18deg) translateX(1px);
  }
  10% {
    transform: rotate(-16deg) translateX(-1px);
  }
  12.5% {
    transform: rotate(14deg) translateX(1px);
  }
  15% {
    transform: rotate(-12deg) translateX(-1px);
  }
  17.5% {
    transform: rotate(10deg) translateX(1px);
  }
  20% {
    transform: rotate(-8deg) translateX(-1px);
  }
  22.5% {
    transform: rotate(6deg) translateX(1px);
  }
  25% {
    transform: rotate(-4deg) translateX(-1px);
  }
  27.5% {
    transform: rotate(3deg) translateX(0);
  }
  30% {
    transform: rotate(-2deg) translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-ico-bell {
    animation: none;
  }
}

.panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

.panel-toggle-header {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.panel-toggle-header .panel-title,
.panel-toggle-header .panel-toggle-chevron {
  align-self: center;
}

.panel-toggle-header:hover {
  background: var(--gray-100);
}

.panel-toggle-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--primary);
  transition: transform 160ms ease;
}

.panel-toggle-chevron * {
  stroke: var(--primary);
  fill: none;
}

.panel-toggle-header[aria-expanded="true"] .panel-toggle-chevron {
  transform: rotate(180deg);
}

.panel-toggle-body[hidden] {
  display: none !important;
}

.panel-header a {
  font-size: var(--text-sm);
  font-weight: 500;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--background);
}

.th-sort {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}

.th-sort::after {
  content: "↕";
  font-size: 11px;
  opacity: 0.35;
  line-height: 1;
}

.th-sort.is-active {
  color: var(--text-primary);
}

.th-sort.is-active[data-dir="asc"]::after {
  content: "↑";
  opacity: 0.8;
}

.th-sort.is-active[data-dir="desc"]::after {
  content: "↓";
  opacity: 0.8;
}

.th-sort:hover {
  color: var(--text-primary);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 160ms ease;
}

.data-table tbody tr.row-link {
  cursor: pointer;
}

.data-table tbody tr.row-link:focus-visible {
  outline: none;
  background: var(--gray-100);
  box-shadow: inset 0 0 0 2px var(--focus-ring, rgba(251, 170, 26, 0.35));
}

.data-table tbody tr.row-link td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}

.table-group-row td {
  background: rgba(251, 170, 26, 0.08);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.table-group-count {
  margin-left: 8px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
}

.list-group-header {
  padding: 12px 16px 8px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  background: rgba(251, 170, 26, 0.08);
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr.table-group-row:hover {
  background: rgba(251, 170, 26, 0.08);
}

.th-check,
.td-check {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

.th-check input,
.td-check input,
.mobile-queue-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.data-table tbody tr.is-selected {
  background: rgba(251, 170, 26, 0.1);
}

.data-table tbody tr.is-selected:hover {
  background: rgba(251, 170, 26, 0.14);
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: var(--space-box);
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  background: rgba(251, 170, 26, 0.12);
  box-shadow: var(--shadow-box);
}

.bulk-bar[hidden] {
  display: none !important;
}

.bulk-bar-count {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bulk-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-queue-item.mobile-queue-item-select {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.mobile-queue-item.mobile-queue-item-select.is-selected {
  background: rgba(251, 170, 26, 0.1);
}

.mobile-queue-check {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  padding: 14px 0;
  cursor: pointer;
}

.mobile-queue-body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 14px 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-table tbody tr:hover {
  background: var(--gray-100);
}

.data-table a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
}

.data-table a:hover {
  color: var(--primary-hover);
}

.data-table-even {
  table-layout: fixed;
  width: 100%;
  min-width: 960px;
}

.data-table-even th,
.data-table-even td {
  width: 9.09%;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  overflow-wrap: break-word;
}

.data-table-even th:first-child,
.data-table-even td:first-child {
  text-align: left;
}

.data-table-even .td-money {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.chip-active {
  background: var(--primary);
  color: var(--text-primary);
}

/* Channel colors */
.chip-call,
.chip-whatsapp {
  border: none;
}

.chip-call {
  background: var(--call-bg);
  color: var(--call-text);
}

.chip-whatsapp {
  background: var(--whatsapp-bg);
  color: var(--whatsapp-text);
}

.btn-call,
a.btn-call {
  background: var(--call-bg);
  color: var(--call-text);
  border-color: var(--call-border);
}

.btn-call:hover,
a.btn-call:hover {
  background: rgba(251, 170, 26, 0.28);
  color: var(--call-text);
  border-color: var(--call-border);
}

.btn-whatsapp,
a.btn-whatsapp {
  background: var(--whatsapp-bg);
  color: var(--whatsapp-text);
  border-color: var(--whatsapp-border);
}

.btn-whatsapp:hover,
a.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.26);
  color: var(--whatsapp-text);
  border-color: var(--whatsapp-border);
}

.choice-card-call {
  border-color: var(--call-border);
  background: var(--call-bg);
}

.choice-card-call.selected,
.choice-card.choice-card-call.selected {
  border-color: var(--call-border);
  background: rgba(251, 170, 26, 0.28);
}

.choice-card-call strong {
  color: var(--call-text);
}

.choice-card-whatsapp {
  border-color: var(--whatsapp-border);
  background: var(--whatsapp-bg);
}

.choice-card-whatsapp.selected,
.choice-card.choice-card-whatsapp.selected {
  border-color: var(--whatsapp-border);
  background: rgba(37, 211, 102, 0.22);
}

.choice-card-whatsapp strong {
  color: var(--whatsapp-text);
}

.kpi-call {
  border: none;
  background: var(--call-bg);
}

.kpi-call .kpi-label,
.kpi-call .kpi-value {
  color: var(--call-text);
}

.kpi-whatsapp {
  border: none;
  background: var(--whatsapp-bg);
}

.kpi-whatsapp .kpi-label,
.kpi-whatsapp .kpi-value {
  color: var(--whatsapp-text);
}


.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  padding: 20px;
}

.week-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.week-bar-track {
  width: 100%;
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--background);
  border-radius: var(--radius-md);
  padding: 8px;
}

.week-bar-fill {
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 2px 2px;
  background: var(--primary);
  min-height: 4px;
}

.week-bar-item.is-today .week-bar-fill {
  background: var(--primary-hover);
}

.week-bar-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.week-bar-value {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-primary);
}

.sidebar-backdrop {
  display: none;
}

.hide-mobile {
  display: initial;
}

.hide-desktop {
  display: none;
}

.mobile-queue {
  display: none;
}

.mobile-queue-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.mobile-queue-item:last-child {
  border-bottom: 0;
}

.mobile-queue-item:active {
  background: var(--gray-100);
}

.mobile-queue-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-queue-name {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-queue-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.mobile-queue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-list {
  display: block;
}

.recent-list .mobile-queue-item:hover {
  background: var(--gray-100);
}

.today-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-box);
  align-items: start;
}

.today-split > .panel {
  min-width: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .today-split {
    grid-template-columns: 1fr;
  }
}

.segmented-full {
  width: 100%;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: none;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.28);
    z-index: 35;
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 44px;
    flex-shrink: 0;
  }

  .topbar {
    min-height: 56px;
    padding: 10px 16px;
    gap: 10px;
  }

  .page-title {
    font-size: var(--text-xl);
  }

  .page-subtitle,
  .toolbar .hint,
  .hide-mobile {
    display: none !important;
  }

  .hide-desktop {
    display: initial;
  }

  .btn-icon-label-short {
    display: inline-flex;
    align-items: center;
  }

  .btn-icon-label-full {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .btn,
  .topbar-actions .btn-primary,
  .topbar-actions .btn-secondary,
  .topbar-actions .btn-md,
  .topbar-actions .btn.btn-primary.btn-md {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
  }

  .content {
    padding: 16px 16px 40px;
    gap: var(--space-box);
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .segmented button {
    height: 44px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-box);
  }

  .kpi-grid-channels {
    grid-template-columns: 1fr 1fr;
  }

  .tracker-split {
    gap: 28px;
  }

  .kpi-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 32px;
  }

  .kpi-hint {
    display: none;
  }

  .panel-header {
    padding: 14px 16px;
  }

  .week-bars {
    display: flex;
    gap: 10px;
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .week-bar-item {
    flex: 0 0 52px;
    scroll-snap-align: start;
  }

  .week-bar-track {
    height: 88px;
  }

  .data-table-wrap {
    overflow-x: auto;
  }

  .panel.has-mobile-list .data-table-wrap {
    display: none;
  }

  .panel.has-mobile-list .mobile-queue {
    display: block;
  }
}

@media (max-width: 560px) {
  .kpi-value {
    font-size: 30px;
  }
}

/* Forms & detail */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .field-span-2 {
  grid-column: 1 / -1;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section + .form-section {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-stack .form-section-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(251, 170, 26, 0.14);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text-primary);
  line-height: 1.2;
}

.form-stack .form-section-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--primary);
}

.form-stack .form-section-ico * {
  stroke: var(--primary);
  fill: none;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-card {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 160ms ease, background 160ms ease;
}

.choice-card:hover {
  border-color: var(--primary);
}

.choice-card.selected {
  border-color: var(--primary);
  background: rgba(251, 170, 26, 0.12);
}

.choice-card strong {
  display: block;
  font-size: var(--text-md);
  color: var(--text-primary);
  margin-bottom: 4px;
}

.choice-card span {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-box);
  align-items: start;
}

.detail-grid-edit {
  grid-template-columns: minmax(300px, 0.95fr) minmax(280px, 1.05fr);
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-box);
  min-width: 0;
}

.detail-grid-edit .form-stack {
  padding-top: 8px;
}

.reminder-empty {
  margin: 0;
  padding: 16px 20px 20px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}

.reminder-list {
  display: flex;
  flex-direction: column;
}

.reminder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.reminder-row:first-child {
  border-top: none;
}

.reminder-row.is-overdue {
  background: #fff8f8;
  box-shadow: inset 3px 0 0 #dc2626;
}

.reminder-row-main {
  min-width: 0;
}

.reminder-when {
  margin: 0 0 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.reminder-overdue-label {
  color: #b91c1c;
  font-weight: 700;
}

.reminder-type {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}

.reminder-note {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.reminder-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 4px;
}

.btn-sm {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font-size: var(--text-sm);
}

.btn-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(32, 151, 11, 0.14);
  color: var(--secondary);
  border-color: rgba(32, 151, 11, 0.35);
  font-weight: 600;
}

.btn-done:hover:not(:disabled) {
  background: rgba(32, 151, 11, 0.24);
  color: var(--secondary);
}

.btn-done:disabled,
button.btn.btn-done:disabled {
  opacity: 1;
  cursor: default;
}

.reminder-row-actions [data-done-reminder],
.reminder-row-actions .btn-done {
  min-width: 118px;
}

.btn-done-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reminder-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: rgba(32, 151, 11, 0.14);
  color: var(--secondary);
  border: 1px solid rgba(32, 151, 11, 0.35);
  font-size: var(--text-sm);
  font-weight: 600;
}

.reminder-row.is-done {
  opacity: 0.72;
}

.reminder-row.is-done .reminder-type {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.reminder-contact-link {
  color: inherit;
  text-decoration: none;
}

.reminder-contact-link:hover {
  color: var(--call-text);
  text-decoration: underline;
}

.panel-toggle .reminder-list {
  border-top: 1px solid var(--border);
}

.panel-toggle .reminder-row:first-child {
  border-top: none;
}

.reminder-item .mobile-queue-top {
  align-items: flex-start;
}

.reminder-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-top: -2px;
}

.reminder-actions .btn-ghost {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  font-size: var(--text-sm);
}

@media (max-width: 700px) {
  .reminder-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .reminder-row-actions {
    justify-content: flex-start;
  }
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-list {
  display: flex;
  flex-direction: column;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.meta-row:last-child {
  border-bottom: 0;
}

.meta-row dt {
  margin: 0;
  color: var(--text-secondary);
}

.meta-row dd {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.trail-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.trail-item:last-child {
  border-bottom: 0;
}

.trail-date {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.trail-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.trail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trail-edit {
  flex-shrink: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  font-size: var(--text-sm);
}

.field .label-text {
  display: block;
  margin-bottom: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-search {
  position: relative;
}

.contact-search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.12);
}

.contact-search-results[hidden] {
  display: none !important;
}

.contact-search-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.contact-search-option span {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
}

.contact-search-option:hover {
  background: var(--gray-100);
}

.contact-search-empty {
  padding: 10px 12px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.contact-search-picked {
  margin: 8px 0 0;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

.trail-title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 500;
}

.trail-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.settings-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: 500;
}

.settings-list a:last-child {
  border-bottom: 0;
}

.settings-list a:hover {
  background: var(--gray-100);
}

.settings-list a span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: var(--text-sm);
}

.dropzone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 16px;
  text-align: center;
  background: var(--background);
  color: var(--text-secondary);
  font-size: var(--text-md);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 480px;
  margin: auto;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: none;
}

.modal-header h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.outcome-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  min-height: 44px;
  height: auto;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.outcome-btn.selected {
  border-color: var(--primary);
  background: rgba(251, 170, 26, 0.12);
}

.when-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.when-grid > .input {
  min-width: 0;
}

.when-time {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.when-time:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.when-time-select {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
}

.when-time-select:focus {
  outline: none;
}

.when-time-sep {
  flex: 0 0 auto;
  width: 12px;
  text-align: center;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 480px) {
  .when-grid {
    grid-template-columns: 1fr;
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-box);
}

.filter-bar-search {
  flex: 1 1 220px;
  min-width: 180px;
  background: var(--surface);
}

.filter-bar-toggle {
  display: none;
}

.filter-bar-active-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.filter-bar-active-count[hidden] {
  display: none !important;
}

.filter-bar-filters {
  display: contents;
}

.filter-bar-filters .input,
.filter-bar-filters select.input {
  min-width: 140px;
  width: auto;
  background: var(--surface);
}

.filter-bar .input,
.filter-bar select.input {
  background: var(--surface);
}

.filter-bar.filter-bar-inline {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-bar.filter-bar-inline .filter-bar-search {
  flex: 1 1 180px;
  min-width: 160px;
}

.filter-bar.filter-bar-inline > select.input {
  flex: 0 1 auto;
  min-width: 120px;
  width: auto;
}

@media (max-width: 900px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 10px;
  }

  .filter-bar-search {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .filter-bar-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .filter-bar-filters {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .filter-bar.is-filters-open .filter-bar-filters {
    display: grid;
  }

  .filter-bar-filters .input,
  .filter-bar-filters select.input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .filter-bar.filter-bar-inline {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    padding: 14px 16px;
    gap: 10px;
  }

  .filter-bar.filter-bar-inline .filter-bar-search {
    flex: 1 1 160px;
    width: auto;
    min-width: 140px;
  }

  .filter-bar.filter-bar-inline > select.input {
    flex: 0 1 auto;
    width: auto;
    min-width: 110px;
  }
}

@media (max-width: 420px) {
  .filter-bar-filters,
  .filter-bar.is-filters-open .filter-bar-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 16px;
    align-items: center;
    justify-content: center;
  }

  .modal {
    max-width: 480px;
    border-radius: var(--radius-xl);
  }
}

/* Final button centering safety net (all pages) */
.btn,
a.btn,
button.btn,
.topbar-actions .btn,
.topbar-actions a.btn,
.topbar-actions button.btn,
.detail-actions .btn,
.detail-actions a.btn,
.form-stack .btn,
.auth-form .btn,
.modal-body .btn,
.modal-header .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.25 !important;
  transform: none !important;
}

/* Tracker week navigation */
.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-box);
}

.week-nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.week-nav-label {
  min-width: 220px;
  text-align: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.week-nav .btn-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1;
}

.week-nav-badge {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(251, 170, 26, 0.28);
  border-radius: var(--radius-full);
  padding: 6px 12px;
}

.week-nav #week-current {
  font-weight: 600;
}

@media (max-width: 700px) {
  .week-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .week-nav-controls {
    justify-content: center;
    width: 100%;
  }

  .week-nav-label {
    min-width: 0;
    flex: 1;
    font-size: var(--text-xl);
  }

  .week-nav .btn-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }
}

.kpi-grid-outcomes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-grid-outcomes-wide {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-outcome {
  border: none;
  background: var(--surface);
}

.kpi-outcome .kpi-label {
  color: var(--text-secondary);
}

.kpi-outcome .kpi-value {
  color: var(--text-primary);
}

.kpi-outcome .kpi-hint {
  color: var(--neutral);
}

.kpi-outcome-listing,
.kpi-outcome-sale,
.kpi-outcome-value,
.kpi-outcome-commission {
  background: var(--surface);
}

.kpi-value-money {
  font-size: clamp(1.15rem, 1.6vw, 1.75rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.section-label {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

@media (max-width: 1200px) {
  .kpi-grid-outcomes-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .kpi-grid-outcomes,
  .kpi-grid-outcomes-wide {
    grid-template-columns: 1fr;
  }
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.pagination-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pagination-pages {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pagination-page {
  appearance: none;
  -webkit-appearance: none;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}

.pagination-page:hover {
  color: var(--text-primary);
}

.pagination-page.is-active {
  background: rgba(251, 170, 26, 0.28);
  color: var(--text-primary);
}

.btn:disabled,
button.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  .pagination-pages {
    order: -1;
    width: 100%;
    justify-content: center;
  }
}

/* ——— Marketing landing (SaaS) ——— */
.lp {
  background: #fff;
  color: var(--text-primary);
}

html:has(.lp) {
  scroll-behavior: smooth;
}

.lp #features,
.lp #how,
.lp #pricing {
  scroll-margin-top: 84px;
}

.lp-wrap {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
}

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.lp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.lp-nav-brand,
.lp-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.lp-nav-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.lp-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
}

.lp-nav-links > a:not(.btn) {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.lp-nav-links > a:not(.btn):hover {
  color: var(--text-primary);
}

.lp-hero {
  padding: 56px 0 72px;
  background:
    linear-gradient(180deg, #fff 0%, #fafafa 100%);
  border-bottom: 1px solid var(--border);
}

.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.lp-hero-copy {
  animation: lp-rise 0.7s ease-out both;
}

.lp-eyebrow {
  margin: 0 0 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--call-text);
}

.lp-headline {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lp-headline-brand {
  display: block;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.lp-lede {
  margin: 0 0 24px;
  max-width: 40ch;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--text-secondary);
}

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lp-hero-note {
  margin: 16px 0 0;
  font-size: var(--text-sm);
  color: var(--neutral);
}

.lp-hero-visual {
  animation: lp-rise 0.85s ease-out 0.1s both;
}

.lp-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-box);
  overflow: hidden;
}

.lp-mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--border);
}

.lp-mock-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}

.lp-mock-bar p {
  margin: 0 0 0 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}

.lp-mock-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--background);
}

.lp-mock-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lp-mock-kpi {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  box-shadow: var(--shadow-box);
}

.lp-mock-kpi p {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.lp-mock-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lp-mock-kpi span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--call-text);
}

.lp-mock-kpi-wa span {
  color: var(--whatsapp-text);
}

.lp-mock-wins {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lp-mock-wins > div {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-box);
}

.lp-mock-wins p {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.lp-mock-wins strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.lp-mock-list {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-box);
  overflow: hidden;
}

.lp-mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.lp-mock-row:last-child {
  border-bottom: 0;
}

.lp-mock-row strong {
  display: block;
  font-size: var(--text-sm);
}

.lp-mock-row span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.lp-mock-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: var(--radius-md);
}

.lp-section {
  padding: 80px 0;
}

.lp-section-muted {
  background: var(--background);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lp-section-head {
  margin-bottom: 40px;
  max-width: 560px;
}

.lp-section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lp-section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.lp-section-head p {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.lp-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.lp-feature {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-box);
}

.lp-feature-ico {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: rgba(251, 170, 26, 0.14);
  color: var(--primary);
}

.lp-feature-ico svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-feature h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.lp-feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.lp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.lp-steps li {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-box);
}

.lp-steps span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.lp-steps h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
}

.lp-steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.lp-pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.lp-price {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-box);
}

.lp-price-featured {
  border-color: rgba(251, 170, 26, 0.55);
  background: linear-gradient(180deg, rgba(251, 170, 26, 0.08), #fff 42%);
}

.lp-price h3 {
  margin: 0 0 8px;
  font-size: var(--text-xl);
}

.lp-price-amount {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.lp-price-amount strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.lp-price ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-price li {
  position: relative;
  padding-left: 18px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.lp-price li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.lp-cta-band {
  padding: 56px 0;
  background: var(--text-primary);
  color: #fff;
}

.lp-cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.lp-cta-band h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.lp-cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.lp-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: #fff;
}

.lp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.lp-footer-inner > p {
  margin: 0;
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.lp-footer-links {
  display: flex;
  gap: 16px;
}

.lp-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.lp-footer-links a:hover {
  color: var(--text-primary);
}

.lp-top,
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-box);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.lp-top[hidden],
.back-to-top[hidden] {
  display: none;
}

.lp-top:hover,
.back-to-top:hover {
  background: var(--gray-100);
  border-color: var(--primary);
}

.lp-top:focus-visible,
.back-to-top:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-box);
}

.lp-top svg,
.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 700px) {
  .lp-top,
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@keyframes lp-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.lp) {
    scroll-behavior: auto;
  }

  .lp-hero-copy,
  .lp-hero-visual {
    animation: none;
  }
}

@media (max-width: 960px) {
  .lp-hero-grid,
  .lp-features,
  .lp-steps,
  .lp-pricing {
    grid-template-columns: 1fr;
  }

  .lp-mock-kpis,
  .lp-mock-wins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .lp-wrap {
    width: calc(100% - 32px);
  }

  .lp-nav-links > a:not(.btn) {
    display: none;
  }

  .lp-hero {
    padding: 32px 0 48px;
  }

  .lp-section {
    padding: 56px 0;
  }
}

/* ——— CRM gaps: due work, DNC, archive, dedupe, empty ——— */

.alert-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: var(--space-box);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--gray-50);
}

.alert-banner-dnc {
  border-color: #f1c0c0;
  background: #fef2f2;
  color: #7f1d1d;
}

.alert-banner-warn {
  border-color: #f5d78e;
  background: #fffbeb;
  color: #78350f;
}

.alert-banner strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 2px;
}

.alert-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.alert-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.open-shortcuts {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px 16px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--border);
}

.open-shortcuts .btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
}

.open-shortcuts .btn.btn-open,
.open-shortcuts a.btn.btn-open,
.open-shortcuts a.btn.btn-md.btn-open {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  justify-content: center;
}

.btn-open-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-open-call {
  background: var(--call-bg);
  color: var(--call-text);
  border-color: var(--call-border);
}

.btn-open-call:hover {
  background: rgba(251, 170, 26, 0.28);
}

.btn-open-whatsapp {
  background: var(--whatsapp-bg);
  color: var(--whatsapp-text);
  border-color: var(--whatsapp-border);
}

.btn-open-whatsapp:hover {
  background: rgba(37, 211, 102, 0.28);
}

.dedupe-warn {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f5d78e;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.9rem;
}

.dedupe-warn.is-visible {
  display: flex;
}

.dedupe-warn a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0 0;
}

.field-check input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.field-check label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

.field-check .hint {
  margin-top: 4px;
}

.log-reminder {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(251, 170, 26, 0.08);
}

.log-reminder .field-check {
  padding-top: 0;
}

.log-reminder-fields {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.log-reminder-fields .field {
  margin: 0;
}

.reminder-item.is-overdue {
  border-color: #f1c0c0;
  background: #fff8f8;
}

.reminder-item.is-done {
  opacity: 0.55;
}

.reminder-item.is-done .mobile-queue-name {
  text-decoration: line-through;
}

.chip-overdue {
  background: #fee2e2;
  color: #991b1b;
}

.chip-dnc {
  background: #fee2e2;
  color: #991b1b;
}

.chip-archived {
  background: var(--gray-100);
  color: var(--gray-600);
}

.chip-source {
  background: #eef2ff;
  color: #3730a3;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--gray-600);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.import-report {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--gray-50);
  font-size: 0.9rem;
}

.import-report strong {
  font-weight: 600;
}

.topbar-actions .open-shortcuts {
  margin-right: 4px;
}

.btn-open-label-short {
  display: none;
}

@media (max-width: 700px) {
  .alert-banner {
    flex-direction: column;
  }

  .open-shortcuts {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px 12px;
  }

  .open-shortcuts .btn.btn-open,
  .open-shortcuts a.btn.btn-open,
  .open-shortcuts a.btn.btn-md.btn-open {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }

  .open-shortcuts .btn-open-ico {
    width: 18px;
    height: 18px;
  }

  .open-shortcuts .btn-open-label-full,
  .open-shortcuts .btn-open-label-short {
    display: none !important;
  }
}

