/* =========================================================
   Mini CRM · Consórcios — FourAgro
   Official FourAgro palette (fourconinvestimentos.com.br/fouragro): warm near-black and brown backgrounds,
   orange for highlights and main actions, caramel and silver details. Traditional font: Arial.
   ========================================================= */

:root {
  /* FourAgro brand */
  --fa-black: #0C0603;
  --fa-brown: #1E1815;
  --fa-brown-light: #342A26;
  --fa-orange: #009B68;
  --fa-caramel: #D1A06D;
  --fa-silver: #B8ADA3;

  --bg: var(--fa-black);
  --surface: rgba(24, 18, 15, 0.94);
  --surface-2: rgba(34, 27, 23, 0.94);
  --primary: var(--fa-orange);
  --primary-deep: #007A52;
  --primary-soft: rgba(0, 155, 104, 0.18);
  --primary-tint: rgba(0, 155, 104, 0.08);
  --on-primary: #1A0F0A;
  --gold: var(--fa-caramel);
  --gold-deep: #007A52;
  --gold-soft: rgba(0, 155, 104, 0.14);
  --text: #F5F0EC;
  --muted: var(--fa-silver);
  --muted-2: #857A72;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --warn: #EBA663;
  --warn-soft: rgba(235, 166, 99, 0.14);
  --danger: #F2806F;
  --danger-soft: rgba(242, 128, 111, 0.14);
  --info: #D9CFC7;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 10px 28px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.75);

  --font-ui: Arial, Helvetica, sans-serif;
  --font-display: Arial, Helvetica, sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --rail-w: 232px;
  --panel-w: 344px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--primary-soft); color: var(--primary-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.icon { width: 18px; height: 18px; flex: none; display: inline-block; }
.icon-sm { width: 15px; height: 15px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   Shell: rail + content
   ========================================================= */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 14px 18px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--on-primary);
  background: linear-gradient(150deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 14px -6px rgba(0, 155, 104, 0.55);
  position: relative;
}
.brand__mark::after { /* tiny gold detail */
  content: ""; position: absolute; right: 6px; top: 6px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.brand__sub { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); padding: 0 12px 8px; }
.nav__link {
  display: flex; align-items: center; gap: 11px;
  height: 42px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__link:hover { background: var(--bg); color: var(--text); }
.nav__link.is-active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.nav__link.is-active .icon { color: var(--primary); }
.nav__count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--bg); color: var(--muted);
}
.nav__link.is-active .nav__count { background: var(--surface-2); color: var(--primary-deep); }

.rail__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.storage-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.storage-note strong { display: block; color: var(--text); font-weight: 600; font-size: 12.5px; }
.storage-note .icon { color: var(--primary); margin-top: 1px; }

.content { min-width: 0; display: flex; flex-direction: column; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 14px;
  height: 68px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(12, 6, 3, 0.82);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { display: none; padding: 0; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Global search */
.gsearch { position: relative; flex: 1; min-width: 0; max-width: 560px; }
.gsearch__field {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.gsearch__field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 155, 104, 0.18); }
.gsearch__field .icon { color: var(--muted); }
.gsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; }
.gsearch input::placeholder { color: var(--muted-2); }
.kbd { font-size: 11px; color: var(--muted); padding: 1px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.gsearch__field:focus-within .kbd { display: none; }

.gsearch__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  max-height: min(420px, 70vh); overflow: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: pop .18s var(--ease) both;
}
.gsearch__group { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); padding: 8px 10px 4px; }
.gsearch__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; text-align: left; cursor: pointer;
}
.gsearch__item:hover, .gsearch__item.is-active { background: var(--primary-tint); }
.gsearch__item .grow { flex: 1; min-width: 0; }
.gsearch__item strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch__item span { font-size: 12.5px; color: var(--muted); }
.gsearch__empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }

/* =========================================================
   Buttons & controls
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px;
  white-space: nowrap; cursor: pointer; user-select: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(0, 155, 104, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn--primary:hover { background: var(--primary-deep); box-shadow: 0 6px 16px -6px rgba(0, 155, 104, 0.5); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn--secondary:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn--soft { background: var(--primary-soft); color: var(--primary-deep); }
.btn--soft:hover { background: rgba(0, 155, 104, 0.28); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--bg); color: var(--text); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: rgba(242, 128, 111, 0.40); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--danger.is-confirm { background: var(--danger); color: var(--on-primary); border-color: var(--danger); }
.btn--gold { background: var(--gold-soft); color: var(--gold-deep); border-color: rgba(0, 155, 104, 0.35); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--lg { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  cursor: pointer; text-decoration: none;
  transition: color .2s, background .2s, border-color .2s, transform .12s;
}
.icon-btn:hover { color: var(--primary-deep); border-color: var(--border-strong); background: var(--primary-tint); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn--plain { border-color: transparent; background: transparent; }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn--sm .icon { width: 15px; height: 15px; }
.icon-btn.is-on { color: var(--primary); background: var(--primary-soft); border-color: transparent; }

/* WhatsApp button (official glyph and color) */
.wa-btn {
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  background: rgba(37, 211, 102, 0.12); color: #4ADE80;
  border: 1px solid rgba(37, 211, 102, 0.30);
  text-decoration: none; flex: none;
  transition: background .2s, transform .12s;
}
.wa-btn:hover { background: #25D366; color: var(--on-primary); border-color: #25D366; }
.wa-btn:active { transform: scale(0.94); }
.wa-btn .icon { width: 16px; height: 16px; }
.wa-btn--lg { width: 38px; height: 38px; border-radius: 10px; }
.wa-btn--lg .icon { width: 20px; height: 20px; }
.wa-btn.is-disabled { opacity: .4; pointer-events: none; }

.phone-link { color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; border-bottom: 1px dashed transparent; }
.phone-link:hover { color: var(--primary-deep); border-bottom-color: currentColor; }
.phone-wrap { display: inline-flex; align-items: center; gap: 8px; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg); border: 1px solid var(--border); }
.seg button {
  height: 30px; padding: 0 11px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-xs); }
.seg .count { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] .count, .seg button[aria-selected="true"] .count { color: var(--primary); }

/* Chips & badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap;
  transition: all .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: transparent; color: var(--primary-deep); font-weight: 600; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.badge--new { background: var(--surface); color: var(--text); }
.badge--contact { background: rgba(255, 255, 255, 0.06); color: var(--info); border-color: rgba(255, 255, 255, 0.14); }
.badge--proposal { background: var(--primary-tint); color: var(--primary); border-color: rgba(0, 155, 104, 0.30); }
.badge--sold { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.badge--lost { color: var(--muted-2); border-style: dashed; background: transparent; }
.badge--gold { background: var(--gold-soft); color: var(--gold-deep); border-color: rgba(0, 155, 104, 0.35); }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(235, 166, 99, 0.35); }
.badge--done { background: var(--primary-soft); color: var(--primary-deep); border-color: transparent; }
.badge--muted { background: var(--bg); color: var(--muted); }

/* Category tags (agenda) */
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.cat::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--muted)); }
.cat--atendimento { --c: var(--primary); }
.cat--retorno { --c: #4CC796; }
.cat--assembleia { --c: var(--gold); }
.cat--tarefa { --c: #8A7F77; }

/* =========================================================
   Cards & sections
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px;
}
.card__title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card__title .icon { color: var(--primary); }
.card__body { padding: 0 18px 18px; }
.card__hint { font-size: 12.5px; color: var(--muted); }

.empty {
  padding: 26px 18px; text-align: center; color: var(--muted); font-size: 13.5px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; font-size: 14.5px; }
.empty .actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.empty--sm { padding: 14px; font-size: 12.5px; }

/* =========================================================
   Pages
   ========================================================= */
.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 32px) 48px;
  animation: page-in .35s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: var(--gold); border-radius: 2px; }
.page__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.page__sub { color: var(--muted); margin-top: 6px; }

/* Agenda layout: main + aside */
.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  gap: 24px;
  align-items: start;
}

/* --- Agenda header */
.agenda-head { padding: 22px 22px 18px; }
.agenda-head__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.agenda-date { font-family: var(--font-display); font-size: clamp(24px, 2.8vw, 32px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.agenda-rel { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.agenda-rel .badge { height: 22px; }

.date-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-nav .btn--secondary { padding: 0 12px; }
.datepick { position: relative; }
.datepick input[type="date"] { position: absolute; inset: 0; opacity: 0; pointer-events: none; }

.agenda-tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.datesearch {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; min-width: 240px; flex: 1; max-width: 340px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.datesearch:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px rgba(0, 155, 104, 0.18); }
.datesearch .icon { color: var(--muted); width: 16px; height: 16px; }
.datesearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.datesearch input::placeholder { color: var(--muted-2); }
.datesearch.is-error { border-color: var(--warn); }

/* Week strip */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.week__day {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 9px;
  border-radius: 12px; border: 1px solid transparent;
  background: var(--surface-2);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.week__day:hover { border-color: var(--border-strong); }
.week__wd { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.week__num { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.2; }
.week__dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.week__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.week__dots i.c-atendimento { background: var(--primary); }
.week__dots i.c-retorno { background: #4CC796; }
.week__dots i.c-assembleia { background: var(--gold); }
.week__dots i.c-tarefa { background: #8A7F77; }
.week__day.is-today .week__num { color: var(--gold-deep); }
.week__day.is-today::after { content: ""; position: absolute; top: 6px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.week__day.is-selected { background: var(--primary); border-color: var(--primary); }
.week__day.is-selected .week__wd, .week__day.is-selected .week__num { color: var(--on-primary); }
.week__day.is-selected .week__dots i { background: rgba(255, 255, 255, 0.8); }

/* --- Agenda list */
.agenda-body { padding: 0 22px 22px; }
.agenda-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.timeline { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.timeline__section { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 10px 2px 2px; }

.item {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px 13px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
  animation: rise .35s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 25ms);
}
.item::before { /* category marker */
  content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--c, var(--border-strong));
}
.item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.item--atendimento { --c: var(--primary); }
.item--retorno { --c: #4CC796; }
.item--assembleia { --c: var(--gold); }
.item--tarefa { --c: #8A7F77; }
.item.is-overdue { background: rgba(235, 166, 99, 0.06); border-color: rgba(235, 166, 99, 0.35); }
.item.is-overdue::before { background: var(--warn); }
.item.is-alerting { animation: rise .35s var(--ease) both, attention 2.4s ease-in-out infinite; }
.item.is-done { background: var(--surface-2); }
.item.is-done .item__title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted-2); }

.item__time { text-align: center; line-height: 1.15; }
.item__time strong { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.item__time span { font-size: 11px; color: var(--muted-2); }
.item__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.item__title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.item__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.item__meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.item__note { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__note b { color: var(--text); font-weight: 500; }
.item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item__value { font-family: var(--font-display); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item__value.is-high { color: var(--gold-deep); }
.item__actions { display: flex; gap: 6px; align-items: center; }

.no-anim .page, .no-anim .item { animation: none; }
.no-anim .item.is-alerting { animation: attention 2.4s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes attention { 0%, 100% { box-shadow: 0 0 0 0 rgba(235, 166, 99, 0); } 50% { box-shadow: 0 0 0 4px rgba(235, 166, 99, 0.14); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.premium {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold-deep);
}
.premium .icon { width: 13px; height: 13px; color: var(--gold); }

/* =========================================================
   Side panel
   ========================================================= */
.panel { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }
.panel .card__head { padding: 14px 16px 10px; }
.panel .card__body { padding: 0 16px 16px; }

.quick-cta {
  padding: 16px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%);
  border: 0; color: var(--on-primary); position: relative; overflow: hidden;
}
.quick-cta::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgba(0, 155, 104, 0.45); }
.quick-cta p { font-size: 12.5px; color: rgba(255, 255, 255, 0.78); margin: 4px 0 12px; }
.quick-cta strong { font-size: 15px; font-weight: 600; }
.quick-cta .btn { background: var(--surface-2); color: var(--primary-deep); }
.quick-cta .btn:hover { background: var(--gold-soft); }

.stats-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-mini { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat-mini span { display: block; font-size: 11.5px; color: var(--muted); }
.stat-mini strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.stat-mini--gold strong { color: var(--gold-deep); }

.mini-list { display: flex; flex-direction: column; gap: 2px; }
.mini {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; margin: 0 -8px;
  border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.mini:hover { background: var(--bg); }
.mini__icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--primary-tint); color: var(--primary); }
.mini__icon .icon { width: 15px; height: 15px; }
.mini__icon--gold { background: var(--gold-soft); color: var(--gold-deep); }
.mini__icon--warn { background: var(--warn-soft); color: var(--warn); }
.mini__icon--muted { background: var(--bg); color: var(--muted); }
.mini__main { flex: 1; min-width: 0; }
.mini__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__sub.is-warn { color: var(--warn); }
.mini__actions { display: flex; gap: 2px; opacity: .85; }
.more-link { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; }

.alert-box {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 12px; margin-bottom: 8px;
  background: var(--warn-soft); border: 1px solid rgba(235, 166, 99, 0.35); cursor: pointer;
}
.alert-box:last-child { margin-bottom: 0; }
.alert-box .icon { color: var(--warn); margin-top: 1px; }
.alert-box--gold { background: var(--gold-soft); border-color: rgba(0, 155, 104, 0.35); }
.alert-box--gold .icon { color: var(--gold-deep); }
.alert-box strong { display: block; font-size: 13px; }
.alert-box span { font-size: 12px; color: var(--muted); }
.ok-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--primary-deep); }

/* =========================================================
   Client page (ficha)
   ========================================================= */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 500; font-size: 13px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.back:hover { color: var(--primary-deep); }

.profile { padding: 22px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.avatar {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; flex: none;
  font-weight: 600; font-size: 15px; color: var(--primary-deep);
  background: var(--primary-soft);
}
.avatar--lg { width: 60px; height: 60px; border-radius: 16px; font-size: 19px; font-family: var(--font-display); }
.avatar--sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.profile__name { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; line-height: 1.15; }
.profile__line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.profile__value { text-align: right; }
.profile__value small { display: block; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.profile__value strong { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; font-variant-numeric: tabular-nums; }
.profile__value.is-high strong { color: var(--gold-deep); }
.profile__bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.profile__appt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.profile__appt input { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); font-size: 13px; }
.profile__appt input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 155, 104, 0.18); }

.client-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.client-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Contact history timeline */
.history { position: relative; display: flex; flex-direction: column; gap: 12px; }
.history::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1.5px; background: var(--border); }
.hist { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.hist__dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--surface); border: 1.5px solid var(--primary); color: var(--primary); font-size: 12px; font-weight: 700;
}
.hist.is-first .hist__dot { background: var(--primary); color: var(--on-primary); }
.hist__card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.hist__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hist__title { font-weight: 600; font-size: 14px; }
.hist__when { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.hist__notes { margin-top: 8px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.hist__base { margin-top: 8px; font-size: 12px; color: var(--gold-deep); display: flex; align-items: center; gap: 6px; }

/* Reminder rows (ficha + panel + reminders) */
.rem { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rem:last-child { border-bottom: 0; }
.rem__check {
  width: 24px; height: 24px; flex: none; border-radius: 7px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: transparent;
  transition: all .15s;
}
.rem__check:hover { border-color: var(--primary); color: var(--primary); }
.rem__check.is-done { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.rem__check .icon { width: 14px; height: 14px; }
.rem__main { flex: 1; min-width: 0; cursor: pointer; }
.rem__title { font-size: 13.5px; font-weight: 600; }
.rem__sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rem__sub .is-warn { color: var(--warn); font-weight: 600; }
.rem.is-done .rem__title { color: var(--muted); text-decoration: line-through; }
.rem__actions { display: flex; gap: 2px; }

/* Documents */
.docs { display: flex; flex-direction: column; gap: 8px; }
.doc { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.doc__icon { width: 36px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: rgba(242, 128, 111, 0.14); color: #F2806F; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; }
.doc__fields { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; min-width: 0; }
.doc__fields input { height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 13px; min-width: 0; }
.doc__fields input:hover { border-color: var(--border); background: var(--surface); }
.doc__fields input:focus { outline: 0; border-color: var(--primary); background: var(--surface); }
.doc__name { font-weight: 600; }
.doc__file { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); padding: 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc__actions { display: flex; gap: 4px; }
.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center;
  transition: border-color .2s, background .2s;
}
.dropzone.is-over { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-deep); }

/* Sales inside the client page */
.sale { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0, 155, 104, 0.30); background: var(--primary-tint); }
.sale + .sale { margin-top: 8px; }
.sale__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sale__value { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.sale__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sale__comm { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .field__label { font-size: 12.5px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.req { color: var(--primary); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 155, 104, 0.18); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2378837B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.field.has-error input, .field.has-error select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(242, 128, 111, 0.12); }
.field__error { font-size: 12px; color: var(--danger); }
.field__error:empty { display: none; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__hint.is-gold { color: var(--gold-deep); }
.field__hint.is-ok { color: var(--primary); }
.field__hint.is-warn { color: var(--warn); }
.input-affix { position: relative; }
.input-affix input { padding-right: 34px; }
.input-affix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.preset-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-chips .chip { height: 26px; font-size: 12px; }

.status-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* =========================================================
   Sales (Vendidos)
   ========================================================= */
.filters { padding: 14px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters__inputs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters__inputs input, .filters__inputs select { height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); font-size: 13px; }
.filters__inputs input:focus, .filters__inputs select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 155, 104, 0.18); }
.filters__label { font-size: 13px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.kpi { padding: 16px 18px; }
.kpi span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.kpi--primary { background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%); border: 0; color: var(--on-primary); }
.kpi--primary span, .kpi--primary small { color: rgba(255, 255, 255, 0.78); }
.kpi--gold strong { color: var(--gold-deep); }
.kpi--ok strong { color: var(--primary); }
.kpi--warn strong { color: var(--warn); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .r { text-align: right; }
.table .client-cell { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.table .client-cell strong { font-weight: 600; white-space: nowrap; }
.table .client-cell .muted { white-space: nowrap; }
.table td.num, .table td.r { white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.comm-toggle { cursor: pointer; border: 0; }

/* =========================================================
   Assemblies
   ========================================================= */
.asm-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.asm-list { display: flex; flex-direction: column; gap: 8px; }
.asm {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.asm.is-past { background: var(--surface-2); }
.asm__date { text-align: center; padding: 6px 0; border-radius: 10px; background: var(--gold-soft); color: var(--gold-deep); }
.asm.is-past .asm__date { background: var(--bg); color: var(--muted); }
.asm__date strong { display: block; font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.asm__date span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.asm__title { font-weight: 600; }
.asm__meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.asm__meta a, .asm__meta button.link { color: var(--primary); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12.5px; }

/* =========================================================
   Dialogs
   ========================================================= */
.dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dialog--wide { width: min(760px, calc(100% - 32px)); }
.dialog[open] { animation: dlg-in .24s var(--ease) both; }
.dialog.is-closing { animation: dlg-out .16s ease-in both; }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dialog[open]::backdrop { animation: fade-in .2s ease both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }

.dialog form, .dialog__inner { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.dialog__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.dialog__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dialog__body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.dialog__foot .left { margin-right: auto; }

.paste-area { min-height: 112px !important; font-size: 14px; background: var(--surface-2) !important; }
.parsed { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.parsed__title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tag-found { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-deep); }
.tag-missing { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.warnings { display: flex; flex-direction: column; gap: 6px; }
.warning { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--warn); }
.warning .icon { width: 15px; height: 15px; margin-top: 2px; }
.alt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dup-box { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid rgba(235, 166, 99, 0.35); font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.proposal { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.proposal.is-ambiguous { border-color: rgba(235, 166, 99, 0.35); background: rgba(235, 166, 99, 0.06); }
.proposal__source { font-size: 12.5px; color: var(--muted); font-style: italic; }
.proposal__row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 110px; gap: 8px; }
.proposal__row input { height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); font-size: 13.5px; min-width: 0; }
.proposal__row input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 155, 104, 0.18); }
.proposal__check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.proposal__check input { width: 16px; height: 16px; accent-color: var(--primary); }

.calc-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--primary-tint); border: 1px solid rgba(0, 155, 104, 0.30); }
.calc-box span { font-size: 12.5px; color: var(--muted); }
.calc-box strong { font-family: var(--font-display); font-size: 24px; color: var(--primary-deep); font-variant-numeric: tabular-nums; }

/* Popover menu */
.menu {
  position: fixed; z-index: 200; min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: pop .14s var(--ease) both;
}
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--bg); }
.menu button.is-danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* =========================================================
   Toasts / alerts
   ========================================================= */
.toasts { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: 14px;
  background: var(--text); color: var(--on-primary);
  box-shadow: var(--shadow-lg); font-size: 13.5px; pointer-events: auto;
  animation: toast-in .26s var(--ease) both;
}
.toast .icon { color: var(--fa-orange); margin-top: 1px; }
.toast strong { display: block; font-weight: 600; }
.toast span { color: rgba(255, 255, 255, 0.72); font-size: 12.5px; }
.toast.is-leaving { animation: toast-out .2s ease-in both; }
.toast--reminder { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--gold); }
.toast--reminder .icon { color: var(--gold-deep); }
.toast--reminder span { color: var(--muted); }
.toast__body { flex: 1; min-width: 0; }
.toast__actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.toast__close { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
.toast__close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* =========================================================
   Commercial activities (meetings, calls, simulations)
   ========================================================= */
.cat--reuniao { --c: var(--primary-deep); }
.cat--ligacao { --c: var(--fa-silver); }
.cat--simulacao { --c: var(--gold-deep); }
.item--reuniao { --c: var(--primary-deep); }
.item--ligacao { --c: var(--fa-silver); }
.item--simulacao { --c: var(--gold-deep); }
.week__dots i.c-reuniao { background: var(--primary-deep); }
.week__dots i.c-ligacao { background: var(--fa-silver); }
.week__dots i.c-simulacao { background: var(--gold-deep); }

/* Save indicator */
.save-status {
  font-size: 12px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 28px; border-radius: 999px;
  transition: opacity .4s var(--ease), background .2s;
}
.save-status:empty { display: none; }
.save-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.save-status.is-saving { color: var(--gold-deep); background: var(--gold-soft); }
.save-status.is-saved { color: var(--primary-deep); background: var(--primary-soft); }
.save-status.is-idle { color: var(--muted-2); background: transparent; }
.save-status.is-error { color: var(--danger); background: var(--danger-soft); }

/* Side calendar */
.side-cal { padding: 14px 16px 16px; }
.side-cal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.side-cal__title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.side-cal__title .icon { color: var(--primary); }
.side-cal__date { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.side-cal__nav { display: flex; align-items: center; gap: 4px; }
.side-cal__body { margin-top: 12px; }
.slots { display: flex; flex-direction: column; gap: 6px; position: relative; }
.slot {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%;
  padding: 9px 10px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2);
  text-align: left; cursor: pointer; position: relative; transition: border-color .2s, background .2s;
}
.slot::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--border-strong)); }
.slot:hover { border-color: var(--border-strong); background: var(--surface); }
.slot--video { --c: var(--gold); }
.slot--meeting { --c: var(--primary-deep); }
.slot--call { --c: var(--fa-silver); }
.slot--appt { --c: var(--primary); }
.slot.is-canceled { opacity: .55; }
.slot.is-canceled .slot__name { text-decoration: line-through; }
.slot__time { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.slot__body { min-width: 0; display: flex; flex-direction: column; }
.slot__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__type { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__status.s-done { color: var(--primary); font-weight: 600; }
.slot__status.s-canceled, .slot__status.s-missed { color: var(--warn); }

/* Popover details */
.menu__header { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; max-width: 280px; }
.menu__header strong { font-size: 13px; }
.menu__header span { font-size: 12px; color: var(--muted); }

/* Client commercial summary */
.csum { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-top: 16px; padding: 4px; }
.csum__item { padding: 10px 14px; border-right: 1px solid var(--border); min-width: 0; }
.csum__item:last-child { border-right: 0; }
.csum__item span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csum__item strong { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csum__item strong.csum__small { font-family: var(--font-ui); font-size: 13.5px; padding-top: 4px; }
.csum__item small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Activity rows (client page) */
.act-row { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.act-row:last-child { border-bottom: 0; }
.act-row.is-canceled { opacity: .6; }
.act-row__main { flex: 1; min-width: 0; cursor: pointer; }
.act-row__title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-row__sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.act-row__sub.is-gold { color: var(--gold-deep); }
.act-row__notes { font-size: 13px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }

/* Stage composer + whole evolution */
.stage-composer { padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); margin-bottom: 16px; }
.stage-composer textarea { width: 100%; min-height: 84px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); resize: vertical; line-height: 1.5; outline: none; transition: border-color .2s, box-shadow .2s; }
.stage-composer textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 155, 104, 0.18); }
.stage-composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.evo { display: flex; flex-direction: column; }
.evo__row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.evo__row:last-child { border-bottom: 0; }
.evo__when strong { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.evo__when span { font-size: 12px; color: var(--muted); }
.evo__badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.evo--simulation .evo__badge { color: var(--gold-deep); }
.evo--meeting .evo__badge { color: var(--primary-deep); }
.evo--call .evo__badge { color: var(--fa-silver); }
.evo--sale .evo__badge { color: var(--primary); }
.evo__title { font-weight: 600; font-size: 14px; }
.evo__detail { font-size: 13px; color: var(--muted); white-space: pre-wrap; word-break: break-word; }

/* Report */
.kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.act-kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.act-kind--call { color: var(--fa-silver); }
.act-kind--simulation { color: var(--gold-deep); }
.act-kind--video { color: var(--primary-deep); }

@media (max-width: 1100px) {
  .csum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .csum__item:nth-child(3) { border-right: 0; }
  .kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .csum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csum__item { border-right: 0; border-bottom: 1px solid var(--border); }
  .save-status { display: none; }
}

/* Mobile bottom nav */
.bottom-nav { display: none; }
.fab { display: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  :root { --rail-w: 76px; --panel-w: 320px; }
  .rail { padding: 18px 12px; align-items: center; }
  .rail .brand__text, .nav__text, .nav__label, .storage-note div, .rail__foot .btn span { display: none; }
  .nav__link { justify-content: center; padding: 0; width: 48px; position: relative; }
  .nav__count { position: absolute; top: 2px; right: -2px; margin: 0; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
  .storage-note { display: none; }
  .rail__foot .btn { width: 48px; padding: 0; }
}

@media (max-width: 1100px) {
  .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .panel > .quick-cta { grid-column: 1 / -1; }
  .client-grid { grid-template-columns: minmax(0, 1fr); }
  .asm-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 14px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .topbar .brand { display: flex; }
  .topbar .brand__text { display: none; }
  .topbar__actions .btn span { display: none; }
  .topbar__actions .btn { width: 40px; padding: 0; }
  .kbd { display: none; }
  .page { padding: 14px 14px 32px; }

  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(18, 12, 9, 0.96); border-top: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; }
  .bottom-nav a.is-active { color: var(--primary-deep); background: var(--primary-tint); font-weight: 600; }

  .agenda-head { padding: 16px; }
  .agenda-body { padding: 0 12px 14px; }
  .date-nav { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; }
  .date-nav .lbl { display: none; }
  .datesearch { max-width: none; min-width: 0; }
  .week { gap: 4px; }
  .week__day { padding: 6px 2px 7px; }
  .week__num { font-size: 16px; }

  .item { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 12px 12px 12px 10px; }
  .item__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .item__value { font-size: 15px; }

  .panel { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .profile__value { grid-column: 1 / -1; text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi--primary { grid-column: 1 / -1; }
  .proposal__row { grid-template-columns: 1fr 1fr; }
  .proposal__row input:first-child { grid-column: 1 / -1; }
  .doc { grid-template-columns: 30px minmax(0, 1fr); }
  .doc__actions { grid-column: 2; }
  .doc__fields { grid-template-columns: 1fr; }
  .asm { grid-template-columns: 56px minmax(0, 1fr); }
  .asm > :last-child { grid-column: 2; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }

  .dialog { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; border: 0; }
  .dialog form, .dialog__inner { max-height: 100dvh; height: 100%; }
  .dialog__body { flex: 1; }
  .dialog__foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   FourAgro finish
   ========================================================= */
/* Calm solid background (no photo): soft warm graphite, easy on the eyes all day */
:root {
  --bg: #1B1A19;
  --surface: #232120;
  --surface-2: #2A2826;
}
body { background: var(--bg); }
.topbar { background: rgba(27, 26, 25, 0.92); }

/* Traditional font everywhere; Arial reads best bold for headings and numbers */
h1, h2, h3, h4, .page__title, .agenda-date, .dialog__title, .profile__name, .profile__value strong,
.item__value, .kpi strong, .stat-mini strong, .week__num, .sale__value, .calc-box strong, .csum__item strong, .asm__date strong {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page__title, .agenda-date { letter-spacing: -0.02em; }

/* Brand: official FourAgro logo */
.rail { background: #171615; border-right-color: var(--border); }
.brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand__logo { width: 170px; height: auto; display: block; }
.brand__symbol { width: 40px; height: 40px; display: none; }
.brand__app { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fa-orange); padding-left: 2px; }
.topbar .brand { flex-direction: row; }
.topbar .brand__logo, .topbar .brand__app { display: none; }
.topbar .brand__symbol { display: block; width: 34px; height: 34px; }
@media (max-width: 1280px) {
  .rail .brand { align-items: center; }
  .rail .brand__logo, .rail .brand__app { display: none; }
  .rail .brand__symbol { display: block; }
}

/* Surfaces */
.card, .item, .slot, .doc, .asm, .empty, .parsed, .proposal, .stage-composer, .hist__card, .stat-mini {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar { border-bottom-color: var(--border); }
.gsearch__field, .datesearch, .seg, .chip, .icon-btn, .btn--secondary, .field input, .field select, .field textarea,
.profile__appt input, .filters__inputs input, .filters__inputs select, .proposal__row input, .doc__fields input:focus, .stage-composer textarea {
  background-color: rgba(0, 0, 0, 0.22);
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--fa-brown-light); color: var(--text); }
.nav__link:hover { background: rgba(255, 255, 255, 0.05); }
.nav__link.is-active { background: var(--primary-soft); color: var(--fa-orange); }
.nav__link.is-active .nav__count { background: var(--fa-orange); color: var(--on-primary); }
.nav__count { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

/* Pill buttons, as on the FourAgro site */
.btn { border-radius: 999px; }
.btn--primary { background: var(--fa-orange); color: var(--on-primary); box-shadow: 0 6px 18px -8px rgba(0, 155, 104, 0.8); }
.btn--primary:hover { background: #007A52; }
.btn--soft { background: var(--primary-soft); color: #7AFFBC; }
.btn--gold { background: var(--gold-soft); color: var(--gold-deep); border-color: rgba(0, 155, 104, 0.35); }
.btn--secondary { color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Quick register call-to-action: dark card with orange glow */
.quick-cta { background: linear-gradient(150deg, var(--fa-brown) 0%, var(--fa-black) 100%); border: 1px solid rgba(0, 155, 104, 0.35); color: var(--text); }
.quick-cta::after { border-color: rgba(184, 173, 163, 0.25); }
.quick-cta p { color: var(--muted); }
.quick-cta .btn { background: var(--fa-orange); color: var(--on-primary); }
.quick-cta .btn:hover { background: #007A52; }

/* KPI highlight card */
.kpi--primary { background: linear-gradient(150deg, var(--fa-orange) 0%, #007A52 100%); color: var(--on-primary); }
.kpi--primary span, .kpi--primary small { color: rgba(26, 15, 10, 0.75); }

/* Toasts / dialogs */
.toast { background: #2A2826; color: var(--text); border: 1px solid var(--border-strong); }
.toast span { color: var(--muted); }
.dialog { background: #222020; border-color: var(--border-strong); }
.dialog__foot { background: rgba(255, 255, 255, 0.02); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.menu { background: #242221; border-color: var(--border-strong); }
.menu button:hover { background: rgba(255, 255, 255, 0.06); }
.gsearch__results { background: #242221; }
.table th { background: rgba(255, 255, 255, 0.03); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* Accents */
.eyebrow { color: var(--fa-caramel); }
.eyebrow::before { background: var(--fa-orange); }
.agenda-rel .badge--done, .badge--done { background: var(--primary-soft); color: #7AFFBC; }
.badge--proposal { background: var(--primary-tint); color: #7AFFBC; border-color: rgba(0, 155, 104, 0.30); }
.badge--contact { color: var(--info); }
.week__day { background: rgba(255, 255, 255, 0.03); }
.week__day.is-today .week__num { color: var(--fa-orange); }
.week__day.is-selected .week__wd, .week__day.is-selected .week__num { color: var(--on-primary); }
.avatar { background: var(--primary-soft); color: #7AFFBC; }
.hist__dot { background: #222020; }
.doc__icon { color: var(--danger); }
.ok-line { color: #7AFFBC; }
.premium, .premium .icon { color: var(--fa-caramel); }
.item__value.is-high, .profile__value.is-high strong, .kpi--gold strong, .stat-mini--gold strong { color: var(--fa-caramel); }
.kpi--ok strong { color: #7AFFBC; }
.phone-link:hover { color: var(--fa-orange); }
::selection { background: var(--fa-orange); color: var(--on-primary); }

/* =========================================================
   Agenda: eye-comfort reading area + unanswered calls + last note
   Solid warm gray (no photo bleeding through), softer text contrast.
   ========================================================= */
.agenda-main {
  --text: #E6DED6;
  --muted: #ABA096;
  --muted-2: #8C8178;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  background: #2B2A28;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--text);
}
.agenda-main .item { background: #33312E; backdrop-filter: none; -webkit-backdrop-filter: none; }
.agenda-main .item:hover { background: #393633; box-shadow: none; }
.agenda-main .item.is-done { background: #2F2D2B; }
.agenda-main .week__day { background: #33312E; }
.agenda-main .week__day.is-selected { background: var(--primary); }
.agenda-main .datesearch, .agenda-main .seg, .agenda-main .chip, .agenda-main .btn--secondary, .agenda-main .icon-btn { background-color: #33312E; }

.item__obs {
  font-size: 13px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 6px 10px; margin-top: 2px;
  border-radius: 8px; background: rgba(255, 255, 255, 0.035); border-left: 2px solid var(--fa-caramel);
  white-space: normal; overflow-wrap: anywhere;
}
.item__obs-label { color: var(--fa-caramel); font-weight: 700; font-size: 12px; }
.item__obs.is-empty { color: var(--muted-2); font-style: italic; border-left-color: var(--border-strong); }

.badge--noanswer { background: rgba(242, 128, 111, 0.14); color: #F2A091; border-color: rgba(242, 128, 111, 0.35); }
.btn--noanswer {
  background: transparent; color: #F2A091; border: 1px solid rgba(242, 128, 111, 0.40);
  height: 28px; padding: 0 12px; font-size: 12px; font-weight: 700;
}
.btn--noanswer:hover { background: rgba(242, 128, 111, 0.14); }

/* Daily motivation screen */
.motivation { width: min(520px, calc(100% - 32px)); background: #242221; }
.motivation__body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 32px 28px; }
.motivation__logo { width: 150px; height: auto; margin-bottom: 8px; }
.motivation__greeting { font-size: 26px; color: var(--text); }
.motivation__date { color: var(--muted); font-size: 13px; margin-top: -4px; }
.motivation__text {
  margin: 12px 0 4px; padding: 18px 20px;
  font-size: 18px; line-height: 1.55; color: #EDE7E1;
  background: rgba(0, 155, 104, 0.07); border-left: 3px solid var(--fa-orange); border-radius: 12px;
  text-align: left;
}
.motivation__agenda { color: var(--fa-caramel); font-size: 13.5px; font-weight: 700; }
.motivation__btn { margin-top: 10px; min-width: 200px; justify-content: center; }
@media (max-width: 640px) {
  .motivation { height: auto; max-height: 100dvh; }
  .motivation__body { justify-content: center; min-height: 100%; }
}

/* =========================================================
   Agenda reading area: light, warm off-white (no pure white glare).
   Re-scopes the theme tokens so every component inside reads dark-on-light.
   ========================================================= */
.agenda-main {
  --text: #2B2521;
  --muted: #6B5F57;
  --muted-2: #8C8077;
  --border: rgba(70, 45, 30, 0.12);
  --border-strong: rgba(70, 45, 30, 0.22);
  --surface: #FCFAF7;
  --surface-2: #F1ECE6;
  --bg: #EAE3DB;
  --info: #5B4F47;
  --warn: #B25E16;
  --warn-soft: rgba(210, 120, 40, 0.12);
  --gold-deep: #007A52;
  --primary-deep: #007A52;
  --primary-soft: rgba(0, 155, 104, 0.14);
  --danger: #BF4430;
  --shadow: 0 1px 2px rgba(60, 40, 25, 0.08), 0 6px 18px -8px rgba(60, 40, 25, 0.18);
  background: #F5F1EC;
  color: var(--text);
  border-color: rgba(70, 45, 30, 0.10);
  color-scheme: light;
}
.agenda-main .item { background: var(--surface); border-color: var(--border); }
.agenda-main .item:hover { background: #FFFFFF; border-color: var(--border-strong); box-shadow: var(--shadow); }
.agenda-main .item.is-done { background: var(--surface-2); }
.agenda-main .item.is-overdue { background: #FBEFE3; border-color: rgba(178, 94, 22, 0.35); }
.agenda-main .week__day { background: var(--surface); border-color: var(--border); }
.agenda-main .week__day.is-today .week__num { color: var(--primary-deep); }
.agenda-main .week__day.is-selected { background: var(--primary); border-color: var(--primary); }
.agenda-main .week__day.is-selected .week__wd, .agenda-main .week__day.is-selected .week__num { color: #FFFFFF; }
.agenda-main .datesearch, .agenda-main .seg, .agenda-main .chip, .agenda-main .btn--secondary, .agenda-main .icon-btn { background-color: var(--surface); color: var(--text); border-color: var(--border-strong); }
.agenda-main .chip[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-deep); border-color: transparent; }
.agenda-main .btn--soft { background: var(--primary-soft); color: var(--primary-deep); }
.agenda-main .datesearch input { color: var(--text); }
.agenda-main .eyebrow { color: #9A6A34; }
.agenda-main .badge--done, .agenda-main .agenda-rel .badge--done { background: var(--primary-soft); color: var(--primary-deep); }
.agenda-main .badge--proposal { background: rgba(0, 155, 104, 0.10); color: var(--primary-deep); }
.agenda-main .badge--contact { background: rgba(70, 45, 30, 0.06); color: var(--info); border-color: var(--border-strong); }
.agenda-main .badge--sold { color: #FFFFFF; }
.agenda-main .badge--noanswer { background: rgba(191, 68, 48, 0.10); color: #B03A27; border-color: rgba(191, 68, 48, 0.35); }
.agenda-main .btn--noanswer { color: #B03A27; border-color: rgba(191, 68, 48, 0.45); background: transparent; }
.agenda-main .btn--noanswer:hover { background: rgba(191, 68, 48, 0.08); }
.agenda-main .item__value.is-high, .agenda-main .premium, .agenda-main .premium .icon { color: #007A52; }
.agenda-main .item__obs { background: #F6EFE6; border-left-color: #C08A52; }
.agenda-main .item__obs-label { color: #007A52; }
.agenda-main .phone-link:hover { color: var(--primary-deep); }
.agenda-main .wa-btn { background: rgba(37, 211, 102, 0.10); border-color: rgba(30, 150, 75, 0.35); color: #1E8E4A; }
.agenda-main .wa-btn:hover { background: #25D366; color: #FFFFFF; }
.agenda-main .empty { background: var(--surface-2); color: var(--muted); }
.agenda-main .empty strong { color: var(--text); }
/* Clamp exactly 2 lines: vertical spacing via transparent borders so the 3rd line is not visible in the padding */
.item__obs { padding: 0 10px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* =========================================================
   Sales tools: WhatsApp templates, goal, funnel, external backup
   ========================================================= */
.msg-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: #3FB56B; background: rgba(37, 211, 102, 0.10); border: 1px solid rgba(37, 211, 102, 0.35);
}
.msg-btn:hover { background: #25D366; color: #FFFFFF; border-color: #25D366; }
.msg-btn .icon { width: 14px; height: 14px; }
.agenda-main .msg-btn { color: #1E8E4A; border-color: rgba(30, 150, 75, 0.35); }
.agenda-main .msg-btn:hover { color: #FFFFFF; }
.phone-wrap { display: inline-flex; align-items: center; gap: 6px; }

/* Goal */
.goal { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.goal__head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.goal__head strong { color: var(--text); font-size: 15px; }
.goal__bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.goal__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--fa-orange), var(--fa-caramel)); transition: width .6s var(--ease); }
.goal__bar.is-done i { background: linear-gradient(90deg, #3FB56B, #7AD49A); }
.goal__foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.goal__note { font-size: 12px; color: var(--muted-2); margin-top: -4px; }
.motivation__goal { color: var(--fa-orange); font-size: 14px; font-weight: 700; }

/* Funnel */
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.fcol { background: #F5F1EC; border-radius: var(--radius-lg); padding: 12px; border: 1px solid rgba(70, 45, 30, 0.10);
  --text: #2B2521; --muted: #6B5F57; --muted-2: #8C8077; --border: rgba(70, 45, 30, 0.12); --border-strong: rgba(70, 45, 30, 0.22);
  --surface: #FCFAF7; --surface-2: #F1ECE6; --bg: #EAE3DB; --warn: #B25E16; --warn-soft: rgba(210, 120, 40, 0.12); --primary-deep: #007A52;
  color: var(--text); color-scheme: light; }
.fcol__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 2px 4px 10px; border-bottom: 3px solid var(--fcol, var(--border-strong)); margin-bottom: 10px; }
.fcol__head strong { display: block; font-size: 14px; }
.fcol__head span { font-size: 12px; color: var(--muted); }
.fcol__head b { font-size: 14px; color: #007A52; white-space: nowrap; }
.fcol--new { --fcol: #8C8077; }
.fcol--contact { --fcol: #4CC796; }
.fcol--proposal { --fcol: var(--fa-orange); }
.fcol--sold { --fcol: #3FB56B; }
.fcol--lost { --fcol: #BF4430; opacity: .85; }
.fcol__list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 260px); overflow-y: auto; }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 10px 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, box-shadow .2s; }
.fcard:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px -10px rgba(60, 40, 25, 0.35); }
.fcard.is-cooling { border-left: 3px solid var(--warn); }
.fcard__top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.fcard__name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard__top .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.fcard__value { font-weight: 700; font-size: 14px; }
.fcard__value.is-high { color: #007A52; }
.fcard__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.fcol .badge--proposal { background: rgba(0, 155, 104, 0.10); color: var(--primary-deep); }
.fcol .empty { background: var(--surface-2); color: var(--muted); }
.is-warn-text { color: var(--warn); }

/* External backup */
.ext-backup { border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ext-backup__head { display: flex; gap: 10px; align-items: flex-start; }
.ext-backup__head .icon { color: var(--fa-orange); flex: none; margin-top: 2px; }
.ext-backup__head strong { display: block; }
.ext-backup__head span { font-size: 12.5px; color: var(--muted); }
.ext-backup__status { font-size: 12.5px; color: var(--muted); background: rgba(63, 181, 107, 0.08); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ext-backup__status.is-error { background: var(--danger-soft); color: var(--danger); }
.ext-backup__actions, .ext-backup__sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ext-backup__pick { display: flex; flex-direction: column; gap: 8px; }
.ext-backup__row { display: flex; gap: 6px; }
.ext-backup__row input { flex: 1; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); padding: 0 10px; background: rgba(0, 0, 0, 0.22); color: var(--text); }

/* =========================================================
   Calls: topbar counter, cadence badge, call queue
   ========================================================= */
.calls-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(0, 155, 104, 0.40); background: var(--primary-tint); color: var(--text); text-decoration: none; font-size: 12.5px;
}
.calls-pill .icon { color: var(--fa-orange); }
.calls-pill b { font-size: 14px; }
.calls-pill span { color: var(--muted); }
.calls-pill:hover { border-color: var(--fa-orange); }
.calls-pill.is-done { border-color: rgba(63, 181, 107, 0.5); background: rgba(63, 181, 107, 0.10); }
.calls-pill.is-done .icon { color: #3FB56B; }
@media (max-width: 900px) { .calls-pill span { display: none; } }

.badge--cadence { background: rgba(0, 155, 104, 0.14); color: var(--fa-caramel); border-color: rgba(0, 155, 104, 0.40); }
.badge--cadence.is-late { background: var(--warn-soft); color: var(--warn); border-color: rgba(235, 166, 99, 0.45); }
.agenda-main .badge--cadence, .fcol .badge--cadence { color: #007A52; border-color: rgba(0, 122, 82, 0.35); background: rgba(0, 155, 104, 0.14); }
.agenda-main .badge--cadence.is-late, .fcol .badge--cadence.is-late { color: var(--warn); }

.queue-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; text-decoration: none; color: var(--text);
  border: 1px solid rgba(0, 155, 104, 0.45); background: linear-gradient(150deg, rgba(0, 155, 104, 0.16), rgba(0, 155, 104, 0.04)); }
.queue-cta strong { display: block; font-size: 14px; }
.queue-cta span:not(.btn) { font-size: 12.5px; color: var(--muted); }
.queue-cta:hover { border-color: var(--fa-orange); }

.queue-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.queue-goal { min-width: 260px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.queue-goal__num strong { font-size: 34px; line-height: 1; }
.queue-goal__num span { font-size: 18px; color: var(--muted); margin-left: 4px; }
.queue-goal__label { font-size: 12px; color: var(--muted); }
.queue-goal.is-done { border-color: rgba(63, 181, 107, 0.5); }

.queue-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .queue-grid { grid-template-columns: 1fr; } }
.queue-now {
  --text: #2B2521; --muted: #6B5F57; --muted-2: #8C8077; --border: rgba(70, 45, 30, 0.12); --border-strong: rgba(70, 45, 30, 0.22);
  --surface: #FCFAF7; --surface-2: #F1ECE6; --bg: #EAE3DB; --warn: #B25E16; --warn-soft: rgba(210, 120, 40, 0.12); --primary-deep: #007A52;
  background: #F5F1EC; color: var(--text); color-scheme: light; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px;
}
.queue-now__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.queue-now__name { font-size: 30px; line-height: 1.1; }
.queue-now__phone { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.queue-now__phone > .icon { color: var(--fa-orange); width: 22px; height: 22px; }
.queue-now__value { font-size: 18px; font-weight: 700; }
.queue-now__value.is-high { color: #007A52; }
.queue-now__reason { color: var(--muted); font-size: 14px; }
.queue-now .badge--proposal { background: rgba(0, 155, 104, 0.10); color: var(--primary-deep); }
.queue-now .badge--noanswer { background: rgba(191, 68, 48, 0.10); color: #B03A27; border-color: rgba(191, 68, 48, 0.35); }
.queue-now .premium, .queue-now .premium .icon { color: #007A52; }
.queue-now .item__obs { background: #F6EFE6; border-left-color: #C08A52; -webkit-line-clamp: 4; }
.queue-now .item__obs-label { color: #007A52; }
.queue-now .msg-btn { color: #1E8E4A; border-color: rgba(30, 150, 75, 0.35); }
.queue-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.queue-btn { height: 48px; padding: 0 26px; font-size: 15px; font-weight: 700; }
.queue-btn--missed { background: transparent; color: #B03A27; border: 2px solid rgba(191, 68, 48, 0.55); }
.queue-btn--missed:hover { background: rgba(191, 68, 48, 0.08); }
.queue-answer { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.queue-answer textarea { width: 100%; border-radius: 12px; border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text); padding: 12px; font: inherit; font-size: 14px; resize: vertical; }
.queue-answer textarea:focus { outline: 2px solid var(--fa-orange); outline-offset: 1px; }

/* =========================================================
   Light workspace (v3.0): everything in the warm off-white "middle tone",
   only the side rail (and the phone bottom bar) stays black with the FourAgro brand.
   ========================================================= */
:root {
  --text: #2B2521;
  --muted: #6B5F57;
  --muted-2: #8C8077;
  --border: rgba(70, 45, 30, 0.12);
  --border-strong: rgba(70, 45, 30, 0.22);
  --bg: #EFE9E2;
  --surface: #FCFAF7;
  --surface-2: #F1ECE6;
  --info: #5B4F47;
  --warn: #B25E16;
  --warn-soft: rgba(210, 120, 40, 0.12);
  --danger: #BF4430;
  --danger-soft: rgba(191, 68, 48, 0.10);
  --gold-deep: #007A52;
  --gold-soft: rgba(0, 155, 104, 0.18);
  --primary-deep: #007A52;
  --primary-soft: rgba(0, 155, 104, 0.14);
  --primary-tint: rgba(0, 155, 104, 0.08);
  --on-primary: #FFFFFF;
  --shadow-xs: 0 1px 2px rgba(60, 40, 25, 0.06);
  --shadow-sm: 0 1px 2px rgba(60, 40, 25, 0.06), 0 2px 8px rgba(60, 40, 25, 0.06);
  --shadow: 0 1px 2px rgba(60, 40, 25, 0.08), 0 6px 18px -8px rgba(60, 40, 25, 0.18);
  --shadow-lg: 0 24px 60px -16px rgba(40, 25, 15, 0.35);
  color-scheme: light;
}
body { background: #F5F1EC; color: var(--text); }

/* Dark brand rail + phone bottom bar: re-scope the dark tokens */
.rail, .bottom-nav {
  --text: #F5F0EC;
  --muted: #B8ADA3;
  --muted-2: #857A72;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --bg: #0C0603;
  --surface: #1E1A18;
  --surface-2: #2A2624;
  --primary-deep: #7AFFBC;
  --on-primary: #1A0F0A;
  color-scheme: dark;
  background: #141210;
  color: var(--text);
}
.rail .storage-note { background: #1E1A18; }

/* Top bar */
.topbar { background: rgba(245, 241, 236, 0.94); border-bottom-color: var(--border); }
.gsearch__field, .datesearch, .seg, .chip, .icon-btn, .btn--secondary, .field input, .field select, .field textarea,
.profile__appt input, .filters__inputs input, .filters__inputs select, .proposal__row input, .doc__fields input:focus, .stage-composer textarea {
  background-color: #FFFFFF;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-deep); }
.gsearch__results, .menu { background: #FFFFFF; border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.menu button:hover, .btn--ghost:hover, .table tbody tr:hover { background: rgba(70, 45, 30, 0.05); }
.table th { background: var(--surface-2); }

/* Surfaces */
.card, .item, .slot, .doc, .asm, .empty, .parsed, .proposal, .stage-composer, .hist__card, .stat-mini { border-color: var(--border); }
.card { background: var(--surface); box-shadow: var(--shadow-sm); }
.agenda-main { background: var(--surface); }
.dialog { background: #FCFAF7; border-color: var(--border-strong); }
.dialog__foot { background: var(--surface-2); }
.dialog::backdrop { background: rgba(30, 20, 12, 0.45); }
.toast { background: #FFFFFF; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.toast span { color: var(--muted); }
.hist__dot { background: var(--surface); }
.week__day { background: var(--surface); border-color: var(--border); }
.week__day.is-today .week__num { color: var(--primary-deep); }
.week__day.is-selected .week__wd, .week__day.is-selected .week__num { color: #FFFFFF; }

/* Accents readable on light */
.eyebrow { color: #007A52; }
.btn--primary { color: #FFFFFF; }
.btn--soft { background: var(--primary-soft); color: var(--primary-deep); }
.btn--gold { background: var(--gold-soft); color: #007A52; border-color: rgba(0, 122, 82, 0.30); }
.btn--secondary { color: var(--text); }
.badge--done, .agenda-rel .badge--done { background: var(--primary-soft); color: var(--primary-deep); }
.badge--proposal { background: rgba(0, 155, 104, 0.10); color: var(--primary-deep); border-color: rgba(0, 155, 104, 0.30); }
.badge--contact { background: rgba(70, 45, 30, 0.06); color: var(--info); border-color: var(--border-strong); }
.badge--sold { color: #FFFFFF; }
.badge--gold { color: #007A52; border-color: rgba(0, 122, 82, 0.35); }
.badge--noanswer { background: rgba(191, 68, 48, 0.10); color: #B03A27; border-color: rgba(191, 68, 48, 0.35); }
.badge--cadence { color: #007A52; border-color: rgba(0, 122, 82, 0.35); background: rgba(0, 155, 104, 0.16); }
.badge--cadence.is-late { color: var(--warn); }
.btn--noanswer { color: #B03A27; border-color: rgba(191, 68, 48, 0.45); background: transparent; }
.btn--noanswer:hover { background: rgba(191, 68, 48, 0.08); }
.avatar { background: var(--primary-soft); color: var(--primary-deep); }
.ok-line, .kpi--ok strong { color: #2F8F55; }
.premium, .premium .icon, .item__value.is-high, .profile__value.is-high strong, .kpi--gold strong, .stat-mini--gold strong { color: #007A52; }
.phone-link:hover { color: var(--primary-deep); }
.wa-btn { background: rgba(37, 211, 102, 0.10); border-color: rgba(30, 150, 75, 0.35); color: #1E8E4A; }
.wa-btn:hover { background: #25D366; color: #FFFFFF; border-color: #25D366; }
.msg-btn { color: #1E8E4A; border-color: rgba(30, 150, 75, 0.35); }
.msg-btn:hover { color: #FFFFFF; }
.item__obs { background: #F6EFE6; border-left-color: #C08A52; }
.item__obs-label { color: #007A52; }
.doc__icon { color: var(--danger); background: var(--danger-soft); }
.alert-box--gold { background: rgba(0, 155, 104, 0.12); border-color: rgba(0, 122, 82, 0.30); }
.kpi--primary span, .kpi--primary small { color: rgba(255, 255, 255, 0.85); }
.kpi--primary, .kpi--primary strong { color: #FFFFFF; }

/* Quick register call-to-action, queue call-to-action, goals */
.quick-cta { background: linear-gradient(150deg, #EEF8F3 0%, #FCFAF7 100%); border: 1px solid rgba(0, 155, 104, 0.35); color: var(--text); }
.quick-cta p { color: var(--muted); }
.quick-cta .btn { color: #FFFFFF; }
.queue-cta { background: linear-gradient(150deg, rgba(0, 155, 104, 0.14), rgba(0, 155, 104, 0.04)); }
.goal__bar { background: rgba(70, 45, 30, 0.10); }
.calls-pill { background: #FFFFFF; }
.calls-pill.is-done { background: rgba(63, 181, 107, 0.10); }
.ext-backup__row input { background: #FFFFFF; }
.ext-backup__status { background: rgba(63, 181, 107, 0.10); }
.motivation { background: #FCFAF7; }
.motivation__text { color: var(--text); }
.motivation__agenda { color: #007A52; }
.motivation__logo { filter: none; background: #141210; padding: 12px 18px; border-radius: 14px; box-sizing: content-box; }
.queue-goal { background: var(--surface); }
.fcol { background: #ECE5DC; border-color: var(--border); }
.queue-now { background: var(--surface); border: 1px solid rgba(0, 155, 104, 0.35); box-shadow: var(--shadow); }

/* =========================================================
   Inteligência Comercial (v3.1): dashboard, closing priority, timeline
   ========================================================= */
.page--intel .page__head { align-items: flex-end; }
.intel-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.intel-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .intel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .intel-kpis { grid-template-columns: 1fr; } }
.intel-kpi { display: flex; flex-direction: column; gap: 6px; }
.intel-kpi > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.intel-kpi > span .badge { height: 20px; font-size: 10.5px; }
.intel-kpi strong { font-size: 24px; }
.intel-kpi small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.intel-kpi.kpi--primary small, .intel-kpi.kpi--primary > span { color: rgba(255, 255, 255, 0.88); }
.intel-kpi.kpi--gold strong { color: #007A52; }
.intel-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .intel-cols { grid-template-columns: 1fr; } }
.intel-mini__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.intel-mini__side strong { font-size: 14px; }
.intel-mini__side strong.is-high { color: #007A52; }
.intel-note { font-size: 12px; color: var(--muted-2); margin: 12px 2px 0; }

.prio { font-weight: 700; }
.prio--high { background: var(--fa-orange); color: #FFFFFF; border-color: var(--fa-orange); }
.prio--medium { background: rgba(0, 155, 104, 0.18); color: #007A52; border-color: rgba(0, 122, 82, 0.35); }
.prio--low { background: var(--surface-2); color: var(--muted); border-color: var(--border-strong); }

.closing-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.closing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius); }
.closing--high { border-left-color: var(--fa-orange); }
.closing--medium { border-left-color: var(--fa-caramel); }
.closing.is-stale { background: #FBF4EC; }
.closing__main { cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.closing__top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.closing__name { font-size: 16px; font-weight: 700; }
.closing__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.closing__value { font-weight: 700; color: var(--text); }
.closing__value.is-high { color: #007A52; }
.closing__why { font-size: 12.5px; color: var(--muted); }
.closing__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.closing__action { text-align: right; }
.closing__action span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 700; }
.closing__action strong { font-size: 14px; color: var(--primary-deep); }
.closing__btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .closing { grid-template-columns: 1fr; }
  .closing__side { align-items: flex-start; }
  .closing__action { text-align: left; }
  .closing__btns { justify-content: flex-start; }
}
.intel-weights { margin-top: 16px; padding: 14px 16px; }
.intel-weights summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.weights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.weights-grid .field span { font-size: 12.5px; color: var(--muted); }
.weights-grid input { height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); padding: 0 10px; background: #FFFFFF; color: var(--text); font: inherit; }
.weights-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

.intel-client { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; border-left: 4px solid var(--fa-orange); }
.intel-client.is-stale { border-left-color: var(--warn); }
.intel-client__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.intel-client__action span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 700; }
.intel-client__action strong { color: var(--primary-deep); }
.intel-client__btns { margin-left: auto; }
.intel-client__why { font-size: 12.5px; color: var(--muted); }

.tl { display: flex; flex-direction: column; }
.tl__section { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 12px 0 6px; }
.tl__row { display: grid; grid-template-columns: 64px 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tl__row:last-child { border-bottom: 0; }
.tl__when { text-align: right; line-height: 1.2; }
.tl__when strong { display: block; font-size: 13px; }
.tl__when span { font-size: 11.5px; color: var(--muted-2); }
.tl__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.tl__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tl__head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl__badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tl__title { font-weight: 600; font-size: 13.5px; }
.tl__detail { font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.tl__origin { font-size: 11.5px; color: var(--muted-2); }
.tl--sale .tl__dot, .tl--meeting-done .tl__dot, .tl--reminder-done .tl__dot { background: rgba(63, 181, 107, 0.14); color: #2F8F55; }
.tl--call-missed .tl__dot { background: rgba(191, 68, 48, 0.10); color: #B03A27; }
.tl--proposal .tl__dot, .tl--simulation .tl__dot, .tl--stage .tl__dot { background: var(--primary-soft); color: var(--primary-deep); }
.tl--revision .tl__detail { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .2); }
.tl__row.is-future { background: rgba(0, 155, 104, 0.05); }
.tl__row.is-future .tl__badge { color: var(--primary-deep); }

/* =========================================================
   Side rail v3.2: always collapsed to icons; the menu button opens the full rail OVER the page
   ========================================================= */
:root { --rail-w: 76px; }
.shell > .content { grid-column: 2; }
.rail { width: var(--rail-w); padding: 14px 12px 18px; align-items: center; gap: 18px; }
.rail__toggle {
  display: grid; place-items: center; width: 44px; height: 40px; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 12px; background: rgba(255, 255, 255, 0.04);
  color: var(--text); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
}
.rail__toggle:hover { background: rgba(255, 255, 255, 0.10); }
.rail__toggle:focus-visible { outline: 2px solid var(--fa-orange); outline-offset: 2px; }
.rail__toggle span, .rail__ico-close { display: none; }
.rail .brand { padding: 0; }
.rail .brand__logo, .rail .brand__app, .rail .nav__text, .rail .nav__label, .rail .storage-note, .rail .rail__foot .btn span { display: none; }
.rail .brand__symbol { display: block; width: 40px; height: 40px; }
.rail .nav__link { justify-content: center; padding: 0; width: 48px; position: relative; }
.rail .nav__count { position: absolute; top: 2px; right: -2px; margin: 0; min-width: 18px; height: 16px; font-size: 10px; padding: 0 4px; }
.rail .rail__foot .btn { width: 48px; padding: 0; justify-content: center; }

/* Open: full width over the content (the page does not move) */
.shell.rail-open .rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 60;
  align-items: stretch; padding: 14px 14px 18px; box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35); overflow-y: auto;
}
.shell.rail-open .rail__toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 12px; justify-content: flex-start; }
.shell.rail-open .rail__toggle span, .shell.rail-open .rail__ico-close { display: inline; }
.shell.rail-open .rail__ico-open { display: none; }
.shell.rail-open .rail .brand { padding: 0 8px; align-items: flex-start; }
.shell.rail-open .rail .brand__logo { display: block; width: 170px; }
.shell.rail-open .rail .brand__app { display: block; }
.shell.rail-open .rail .brand__symbol { display: none; }
.shell.rail-open .rail .nav__label { display: block; }
.shell.rail-open .rail .nav__text { display: inline; }
.shell.rail-open .rail .nav__link { justify-content: flex-start; padding: 0 12px; width: auto; }
.shell.rail-open .rail .nav__count { position: static; margin-left: auto; min-width: 22px; height: 20px; font-size: 11.5px; padding: 0 7px; }
.shell.rail-open .rail .rail__foot .btn { width: auto; padding: 0 12px; justify-content: flex-start; }
.shell.rail-open .rail .rail__foot .btn span { display: inline; }
.shell.rail-open .rail .storage-note { display: flex; }
.shell.rail-open .rail .storage-note div { display: block; }
.rail-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(20, 14, 10, 0.30); }
@media (max-width: 760px) { .rail-backdrop { display: none; } .shell > .content { grid-column: 1; } }

/* =========================================================
   Eye-comfort pass (v3.3): matte surfaces, softer contrast and orange, larger text,
   Segoe UI (Windows' native UI font, crisper with ClearType than Arial). CSS only.
   ========================================================= */
:root, .agenda-main, .fcol, .queue-now {
  --font-ui: "Segoe UI", Arial, Helvetica, sans-serif;
  --font-display: "Segoe UI", Arial, Helvetica, sans-serif;
  --text: #34302B;
  --muted: #6B625A;
  --muted-2: #8C837B;
  --border: rgba(60, 45, 35, 0.10);
  --border-strong: rgba(60, 45, 35, 0.18);
  --bg: #E9E5DF;
  --surface: #F7F4EF;
  --surface-2: #EEEAE4;
  --primary: #009B68;
  --primary-deep: #007A52;
  --primary-soft: rgba(0, 155, 104, 0.12);
  --primary-tint: rgba(0, 155, 104, 0.07);
  --shadow-sm: 0 1px 2px rgba(60, 40, 25, 0.05);
  --shadow: 0 1px 2px rgba(60, 40, 25, 0.06), 0 4px 14px -8px rgba(60, 40, 25, 0.16);
}
body { background: #ECE8E2; color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .page__title, .agenda-date, .dialog__title, .item__value, .kpi strong, .stat-mini strong, .week__num { font-family: var(--font-display); font-weight: 600; }
.topbar { background: rgba(236, 232, 226, 0.95); }
.card, .agenda-main, .dialog, .motivation, .queue-goal { background: var(--surface); box-shadow: var(--shadow-sm); }
.toast, .menu, .gsearch__results { background: #F9F7F3; }

/* The rail stays black, a touch softer so it does not "cut" the page */
.rail, .bottom-nav { background: #1B1917; }

/* Orange only for accents: softer fills, no glowing shadows */
.btn--primary, .quick-cta .btn { background: var(--primary); color: #FFFFFF; box-shadow: none; }
.btn--primary:hover, .quick-cta .btn:hover { background: #007A52; }
.week__day.is-selected { background: var(--primary); border-color: var(--primary); }
.prio--high { background: var(--primary); border-color: var(--primary); }
.kpi--primary, .intel-kpi.kpi--primary { background: var(--surface); color: var(--text); border-left: 4px solid var(--primary); }
.kpi--primary span, .kpi--primary small, .intel-kpi.kpi--primary > span, .intel-kpi.kpi--primary small { color: var(--muted); }
.kpi--primary strong { color: var(--primary-deep); }

/* Call-to-action cards: plain card with an accent edge instead of a peach gradient */
.quick-cta, .queue-cta { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); }
.quick-cta::after { display: none; }

/* Overdue / alerting rows: normal card + warm edge (no big tinted blocks) */
.item.is-overdue, .agenda-main .item.is-overdue { background: var(--surface); border-color: rgba(178, 94, 22, 0.22); }
.item.is-overdue::before { background: #C9772F; }
.closing.is-stale { background: var(--surface); }
.alert-box { background: var(--surface-2); }
.item__obs, .agenda-main .item__obs { background: #F1ECE4; }
.agenda-main .item { background: #FBF9F6; }
.agenda-main .item:hover { background: #FFFFFF; }

/* Larger, calmer small text */
.item__title { font-size: 15.5px; }
.item__meta, .item__note, .item__obs { font-size: 13.5px; }
.item__time strong { font-size: 16px; }
.cat { font-size: 12.5px; }
.badge { font-size: 12px; }
.mini__title { font-size: 14px; }
.mini__sub, .card__hint, .field__hint, .goal__foot, .goal__note, .closing__why, .closing__meta, .tl__detail, .tl__origin, .intel-kpi small { font-size: 13px; }
.card__title { font-size: 15.5px; }
.nav__link { font-size: 14.5px; }
.week__wd { font-size: 12px; }
.timeline__section, .tl__section, .eyebrow { font-size: 12px; }
.page__sub, .agenda-rel { font-size: 14px; }

/* v3.4: returns in the side schedule + call result on the client page */
.slot--reminder { --c: #C9772F; }
.slot.is-done .slot__name { text-decoration: line-through; color: var(--muted); }
.slot__status.s-late { color: var(--warn); font-weight: 700; }
.call-result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.call-result__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.call-result .btn { height: 34px; padding: 0 14px; font-weight: 700; }
.call-result__yes { background: rgba(63, 181, 107, 0.12); color: #2B7D4B; border: 1px solid rgba(47, 143, 85, 0.40); }
.call-result__yes:hover { background: rgba(63, 181, 107, 0.22); }

/* v3.5: "Atendeu" (answered call) */
.badge--answered { background: rgba(63, 181, 107, 0.12); color: #2B7D4B; border-color: rgba(47, 143, 85, 0.38); }
.call-btns { display: flex; gap: 6px; }
.btn--answered { background: transparent; color: #2B7D4B; border: 1px solid rgba(47, 143, 85, 0.45); height: 28px; padding: 0 12px; font-size: 12px; font-weight: 700; }
.btn--answered:hover { background: rgba(63, 181, 107, 0.12); }

/* v3.6.2: copy phone number */
.copy-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
}
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn:hover { color: var(--primary-deep); border-color: var(--primary); }
.copy-btn.is-copied { color: #2B7D4B; border-color: rgba(47, 143, 85, 0.5); background: rgba(63, 181, 107, 0.10); }
.queue-now__phone .copy-btn { width: 34px; height: 34px; }

/* v3.7: one search box, inside the agenda */
.search-slot { flex: 1; min-width: 240px; max-width: 520px; }
.search-slot .gsearch { max-width: none; width: 100%; }
.search-slot .gsearch__field { height: 40px; }
.search-slot .gsearch__results { z-index: 40; }

/* v3.8: use the whole page width */
.page { max-width: none; }

/* Quick register: large window, notes/conversation on the left, conference on the right */
.dialog--quick { width: min(1280px, calc(100% - 32px)); }
.dialog--quick form { max-height: calc(100dvh - 32px); }
.dialog--quick .dialog__body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dialog--quick .dialog__body > :not(.quick-left):not(.parsed) { grid-column: 1 / -1; }
.dialog--quick .quick-left { grid-row: span 3; display: flex; flex-direction: column; gap: 10px; }
.dialog--quick .paste-area { min-height: 300px; font-size: 15px; line-height: 1.55; resize: vertical; }
.quick-stages { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.quick-stages__title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--primary-deep); }
.quick-stages ol { margin: 6px 0 4px 20px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
@media (max-width: 900px) {
  .dialog--quick .dialog__body { grid-template-columns: 1fr; }
  .dialog--quick .quick-left { grid-row: auto; }
  .dialog--quick .paste-area { min-height: 180px; }
}

/* v3.8: agenda starts at the very top — the top strip's buttons live in the agenda header */
body.topbar-hidden .topbar { display: none; }
body.topbar-hidden .page { padding-top: 16px; }
.agenda-head { position: relative; }
.head-actions-slot { position: absolute; top: 14px; right: 18px; }
.head-actions-slot .topbar__actions { margin-left: 0; }
@media (max-width: 760px) {
  body.topbar-hidden .topbar { display: flex; }
  .head-actions-slot { position: static; margin-bottom: 10px; }
}
body.topbar-hidden .panel { top: 16px; }

/* =========================================================
   v3.9 layout: home = attendance agenda + schedule + register; everything else in the side menu
   ========================================================= */
.rail-stats { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rail-calls, .rail-goal {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); color: #F1EFE8; text-decoration: none; cursor: pointer; font-size: 12.5px;
}
.rail-calls:hover, .rail-goal:hover { background: rgba(255, 255, 255, 0.11); }
.rail-calls__top { display: flex; align-items: center; gap: 6px; justify-content: center; }
.rail-calls__top b { font-size: 13px; }
.rail-calls__label, .rail-goal__label { display: none; color: #B8ADA3; }
.rail-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.rail-bar i { display: block; height: 100%; background: var(--primary); }
.rail-goal .rail-bar i { background: #8FD3B0; }
.rail-goal.is-empty { align-items: center; }
.shell.rail-open .rail-calls__top { justify-content: flex-start; }
.shell.rail-open .rail-calls__label, .shell.rail-open .rail-goal__label { display: inline; }
.rail .rail-quick { width: 48px; padding: 0; justify-content: center; color: #FFFFFF; }
.shell.rail-open .rail .rail-quick { width: auto; padding: 0 12px; justify-content: flex-start; }
.rail .rail__foot .save-status { display: none; }

/* Agenda side: schedule + inline register */
.quick-inline__form { display: flex; flex-direction: column; gap: 8px; }
.quick-inline__form textarea {
  width: 100%; min-height: 150px; resize: vertical; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text); font: inherit; font-size: 14px; line-height: 1.5;
}
.quick-inline__form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.quick-inline__preview { font-size: 13px; color: var(--muted); line-height: 1.45; }
.quick-inline__preview .is-warn { color: var(--warn); }
.quick-inline__btns { display: flex; gap: 8px; justify-content: flex-end; }

/* Reminders page: the cards that used to be stacked beside the agenda */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.overview-grid > [hidden] { display: none !important; }

/* v3.9 brand: green from the new logo (#009B68) + mint accent (#7AFFBC) */
:root, .agenda-main, .fcol, .queue-now {
  --fa-orange: #009B68;
  --primary: #009B68;
  --primary-deep: #007A52;
  --primary-soft: rgba(0, 155, 104, 0.12);
  --primary-tint: rgba(0, 155, 104, 0.07);
}
.eyebrow, .agenda-main .eyebrow { color: var(--primary-deep); }
.eyebrow::before { background: var(--primary); }
.btn--primary:hover, .quick-cta .btn:hover { background: #007A52; }
.nav__link.is-active { background: rgba(122, 255, 188, 0.14); color: #7AFFBC; }
.nav__link.is-active .nav__count { background: #7AFFBC; color: #0B3B2B; }
.rail-goal .rail-bar i { background: #7AFFBC; }
.brand__symbol { border-radius: 10px; }
.rail .brand__app { color: #7AFFBC; }
.shell.rail-open .rail .brand { flex-direction: row; align-items: center; gap: 10px; }
.shell.rail-open .rail .brand__symbol { display: block; width: 36px; height: 36px; }
.shell.rail-open .rail .brand__app { font-size: 15px; letter-spacing: 0.04em; text-transform: none; font-weight: 700; }
.motivation__logo { width: 84px; height: 84px; background: none; padding: 0; border-radius: 20px; }

/* Compact agenda card: name, phone, call time, answered or not */
.item--compact { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 8px 12px 8px 10px; gap: 12px; }
.item--compact .item__time strong { font-size: 15px; }
.item--compact .item__main { gap: 2px; }
.item--compact .item__title { font-size: 15px; }
.item--compact .item__meta { font-size: 13.5px; gap: 8px; }
.item__side--row { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.item--compact .wa-btn { width: 28px; height: 28px; }
.agenda-main .timeline { gap: 6px; }
@media (max-width: 640px) { .item--compact { grid-template-columns: 52px minmax(0, 1fr); } .item--compact .item__side--row { grid-column: 1 / -1; justify-content: flex-start; } }

/* Live reading of the note being typed */
.stage-hint { font-size: 13px; color: var(--muted); min-height: 0; }
.stage-hint:empty { display: none; }
.stage-hint .is-missed { color: #B03A27; }
.stage-hint .is-answered { color: #2B7D4B; }

/* Schedule rules dialog */
.rules-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.rules-group legend { font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* Compact reminder rows in the agenda too (no notes line, less padding) */
.agenda-main .item:not(.item--compact) { padding: 8px 12px 8px 10px; }
.agenda-main .item:not(.item--compact) .item__note { display: none; }
.agenda-main .item:not(.item--compact) .item__title { font-size: 15px; }

/* ===== v4.0 online: login screen ===== */
.auth-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 20% 0%, rgba(122, 255, 188, 0.18), transparent 60%), var(--fa-black, #0d0f0e); }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border-radius: 18px; background: var(--surface, #fff); color: var(--text, #17201b); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5); }
.auth-logo { width: 52px; height: 52px; border-radius: 12px; }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-sub { margin: -6px 0 4px; color: var(--muted); font-size: 14px; }
.auth-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(220, 38, 38, 0.1); color: #b42318; font-size: 14px; }
.auth-submit { justify-content: center; min-height: 44px; font-size: 15px; }
.auth-switch { background: none; border: 0; color: var(--primary); font: inherit; font-size: 14px; cursor: pointer; padding: 4px; }
.auth-switch:hover { text-decoration: underline; }
/* PC-only sections are hidden in the online version */
body.is-online [data-local-only] { display: none !important; }

/* ===== v4.0 one card per client: other things of the day folded in ===== */
.item__extras { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.item__extra { font-size: 12px; line-height: 1.3; padding: 2px 8px; border-radius: 999px; background: rgba(0, 155, 104, 0.09); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__extra b { font-weight: 600; color: var(--primary-deep, #007A52); }
.item__extra.is-overdue { background: rgba(220, 38, 38, 0.09); color: #b42318; }

/* ===== v4.0.1 filter chips under the week strip ===== */
.agenda-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.agenda-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border, rgba(0,0,0,.1)); background: var(--surface, #fff); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.agenda-chip:hover { border-color: var(--primary); }
.agenda-chip__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: rgba(0, 155, 104, 0.1); color: var(--primary-deep, #007A52); }
.agenda-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.agenda-chip.is-active .agenda-chip__n { background: rgba(255, 255, 255, 0.22); color: #fff; }
.agenda-chip--naoatendeu:not(.is-active) .agenda-chip__n { background: rgba(220, 38, 38, 0.1); color: #b42318; }

/* ===== v4.1 client page (same layout as the reference design) ===== */
.client-page { max-width: 1480px; }
.cp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cp-back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; margin-bottom: 10px; }
.cp-back:hover { color: var(--primary); }
.cp-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cp-title h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.02em; color: #202D29; }
.cp-stage { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(0, 155, 104, 0.12); color: #007A52; font-weight: 600; font-size: 15px; }
.cp-stage--sm { height: 28px; font-size: 14px; }
.cp-head__actions { display: flex; align-items: center; gap: 12px; }
.cp-btn { height: 46px; padding: 0 20px; font-size: 16px; font-weight: 600; border-radius: 10px; gap: 10px; text-decoration: none; }
.cp-btn--wa { background: var(--surface, #fff); color: #007A52; border: 1.5px solid #009B68; }
.cp-btn--wa:hover { background: rgba(0, 155, 104, 0.08); }
.cp-more { position: relative; }
.cp-more > summary { list-style: none; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border, rgba(0,0,0,.12)); border-radius: 10px; background: var(--surface, #fff); cursor: pointer; }
.cp-more > summary::-webkit-details-marker { display: none; }
.cp-more__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(360px, 90vw); padding: 14px; border-radius: 14px; background: var(--surface, #fff); box-shadow: 0 18px 40px -12px rgba(0,0,0,.28); border: 1px solid var(--border, rgba(0,0,0,.08)); display: flex; flex-direction: column; gap: 10px; }
.cp-more__label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cp-more__btns { display: flex; flex-wrap: wrap; gap: 6px; }

.cp-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.cp-main, .cp-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1080px) { .cp-grid { grid-template-columns: 1fr; } }

.cp-next-action { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 22px 26px; border-radius: 14px; background: #E4F5EC; border: 1px solid rgba(0, 155, 104, 0.18); border-left: 4px solid #009B68; }
.cp-next-action.is-late { background: #fdf0ec; border-color: rgba(220, 38, 38, .2); border-left-color: #d9534f; }
.cp-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #202D29; }
.cp-next-action__title { margin-top: 6px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: #007A52; line-height: 1.2; }
.cp-next-action.is-late .cp-next-action__title { color: #a8322c; }
.cp-next-action__sub { margin-top: 4px; font-size: 16px; color: var(--text); }
.cp-prio { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: rgba(0, 155, 104, .12); color: #202D29; font-size: 14px; font-weight: 600; white-space: nowrap; }
.cp-prio--high, .cp-prio--alta { background: rgba(220, 38, 38, .12); color: #a8322c; }
.cp-prio--medium, .cp-prio--media { background: rgba(217, 160, 30, .16); color: #7a5600; }

.cp-card { padding: 22px 24px; border-radius: 14px; }
.cp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cp-card__head--conv { justify-content: flex-start; gap: 16px; }
.cp-card__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 700; color: #202D29; }
.cp-card__title .icon { color: #009B68; width: 22px; height: 22px; }
.cp-card__hint { font-size: 14px; color: var(--muted); }
.cp-textarea { width: 100%; min-height: 130px; resize: vertical; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border, rgba(0,0,0,.14)); background: var(--surface, #fff); font: inherit; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.cp-textarea:focus { outline: none; border-color: #009B68; box-shadow: 0 0 0 4px rgba(0, 155, 104,.15); }
.cp-conv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cp-conv-calls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-call-btn { height: 42px; padding: 0 18px; border-radius: 10px; background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,.16)); font-weight: 500; font-size: 15px; gap: 8px; }
.cp-call-btn:hover { border-color: #009B68; }
.cp-save { height: 44px; padding: 0 22px; font-size: 16px; font-weight: 600; border-radius: 10px; gap: 8px; }

.cp-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cp-tab { height: 38px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--border, rgba(0,0,0,.12)); background: var(--surface, #fff); font: inherit; font-size: 15px; color: var(--text); cursor: pointer; }
.cp-tab.is-active { background: #E4F5EC; border-color: #E4F5EC; color: #007A52; font-weight: 700; }
.client-page .tl__row { position: relative; }
.client-page .tl__edit { position: absolute; right: 0; top: 4px; opacity: .55; }
.client-page .tl__row:hover .tl__edit { opacity: 1; }

.cp-link, .cp-add { display: inline-flex; align-items: center; gap: 6px; border: 0; font: inherit; font-weight: 600; font-size: 15px; color: #007A52; cursor: pointer; }
.cp-link { background: none; padding: 4px; }
.cp-add { background: #E4F5EC; padding: 8px 14px; border-radius: 10px; }
.cp-add:hover { background: #D3EEDF; }
.cp-data { margin: 0; }
.cp-data > div { display: grid; grid-template-columns: minmax(120px, 1fr) 1.2fr; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border, rgba(0,0,0,.08)); }
.cp-data > div:first-child { border-top: 0; padding-top: 2px; }
.cp-data dt { font-size: 15px; color: var(--text); }
.cp-data dd { margin: 0; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.cp-form-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.cp-notes { font-size: 15.5px; line-height: 1.55; color: var(--text); }
.cp-empty { font-size: 15px; color: var(--muted); padding: 2px 0; }
.cp-next { display: flex; flex-direction: column; gap: 8px; }
.cp-next__item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border, rgba(0,0,0,.1)); }
.cp-next__item[role="button"] { cursor: pointer; }
.cp-next__item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-next__item strong { color: #007A52; font-size: 16px; }
.cp-next__item span { font-size: 15px; }
.cp-next__ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: #E4F5EC; color: #009B68; }
.cp-appt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border, rgba(0,0,0,.12)); font-size: 13.5px; color: var(--muted); }
.cp-appt input { height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border, rgba(0,0,0,.14)); background: var(--surface, #fff); font: inherit; font-size: 13.5px; color: var(--text); }
.cp-sims > .card { padding: 22px 24px; border-radius: 14px; }

/* ===== v4.2 ContataBR brand in the rail: symbol with the name under it ===== */
.rail .brand { flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 2px; }
.rail .brand__symbol { display: block !important; width: 40px; height: 40px; border-radius: 10px; }
.rail .brand__app--name { display: block !important; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #fff; padding: 0; }

/* v4.2.1 multi-line stage */
.tl__detail, .hist__notes { white-space: pre-line; }

/* v4.3 pack toggle */
body.no-pack [data-nav="assembleias"], body.no-pack [data-nav="funil"], body.no-pack .agenda-chip--assembleia { display: none !important; }
.pack-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border, rgba(0,0,0,.12)); border-radius: 12px; cursor: pointer; }
.pack-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: #009B68; flex-shrink: 0; }
.pack-toggle span { display: flex; flex-direction: column; gap: 3px; }
.pack-toggle small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* v4.3 import */
#importDialog { width: min(980px, calc(100vw - 32px)); max-width: none; }
.imp-step { display: flex; flex-direction: column; gap: 14px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed rgba(0, 155, 104,.35); border-radius: 14px; background: #E4F5EC; color: #007A52; cursor: pointer; text-align: center; }
.imp-drop.is-over { background: #E4F5EC; border-color: #009B68; }
.imp-drop .icon { width: 28px; height: 28px; }
.imp-drop span { color: var(--muted); font-size: 13.5px; }
.imp-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-summary > div { padding: 12px 14px; border-radius: 12px; background: #E4F5EC; display: flex; flex-direction: column; gap: 2px; }
.imp-summary strong { font-size: 24px; color: #007A52; }
.imp-summary span { font-size: 13px; color: var(--muted); }
.imp-summary .is-warn { background: #fdf3ec; }
.imp-summary .is-warn strong { color: #a8322c; }
@media (max-width: 640px) { .imp-summary { grid-template-columns: 1fr; } }
.imp-table-wrap { overflow: auto; max-height: 340px; border: 1px solid var(--border, rgba(0,0,0,.1)); border-radius: 12px; }
.imp-table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.imp-table th, .imp-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, rgba(0,0,0,.08)); text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.imp-table th { position: sticky; top: 0; background: var(--surface, #fff); vertical-align: top; }
.imp-col { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.imp-table select { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border, rgba(0,0,0,.15)); background: var(--surface, #fff); }
.imp-cell--name, .imp-cell--phone { font-weight: 600; color: #007A52; }
.imp-cell--skip { color: var(--muted-2, #aaa); text-decoration: line-through; }
.imp-skipped { font-size: 13px; color: var(--muted); }
.quick-inline__import { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: #007A52; cursor: pointer; }
.quick-inline__import:hover { text-decoration: underline; }

/* v4.4 open sign-up */
.auth-gate { overflow-y: auto; align-items: start; padding: 24px 16px; }
.auth-card { margin: auto; }
.auth-card select { width: 100%; height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border, rgba(0,0,0,.15)); background: var(--surface, #fff); font: inherit; color: var(--text); }
.auth-terms { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.auth-terms input { width: 18px; height: 18px; margin-top: 1px; accent-color: #009B68; flex-shrink: 0; }
.auth-terms a { color: #007A52; }
.auth-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; padding: 2px; text-decoration: underline; }
a.auth-submit { display: inline-flex; align-items: center; text-decoration: none; }
.welcome { margin-bottom: 18px; padding: 20px 22px; border-radius: 14px; background: #E4F5EC; border: 1px solid rgba(0, 155, 104,.2); }
.welcome h2 { margin: 0 0 10px; font-size: 19px; color: #007A52; }
.welcome ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.45; }
.welcome p { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.welcome__link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: #007A52; text-decoration: underline; cursor: pointer; }
.owner { max-width: 1400px; }
.owner-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.owner-head h1 { margin: 4px 0 0; font-size: 28px; color: #202D29; }
.owner-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.owner-stats > div { padding: 16px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); display: flex; flex-direction: column; gap: 4px; }
.owner-stats strong { font-size: 30px; color: #007A52; line-height: 1; }
.owner-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .owner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.owner-card { padding: 20px 22px; border-radius: 14px; margin-bottom: 18px; }
.owner-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.owner-src { padding: 6px 12px; border-radius: 999px; background: #E4F5EC; font-size: 14px; }
.owner-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.owner-filter { display: flex; gap: 8px; }
.owner-table-wrap { overflow-x: auto; }
.owner-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.owner-table th, .owner-table td { padding: 10px; border-bottom: 1px solid var(--border, rgba(0,0,0,.08)); text-align: left; vertical-align: top; white-space: nowrap; }
.owner-table th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.owner-table small { display: block; color: var(--muted); font-size: 12px; }
.owner-table a { color: #007A52; }
body:not(.is-owner) #ownerBtn { display: none; }

/* v4.4.1 grouped history */
.tl__children { list-style: none; margin: 8px 0 4px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 155, 104,.06); display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.tl__children li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.tl__children .tl__badge { font-size: 10.5px; }
.tl__sub { color: var(--muted); font-size: 13px; }

/* v4.5 side rail (reference layout) */
.rail { background: #211F1C; border-right: 0; scrollbar-width: thin; scrollbar-color: #3a403c transparent; }
.rail .nav__link { height: 40px; border-radius: 10px; color: #E8ECE9; font-size: 15px; gap: 14px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.rail .nav__link .icon { color: #CFD6D1; width: 19px; height: 19px; }
.rail .nav__link:hover { background: rgba(255, 255, 255, 0.06); }
.rail .nav__link.is-active { background: #1E3A2D; color: #FFFFFF; }
.rail .nav__link.is-active .icon { color: #7AFFBC; }
.rail .nav__count { background: #009B68; color: #FFFFFF; font-weight: 700; }
.rail .nav__label { color: #7E8A83; font-size: 11.5px; letter-spacing: 0.14em; padding: 14px 12px 6px; }
.rail .nav--prefs { margin-top: 4px; }
.rail .rail__foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rail .rail-quick { height: 42px; border-radius: 12px; background: #009B68; color: #fff; }
.rail .rail-quick:hover { background: #007A52; }
.rail .storage-note[hidden] { display: none !important; }
.rail-calls, .rail-goal { background: #2B2925; border: 1px solid rgba(255,255,255,.06); }
.rail-calls b { color: #fff; }
.rail-bar i { background: #009B68; }
/* collapsed: icons only, one rounded dark column */
.rail .rail__foot .nav--prefs .nav__link { width: 48px; }
/* open */
.shell.rail-open .rail { width: 268px; padding: 14px 16px 18px; gap: 12px; }
.shell.rail-open .rail .rail__foot { align-items: stretch; }
.shell.rail-open .rail .rail__foot .nav--prefs .nav__link { width: auto; padding: 0 12px; justify-content: flex-start; }
.shell.rail-open .rail .nav--prefs .nav__label, .shell.rail-open .rail .nav--prefs .nav__text { display: inline; }
.shell.rail-open .rail .nav--prefs .nav__label { display: block; }
.shell.rail-open .rail .rail-quick { width: 100%; justify-content: flex-start; padding: 0 16px; font-size: 15px; gap: 12px; }
.shell.rail-open .rail .brand { padding: 4px 6px; gap: 12px; }
.shell.rail-open .rail .brand__symbol { width: 40px; height: 40px; }
.shell.rail-open .rail .brand__app--name { font-size: 20px; color: #fff; }
.shell.rail-open .rail-calls, .shell.rail-open .rail-goal { padding: 10px 12px; font-size: 14px; }
.shell.rail-open .rail-calls__label, .shell.rail-open .rail-goal__label { color: #CFD6D1; }
.shell.rail-open .rail-goal.is-empty { align-items: center; flex-direction: column; justify-content: center; gap: 4px; }
/* closed rail: brand name under the symbol stays hidden (only icons) */
.shell:not(.rail-open) .rail .brand__app--name { display: none !important; }

/* v4.5 agenda (reference layout) */
.agenda-more { position: relative; }
.agenda-more > summary { list-style: none; cursor: pointer; }
.agenda-more > summary::-webkit-details-marker { display: none; }
.agenda-more__list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: flex; flex-wrap: wrap; gap: 8px; width: max-content; max-width: min(420px, 80vw); padding: 10px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,.1)); box-shadow: 0 14px 34px -14px rgba(0,0,0,.3); }
.item__todo { font-size: 14.5px; color: var(--text); margin-top: 1px; }
.item__todo.is-overdue { color: #b42318; }
.item__last { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; min-width: 0; }
.item__last .icon { flex-shrink: 0; }
.item--compact .item__title { font-size: 17px; font-weight: 700; }
.goal-day { padding: 18px 20px; }
.goal-day__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.goal-day__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: #202D29; }
.goal-day__title .icon { color: #009B68; }
.goal-day__head b { font-size: 16px; }
.goal-day__bar { height: 8px; border-radius: 999px; background: rgba(0, 155, 104,.12); overflow: hidden; margin: 12px 0 8px; }
.goal-day__bar i { display: block; height: 100%; border-radius: 999px; background: #009B68; }
.goal-day__msg { margin: 0; font-size: 14px; color: var(--muted); }
.goal-day.is-done .goal-day__msg { color: #007A52; font-weight: 600; }
.quick-inline__head { flex-direction: column; align-items: flex-start; gap: 2px; }
.quick-inline__head p { margin: 0; font-size: 14px; color: var(--muted); }
.quick-inline__save { width: 100%; height: 48px; justify-content: center; font-size: 16px; font-weight: 700; border-radius: 12px; gap: 10px; }
.quick-inline__links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-inline__links .quick-inline__import { margin-top: 0; font-size: 15px; }
.quick-inline__review { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.quick-inline__hint { display: inline-block; }
.item__last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.item__last .icon { vertical-align: -2px; margin-right: 6px; }

/* v4.6 official palette */
:root, .agenda-main, .fcol, .queue-now {
  --primary: #009B68;
  --fa-orange: #009B68;
  --primary-deep: #007A52;
  --primary-soft: #E4F5EC;
  --primary-tint: rgba(0, 155, 104, 0.07);
  --on-primary: #FFFFFF;
  --bg: #F7F4EE;
  --surface: #FCFAF7;
  --surface-2: #F2EEE7;
  --text: #202D29;
  --border: #E5E0D8;
  --border-strong: #D6CFC4;
}
body { background: #F7F4EE; color: #202D29; }
.card, .item, .cp-card, .goal-day, .owner-stats > div { background: #FCFAF7; border-color: #E5E0D8; }
input, select, textarea { background-color: #FCFAF7; border-color: #E5E0D8; color: #202D29; }
.quick-inline__form textarea, .cp-textarea { background: #FCFAF7; border-color: #E5E0D8; }
.rail, .bottom-nav { background: #211F1C; }
.rail .nav__link.is-active { background: #1E3A2D; }
.rail .nav__link.is-active .icon, .rail .brand__app { color: #7AFFBC; }
.rail .nav__count, .rail .rail-quick, .btn--primary { background: #009B68; color: #FFFFFF; }
.btn--primary:hover, .rail .rail-quick:hover { background: #007A52; }
.agenda-chip.is-active, .cp-tab.is-active { background: #009B68; border-color: #009B68; color: #FFFFFF; }
.cp-tab.is-active { background: #E4F5EC; border-color: #E4F5EC; color: #007A52; }
.cp-stage, .cp-add, .agenda-chip__n, .welcome, .cp-next-action, .imp-drop, .owner-src { background-color: #E4F5EC; }
.auth-card { background: #FCFAF7; color: #202D29; }
.auth-gate { background: radial-gradient(1200px 600px at 20% 0%, rgba(122, 255, 188, 0.16), transparent 60%), #211F1C; }
.auth-ok { margin: 0; padding: 12px 14px; border-radius: 10px; background: #E4F5EC; color: #007A52; font-size: 14.5px; line-height: 1.5; }

/* v4.7.2 Lembretes page: cards fill each column without gaps (mural) */
.overview-grid { display: block; columns: 3 340px; column-gap: 16px; }
.overview-grid > * { break-inside: avoid; margin: 0 0 16px; width: 100%; display: inline-block; }
.overview-grid > [hidden] { display: none !important; }
@media (min-width: 1500px) { .overview-grid { columns: 4 320px; } }
.stat-mini__of { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* v4.7.2 values and "premium" in the official palette (the old caramel/gold came from the previous brand) */
:root, .agenda-main, .fcol, .queue-now {
  --gold: #009B68;
  --gold-deep: #007A52;
  --gold-soft: #E4F5EC;
  --fa-caramel: #007A52;
}
.premium, .premium .icon { color: #007A52; }
.premium { background: #E4F5EC; border-color: rgba(0, 155, 104, 0.25); }
.btn--gold, .badge--gold { background: #E4F5EC; color: #007A52; border-color: rgba(0, 155, 104, 0.3); }
.is-high, .num.is-high, .fcard__value.is-high, .closing__value.is-high, .queue-now__value.is-high, .profile__value.is-high strong { color: #007A52; }
.item__obs-label { color: #007A52; }
/* priority "média" keeps its own amber so it does not look like "baixa" */
.prio--medium { background: #FBF1DC; color: #8A5A00; border-color: rgba(138, 90, 0, 0.25); }

/* v4.7.2 phone fixes */
@media (max-width: 900px) { .intel-cols { grid-template-columns: minmax(0, 1fr); } }
.intel-cols > *, .cp-grid > *, .agenda-layout > *, .overview-grid > * { min-width: 0; }
.seg { max-width: 100%; flex-wrap: wrap; }
@media (max-width: 640px) {
  .agenda-more { flex-basis: 100%; }
  .agenda-more__list { position: static; width: 100%; max-width: none; margin-top: 8px; box-shadow: none; }
  .page__head { flex-wrap: wrap; }
  .mini__main, .mini__title, .mini__sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
.dialog__foot { flex-wrap: wrap; }
@media (max-width: 640px) { .dialog__foot .btn { flex: 1 1 auto; justify-content: center; } dialog.dialog { max-width: calc(100vw - 16px); } }
