/* Variáveis de tema (Modo Claro padrão e Modo Escuro) */
:root,
:root[data-theme="light"] {
  --bg: #f3f3f2;
  --surface: #ffffff;
  --bubble: #ffffff;
  --ink: #111113;
  --muted: #7c7c82;
  --line: #e5e5e8;
  --dark: #1c1c1e;
  --dark-ink: #f2f2f4;
  --dark-muted: #8e8e93;
  --accent: #ad0503;
  --accent-fg: #ad0503;
  --accent-ink: #ffffff;
  --accent-soft: rgba(173, 5, 3, 0.12);
  --accent-line: rgba(173, 5, 3, 0.36);
  --alert: #e5484d;
  --err: #dc2626;
  --err-bg: rgba(220, 38, 38, 0.1);
  --warn: #f5a524;
  --warn-bg: rgba(245, 165, 36, 0.14);
  --warn-fg: #b45309;
  --ok: #30a46c;
  --ok-bg: rgba(48, 164, 108, 0.14);
  --card: #ffffff;
  --surface-2: #f7f7f8;
  --me: #111113;
  --me-ink: #ffffff;
  --ev-bg: rgba(173, 5, 3, 0.08);
  --ev-sub: #7a2d2c;
  --ev-warn-bg: #fdeeee;
  --ev-warn-sub: #9b5b5d;
  --pill-bg: #e6e6ea;
  --pill-active: #ffffff;
  --card-active-bg: #ad0503;
  --card-active-ink: #ffffff;
  --card-active-muted: rgba(255, 255, 255, 0.8);
  --chart-stroke: #ad0503;
  --chart-fill: rgba(173, 5, 3, 0.12);
  --chart-prev: #a1a1aa;
  --cal-vencimento: #e5484d;
  --cal-treino: #2563eb;
  --cal-checkin: #16a34a;
  --cal-avaliacao: #d97706;
  --cal-agenda: #7c3aed;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --bubble: #1c1c1e;
  --ink: #f2f2f4;
  --muted: #8e8e93;
  --line: #2c2c30;
  --dark: #141416;
  --dark-ink: #f2f2f4;
  --dark-muted: #8e8e93;
  --accent: #ad0503;
  --accent-fg: #ff5b59;
  --accent-ink: #ffffff;
  --accent-soft: rgba(173, 5, 3, 0.22);
  --accent-line: rgba(255, 91, 89, 0.42);
  --alert: #ff5c61;
  --err: #ff6b6e;
  --err-bg: rgba(229, 72, 77, 0.18);
  --warn: #f5a524;
  --warn-bg: rgba(245, 165, 36, 0.18);
  --warn-fg: #fbbf24;
  --ok: #30a46c;
  --ok-bg: rgba(48, 164, 108, 0.2);
  --card: #1c1c1e;
  --surface-2: #242428;
  --me: #ad0503;
  --me-ink: #ffffff;
  --ev-bg: #2a1213;
  --ev-sub: #f0a4a3;
  --ev-warn-bg: #33191b;
  --ev-warn-sub: #f09a9d;
  --pill-bg: #242428;
  --pill-active: #34343a;
  --card-active-bg: #ad0503;
  --card-active-ink: #ffffff;
  --card-active-muted: rgba(255, 255, 255, 0.8);
  --chart-stroke: #ff5b59;
  --chart-fill: rgba(173, 5, 3, 0.18);
  --chart-prev: #636369;
  --cal-vencimento: #ff5c61;
  --cal-treino: #60a5fa;
  --cal-checkin: #34d399;
  --cal-avaliacao: #fbbf24;
  --cal-agenda: #a78bfa;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Botão único de Tema (Lua no claro, Sol no escuro) */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bubble);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:active {
  transform: scale(0.93);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: none;
}

:root[data-theme="light"] .theme-toggle .ico-moon {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .ico-sun {
  display: block;
}

@keyframes uiViewEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Views com rolagem interna independente da dock inferior */
.view {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
}

.view.on {
  display: flex;
  animation: uiViewEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* DASHBOARD - AGENDA SUPERIOR */
.agenda {
  background: var(--surface);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px;
  position: relative;
  z-index: 3;
  color: var(--ink);
}

.agenda-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-left: 0;
}

.brand-logo .brand-img-light {
  display: none;
}

:root[data-theme="dark"] .brand-logo .brand-img-dark {
  display: none;
}

:root[data-theme="dark"] .brand-logo .brand-img-light {
  display: block;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}

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

.dash-logo {
  height: 28px;
}

.hd-logo {
  height: 25px;
}

.agenda-brand {
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: none;
}

.hd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.agenda-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.slot {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  min-height: 46px;
  border-top: 1px solid var(--line);
  padding: 6px 0;
  font-size: 11px;
  color: var(--muted);
}

.slot:first-child {
  border-top: 0;
}

.ev {
  background: var(--ev-bg);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  text-align: left;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  font-family: inherit;
  cursor: pointer;
}

.ev small {
  display: block;
  font-weight: 400;
  color: var(--ev-sub);
  font-size: 11px;
  margin-top: 2px;
}

.ev.warn {
  background: var(--ev-warn-bg);
  border-color: var(--alert);
}

.ev.warn small {
  color: var(--ev-warn-sub);
}

.ev.empty {
  background: var(--pill-bg);
  border-color: var(--muted);
  color: var(--muted);
}

/* CABEÇALHO DE DATA FIXO NO TOPO */
.dateline {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--surface);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] .dateline {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.62), 0 3px 10px rgba(0, 0, 0, 0.42);
}

.dow {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dow i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert);
  margin-left: 4px;
  vertical-align: middle;
}

.dow i[hidden] {
  display: none;
}

.month {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  text-transform: capitalize;
}

.day {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* CARD ESCURO DE TAREFAS (PARA FAZER) */
.todo {
  background: var(--dark);
  color: var(--dark-ink);
  margin: 14px 14px 0;
  padding: 14px 14px 12px;
  border-radius: 22px;
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.todo-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  min-height: 20px;
}

.todo-hd h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.clear-done-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f2f2f4;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.clear-done-btn[hidden] {
  display: none !important;
}

.ag-tasks-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 24px;
}

.ag-tasks-bar span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.clear-done-light {
  background: var(--bubble);
  border: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.clear-done-light[hidden] {
  display: none !important;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.task-row:last-of-type {
  border-bottom: 0;
}

.task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  flex: 1;
  min-width: 0;
  text-align: left;
  font-family: inherit;
}

.task-check-btn {
  background: none;
  border: 0;
  padding: 6px 4px 6px 0;
  margin: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ag-task-row .task-check-btn {
  padding: 4px 2px 4px 0;
}

.task-check-btn:hover .box {
  border-color: var(--accent-fg);
}

.task-check-btn .box,
.task .box,
.ag-task .box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #77777c;
  flex: none;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.task-row.done .box,
.ag-task-row.done .box,
.task.done .box,
.ag-task.done .box {
  background: var(--accent);
  border-color: var(--accent);
}

.task-row.done .box::after,
.ag-task-row.done .box::after,
.task.done .box::after,
.ag-task.done .box::after {
  content: "";
  width: 5px;
  height: 2.5px;
  border-left: 1.8px solid var(--accent-ink);
  border-bottom: 1.8px solid var(--accent-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}

.task-row.done .t,
.ag-task-row.done .t,
.task.done .t,
.ag-task.done .t {
  text-decoration: line-through;
  color: var(--dark-muted);
}

.task-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 8px;
  row-gap: 1px;
}

.task .t,
.ag-task .t {
  flex: 1 0 auto;
  max-width: 100%;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.task-note {
  font-weight: 600;
  color: var(--accent-fg);
}

.todo .task-note {
  color: #f6c453;
}

.task-obs-add {
  font-size: 10.5px;
  color: var(--dark-muted);
  margin-left: 6px;
  opacity: 0.72;
  white-space: nowrap;
}

.task:hover .task-obs-add,
.ag-task:hover .task-obs-add {
  opacity: 1;
}

.prio-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.prio-dot.alta {
  background: var(--alert);
}

.prio-dot.media {
  background: var(--warn);
}

.task .tag,
.ag-task .tag {
  font-size: 10px;
  color: var(--dark-muted);
  text-align: left;
  line-height: 1.15;
  flex: none;
  white-space: nowrap;
}

.todo .task .tag {
  color: rgba(255, 255, 255, 0.72);
}

.task .tag.hot,
.ag-task .tag.hot {
  color: var(--alert);
  font-weight: 700;
  font-size: 10.5px;
}

.todo .task .tag.hot {
  color: #ff7a7e;
}

.task .tag.med,
.ag-task .tag.med {
  color: var(--warn);
  font-weight: 700;
  font-size: 10.5px;
}

.todo .task .tag.med {
  color: #fbbf24;
}

.task-edit-btn {
  background: none;
  border: 0;
  color: var(--dark-muted);
  font-size: 16px;
  line-height: 1;
  padding: 3px 4px;
  cursor: pointer;
  flex: none;
}

.todo .task-edit-btn {
  color: rgba(255, 255, 255, 0.74);
}

.todo .task-edit-btn:hover {
  color: #ffffff;
}

.add {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 0 0;
  color: #ffffff;
  font-size: 14px;
}

.add input {
  background: none;
  border: 0;
  outline: 0;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  width: 100%;
}

.add input::placeholder {
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
}

.add .plus {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: none;
}

.add .plus svg {
  display: block;
}

/* ASSISTENTE */
.assistant {
  flex: 1 0 auto;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.who .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.who-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.btn-clear-chat {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-clear-chat:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong, var(--muted));
}

.btn-clear-chat:disabled {
  opacity: 0.45;
  cursor: default;
}

.status-pill {
  margin-left: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-pill .sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

.status-pill.cloud .sdot {
  background: var(--ok);
}

.msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m {
  max-width: 88%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.42;
  background: var(--bubble);
  border: 1px solid var(--line);
}

.m.me {
  align-self: flex-end;
  background: var(--me);
  color: var(--me-ink);
  border-color: transparent;
}

.m p {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.m p:last-child {
  margin: 0;
}

.m .m-hd {
  margin: 8px 0 4px;
  font-weight: 700;
  color: var(--ink);
}

.m .m-hd:first-child {
  margin-top: 0;
}

.m .m-li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 3px 0;
}

.m .m-li:last-child {
  margin-bottom: 0;
}

.m .m-dot {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.42;
}

.m .m-num {
  flex: 0 0 auto;
  min-width: 18px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.5;
}

.m .m-li-body {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.m.me .m-dot,
.m.me .m-num,
.m.me .m-hd {
  color: inherit;
}

.m strong {
  font-weight: 600;
}

.m em {
  font-style: italic;
  opacity: 0.88;
}

.m .m-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.msg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kpi {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 11px;
  min-width: 0;
}

.kpi-privacy,
.kpi-cash {
  position: relative;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.kpi-privacy:active,
.kpi-cash:active {
  transform: scale(0.98);
}

.kpi-privacy b,
.kpi-cash b {
  padding-right: 22px;
}

.kpi-eye-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kpi-eye-btn:hover {
  color: var(--ink);
}

.kpi-eye-btn svg {
  display: block;
  pointer-events: none;
}

button.kpi {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

button.kpi:active {
  transform: scale(0.98);
}

button.kpi.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.kpi b {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.25;
}

.kpis-cli {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kpis-cli .kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpis-cli .kpi .kpi-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 0;
}

.kpis-cli .kpi .kpi-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.cli-mode-switch {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.cli-mode-opt {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.cli-mode-opt.active-mode {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-fg);
}

.cli-mode-sep {
  color: var(--muted);
  font-size: 12px;
}

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--bubble);
  color: inherit;
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* PENDÊNCIAS NO DASHBOARD */
.dash-pend-card {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin: 12px 14px 8px;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#dashPendList {
  display: flex;
  flex-direction: column;
}

.dash-pend-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-pend-hd h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-pend-links {
  display: flex;
  gap: 6px;
}

.dash-pend-pill {
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.dash-pend-pill.x {
  color: var(--alert);
  border-color: rgba(229, 72, 77, 0.35);
}

.dash-pend-pill.c {
  color: var(--warn);
  border-color: rgba(245, 165, 36, 0.4);
}

.pend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pend-item:first-child {
  padding-top: 2px;
  border-top: 0;
}

.pend-item:last-child {
  padding-bottom: 4px;
}

.pend-info {
  min-width: 180px;
  flex: 1 1 200px;
}

.pend-name {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pend-name-link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.pend-name-link:hover {
  text-decoration: underline;
  color: var(--accent-fg);
}

.pend-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.pend-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.pend-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
}

.pend-btn.alt {
  background: transparent;
  color: var(--muted);
}

.pend-btn:active {
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* PÁGINAS INTERNAS */
.page {
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 20px;
  gap: 12px;
  color: var(--ink);
}

.page > *,
#v-dashboard > *,
.dash-main-col > *,
.cli-main-col > *,
.fin-main-col > *,
.ag-cal-col > *,
.ag-feed-col > *,
.cfg-panels-col > * {
  flex-shrink: 0;
}

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
}

.hd h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  flex: 1;
  min-width: 0;
  text-transform: capitalize;
}

.hd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.cta {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover {
  filter: brightness(1.06);
}

.cta:active {
  transform: scale(0.97);
}

.card {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.row > div:first-child {
  min-width: 0;
  flex: 1;
}

.row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.row:first-child {
  padding-top: 0;
}

.row b {
  font-size: 15px;
  display: block;
}

.fin-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.fin-cli-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 2px;
}

.fin-cli-link:hover,
.fin-cli-link:active {
  color: var(--accent-fg);
}

.row span {
  font-size: 12.5px;
  color: var(--muted);
}

#agendaGroups {
  display: flex;
  flex-direction: column;
}

.day-h {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  margin: 14px 4px 6px;
  font-weight: 600;
}

.day-h:first-child {
  margin-top: 2px;
}

.ag-ev-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: none;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  white-space: nowrap;
  vertical-align: middle;
}

.badge.w {
  background: rgba(245, 165, 36, 0.16);
  color: var(--warn);
}

.badge.x {
  background: rgba(229, 72, 77, 0.14);
  color: var(--alert);
}

.badge.t {
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.badge.out {
  background: rgba(142, 142, 147, 0.16);
  color: var(--muted);
}

.badge.cat-vencimento {
  background: rgba(229, 72, 77, 0.14);
  color: var(--cal-vencimento);
}

.badge.cat-treino {
  background: rgba(37, 99, 235, 0.14);
  color: var(--cal-treino);
}

.badge.cat-checkin {
  background: rgba(22, 163, 74, 0.14);
  color: var(--cal-checkin);
}

.badge.cat-avaliacao {
  background: rgba(217, 119, 6, 0.15);
  color: var(--cal-avaliacao);
}

.badge.cat-agenda {
  background: rgba(124, 58, 237, 0.14);
  color: var(--cal-agenda);
}

:root[data-theme="dark"] .badge.cat-treino {
  background: rgba(96, 165, 250, 0.18);
}

:root[data-theme="dark"] .badge.cat-checkin {
  background: rgba(52, 211, 153, 0.18);
}

:root[data-theme="dark"] .badge.cat-avaliacao {
  background: rgba(251, 191, 36, 0.18);
}

:root[data-theme="dark"] .badge.cat-agenda {
  background: rgba(167, 139, 250, 0.18);
}

.cal-cat-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex: none;
}

.task-meta-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

#calSelectedDayFeed [data-cal-cat],
#agendaGroups [data-cal-cat],
#agTaskList [data-cal-cat] {
  border-left: 3px solid transparent;
  padding-left: 10px;
}

#calSelectedDayFeed [data-cal-cat="vencimento"],
#agendaGroups [data-cal-cat="vencimento"],
#agTaskList [data-cal-cat="vencimento"] {
  border-left-color: var(--cal-vencimento);
}

#calSelectedDayFeed [data-cal-cat="treino"],
#agendaGroups [data-cal-cat="treino"],
#agTaskList [data-cal-cat="treino"] {
  border-left-color: var(--cal-treino);
}

#calSelectedDayFeed [data-cal-cat="checkin"],
#agendaGroups [data-cal-cat="checkin"],
#agTaskList [data-cal-cat="checkin"] {
  border-left-color: var(--cal-checkin);
}

#calSelectedDayFeed [data-cal-cat="avaliacao"],
#agendaGroups [data-cal-cat="avaliacao"],
#agTaskList [data-cal-cat="avaliacao"] {
  border-left-color: var(--cal-avaliacao);
}

#calSelectedDayFeed [data-cal-cat="agenda"],
#agendaGroups [data-cal-cat="agenda"],
#agTaskList [data-cal-cat="agenda"] {
  border-left-color: var(--cal-agenda);
}

.btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--muted);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn.p {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn.del {
  color: var(--alert);
  border-color: rgba(229, 72, 77, 0.35);
}

.btn.del.confirm {
  background: var(--alert);
  color: #ffffff;
  border-color: var(--alert);
  font-weight: 600;
}

/* CONTROLES E FILTROS */
.field {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 12px;
  font: inherit;
  font-size: 16px;
  color: inherit;
  outline: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

input.field:not([type="checkbox"]):not([type="radio"]),
select.field {
  height: 42px;
  min-height: 42px;
  line-height: 22px;
  box-sizing: border-box;
}

select.field,
.filters select {
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.015em;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-left: 10px;
  padding-right: 22px;
}

select.field::picker-icon,
.filters select::picker-icon {
  display: none;
}

input[type="date"].field,
input[type="time"].field {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  display: block;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 22px;
  color-scheme: light;
}

:root[data-theme="dark"] input[type="date"].field,
:root[data-theme="dark"] input[type="time"].field {
  color-scheme: dark;
}

.metric-panel label:not(.switch-ctl):not(.chk):not(.evo-photo-card),
.fin-custom-range label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filters select {
  font-size: 13.5px;
}

.filter-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 2px 4px;
}

.filter-note[hidden] {
  display: none;
}

.filter-note button {
  background: none;
  border: 0;
  color: var(--accent-fg);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  overflow: visible;
}

.acts[hidden] {
  display: none;
}

.acts .btn {
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  flex: 1 1 auto;
  text-align: center;
}

.cli-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.cli-left-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.row.cli-row-select {
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.row.cli-row-select.is-selected {
  background: var(--ev-bg);
}

.cli-sel-check {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
  margin: 0;
}

.cli-name-btn {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.cli-name-btn b {
  display: block;
  font-size: 15px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.cli-sub-line {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
  cursor: pointer;
}

.cli-sub-line::-webkit-scrollbar {
  display: none;
}

.cli-badges-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.cli-badges-line::-webkit-scrollbar {
  display: none;
}

.cli-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
}

.cli-more-btn {
  width: 28px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

@keyframes uiMenuPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cli-menu {
  position: absolute;
  left: 0;
  top: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  z-index: 20;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transform-origin: top left;
  animation: uiMenuPop 0.17s cubic-bezier(0.22, 1, 0.36, 1);
}

.cli-menu[hidden] {
  display: none !important;
}

.cli-menu button {
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.cli-menu button.del-opt {
  color: var(--alert);
}

.cli-menu button.del-opt.confirm {
  background: var(--alert);
  color: #ffffff;
  font-weight: 600;
}

/* FINANCEIRO: CARDS KPI, GRÁFICO E CANAIS */
.fin-kpis-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fin-kpi-card {
  position: relative;
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 13px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.12s ease, border-color 0.2s ease;
}

.fin-kpi-card:active {
  transform: scale(0.98);
}

.fin-kpi-card.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.fin-kpi-lbl {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  padding-right: 22px;
}

.info-i-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.info-i-btn:hover,
.info-i-btn:active {
  border-color: var(--accent);
  color: var(--accent-fg);
  background: var(--ev-bg);
}

.fin-kpi-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fin-analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-card,
.split-card {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
}

.fin-chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.fin-chart-top .chart-title {
  margin: 0;
}

.fin-chart-seg {
  display: inline-flex;
  align-items: stretch;
  background: var(--pill-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
  flex: none;
}

.fin-chart-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.fin-chart-seg button.on {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.chart-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.chart-big-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 2px;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ok-bg);
  color: var(--ok);
}

.chart-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.leg-item.off {
  opacity: 0.45;
}

.leg-line {
  width: 12px;
  height: 2px;
  background: var(--chart-stroke);
  display: inline-block;
}

.leg-line.dashed {
  background: none;
  border-top: 2px dashed var(--chart-prev);
}

.leg-line.trend {
  background: none;
  border-top: 2px dashed var(--warn);
}

.chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 150;
  min-height: 138px;
  max-height: 190px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 10;
  min-width: 145px;
  max-width: 240px;
}

.chart-tooltip.on {
  opacity: 1;
}

.chart-tooltip-hd {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
}

.chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
}

.chart-tooltip-row b {
  color: var(--ink);
  font-weight: 700;
}

.chart-pt-halo {
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.chart-pt.is-active .chart-pt-halo {
  opacity: 1;
}

.evo-x-lbl {
  transition: opacity 0.14s ease, fill 0.14s ease;
}

.evo-x-lbl.is-active {
  opacity: 0;
}

.chart-guide-line {
  stroke: var(--accent);
  stroke-width: 1.35;
  stroke-dasharray: 3 3;
  transition: opacity 0.14s ease;
}

.evo-active-xlabel {
  transition: opacity 0.14s ease;
}

.evo-active-xlabel rect {
  fill: var(--accent);
  filter: drop-shadow(0 2px 6px rgba(173, 5, 3, 0.28));
}

.evo-active-xlabel text {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#evoCompactWeightBody tr.is-range-selected td {
  background: rgba(173, 5, 3, 0.08);
  transition: background-color 0.16s ease;
}

#evoCompactWeightBody tr.is-range-selected td:first-child {
  color: var(--accent-fg);
  font-weight: 700;
  box-shadow: inset 3px 0 0 rgba(173, 5, 3, 0.55);
}

#evoCompactWeightBody tr.is-range-endpoint td {
  background: rgba(173, 5, 3, 0.12);
}

#evoCompactWeightBody tr.is-range-endpoint td:first-child {
  box-shadow: inset 3.5px 0 0 var(--accent);
}

#evoCompactWeightBody tr.is-week-active td {
  background: rgba(173, 5, 3, 0.13);
  transition: background-color 0.16s ease;
}

#evoCompactWeightBody tr.is-week-active td:first-child {
  color: var(--accent-fg);
  box-shadow: inset 3px 0 0 var(--accent);
}

.evo-x-lbl.is-in-range {
  fill: var(--accent-fg);
  font-weight: 700;
}

.evo-x-lbl.is-range-endpoint {
  fill: var(--accent);
  font-weight: 800;
}

.evo-chart-selection {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(173, 5, 3, 0.22);
  background: rgba(173, 5, 3, 0.045);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evo-chart-selection[hidden] {
  display: none !important;
}

.evo-goal-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.evo-cs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.evo-cs-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
}

.evo-cs-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.evo-cs-span-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.evo-cs-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.evo-cs-clear {
  flex-shrink: 0;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.evo-cs-clear:hover {
  border-color: var(--accent);
  color: var(--accent-fg);
  background: rgba(173, 5, 3, 0.06);
}

.evo-cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evo-cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink);
}

.evo-cs-chip > span:first-child {
  color: var(--muted);
  font-size: 11px;
}

.split-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.split-pcts {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.split-pcts strong {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.split-pcts small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.split-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
  margin-bottom: 12px;
}

.split-bar-fill {
  height: 100%;
  background: var(--card-active-bg);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.split-row:last-child {
  padding-bottom: 0;
}

.split-row-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.split-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--card-active-bg);
  flex: none;
}

.split-dot.alt {
  background: var(--muted);
}

.split-row-left b {
  display: block;
  font-size: 13.5px;
}

.split-row-left span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.split-row-right {
  text-align: right;
  flex: none;
}

.split-row-right b {
  display: block;
  font-size: 14.5px;
}

/* MÓDULOS DE MÉTRICAS AVANÇADAS */
.metrics-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-panel {
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mp-hd h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mp-hd small {
  font-size: 11.5px;
  color: var(--muted);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.forecast-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.f-box {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 14px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.f-box.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.f-box span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.f-box b {
  display: block;
  font-size: 15px;
  margin-top: 2px;
}

.f-box .f-diff {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
}

.f-box .f-diff.pos {
  color: var(--ok);
}

.f-box .f-diff.neg {
  color: var(--alert);
}

.f-box em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.plan-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pb-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pb-top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.pb-track {
  height: 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}

.pb-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.meta-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}

.meta-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
  transition: width 0.25s ease;
}

.goal-edit-box {
  display: flex;
  gap: 6px;
  align-items: center;
}

.goal-edit-box[hidden] {
  display: none !important;
}

.cost-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cost-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.cost-item:last-child {
  border-bottom: 0;
}

.cost-add {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  gap: 6px;
}

.mini-stats-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ms-box {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 11px;
}

.ms-box span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  padding-right: 22px;
}

.ms-box b {
  display: block;
  font-size: 16px;
  margin-top: 2px;
}

.ms-box small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* PÍLULAS DE ORGANIZAÇÃO MOBILE */
.mob-pills-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  min-height: 38px;
  flex-shrink: 0;
  scrollbar-width: none;
}

.mob-pills-bar::-webkit-scrollbar {
  display: none;
}

.mob-pill {
  flex: none;
  border: 1px solid var(--line);
  background: var(--bubble);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.mob-pill.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

/* Seções controladas por pílula no Mobile */
#v-financeiro .fin-sec {
  display: none;
}

#v-financeiro[data-mob-sec="lancamentos"] .fin-sec-lancamentos {
  display: block;
}

#v-financeiro[data-mob-sec="lancamentos"] .fin-analytics-grid.fin-sec-lancamentos {
  display: flex;
}

#v-financeiro[data-mob-sec="lancamentos"] .filter-note.fin-sec-lancamentos {
  display: flex;
}

#v-financeiro[data-mob-sec="lancamentos"] .filter-note[hidden] {
  display: none;
}

#v-financeiro[data-mob-sec="previsao"] .fin-sec-previsao,
#v-financeiro[data-mob-sec="planos"] .fin-sec-planos,
#v-financeiro[data-mob-sec="lancamentos"] #finDiscountsPanel {
  display: flex;
}

.health-period-pills {
  margin-bottom: 2px;
}

.health-period-pills .mob-pill {
  padding: 6px 12px;
  font-size: 12px;
}

.fin-custom-range {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fin-custom-range[hidden] {
  display: none;
}

.health-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-sub-hd {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12.5px;
}

.health-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

#v-clientes .cli-sec {
  display: none;
}

#v-clientes[data-mob-sec="alunos"] .cli-sec-alunos {
  display: block;
}

#v-clientes[data-mob-sec="alunos"] .cli-search-row.cli-sec-alunos,
#v-clientes[data-mob-sec="alunos"] .cli-multi-bar.cli-sec-alunos,
#v-clientes[data-mob-sec="alunos"] .filter-note.cli-sec-alunos,
#v-clientes[data-mob-sec="alunos"] .cli-sort-bar.cli-sec-alunos {
  display: flex;
}

#v-clientes[data-mob-sec="alunos"] .cli-multi-bar[hidden],
.cli-multi-bar[hidden],
#v-clientes[data-mob-sec="alunos"] .cli-sort-bar[hidden],
.cli-sort-bar[hidden] {
  display: none !important;
}

.cli-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
}

.cli-search-row .field {
  flex: 1;
  min-width: 0;
}

.cli-select-toggle {
  flex: none;
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.cli-select-toggle.on {
  border-color: var(--accent);
  color: var(--accent-fg);
  background: var(--ev-bg);
}

.cli-multi-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
}

.cli-multi-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.cli-multi-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.cli-multi-bar .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.danger-fill {
  background: var(--alert);
  border-color: var(--alert);
  color: #ffffff;
  font-weight: 600;
}

.btn.danger-fill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cli-sort-bar {
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 36px;
  gap: 6px;
  overflow: visible;
  padding: 2px 0;
  position: relative;
  z-index: 2;
}

#v-clientes .filter-note,
#v-clientes .cli-multi-bar,
#v-clientes #clientList {
  flex: 0 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.cli-sort-bar .sort-pill {
  flex: 0 0 auto;
  white-space: nowrap;
  height: auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cli-sort-bar::-webkit-scrollbar {
  display: none;
}

.sort-pill {
  flex: none;
  border: 1px solid var(--line);
  background: var(--bubble);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.sort-pill.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.sort-pill.sort-dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-arrow {
  width: 13px;
  height: 13px;
  flex: none;
  transition: transform 0.18s ease;
}

.sort-pill.sort-dir[data-dir="desc"] .sort-arrow {
  transform: rotate(180deg);
}

.sort-pill.cli-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-pill.cli-filter-pill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.sort-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.sort-count[hidden] {
  display: none;
}

.sort-pill.cli-filter-pill.on .sort-count {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

#v-clientes[data-mob-sec="alunos"] .filter-note[hidden] {
  display: none;
}

#v-clientes[data-mob-sec="saude"] .cli-sec-saude,
#v-clientes[data-mob-sec="retencao"] .cli-sec-retencao,
#v-clientes[data-mob-sec="retencao"] .cli-sec-origem {
  display: flex;
}

/* AGENDA / TAREFAS */
#v-agenda .hd {
  flex-wrap: wrap;
  row-gap: 10px;
}

#v-agenda .seg {
  order: 3;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  background: var(--pill-bg);
  padding: 3px;
  border-radius: 999px;
}

.seg button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ag-clickable-ev {
  cursor: pointer;
}

.ag-clickable-ev:active {
  opacity: 0.72;
}

.appt-link-bar {
  display: flex;
  gap: 8px;
}

.appt-link-bar[hidden] {
  display: none !important;
}

.appt-link-bar .btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
}

.appt-plan-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.appt-plan-box[hidden] {
  display: none !important;
}

.appt-plan-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.appt-plan-hd label {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.appt-plan-hd small {
  color: var(--muted);
  font-size: 11px;
}

/* CONFIGURAÇÕES */
.cfg-plans-list,
.cfg-promo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cfg-plan-group-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--muted);
  padding: 6px 2px 0;
}

.cfg-plan-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cfg-plan-head strong {
  font-size: 14px;
}

.cfg-plan-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.cfg-promo-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfg-promo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cfg-promo-top strong {
  font-size: 14px;
}

.cfg-promo-meta {
  font-size: 12px;
  color: var(--muted);
}

.cfg-promo-actions {
  display: flex;
  gap: 8px;
}

.cfg-promo-actions .btn {
  padding: 5px 10px;
  font-size: 12px;
}

.seg button.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.ag-task-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.ag-task-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ag-task-row:first-child {
  padding-top: 0;
}

.ag-task {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font-family: inherit;
  padding: 0;
}

/* CALENDÁRIO */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
}

.cal-label {
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal b {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 4px 0;
}

.cal button {
  aspect-ratio: 1;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.cal button.today:not(.on) {
  border: 1.5px solid var(--accent);
  font-weight: 600;
}

.cal button.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.cal-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.cal-filters::-webkit-scrollbar {
  display: none;
}

.cal-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bubble);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.cal-pill.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.cal-pill[data-cal-f="vencimento"].on {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.cal-pill[data-cal-f="treino"].on {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.cal-pill[data-cal-f="checkin"].on {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.cal-pill[data-cal-f="avaliacao"].on {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

.cal-pill[data-cal-f="agenda"].on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.cal-dot-leg {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.cal-pill.on .cal-dot-leg {
  box-shadow: 0 0 0 1px var(--accent-ink);
}

.cal-dots {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5px;
}

.cal-dots i {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  display: block;
}

.cal button.on .cal-dots i {
  box-shadow: 0 0 0 1.4px rgba(255, 255, 255, 0.9);
}

.cal-day-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.cal-day-hd b {
  font-size: 14px;
}

/* DOCK INFERIOR MOBILE */
.bar {
  flex: none;
  width: 100%;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compose {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bubble);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 6px 5px 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.compose.hide {
  display: none;
}

.compose input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: inherit;
  min-width: 0;
}

.compose input::placeholder {
  color: var(--muted);
}

.ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.ic.send {
  background: var(--accent);
  color: var(--accent-ink);
}

.ic.rec {
  background: var(--alert);
  color: #ffffff;
  animation: pulse 1.1s infinite ease-in-out;
}

.ic:disabled {
  opacity: 0.55;
  cursor: default;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.tab {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  cursor: pointer;
}

.tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.on {
  color: var(--accent-fg);
  font-weight: 600;
}

.tab-desktop-only {
  display: none;
}

/* MODAIS */
body.modal-open .app {
  pointer-events: none !important;
}

body.modal-open .view {
  overflow: hidden !important;
  -webkit-overflow-scrolling: auto !important;
}

@keyframes uiModalBgIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes uiModalBgOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes uiSheetSlideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 44%, 0) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes uiSheetSlideDown {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 40%, 0) scale(0.985);
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  transform: translate3d(0, 0, 0);
  touch-action: manipulation;
}

.modal.on {
  display: flex;
  animation: uiModalBgIn 0.22s ease forwards;
}

.modal.closing {
  display: flex;
  pointer-events: none;
  animation: uiModalBgOut 0.2s ease forwards;
}

.sheet {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  max-height: 92dvh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  transform: translate3d(0, 0, 0);
  background: var(--surface);
  color: var(--ink);
  border-radius: 26px 26px 0 0;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.modal.on .sheet {
  will-change: transform, opacity;
  animation: uiSheetSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.modal.closing .sheet {
  will-change: transform, opacity;
  animation: uiSheetSlideDown 0.21s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 0 auto 2px;
  flex: none;
}

.sheet h2 {
  margin: 0 0 2px;
  font-size: 20px;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.grid2 > div {
  min-width: 0;
}

.sheet label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.sheet .chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  margin: 2px 0 0;
}

.sheet .chk input {
  width: 18px;
  height: 18px;
}

.sheet input[type="date"],
.sheet input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  display: block;
  padding: 8px 10px;
  font-size: 16px;
  line-height: 22px;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.sheet-actions .btn {
  padding: 11px 14px;
  font-size: 14px;
  flex: 1;
}

[hidden] {
  display: none !important;
}

.hint {
  font-size: 12.5px;
  color: var(--accent-fg);
  min-height: 16px;
  margin: 0;
}

.hint.err {
  color: var(--alert);
}

.sub-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

@keyframes uiToastIn {
  from {
    opacity: 0;
    transform: translate3d(-50%, 12px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: #1c1c1e;
  color: #f2f2f4;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: min(390px, calc(100vw - 32px));
  text-align: center;
  animation: uiToastIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast[hidden] {
  display: none;
}

/* BOTÃO DE DATA NO DASHBOARD */
button.dateline {
  width: 100%;
  border-left: 0;
  border-right: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease;
}

button.dateline:active {
  transform: scale(0.99);
}

/* AGENDA & CALENDÁRIO UNIFICADOS */
#v-agenda .seg {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#agEventsPane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 140px;
}

#agEventsPane[hidden] {
  display: none;
}

.cal-feed-hd {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 4px 2px;
}

#agendaGroups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-day-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 12px;
}

.cal-day-bar b {
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-day-group .day-h {
  margin: 4px 4px 6px;
  position: static;
}

.ag-row-tap {
  cursor: pointer;
  transition: opacity 0.12s ease, background-color 0.2s ease;
}

.ag-row-tap:active {
  opacity: 0.85;
}

.ag-row-btn {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ag-row-btn:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ag-row-btn > :first-child {
  min-width: 0;
  flex: 1;
}

.ag-row-btn .ag-clickable-ev {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ag-row-btn .ag-clickable-ev b,
.ag-ev-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.ag-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
}

.ag-ev-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.ag-row-chevron {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  flex: none;
}

.task-row .task:hover .t {
  color: var(--accent-fg);
}

.is-highlight {
  background: var(--accent-soft) !important;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--accent-line);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* FINANCEIRO MINI GRÁFICOS DE PREVISÃO */
.mini-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 2px;
}

.mini-chart-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.mc-hd b {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mc-hd b.pos {
  color: var(--ok);
}

.mc-hd b.neg {
  color: var(--alert);
}

.mini-chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 320 / 124;
  overflow: hidden;
}

#healthChartWrap {
  aspect-ratio: 320 / 132;
}

.mini-svg {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  display: block;
}

.mini-svg.health-svg {
  aspect-ratio: auto;
}

.mc-sub {
  display: flex;
  gap: 12px;
  font-size: 10.5px;
  color: var(--muted);
}

.mc-sub span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mc-dot {
  width: 8px;
  height: 2.5px;
  border-radius: 99px;
  display: inline-block;
}

.mc-dot.solid {
  background: var(--accent);
}

.mc-dot.dash {
  border-top: 2px dashed var(--chart-prev);
  height: 0;
  background: transparent;
}

.mc-dot.ok {
  background: var(--ok);
}

.mc-dot.warn {
  border-top: 2px dashed var(--alert);
  height: 0;
  background: transparent;
}

/* MENU E SUBPÁGINAS EM AJUSTES */
.cfg-menu-card {
  display: none;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

#v-config[data-cfg-sec="menu"] .cfg-menu-card {
  display: flex;
}

.cfg-menu-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.cfg-menu-row:first-child {
  border-top: 0;
}

.cfg-menu-row:active {
  background: var(--bg);
}

.cfg-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: #ffffff;
}

.cfg-ico svg {
  width: 19px;
  height: 19px;
}

.cfg-ico.ico-red { background: linear-gradient(135deg, #d91c18 0%, #990705 100%); }
.cfg-ico.ico-blue { background: #3b82f6; }
.cfg-ico.ico-amber { background: #f59e0b; }
.cfg-ico.ico-green { background: #10b981; }
.cfg-ico.ico-purple { background: #8b5cf6; }
.cfg-ico.ico-rose { background: #f43f5e; }
.cfg-ico.ico-slate { background: #64748b; }
.cfg-ico.ico-cyan { background: #06b6d4; }

.cfg-menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cfg-menu-text strong {
  font-size: 14.5px;
  font-weight: 600;
}

.cfg-menu-text span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfg-chev {
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  flex: none;
}

.cfg-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

#v-config[data-cfg-sec="menu"] .cfg-back-bar {
  display: none;
}

.cfg-back-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.cfg-back-bar b {
  font-size: 14.5px;
  font-weight: 700;
}

#v-config .cfg-sec {
  display: none;
}

#v-config[data-cfg-sec="macros"] .cfg-sec-macros,
#v-config[data-cfg-sec="planos"] .cfg-sec-planos,
#v-config[data-cfg-sec="promos"] .cfg-sec-promos,
#v-config[data-cfg-sec="financeiro"] .cfg-sec-financeiro,
#v-config[data-cfg-sec="formularios"] .cfg-sec-formularios,
#v-config[data-cfg-sec="automacoes"] .cfg-sec-automacoes,
#v-config[data-cfg-sec="regras"] .cfg-sec-regras,
#v-config[data-cfg-sec="notificacoes"] .cfg-sec-notificacoes,
#v-config[data-cfg-sec="backup"] .cfg-sec-backup,
#v-config[data-cfg-sec="nuvem"] .cfg-sec-nuvem {
  display: flex;
}

/* CALCULADORA DE MACROS */
.macro-goal-wrap label,
.macro-pct-head label {
  display: block;
  margin-bottom: 5px;
}

.macro-goals-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.macro-goals-bar.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.macro-client-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macro-client-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}

.macro-client-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.macro-client-pick-row .field {
  flex: 1;
  min-width: 0;
}

.macro-client-status {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.macro-client-status.is-warn {
  color: var(--warn-fg, #b45309);
  font-weight: 600;
}

.macro-goal-btn {
  border: 0;
  border-radius: 9px;
  padding: 8px 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.macro-goal-btn.on {
  background: var(--accent);
  color: #ffffff;
}

.macro-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.macro-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 6px;
}

#macroTargetWeightField.is-disabled,
#macroTimeField.is-disabled {
  opacity: 0.55;
}

.macro-pct-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.macro-pct-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.macro-pct-head label {
  margin: 0;
}

.macro-pct-acts {
  display: flex;
  align-items: center;
  gap: 6px;
}

.macro-auto-btn {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-fg);
  border-radius: 999px;
  padding: 2px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.macro-presets-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.macro-presets-row::-webkit-scrollbar {
  display: none;
}

.macro-presets-row .chip {
  flex: none;
  font-size: 11.5px;
  padding: 5px 10px;
}

.macro-presets-row .chip.on {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.macro-pct-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-pct-box small {
  font-size: 10.5px;
  color: var(--muted);
}

.macro-pct-bar {
  display: flex;
  height: 7px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
  gap: 2px;
}

.macro-pct-bar .mpb-p { background: #ef4444; transition: width 0.2s ease; }
.macro-pct-bar .mpb-c { background: #3b82f6; transition: width 0.2s ease; }
.macro-pct-bar .mpb-f { background: #f59e0b; transition: width 0.2s ease; }

.macro-alert {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 500;
}

.macro-alert.is-err {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.macro-alert.is-warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.macro-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.macro-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.macro-kpi {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.macro-kpi span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.macro-kpi b {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.macro-kpi small {
  font-size: 10.5px;
  color: var(--muted);
}

.macro-kpi.hero {
  background: linear-gradient(135deg, #c8100d 0%, #890402 100%);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.macro-kpi.hero span,
.macro-kpi.hero small {
  color: rgba(255, 255, 255, 0.86);
}

.macro-res-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.macro-res-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.macro-res-card .mrc-lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.macro-res-card .mrc-lbl em {
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
  margin-left: auto;
}

.macro-res-card .mrc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.macro-res-card.is-p .mrc-dot { background: #ef4444; }
.macro-res-card.is-c .mrc-dot { background: #3b82f6; }
.macro-res-card.is-f .mrc-dot { background: #f59e0b; }

.macro-res-card .mrc-val {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.macro-res-card small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.macro-inc-proj-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  margin: 2px 0;
}

.macro-inc-proj-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}

.med-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.med-box.is-active {
  border-color: var(--accent-line, rgba(220, 38, 38, 0.28));
  background: var(--accent-soft, rgba(220, 38, 38, 0.04));
}

.med-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.med-head label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.med-badge,
.evo-med-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-fg);
  background: var(--card);
  border: 1px solid var(--accent-line, rgba(220, 38, 38, 0.28));
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.med-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.med-details[hidden],
.med-badge[hidden],
.med-note[hidden],
.med-reset-btn[hidden],
.med-custom-name-wrap[hidden] {
  display: none;
}

.med-subgrid,
.med-custom-name-wrap,
.med-kcal-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.med-subgrid {
  display: grid;
}

.med-kcal-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.med-kcal-input-wrap .field {
  flex: 1;
  min-width: 0;
}

.med-reset-btn {
  flex: none;
  white-space: nowrap;
}

.med-note {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}

.evo-pm-med-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.macro-proj-card {
  gap: 12px;
}

.macro-proj-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.macro-chart-wrap {
  min-height: 180px;
}

.macro-proj-list-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.macro-proj-list-hd span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.macro-copy-proj-btn {
  padding: 5px 10px;
  font-size: 11.5px;
}

.macro-proj-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.macro-proj-empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.macro-proj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.macro-proj-row.is-target {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.macro-proj-row .mpr-left,
.macro-proj-row .mpr-right {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.macro-proj-row .mpr-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.macro-proj-row .mpr-left strong {
  font-size: 13px;
  font-weight: 700;
}

.macro-proj-row .mpr-left span {
  font-size: 11px;
  color: var(--muted);
}

.macro-proj-row .mpr-right b {
  font-size: 13.5px;
  font-weight: 800;
}

.macro-proj-row .mpr-right em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.macro-proj-row.is-target .mpr-left strong,
.macro-proj-row.is-target .mpr-right b {
  color: var(--accent-fg);
}

.macro-cond-wrap {
  position: relative;
}

.macro-cond-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.macro-cond-hd label {
  margin: 0 !important;
}

.macro-cond-hint {
  font-size: 11px;
  color: var(--muted);
}

.macro-cond-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.macro-cond-chips .chip {
  font-size: 12px;
  padding: 6px 11px;
}

.macro-cond-chips .chip.on {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.macro-cond-tooltip {
  position: absolute;
  z-index: 35;
  pointer-events: none;
  background: var(--ink);
  color: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  font-size: 11.5px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.macro-cond-tooltip[hidden] {
  display: none !important;
}

.macro-cond-tooltip .mct-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .macro-cond-tooltip .mct-hd {
  border-bottom-color: rgba(0, 0, 0, 0.18);
}

.macro-cond-tooltip .mct-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .macro-cond-tooltip .mct-badge {
  background: rgba(0, 0, 0, 0.14);
}

.macro-cond-tooltip .mct-row b {
  font-weight: 700;
}

.macro-cond-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-fg);
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.macro-cond-note-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 240px;
}

.macro-cond-note-sub {
  font-size: 11.5px;
  opacity: 0.92;
}

.macro-cond-apply-btn {
  border: 1px solid var(--accent-line);
  background: var(--surface);
  color: var(--accent-fg);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 520px) {
  .macro-kpis,
  .macro-res-grid {
    grid-template-columns: 1fr;
  }

  .macro-res-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .macro-res-card .mrc-lbl {
    min-width: 112px;
  }

  .macro-res-card .mrc-val {
    font-size: 17px;
  }
}

.cfg-mem-summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.cfg-mem-form {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.cfg-mem-form .btn {
  padding: 9px 14px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .cfg-mem-form {
    grid-template-columns: 1fr auto;
  }

  .cfg-mem-form select {
    grid-column: 1 / -1;
  }
}

.cfg-mem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.cfg-mem-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.cfg-mem-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cfg-mem-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfg-mem-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cfg-mem-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.cfg-mem-badge.auto {
  background: rgba(34, 197, 94, 0.14);
  color: var(--ok);
}

.cfg-mem-subj {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.cfg-mem-text {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}

.cfg-mem-src {
  font-size: 11px;
  color: var(--muted);
}

.notif-status-box,
.notif-opt-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notif-opt-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-opt-text strong {
  font-size: 13.5px;
  font-weight: 600;
}

.notif-opt-text span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.notif-sub-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.notif-sub-row > div {
  flex: 1;
  min-width: 0;
}

.notif-sub-row .btn {
  flex: none;
  padding: 9px 12px;
}

.switch-ctl {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex: none;
  cursor: pointer;
}

.switch-ctl input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.18s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}

.switch-ctl input:checked + .switch-slider {
  background: var(--ok);
}

.switch-ctl input:checked + .switch-slider::before {
  transform: translateX(18px);
}

/* DETALHE DO COMPROMISSO */
.ad-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ad-top-row h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.ad-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ad-meta {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.ad-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ad-meta-row span {
  color: var(--muted);
}

.ad-meta-row b {
  font-weight: 600;
  text-align: right;
}

.ad-link-box {
  background: var(--ev-bg);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-link-url {
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.35;
}

.ad-link-actions {
  display: flex;
  gap: 8px;
}

.ad-link-actions .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.ad-resched-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

/* MODAL INFORMAÇÃO & EXCLUSÃO EM LOTE */
.info-summary {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.info-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
}

.info-body p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

#infoSheet .sheet-actions {
  grid-template-columns: 1fr;
}

.md-names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.md-names-list span {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--ev-warn-bg);
  color: var(--ev-warn-sub);
  border-radius: 999px;
  padding: 4px 9px;
}

/* WRAPPERS RESPONSIVOS DESKTOP (TRANSPARENTES NO MOBILE < 960px) */
.sidebar-brand,
.ag-desk-task-btn {
  display: none;
}

.dash-main-col,
.fin-main-col,
.ag-cal-col,
.ag-feed-col,
.cfg-panels-col {
  display: contents;
}

#v-clientes .cli-main-col {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

#v-clientes[data-mob-sec="alunos"] .cli-main-col {
  display: flex;
}

.assistant-compose-slot:empty {
  display: none;
}

.ag-tasks-bar-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* VERSÃO DESKTOP (>= 960px) — SIDEBAR FIXA + LAYOUT MULTI-COLUNA */
@media (min-width: 960px) {
  .app {
    max-width: none;
    width: 100%;
    height: 100dvh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    transition: grid-template-columns 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Sidebar esquerda fixa (substitui a dock inferior mobile) */
  .bar {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    padding: 20px 14px 18px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    justify-content: flex-start;
    gap: 18px;
    z-index: 20;
    overflow-y: auto;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 6px 14px;
    border-bottom: 1px solid var(--line);
    flex: none;
  }

  .sidebar-brand-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 3px 5px;
    margin: -3px -5px;
    border-radius: 10px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.12s ease;
  }

  .sidebar-brand-left:hover {
    background: var(--pill-bg);
  }

  .sidebar-brand-left:active {
    transform: scale(0.98);
  }

  .sidebar-brand-left:focus-visible {
    outline: 2px solid var(--accent-line);
    outline-offset: 2px;
  }

  .sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .sidebar-brand-txt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .sidebar-brand-txt strong {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
  }

  .sidebar-brand-txt span {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.2;
  }

  .tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }

  .tab:hover {
    background: var(--pill-bg);
    color: var(--ink);
  }

  .tab.on {
    background: var(--accent-soft);
    color: var(--accent-fg);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .tab svg {
    width: 19px;
    height: 19px;
    flex: none;
  }

  /* Ocultar logos e alternadores duplicados nas views quando a sidebar já exibe */
  .hd .hd-logo,
  .hd .theme-toggle,
  .agenda-top .agenda-brand,
  .agenda-top .theme-toggle {
    display: none;
  }

  /* Área principal à direita da sidebar */
  .view {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-width: 0;
  }

  .page {
    padding: 24px 30px 40px;
    gap: 18px;
  }

  .hd {
    padding-bottom: 2px;
  }

  .hd h1 {
    font-size: 26px;
    letter-spacing: -0.025em;
  }

  /* Toast centralizado na área útil desktop */
  .toast {
    bottom: 24px;
    left: calc(50% + 124px);
    max-width: 440px;
  }

  /* Scrollbars discretas nas colunas desktop */
  .view::-webkit-scrollbar,
  .dash-main-col::-webkit-scrollbar,
  .msgs::-webkit-scrollbar,
  .bar::-webkit-scrollbar,
  .sheet::-webkit-scrollbar {
    width: 7px;
    height: 7px;
  }

  .view::-webkit-scrollbar-thumb,
  .dash-main-col::-webkit-scrollbar-thumb,
  .msgs::-webkit-scrollbar-thumb,
  .bar::-webkit-scrollbar-thumb,
  .sheet::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 999px;
  }

  .view::-webkit-scrollbar-track,
  .dash-main-col::-webkit-scrollbar-track,
  .msgs::-webkit-scrollbar-track,
  .bar::-webkit-scrollbar-track,
  .sheet::-webkit-scrollbar-track {
    background: transparent;
  }

  /* DASHBOARD DESKTOP: COLUNA OPERACIONAL + ASSISTENTE FIXO À DIREITA */
  #v-dashboard.on {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(370px, 0.85fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 22px;
    padding: 22px 28px;
    height: 100%;
    overflow: hidden;
  }

  #v-dashboard .dash-main-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 24px;
  }

  #v-dashboard .agenda {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px 18px;
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin: 0;
  }

  #v-dashboard .agenda-top {
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  #v-dashboard .agenda-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--muted);
  }

  #v-dashboard button.dateline {
    position: static;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 18px;
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin: 0;
    transition: border-color 0.15s ease, transform 0.12s ease;
  }

  #v-dashboard button.dateline:hover {
    border-color: var(--accent-line);
  }

  #v-dashboard .todo,
  #v-dashboard .dash-pend-card {
    margin: 0;
    border-radius: 20px;
  }

  #v-dashboard .dash-pend-card {
    padding: 16px 18px 20px;
  }

  #v-dashboard .assistant {
    flex: 1;
    grid-column: 2;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  }

  #v-dashboard .who {
    flex: none;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    margin: 0;
  }

  #v-dashboard .msgs {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 16px 18px;
  }

  #v-dashboard .kpis {
    flex: none;
    padding: 10px 16px 4px;
    margin: 0;
    border-top: 1px solid var(--line);
    gap: 8px;
  }

  #v-dashboard .chips {
    flex: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 6px 16px 8px;
    margin: 0;
  }

  #v-dashboard .chips::-webkit-scrollbar {
    display: none;
  }

  #v-dashboard .assistant-compose-slot {
    display: block;
    flex: none;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  #v-dashboard .assistant-compose-slot .compose {
    background: var(--bg);
    box-shadow: none;
    border-radius: 16px;
    padding: 6px 8px 6px 14px;
  }

  #v-dashboard .assistant-compose-slot .compose input {
    font-size: 14.5px;
  }

  /* FINANCEIRO DESKTOP: SEÇÕES LADO A LADO SEM PÍLULAS MOBILE */
  #finMobPills {
    display: none;
  }

  #v-financeiro.on {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.9fr);
    align-items: start;
    align-content: start;
    gap: 16px 22px;
  }

  #v-financeiro > .hd,
  #v-financeiro > .filters,
  #v-financeiro > .fin-kpis-row {
    grid-column: 1 / -1;
  }

  #v-financeiro > .hd { grid-row: 1; }
  #v-financeiro > .filters { grid-row: 2; }
  #v-financeiro > .fin-kpis-row { grid-row: 3; }

  #v-financeiro .filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  #v-financeiro .fin-kpis-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  #v-financeiro .fin-sec {
    display: flex;
  }

  #v-financeiro .fin-analytics-grid.fin-sec-lancamentos {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #v-financeiro .filter-note.fin-sec-lancamentos {
    display: flex;
  }

  #v-financeiro .filter-note.fin-sec-lancamentos[hidden] {
    display: none;
  }

  #v-financeiro .card.fin-sec-lancamentos {
    display: block;
  }

  #v-financeiro .fin-main-col {
    grid-column: 1;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }

  #v-financeiro .metrics-stack {
    grid-column: 2;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    margin: 0;
  }

  /* CLIENTES DESKTOP: DIRETÓRIO À ESQUERDA + SAÚDE & RETENÇÃO À DIREITA */
  #cliMobPills {
    display: none;
  }

  #v-clientes.on {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.9fr);
    align-items: start;
    align-content: start;
    gap: 16px 22px;
  }

  #v-clientes > .hd,
  #v-clientes > .kpis-cli {
    grid-column: 1 / -1;
  }

  #v-clientes > .hd { grid-row: 1; }
  #v-clientes > .kpis-cli { grid-row: 2; }

  #v-clientes .kpis-cli {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  #v-clientes .cli-sec {
    display: flex;
  }

  #v-clientes .cli-search-row.cli-sec-alunos,
  #v-clientes .cli-sort-bar.cli-sec-alunos,
  #v-clientes .cli-multi-bar.cli-sec-alunos,
  #v-clientes .filter-note.cli-sec-alunos {
    display: flex;
  }

  #v-clientes .cli-multi-bar[hidden],
  #v-clientes .filter-note[hidden] {
    display: none;
  }

  #v-clientes .card.cli-sec-alunos {
    display: block;
  }

  #v-clientes .cli-main-col {
    grid-column: 1;
    grid-row: 3;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  #v-clientes .metrics-stack {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    margin: 0;
  }

  #v-clientes .cli-sec-saude {
    order: -1;
  }

  /* AGENDA DESKTOP: EVENTOS/CALENDÁRIO E TAREFAS SIMULTÂNEOS */
  #v-agenda .seg {
    display: none;
  }

  .ag-desk-task-btn {
    display: inline-flex;
    padding: 5px 11px;
    font-size: 12px;
  }

  #v-agenda.on {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.85fr);
    align-items: start;
    align-content: start;
    gap: 16px 22px;
  }

  #v-agenda > .hd {
    grid-column: 1 / -1;
  }

  #v-agenda #agEventsPane {
    grid-column: 1;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding-bottom: 0;
  }

  #v-agenda #agTasksPane {
    grid-column: 2;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  /* AJUSTES DESKTOP: MENU À ESQUERDA + PAINEL ATIVO À DIREITA */
  #v-config .cfg-back-bar {
    display: none !important;
  }

  #v-config.on {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: 18px 26px;
  }

  #v-config > .hd {
    grid-column: 1 / -1;
  }

  #v-config #cfgMenuList {
    grid-column: 1;
    display: flex !important;
    position: sticky;
    top: 0;
  }

  #v-config .cfg-menu-row:hover {
    background: var(--pill-bg);
  }

  #v-config .cfg-menu-row.on {
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  #v-config .cfg-menu-row.on .cfg-menu-text strong {
    color: var(--accent-fg);
  }

  #v-config .cfg-menu-row .cfg-chev {
    opacity: 0.45;
  }

  #v-config .cfg-menu-row.on .cfg-chev {
    color: var(--accent-fg);
    opacity: 1;
  }

  #v-config .cfg-panels-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 720px;
  }

  #v-config #cfgMenuList [data-cfg-tab="macros"],
  #v-config #cfgMenuList [data-cfg-tab="formularios"],
  #v-config #cfgMenuList [data-cfg-tab="automacoes"] {
    display: none;
  }

  #v-config.on[data-desktop-solo="macros"],
  #v-config.on[data-desktop-solo="formularios"],
  #v-config.on[data-desktop-solo="automacoes"] {
    grid-template-columns: minmax(0, 1fr);
  }

  #v-config[data-desktop-solo="macros"] #cfgMenuList,
  #v-config[data-desktop-solo="formularios"] #cfgMenuList,
  #v-config[data-desktop-solo="automacoes"] #cfgMenuList {
    display: none !important;
  }

  #v-config[data-desktop-solo="macros"] .cfg-panels-col,
  #v-config[data-desktop-solo="formularios"] .cfg-panels-col,
  #v-config[data-desktop-solo="automacoes"] .cfg-panels-col {
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    align-items: start;
    gap: 18px;
    max-width: 1180px;
  }

  #v-config[data-desktop-solo="macros"] .cfg-panels-col > .metric-panel,
  #v-config[data-desktop-solo="formularios"] .cfg-panels-col > .metric-panel,
  #v-config[data-desktop-solo="automacoes"] .cfg-panels-col > .metric-panel {
    min-width: 0;
  }

  .macro-presets-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .macro-chart-wrap {
    min-height: 210px;
  }

  .macro-proj-list {
    max-height: 332px;
  }

  #v-config[data-cfg-sec="menu"] .cfg-sec-planos {
    display: flex;
  }

  @keyframes uiSheetPopIn {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0) scale(0.955);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  @keyframes uiSheetPopOut {
    from {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
    to {
      opacity: 0;
      transform: translate3d(0, 10px, 0) scale(0.96);
    }
  }

  /* MODAIS CENTRALIZADOS NO DESKTOP */
  .modal {
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .sheet {
    max-width: 540px;
    max-height: 88dvh;
    border-radius: 22px;
    padding: 22px 24px 24px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  }

  .modal.on .sheet {
    animation: uiSheetPopIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .modal.closing .sheet {
    animation: uiSheetPopOut 0.19s cubic-bezier(0.4, 0, 1, 1) forwards;
  }

  .sheet .handle {
    display: none;
  }

  .sheet input[type="date"],
  .sheet input[type="time"],
  .metric-panel input[type="date"],
  .metric-panel input[type="time"] {
    font-size: 14px;
  }
}

/* TELAS LARGAS (>= 1240px) — 3 COLUNAS NA AGENDA */
@media (min-width: 1240px) {
  .app {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .toast {
    left: calc(50% + 130px);
  }

  #v-agenda.on {
    grid-template-columns: 356px minmax(0, 1.15fr) minmax(290px, 0.85fr);
  }

  #v-agenda #agEventsPane {
    display: contents !important;
  }

  #v-agenda .ag-cal-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    position: sticky;
    top: 0;
  }

  #v-agenda .ag-feed-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  #v-agenda #agTasksPane {
    grid-column: 3;
    position: sticky;
    top: 0;
  }
}


/* === MOBILE PILL & ACTION SAFETY + DESKTOP SAAS WORKSPACE REDESIGN === */
.dash-desktop-hero,
.dash-bento-kpis,
.nav-sec-label,
.nav-badge,
.sidebar-footer,
.dash-link-btn {
  display: none;
}

.health-period-pills,
.cal-filters,
.mob-pills-bar {
  flex-shrink: 0;
  flex-wrap: wrap;
  overflow: visible;
  height: auto;
  min-height: 36px;
  align-items: center;
}

.health-period-pills .mob-pill,
.cal-filters .cal-filter,
.mob-pills-bar .mob-pill {
  flex: 0 0 auto;
  white-space: nowrap;
  height: auto;
  min-height: 32px;
}

.fin-pay-row {
  cursor: pointer;
}

.fin-pay-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fin-edit-btn {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
  background: var(--pill-bg);
  color: var(--ink);
  border: 1px solid var(--line);
}

.fin-edit-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent-fg);
}

.fin-pay-vals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.fin-pay-orig {
  font-size: 10.5px;
  color: var(--muted);
  text-decoration: line-through;
}

.badge.promo-tag {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .badge.promo-tag {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
}

.badge.disc-tag {
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.badge.table-diff-tag {
  background: var(--pill-bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.fin-disc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fin-disc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.fin-disc-row span {
  color: var(--muted);
}

.fin-disc-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0 2px;
}

@media (min-width: 960px) {
  /* SIDEBAR SAAS NAVIGATION & FOOTER WIDGETS */
  .app {
    grid-template-columns: 248px minmax(0, 1fr);
    background: var(--bg);
  }

  .bar {
    height: 100%;
    background: var(--surface);
    border-top: 0;
    border-right: 1px solid var(--line);
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
  }

  .sidebar-brand {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .sidebar-brand-txt strong {
    font-size: 14.5px;
    font-weight: 750;
    letter-spacing: -0.01em;
  }

  .sidebar-brand-txt span {
    font-size: 11px;
    color: var(--muted);
  }

  #tabs.tabs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    order: 1;
  }

  .nav-sec-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 10px 4px;
  }

  .nav-sec-main {
    order: 0;
    padding-top: 2px;
  }

  #tabs .tab[data-tab="dashboard"] { order: 1; }
  #tabs .tab[data-tab="clientes"] { order: 2; }
  #tabs .tab[data-tab="evolucao"] { order: 3; }
  #tabs .tab[data-tab="agenda"] { order: 4; }
  #tabs .tab[data-tab="financeiro"] { order: 5; }
  .nav-sec-sys { order: 6; }
  #tabs .tab-desktop-only { display: flex; }
  #tabs .tab-mobile-more { display: none !important; }
  #cfgMenuList [data-open-tab="evolucao"] { display: none; }
  #tabs .tab[data-cfg-direct="macros"] { order: 7; }
  #tabs .tab[data-cfg-direct="formularios"] { order: 8; }
  #tabs .tab[data-cfg-direct="automacoes"] { order: 9; }
  #tabs .tab[data-cfg-direct="planos"] { order: 10; }

  #tabs .tab {
    width: 100%;
    min-height: 40px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  }

  #tabs .tab svg {
    width: 18px;
    height: 18px;
    flex: none;
    order: 0;
  }

  #tabs .tab .tab-lbl {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #tabs .tab:hover:not(.on) {
    background: var(--pill-bg);
    color: var(--ink);
  }

  #tabs .tab.on {
    background: linear-gradient(135deg, #c8100d 0%, #8f0503 100%);
    color: #ffffff;
    font-weight: 650;
    box-shadow: 0 6px 16px rgba(173, 5, 3, 0.25);
  }

  #tabs .tab .nav-badge {
    order: 2;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--pill-bg);
    color: var(--ink);
  }

  #tabs .tab .nav-badge[hidden] {
    display: none !important;
  }

  #tabs .tab .nav-badge.warn {
    background: var(--accent-soft);
    color: var(--accent-fg);
  }

  #tabs .tab.on .nav-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    order: 99;
  }

  .sidebar-goal-card {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    padding: 11px 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease;
  }

  .sidebar-goal-card:hover {
    border-color: var(--accent-line);
  }

  .sidebar-goal-card .sg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--muted);
  }

  .sidebar-goal-card .sg-top strong {
    font-size: 12.5px;
    font-weight: 750;
    color: var(--accent-fg);
  }

  .sidebar-goal-card .sg-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--pill-bg);
    overflow: hidden;
  }

  .sidebar-goal-card .sg-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #c8100d, #ff4f4d);
    transition: width 0.25s ease;
  }

  .sidebar-goal-card .sg-sub {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-card {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    padding: 9px 10px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .sidebar-user-card:hover {
    background: var(--pill-bg);
  }

  .sidebar-user-card .su-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8100d 0%, #8f0503 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
    display: grid;
    place-items: center;
    flex: none;
  }

  .sidebar-user-card .su-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .sidebar-user-card .su-info strong {
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-card .su-info em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
  }

  .sidebar-user-card .su-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    flex: none;
  }

  .sidebar-user-card .su-dot.ok {
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-bg);
  }

  .sidebar-user-card .su-dot.syncing {
    background: var(--warn);
  }

  /* DASHBOARD DESKTOP SAAS LAYOUT */
  #v-dashboard.on {
    grid-template-columns: minmax(0, 1.38fr) minmax(350px, 0.85fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 16px 22px;
    padding: 20px 28px 22px;
  }

  #v-dashboard .dash-desktop-hero {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  #v-dashboard .dash-hero-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }

  #v-dashboard .dash-hero-text p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
  }

  #v-dashboard .dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  #v-dashboard .dash-hero-btn {
    height: 36px;
    padding: 0 13px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
  }

  #v-dashboard .dash-hero-btn:hover {
    border-color: var(--accent-line);
  }

  #v-dashboard .dash-hero-cta {
    height: 36px;
    padding: 0 15px;
    font-size: 12.5px;
    font-weight: 650;
    border-radius: 10px;
  }

  #v-dashboard .dash-bento-kpis {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .dash-bento-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 14px 16px;
    text-align: left;
    color: var(--ink);
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }

  .dash-bento-card:hover {
    border-color: var(--accent-line);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  }

  .dash-bento-card .db-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }

  .dash-bento-card .db-top-acts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .db-eye-btn {
    width: 24px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
  }

  .db-eye-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .db-eye-btn.is-light {
    background: var(--pill-bg);
    border-color: var(--line);
    color: var(--muted);
  }

  .db-eye-btn.is-light:hover {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--ink);
  }

  .db-eye-btn:active {
    transform: scale(0.94);
  }

  .db-eye-btn svg {
    display: block;
    pointer-events: none;
  }

  .dash-bento-card .db-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    background: var(--pill-bg);
    color: var(--ink);
  }

  .dash-bento-card .db-val {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
  }

  .dash-bento-card .db-sub {
    font-size: 12px;
    color: var(--muted);
  }

  .dash-bento-card.is-warn .db-pill {
    background: var(--accent-soft);
    color: var(--accent-fg);
  }

  .dash-bento-card.hero {
    background: linear-gradient(135deg, #c8100d 0%, #890402 100%);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(173, 5, 3, 0.24);
  }

  .dash-bento-card.hero .db-top,
  .dash-bento-card.hero .db-sub {
    color: rgba(255, 255, 255, 0.84);
  }

  .dash-bento-card.hero .db-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  .dash-bento-card .db-bar {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    overflow: hidden;
    margin-top: 2px;
  }

  .dash-bento-card .db-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #ffffff;
  }

  #v-dashboard .dash-main-col {
    grid-column: 1;
    grid-row: 3;
    gap: 14px;
  }

  #v-dashboard .assistant {
    grid-column: 2;
    grid-row: 3;
    border-radius: 16px;
  }

  #v-dashboard button.dateline,
  #v-dashboard .agenda-brand,
  #v-dashboard .agenda-top .theme-toggle,
  #v-dashboard .assistant .kpis {
    display: none;
  }

  #v-dashboard .dash-link-btn {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  #v-dashboard .dash-link-btn:hover {
    border-color: var(--accent-line);
    color: var(--accent-fg);
  }

  #v-dashboard .agenda,
  #v-dashboard .todo,
  #v-dashboard .dash-pend-card {
    border-radius: 15px;
  }

  /* FINANCEIRO DESKTOP: HERO KPI GRADIENT + COMPACT PROPORTIONS */
  #v-financeiro.on {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.88fr);
    gap: 16px 20px;
    padding: 20px 28px 26px;
  }

  #v-financeiro .fin-kpi-card {
    border-radius: 15px;
    padding: 14px 16px;
    transition: border-color 0.15s ease, transform 0.15s ease;
  }

  #v-financeiro .fin-kpi-card.on {
    background: linear-gradient(135deg, #c8100d 0%, #8f0503 100%);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(173, 5, 3, 0.24);
  }

  #v-financeiro .fin-kpi-card.on .fin-kpi-lbl,
  #v-financeiro .fin-kpi-card.on small {
    color: rgba(255, 255, 255, 0.86) !important;
  }

  #v-financeiro .fin-kpi-card.on .fin-kpi-val,
  #v-financeiro .fin-kpi-card.on b {
    color: #ffffff !important;
  }

  #v-financeiro .fin-kpi-card.on .info-i-btn {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
  }

  #v-financeiro .fin-kpi-card.on .info-i-btn:hover,
  #v-financeiro .fin-kpi-card.on .info-i-btn:active {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
  }

  #v-financeiro .fin-analytics-grid.fin-sec-lancamentos {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  #v-financeiro .chart-card {
    border-radius: 15px;
    padding: 12px 16px;
  }

  #v-financeiro .chart-big-val {
    font-size: 21px;
  }

  #v-financeiro .chart-wrap {
    height: 142px;
    min-height: 142px;
    max-height: 142px;
    aspect-ratio: auto;
  }

  #v-financeiro .mini-chart-wrap {
    height: 134px;
    min-height: 134px;
    max-height: 134px;
    aspect-ratio: auto;
    overflow: hidden;
  }

  #v-financeiro .mini-svg {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  #v-financeiro .fin-pay-row {
    padding: 12px 16px;
  }

  /* CLIENTES DESKTOP: CRISP WRAP PILLS + HERO KPI + COMPACT SAÚDE */
  #v-clientes.on {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 16px 20px;
    padding: 20px 28px 26px;
  }

  #v-clientes .kpis-cli .kpi {
    border-radius: 15px;
    padding: 14px 16px;
  }

  #v-clientes .kpis-cli .kpi.on {
    background: linear-gradient(135deg, #c8100d 0%, #8f0503 100%);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(173, 5, 3, 0.24);
  }

  #v-clientes .kpis-cli .kpi.on b {
    color: #ffffff !important;
  }

  #v-clientes .kpis-cli .kpi.on .kpi-title,
  #v-clientes .kpis-cli .kpi.on span {
    color: rgba(255, 255, 255, 0.86);
  }

  #v-clientes .cli-sort-bar,
  #v-clientes .health-period-pills,
  #v-agenda .cal-filters {
    flex-wrap: wrap;
    overflow: visible;
    height: auto;
    min-height: 0;
  }

  #v-clientes .cli-badges-line {
    flex-wrap: wrap;
    overflow: visible;
  }

  #v-clientes .mini-chart-wrap {
    height: 148px;
    min-height: 148px;
    max-height: 148px;
    aspect-ratio: auto;
    overflow: hidden;
  }

  #v-clientes .mini-svg {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  #v-clientes #clientList .row {
    padding: 13px 16px;
  }
}

@media (min-width: 1240px) {
  .app {
    grid-template-columns: 256px minmax(0, 1fr);
  }

  #v-dashboard.on,
  #v-financeiro.on,
  #v-clientes.on,
  #v-evolucao.on,
  #v-agenda.on,
  #v-config.on {
    padding: 22px 34px 28px;
  }
}

/* ======================== CHECK-INS & COMPARADOR DE FOTOS ======================== */

.badge-btn {
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.sheet.sheet-wide {
  max-width: 720px;
}

.cv-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cv-link-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cv-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cv-link-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.cv-link-url {
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 9px;
}

.cv-schedule-note {
  margin-top: 6px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.38;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
}

.cv-schedule-note.is-wait {
  color: var(--accent-fg);
  background: var(--accent-soft);
  border-color: var(--accent-line, rgba(220, 38, 38, 0.28));
  font-weight: 600;
}

.cv-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-link-actions .btn {
  padding: 6px 11px;
  font-size: 12px;
}

.cv-tabs,
.cv-date-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 5px;
  vertical-align: middle;
}

.cv-chart-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.cv-chart-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cv-chart-hd strong {
  display: block;
  font-size: 13px;
}

.cv-chart-hd span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.cv-chart-card .chart-wrap {
  height: 126px;
  min-height: 126px;
}

.cv-empty {
  text-align: center;
  padding: 20px 14px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.cv-empty strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.cv-empty p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.cv-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 8px;
}

.cv-detail-weight {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.cv-detail-weight b {
  font-size: 18px;
}

.cv-sec-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 14px 0 6px;
}

.cv-meas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 6px;
}

.cv-meas-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 9px;
}

.cv-meas-item span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.cv-meas-item b {
  display: block;
  font-size: 13.5px;
  margin-top: 2px;
}

.cv-meas-item small {
  display: block;
  font-size: 10.5px;
  color: var(--ok);
  margin-top: 1px;
}

.cv-photos-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cv-thumb-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.cv-thumb-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.cv-thumb-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 6px;
}

.cv-thumb-loading {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
}

.cv-qa-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-qa-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 10px;
}

.cv-qa-item.warn {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.cv-qa-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.cv-qa-top span {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.cv-qa-top b {
  text-align: right;
  flex-shrink: 0;
  max-width: 58%;
  line-height: 1.35;
}

.cv-qa-item.warn .cv-qa-top span {
  color: var(--accent-fg);
}

.cv-qa-note {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-wrap;
}

.cv-feedback-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-wa-preview {
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 6px 10px;
}

.cv-wa-preview summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.cv-wa-preview[open] summary {
  color: var(--ink);
  margin-bottom: 6px;
}

.cv-wa-preview-body {
  margin: 0;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.cv-history-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cv-history-bar .cv-date-pills {
  flex: 1;
  min-width: 180px;
}

.cv-new-entry-btn {
  padding: 6px 11px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cv-head-edit-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.cv-edit-form {
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-edit-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cv-edit-hd strong {
  font-size: 14px;
}

.cv-edit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.cv-edit-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.cv-edit-meas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.cv-edit-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.cv-edit-photo-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-edit-photo-card .cv-edit-photo-slot {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.cv-edit-photo-preview {
  height: 92px;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}

.cv-edit-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-edit-photo-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cv-edit-photo-btns .btn {
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.cv-edit-qa-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px 10px;
}

.cv-edit-qa-details summary {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cv-edit-qa-details summary::-webkit-details-marker {
  display: none;
}

.cv-edit-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cv-edit-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}

.cv-cmp-shortcuts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.cv-cmp-delta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
}

.cv-cmp-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-cmp-row {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.cv-cmp-row-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.cv-cmp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cv-cmp-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.cv-cmp-cell img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.cv-cmp-cell span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 6px;
  color: var(--muted);
}

.cv-cmp-cell.empty {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.cv-cmp-cell.empty small {
  font-size: 11px;
  color: var(--muted);
}

.plb-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.plb-fig {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.plb-fig img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  background: #000;
}

.plb-fig figcaption {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 8px;
}

.cfg-ci-custom-box {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cfg-ci-radar {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfg-ci-radar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.cfg-ci-radar-row b {
  display: block;
  font-size: 12.5px;
}

.cfg-ci-radar-row span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

/* Formulários & Automações + desktop solo overflow guard */
.macro-result-panel,
.macro-proj-box,
.macro-proj-chart-wrap {
  min-width: 0;
  max-width: 100%;
}

.macro-proj-chart-wrap svg {
  max-width: 100%;
  display: block;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cfg-tpl-toolbar {
  margin-bottom: 10px;
}

.cfg-tpl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg-tpl-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cfg-tpl-card:hover {
  border-color: rgba(173, 5, 3, 0.35);
}

.cfg-tpl-card.on {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(173, 5, 3, 0.12);
}

.cfg-tpl-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cfg-tpl-title-row strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.cfg-tpl-summary {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.cfg-tpl-usage {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.cfg-tpl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cfg-tpl-actions .btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.cfg-tpl-send-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.cfg-tpl-send-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.cfg-tpl-send-actions .btn {
  padding: 6px 11px;
  font-size: 12px;
}

.cfg-tpl-subhd {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.cfg-tpl-blocks,
.cfg-tpl-photos-box,
.cfg-auto-group {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.cfg-tpl-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
}

.cfg-tpl-std-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.cfg-tpl-std-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.cfg-tpl-std-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
}

.cfg-auto-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cfg-auto-stat {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: center;
}

.cfg-auto-stat b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.cfg-auto-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.cv-tpl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.cv-tpl-row label {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.cv-tpl-row .field {
  flex: 1;
  min-width: 0;
  padding: 5px 10px;
  font-size: 12px;
}

/* EVOLUÇÃO DOS ALUNOS */
#v-evolucao,
#v-evolucao > *,
#evoMainContent,
#evoPaneVisual,
#evoPaneSheet {
  min-width: 0;
  max-width: 100%;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evo-subtabs {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  background: var(--pill-bg);
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
  flex: none;
}

.evo-subtabs button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.evo-subtabs button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.evo-topbar {
  position: relative;
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.evo-student-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.evo-student-picker label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex: none;
}

.evo-picker-combo {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 440px;
}

.evo-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  min-height: 40px;
  padding: 7px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.evo-picker-trigger:hover,
.evo-picker-trigger.is-open {
  border-color: var(--accent-line);
}

.evo-picker-trigger.is-open {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.evo-picker-trigger-main {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.evo-picker-trigger-main strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evo-picker-trigger-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}

.evo-picker-trigger-tail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.evo-picker-search-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.evo-picker-search-hint svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.evo-picker-caret {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: none;
  transition: transform 0.16s ease;
}

.evo-picker-trigger.is-open .evo-picker-caret {
  transform: rotate(180deg);
}

.evo-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: min(320px, 100%);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 65;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.evo-picker-popover[hidden] {
  display: none !important;
}

.evo-picker-clear {
  flex: none;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.evo-picker-clear[hidden] {
  display: none;
}

.evo-picker-sort-bar {
  padding: 2px 0 0;
}

.evo-picker-meta-line {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.evo-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(360px, 54vh);
  overflow-y: auto;
  padding-right: 2px;
}

.row.evo-picker-row {
  width: 100%;
  display: block;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bubble);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.row.evo-picker-row:hover,
.row.evo-picker-row.is-focused {
  border-color: var(--accent-line);
  background: var(--ev-bg);
}

.row.evo-picker-row.is-selected {
  border-color: var(--accent);
  background: var(--ev-bg);
}

.row.evo-picker-row .cli-name-btn,
.row.evo-picker-row .cli-sub-line {
  cursor: pointer;
}

.badge.evo-picked-badge {
  background: var(--accent-soft);
  color: var(--accent-fg);
  font-weight: 700;
}

.evo-picker-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.evo-picker-empty b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 3px;
}

@media (max-width: 520px) {
  .evo-picker-search-hint span {
    display: none;
  }
}

.evo-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.evo-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.evo-action-btns .btn {
  padding: 7px 12px;
  font-size: 12.5px;
}

.evo-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.evo-right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.evo-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.evo-info-card,
.evo-photos-card,
.evo-chart-card,
.evo-table-card {
  min-width: 0;
}

.evo-id-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.evo-info-card.is-minimized .evo-id-head {
  margin-bottom: 8px;
  align-items: center;
}

.evo-id-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: none;
}

.evo-win-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.evo-mac-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), filter 0.16s ease, box-shadow 0.16s ease;
}

.evo-mac-btn svg {
  opacity: 0.72;
  transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.evo-mac-btn:hover svg,
.evo-mac-btn:focus-visible svg,
.evo-mac-btn.is-expanded svg,
.evo-mac-btn.is-collapsed svg {
  opacity: 1;
}

.evo-mac-btn:active {
  transform: scale(0.9);
}

.evo-mac-btn.min {
  background: #febc2e;
  color: #5c3c00;
}

.evo-mac-btn.zoom {
  background: #28c840;
  color: #0b4a16;
}

.evo-mac-btn.zoom.is-expanded {
  box-shadow: 0 0 0 2px rgba(40, 200, 64, 0.32);
}

.evo-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.evo-panel-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.evo-panel-toggle:active {
  transform: scale(0.96);
}

.evo-panel-toggle svg {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.evo-panel-toggle.is-collapsed svg {
  transform: rotate(180deg);
}

.evo-collapse-wrap {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.evo-collapse-wrap.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.evo-collapse-inner {
  min-height: 0;
  overflow: hidden;
}

.evo-info-mini-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  animation: uiPanelEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.evo-info-mini-bar[hidden] {
  display: none !important;
}

.evo-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.evo-mini-chip b {
  color: var(--ink);
}

.evo-mini-chip.is-strat {
  color: var(--accent-fg);
  border-color: rgba(173, 5, 3, 0.28);
  background: rgba(173, 5, 3, 0.06);
  font-weight: 700;
}

.evo-photos-card.is-minimized .evo-photos-toolbar {
  margin-bottom: 0;
}

.evo-photos-card.is-compact .evo-photo-frame,
.evo-photos-card.is-compact .evo-photo-placeholder {
  width: 100%;
  max-width: 168px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}

.evo-id-left strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.evo-id-left span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.evo-phase-wrap .field {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  font-weight: 700;
  width: auto;
}

.evo-personal-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 12px;
}

.evo-personal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.evo-rf-mark {
  display: inline-flex;
  width: auto;
  height: 24px;
}

.evo-rf-mark img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.evo-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.evo-personal-grid > div span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.evo-personal-grid > div b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.evo-subhd {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.evo-compare-wrap {
  overflow-x: auto;
}

.evo-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.evo-compare-table th,
.evo-compare-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.evo-compare-table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg);
}

.evo-compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

.evo-compare-table td.is-strat {
  font-weight: 700;
  color: var(--accent-fg);
}

.evo-photos-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.evo-photo-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.evo-photo-filters .field,
.evo-photo-filters select.field {
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0 26px 0 11px;
  border-radius: 999px;
  background-color: var(--bg);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  font-size: 12px;
  font-weight: 600;
  line-height: 30px;
  color: var(--ink);
  margin: 0;
}

.evo-photo-filters .evo-panel-toggle,
.evo-photo-filters .btn {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

.evo-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.evo-photo-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  margin: 0;
  height: 100%;
  box-sizing: border-box;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: center;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.evo-photo-card:hover {
  border-color: rgba(173, 5, 3, 0.45);
}

.evo-photo-card.is-goal {
  border-color: rgba(173, 5, 3, 0.45);
}

.evo-photo-card.empty {
  cursor: default;
}

.evo-photo-card.empty.upload {
  border-style: dashed;
  cursor: pointer;
}

.evo-photo-tag {
  flex: none;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.evo-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.evo-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.evo-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  flex: none;
  box-sizing: border-box;
}

.evo-photo-cap {
  flex: none;
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}

.evo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.evo-legend span::before {
  content: "";
  width: 10px;
  height: 3px;
  border-radius: 99px;
  display: inline-block;
}

.evo-legend .el-actual::before { background: #16a34a; }
.evo-legend .el-avg::before { background: #8b5cf6; }
.evo-legend .el-daily::before { background: #0ea5e9; }
.evo-legend .el-proj::before { background: #2563eb; }
.evo-legend .el-min::before { background: #dc2626; }
.evo-legend .el-max::before { background: #d97706; }

.evo-legend .el-avg[hidden],
.evo-legend .el-daily[hidden] {
  display: none;
}

.evo-chart-hd {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.evo-chart-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.evo-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.evo-expand-btn:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.evo-expand-btn:active {
  transform: scale(0.96);
}

.evo-expand-btn.on {
  background: var(--accent-soft);
  border-color: rgba(173, 5, 3, 0.35);
  color: var(--accent-fg);
}

.evo-chart-scope-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.evo-chart-scope-bar[hidden] {
  display: none !important;
}

.evo-chart-quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.evo-chart-scope-pill {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.evo-chart-scope-pill:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.evo-chart-scope-pill:active {
  transform: scale(0.96);
}

.evo-chart-scope-pill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.evo-chart-range {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.evo-chart-range select.field {
  width: auto;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 0 22px 0 9px;
  border-radius: 999px;
  background-color: var(--surface);
  background-position: calc(100% - 11px) 50%, calc(100% - 6px) 50%;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 26px;
  color: var(--ink);
}

.evo-chart-wrap {
  min-height: 205px;
  height: 205px;
  max-width: 100%;
  transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1), min-height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.evo-chart-wrap.is-info-compact {
  min-height: 240px;
  height: 240px;
}

.evo-chart-wrap.is-expanded {
  min-height: 310px;
  height: 310px;
}

@media (min-width: 960px) {
  .evo-chart-wrap {
    min-height: 220px;
    height: 236px;
  }

  .evo-chart-wrap.is-info-compact {
    min-height: 300px;
    height: 300px;
  }

  .evo-chart-wrap.is-expanded {
    min-height: 410px;
    height: 410px;
  }
}

.evo-chart-wrap svg {
  width: 100%;
  max-width: 100%;
  display: block;
}

.evo-chart-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.evo-limit-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.evo-limit-pill b {
  color: var(--ink);
}

.evo-step-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.evo-step-hero b {
  color: var(--ink);
}

.evo-compact-table-wrap {
  max-height: 295px;
  overflow-y: auto;
  overflow-x: auto;
}

.evo-table-card .evo-table th,
.evo-table-card .evo-table td {
  padding: 5px 4px;
  font-size: 11.5px;
}

.evo-full-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

.evo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.evo-table th,
.evo-table td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.evo-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  z-index: 1;
}

.evo-table tbody tr.is-clickable {
  cursor: pointer;
}

.evo-table tbody tr.is-clickable:hover {
  background: var(--bg);
}

.evo-sheet-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-top: 6px;
}

.evo-sb-item {
  min-width: 115px;
  flex: 1 1 130px;
}

.evo-sb-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.evo-sb-item b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}

.evo-phase-macros-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

@media (min-width: 720px) {
  .evo-phase-macros-strip {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.evo-pm-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.evo-pm-card.is-active {
  border-color: rgba(173, 5, 3, 0.45);
}

.evo-pm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evo-pm-top strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.evo-pm-vals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}

.evo-pm-vals span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 11.5px;
}

.evo-pm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.evo-pm-meta {
  font-size: 11px;
  color: var(--muted);
}

.evo-plan-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 10px 0;
}

@media (min-width: 680px) {
  .evo-photos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .evo-plan-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .evo-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .evo-student-picker {
    flex: 1;
    max-width: 430px;
  }

  .evo-picker-popover {
    width: min(560px, 76vw);
  }

  .evo-top-grid {
    grid-template-columns: minmax(272px, 324px) minmax(0, 1fr);
    gap: 16px;
  }

  .app[data-sidebar-collapsed="1"] .evo-top-grid:not(.is-info-minimized):not(.is-info-expanded) {
    grid-template-columns: minmax(236px, 264px) minmax(0, 1fr);
    gap: 14px;
  }

  .app[data-sidebar-collapsed="1"] .evo-info-card:not(.is-minimized):not(.is-expanded) {
    padding: 12px 13px;
  }

  .app[data-sidebar-collapsed="1"] .evo-info-card:not(.is-minimized):not(.is-expanded) .evo-personal-box {
    padding: 9px 10px;
    margin-bottom: 10px;
  }

  .app[data-sidebar-collapsed="1"] .evo-info-card:not(.is-minimized):not(.is-expanded) .evo-compare-table {
    font-size: 11px;
  }

  .app[data-sidebar-collapsed="1"] .evo-info-card:not(.is-minimized):not(.is-expanded) .evo-compare-table th,
  .app[data-sidebar-collapsed="1"] .evo-info-card:not(.is-minimized):not(.is-expanded) .evo-compare-table td {
    padding: 4.5px 5px;
  }

  .evo-top-grid.is-info-minimized,
  .evo-top-grid.is-info-expanded {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .evo-top-grid.is-info-minimized .evo-info-card {
    padding: 12px 16px;
  }

  .evo-info-card.is-expanded {
    padding: 18px 20px;
  }

  .evo-info-card.is-expanded .evo-id-left strong {
    font-size: 18px;
  }

  .evo-info-card.is-expanded .evo-id-left span {
    font-size: 13px;
  }

  .evo-info-card.is-expanded .evo-personal-box {
    padding: 14px 16px;
  }

  .evo-info-card.is-expanded .evo-personal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .evo-info-card.is-expanded .evo-personal-grid > div b {
    font-size: 14.5px;
  }

  .evo-info-card.is-expanded .evo-compare-table {
    font-size: 13px;
  }

  .evo-info-card.is-expanded .evo-compare-table th,
  .evo-info-card.is-expanded .evo-compare-table td {
    padding: 8px 10px;
  }
}

@media (min-width: 1180px) {
  .app[data-sidebar-collapsed="1"] .evo-bottom-grid:not(.is-chart-wide) {
    grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.72fr);
    gap: 14px;
  }
}

@media (min-width: 1380px) {
  .evo-bottom-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(265px, 0.74fr);
    gap: 16px;
  }

  .evo-bottom-grid.is-chart-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* EVOLUÇÃO POR FASES */
.evo-phases-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

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

.evo-phase-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.evo-phase-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.evo-phase-card:hover:not(.on) {
  border-color: var(--muted);
}

.evo-phase-card.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(173, 5, 3, 0.14);
}

.epc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.epc-top strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.epc-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.epc-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.epc-metrics span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.epc-metrics b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.epc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.epc-foot span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

@media (min-width: 720px) {
  .evo-phase-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* CARD DE DADOS PUXADOS DO ALUNO NO MODAL DE FASES */
.ep-student-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 10px;
}

.ep-student-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ep-student-top > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-student-top strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.ep-student-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-inline-xs {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-inline-xs:hover {
  border-color: var(--accent);
  color: var(--accent-fg);
}

.ep-student-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
}

@media (min-width: 580px) {
  .ep-student-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ep-student-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
}

.ep-student-grid > div span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ep-student-grid > div b {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1px;
}

.ep-student-grid > div.is-missing b {
  color: var(--warn-fg, #b45309);
}

.ep-student-inputs {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.ep-student-missing-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* BARRA LATERAL RECOLHÍVEL (DESKTOP) */
@media (min-width: 960px) {
  .sidebar-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
  }

  .sidebar-collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .sidebar-collapse-btn:hover {
    background: var(--pill-bg);
    color: var(--ink);
  }

  .sidebar-collapse-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
  }

  .app[data-sidebar-collapsed="1"] {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app[data-sidebar-collapsed="1"] .bar {
    padding: 14px 10px;
    align-items: center;
    gap: 10px;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-brand {
    flex-direction: column;
    align-items: center;
    padding: 0 0 10px;
    width: 100%;
    gap: 8px;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-brand-txt,
  .app[data-sidebar-collapsed="1"] .sidebar-head-actions .theme-toggle {
    display: none;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-collapse-btn svg {
    transform: rotate(180deg);
  }

  .app[data-sidebar-collapsed="1"] .nav-sec-main {
    display: none;
  }

  .app[data-sidebar-collapsed="1"] .nav-sec-sys {
    font-size: 0;
    padding: 0;
    height: 1px;
    width: 28px;
    margin: 5px auto;
    background: var(--line);
  }

  .app[data-sidebar-collapsed="1"] #tabs.tabs {
    align-items: center;
    gap: 4px;
  }

  .app[data-sidebar-collapsed="1"] #tabs .tab {
    position: relative;
    width: 44px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    gap: 0;
    font-size: 0;
    justify-content: center;
  }

  .app[data-sidebar-collapsed="1"] #tabs .tab svg {
    width: 19px;
    height: 19px;
  }

  .app[data-sidebar-collapsed="1"] #tabs .tab .tab-lbl {
    display: none;
  }

  .app[data-sidebar-collapsed="1"] #tabs .tab .nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9.5px;
    margin-left: 0;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-footer {
    width: 100%;
    align-items: center;
    padding-top: 10px;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-goal-card,
  .app[data-sidebar-collapsed="1"] .sidebar-user-card .su-info,
  .app[data-sidebar-collapsed="1"] .sidebar-user-card .su-dot {
    display: none;
  }

  .app[data-sidebar-collapsed="1"] .sidebar-user-card {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* TRANSIÇÕES E ANIMAÇÕES GLOBAIS */
@keyframes uiPanelEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes uiDetailsOpen {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#evoPaneVisual:not([hidden]),
#evoPaneSheet:not([hidden]),
#agEventsPane:not([hidden]),
#agTasksPane:not([hidden]),
#cvHistoryPane:not([hidden]),
#cvComparePane:not([hidden]),
#adReschedBox:not([hidden]),
#cvWeightCard:not([hidden]),
#cvEditForm {
  animation: uiPanelEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes uiTabIconPop {
  0% { transform: scale(0.84); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes uiCheckPop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes uiMobDrillIn {
  from {
    opacity: 0;
    transform: translate3d(14px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes uiMobBackIn {
  from {
    opacity: 0;
    transform: translate3d(-12px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.tab.on svg {
  animation: uiTabIconPop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.task-row.done .box,
.ag-task-row.done .box {
  animation: uiCheckPop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.cli-card,
.pend-item,
.ag-row-tap,
.ag-task,
.task,
.ev,
.cfg-menu-row,
.evo-photo-card,
.cal button[data-cal-day] {
  transition: transform 0.14s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.cli-card:active,
.pend-item:active,
.ag-row-tap:active,
.ag-task:active,
.task:active,
.ev:active,
.cfg-menu-row:active,
.evo-photo-card:active,
.cal button[data-cal-day]:active {
  transform: scale(0.982);
}

@media (max-width: 959px) {
  .view.on {
    animation-duration: 0.26s;
  }

  #v-financeiro[data-mob-sec="lancamentos"] .fin-sec-lancamentos,
  #v-financeiro[data-mob-sec="previsao"] .fin-sec-previsao,
  #v-financeiro[data-mob-sec="planos"] .fin-sec-planos,
  #v-clientes[data-mob-sec="alunos"] .cli-main-col,
  #v-clientes[data-mob-sec="saude"] .cli-sec-saude,
  #v-clientes[data-mob-sec="retencao"] .cli-sec-retencao,
  #v-clientes[data-mob-sec="retencao"] .cli-sec-origem {
    animation: uiPanelEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #v-config[data-cfg-sec="menu"] .cfg-menu-card {
    animation: uiMobBackIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #v-config:not([data-cfg-sec="menu"]) .cfg-back-bar,
  #v-config:not([data-cfg-sec="menu"]) .cfg-sec {
    animation: uiMobDrillIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

details[open] > *:not(summary) {
  animation: uiDetailsOpen 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.mob-pill,
.seg button,
#tabs .tab,
.metric-panel,
.card {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.14s ease, box-shadow 0.2s ease;
}

.mob-pill:active,
.seg button:active,
#tabs .tab:active {
  transform: scale(0.97);
}

/* Morphing suave do painel de Evolução com View Transitions quando suportado */
#evoPaneVisual.is-vt-active .evo-chart-wrap,
#evoPaneVisual.is-vt-active .evo-collapse-wrap,
#evoPaneVisual.is-vt-active .evo-panel-toggle svg {
  transition: none;
}

#evoPaneVisual.is-vt-active #evoInfoCard {
  view-transition-name: evo-info-card;
}

#evoPaneVisual.is-vt-active #evoPhotosCard {
  view-transition-name: evo-photos-card;
}

#evoPaneVisual.is-vt-active #evoChartCard {
  view-transition-name: evo-chart-card;
}

#evoPaneVisual.is-vt-active #evoTableCard {
  view-transition-name: evo-table-card;
}

::view-transition-group(evo-info-card),
::view-transition-group(evo-photos-card),
::view-transition-group(evo-chart-card),
::view-transition-group(evo-table-card) {
  animation-duration: 0.34s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* === ONDA 4: TOASTS SEMÂNTICOS & COMPONENTES === */
.toast.is-success {
  background: #14532d;
  color: #f0fdf4;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.toast.is-warn {
  background: #78350f;
  color: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.toast.is-error {
  background: #7f1d1d;
  color: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.toast.is-info {
  background: #1c1c1e;
  color: #f2f2f4;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.macro-apply-phase-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macro-apply-phase-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.macro-apply-phase-hd strong {
  font-size: 12.5px;
  color: var(--ink);
}

.macro-apply-phase-hd small {
  font-size: 11px;
  color: var(--muted);
}

.macro-apply-phase-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.macro-apply-phase-row .field {
  flex: 1 1 200px;
  min-width: 0;
}

.evo-protocol-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
}

.evo-protocol-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.evo-protocol-link:hover {
  border-color: var(--accent);
  color: var(--accent-fg);
}

.ib-summary-box {
  margin-top: 6px;
}

.ib-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ib-stat-grid > div {
  padding: 10px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ib-stat-grid span {
  font-size: 11px;
  color: var(--muted);
}

.ib-stat-grid strong {
  font-size: 16px;
  color: var(--ink);
}

.fin-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fin-search-input {
  flex: 1 1 170px;
  min-width: 150px;
}

.fin-acct-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  gap: 2px;
  flex: 0 0 auto;
}

.fin-acct-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fin-acct-btn.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.badge.comp-tag {
  background: var(--info-soft);
  color: var(--info);
}

.fin-pix-btn {
  padding: 5px 9px;
  font-size: 11.5px;
}

.pend-more-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--bg2);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.pend-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent-fg);
}

.msg-confirm-card {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-confirm-summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.msg-confirm-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-confirm-state {
  font-size: 12px;
  font-weight: 600;
}

.msg-confirm-state.is-done {
  color: var(--ok);
}

.msg-confirm-state.is-cancelled {
  color: var(--muted);
}

.appt-quick-client {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
}

.appt-quick-client > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.appt-quick-client strong {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appt-quick-client small {
  font-size: 12px;
  color: var(--muted);
}

.appt-quick-client .btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 11.5px;
}

.evo-phases-bar-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.evo-phases-bar-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.evo-phases-toggle-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.evo-phases-toggle-btn:hover,
.evo-phases-toggle-btn.on {
  border-color: var(--accent);
  color: var(--accent-fg);
}

.epc-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.epc-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.epc-expand-btn:hover {
  border-color: var(--accent);
  color: var(--accent-fg);
}

.evo-phase-card.is-compact {
  padding: 10px 12px;
  gap: 4px;
}

.evo-phase-card.is-compact .epc-sub {
  margin-bottom: 0;
}

.epc-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.epc-details[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .evo-phase-card.is-compact {
    padding: 9px 11px;
    border-radius: 12px;
  }
  .evo-phase-card.is-compact .epc-top strong {
    font-size: 13.5px;
  }
  .evo-phase-card.is-compact .epc-sub {
    font-size: 11.5px;
  }
}

.evo-print-root {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body.is-printing-evo {
    background: #ffffff !important;
    color: #111113 !important;
    overflow: visible !important;
    height: auto !important;
  }
  body.is-printing-evo > *:not(#evoPrintRoot) {
    display: none !important;
  }
  body.is-printing-evo #evoPrintRoot {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #111113 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    font-size: 11px;
    line-height: 1.4;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #evoPrintRoot * {
    box-sizing: border-box;
  }
  #evoPrintRoot .pr-hd {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #ad0503;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
  #evoPrintRoot .pr-hd h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #111113;
  }
  #evoPrintRoot .pr-hd p {
    margin: 2px 0 0;
    color: #555555;
    font-size: 11px;
  }
  #evoPrintRoot .pr-brand {
    text-align: right;
    font-size: 11px;
    color: #555555;
  }
  #evoPrintRoot .pr-brand strong {
    display: block;
    color: #ad0503;
    font-size: 13px;
  }
  #evoPrintRoot .pr-kpis {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }
  #evoPrintRoot .pr-kpi {
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    padding: 6px 8px;
    background: #fafafa;
  }
  #evoPrintRoot .pr-kpi span {
    display: block;
    font-size: 9px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  #evoPrintRoot .pr-kpi b {
    font-size: 12px;
    color: #111113;
  }
  #evoPrintRoot .pr-sec-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ad0503;
    margin: 12px 0 6px;
  }
  #evoPrintRoot .pr-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }
  #evoPrintRoot .pr-phase {
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    padding: 8px 10px;
    break-inside: avoid;
  }
  #evoPrintRoot .pr-phase-hd {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 11.5px;
  }
  #evoPrintRoot .pr-phase-hd span {
    color: #ad0503;
    font-weight: 700;
  }
  #evoPrintRoot .pr-phase-sub {
    color: #555555;
    font-size: 10px;
    margin-top: 2px;
  }
  #evoPrintRoot .pr-phase-macros {
    margin-top: 4px;
    font-weight: 600;
    font-size: 10.5px;
  }
  #evoPrintRoot .pr-phase-links {
    margin-top: 4px;
    font-size: 9.5px;
    color: #444444;
    word-break: break-all;
  }
  #evoPrintRoot .pr-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    break-inside: avoid;
  }
  #evoPrintRoot .pr-photo {
    margin: 0;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    padding: 5px;
    text-align: center;
  }
  #evoPrintRoot .pr-photo-lbl {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555555;
    margin-bottom: 4px;
  }
  #evoPrintRoot .pr-photo img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
  }
  #evoPrintRoot .pr-photo figcaption {
    font-size: 9.5px;
    color: #555555;
    margin-top: 4px;
  }
  #evoPrintRoot .pr-chart {
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    break-inside: avoid;
  }
  #evoPrintRoot .pr-chart svg {
    width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
  }
  #evoPrintRoot table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
  }
  #evoPrintRoot th,
  #evoPrintRoot td {
    border-bottom: 1px solid #e8e8ec;
    padding: 4px 5px;
    text-align: left;
    font-variant-numeric: tabular-nums;
  }
  #evoPrintRoot th {
    background: #f5f5f7;
    font-weight: 700;
    color: #444444;
  }
  #evoPrintRoot .pr-foot {
    margin-top: 12px;
    font-size: 9.5px;
    color: #777777;
    text-align: center;
    border-top: 1px solid #eeeeee;
    padding-top: 6px;
  }
}

/* === AVALIAÇÕES FÍSICAS & COMPARATIVO === */
.assess-toolbar-panel .mp-hd,
.assess-compare-panel .mp-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.assess-toolbar-acts,
.assess-compare-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assess-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.assess-empty-card {
  padding: 20px;
  text-align: center;
}

.assess-card-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.assess-card-hd strong {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
}

.assess-card-hd small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.assess-card-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.assess-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.assess-kpi {
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assess-kpi span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.assess-kpi b {
  font-size: 16px;
  color: var(--ink);
}

.assess-kpi em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}

.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-alert { color: var(--alert); }
.tone-muted { color: var(--muted); }

.assess-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.assess-thumbs figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  background: var(--bg2);
  text-align: center;
}

.assess-thumbs img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.assess-thumbs figcaption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.assess-compare-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.assess-cmp-sec {
  margin-top: 14px;
}

.assess-cmp-sec h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink);
}

.assess-cmp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.assess-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.assess-cmp-table th,
.assess-cmp-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.assess-cmp-table th:first-child,
.assess-cmp-table td:first-child {
  text-align: left;
  color: var(--muted);
}

.assess-cmp-table thead th {
  background: var(--bg2);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}

.cmp-delta.is-good { color: var(--ok); font-weight: 700; }
.cmp-delta.is-bad { color: var(--alert); font-weight: 700; }
.cmp-delta.is-neutral { color: var(--muted); }

.assess-cmp-photos-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assess-cmp-photo-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.assess-cmp-photo-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.assess-cmp-photo-cols figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: var(--bg2);
  text-align: center;
}

.assess-cmp-photo-cols img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.assess-cmp-photo-cols figcaption {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 5px;
}

.assess-no-photo {
  height: 200px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.assess-sheet {
  max-width: 720px !important;
}

.as-live-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.as-live-kpis > div {
  padding: 8px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.as-live-kpis span {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.as-live-kpis b {
  font-size: 14px;
  color: var(--ink);
}

.as-live-kpis small {
  font-size: 10px;
  color: var(--muted);
}

.as-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.as-sec-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.as-sec-title small {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.as-field-item.is-req-fold label {
  color: var(--accent-fg);
  font-weight: 700;
}

.as-field-item.is-req-fold .field {
  border-color: rgba(173, 5, 3, 0.35);
}

.as-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.as-photo-slot {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg2);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.as-photo-slot strong {
  font-size: 20px;
  color: var(--accent-fg);
}

.as-photo-slot span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 0 6px;
}

.as-photo-slot.has-img {
  border-style: solid;
  padding: 0;
}

.as-photo-slot.has-img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.as-photo-bar {
  width: 100%;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.as-photo-bar span {
  font-size: 10px;
  padding: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-photo-del {
  border: 0;
  background: transparent;
  color: var(--alert);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 760px) {
  .assess-kpi-grid,
  .as-live-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .assess-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .as-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.av-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.av-type-seg,
.as-subject-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  gap: 2px;
}

.av-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.av-seg-btn.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.av-search-input {
  flex: 1 1 200px;
  min-width: 160px;
}

.assess-compare-selectors.av-cmp-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .assess-compare-selectors.av-cmp-3 {
    grid-template-columns: 1fr;
  }
}

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

#onboardingInviteSheet .oi-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

#onboardingInviteSheet .oi-btn-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#onboardingInviteSheet .oi-btn-primary,
#onboardingInviteSheet .oi-btn-sec,
#onboardingInviteSheet .oi-btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

#onboardingInviteSheet .oi-btn-primary {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
}

#onboardingInviteSheet .oi-btn-sec,
#onboardingInviteSheet .oi-btn-close {
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 420px) {
  #onboardingInviteSheet .oi-btn-row {
    grid-template-columns: 1fr;
  }
}

.cv-alert-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0 14px;
}

.cv-alert-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cv-alert-banner-top span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-fg);
}

.cv-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  white-space: nowrap;
}

.cv-alert-banner-text {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}
