/* ===== Identidade Ekin — tema escuro (padrao) + claro ===== */

:root,
:root[data-theme="dark"] {
  --bg: #0c0c0f;
  --surface: #151519;
  --surface-2: #1c1c22;
  --surface-3: #232329;
  --border: #2b2b33;
  --border-soft: #232329;
  --text: #ececed;
  --text-muted: #8b8b95;
  --text-dim: #63636d;
  --accent: #e8b23c;
  --accent-hover: #f0c256;
  --accent-ink: #17140b;
  --link: #e8b23c;
  --ok-bg: rgba(62, 207, 142, 0.14);
  --ok-ink: #4ad991;
  --err-bg: rgba(229, 72, 77, 0.14);
  --err-ink: #ff6b6f;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #eceef1;
  --border: #e2e5e9;
  --border-soft: #eceef1;
  --text: #191c20;
  --text-muted: #6b7280;
  --text-dim: #99a0aa;
  --accent: #c98a10;
  --accent-hover: #b57c0c;
  --accent-ink: #ffffff;
  --link: #b8790a;
  --ok-bg: #e7f6ec;
  --ok-ink: #1c7a3f;
  --err-bg: #fdeaea;
  --err-ink: #b3261e;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 14px/1.55 "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* o drawer de detalhes fica fora da tela e nao pode gerar rolagem horizontal na pagina */
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Shell com sidebar ===== */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 700; letter-spacing: 0.06em; font-size: 13px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-item {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: var(--text-muted); font-weight: 500; font-size: 13.5px;
  border-left: 2px solid transparent;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: var(--surface-2); color: var(--accent);
  border-left-color: var(--accent);
}

.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.sidebar-foot .who { display: flex; flex-direction: column; margin-bottom: 10px; }
.sidebar-foot .who strong { font-size: 13px; word-break: break-all; }
.sidebar-foot .who span { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.main { display: flex; flex-direction: column; min-width: 0; }
.main-top {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 14px 28px; border-bottom: 1px solid var(--border);
}
/* largura 100% do monitor (sem teto): a folga lateral cresce um pouco em telas grandes */
.main-body { padding: 24px clamp(24px, 2.4vw, 56px) 60px; width: 100%; max-width: none; }

/* ===== Tipografia de pagina ===== */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 19px; margin: 0 0 2px; font-weight: 650; }
.page-head .sub { color: var(--text-muted); font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }

/* ===== Stat tiles ===== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat .n { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.stat .l { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* ===== Forms ===== */
label { display: block; font-size: 12.5px; color: var(--text-muted); margin: 12px 0 5px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font: inherit;
}
input::placeholder { color: var(--text-dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; }
@media (max-width: 760px) { .form-2col, .form-3col { grid-template-columns: 1fr; } }

/* ===== Botoes ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 15px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--text-dim); }
.btn.danger { background: transparent; color: var(--err-ink); border-color: var(--err-bg); }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }

/* ===== Tabelas ===== */
.table-scroll { overflow-x: auto; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 820px; }
.table-scroll td .ph { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); font-weight: 600; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.row-clickable { cursor: pointer; }
tbody tr.is-open { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
tbody tr.row-error { box-shadow: inset 3px 0 0 var(--err-ink); }
tbody tr.row-stale { box-shadow: inset 3px 0 0 #d99a1e; }
td .muted-cell { color: var(--text-dim); }
/* Data e o botao "Detalhes" nao quebram linha e ficam sempre visiveis */
.table-scroll th:last-child, .table-scroll td:last-child,
.table-scroll th:nth-last-child(2), .table-scroll td:nth-last-child(2) { white-space: nowrap; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-3); font-size: 11.5px; color: var(--text); border: 1px solid var(--border);
}
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); border: none; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }

/* ===== Flash / avisos ===== */
.flash { padding: 11px 15px; border-radius: 9px; margin-bottom: 16px; font-size: 13px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.err { background: var(--err-bg); color: var(--err-ink); }

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.hint.err-text { color: var(--err-ink); }
.hint code { background: var(--surface-3); padding: 1px 6px; border-radius: 4px; cursor: pointer; color: var(--text); }

/* ===== Filtros ===== */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters > div:first-child { grid-column: span 2; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } .filters > div:first-child { grid-column: span 2; } }

/* Seletor de periodo (calendario) */
.date-field { position: relative; }
.date-btn {
  width: 100%; text-align: left; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer;
}
.date-btn:hover { border-color: var(--text-dim); }
.date-btn.active { border-color: var(--accent); }
.date-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0;
  width: 286px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 12px;
}
.date-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.date-presets button {
  padding: 5px 10px; font-size: 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface-2); color: var(--text); cursor: pointer;
}
.date-presets button:hover { border-color: var(--accent); color: var(--accent); }
.date-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.date-cal-head button { background: none; border: none; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 8px; }
.date-cal-head button:hover { color: var(--text); }
.date-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: 10px; color: var(--text-dim); padding: 2px 0; }
.cal-d { border: none; background: none; color: var(--text); font: inherit; font-size: 12.5px; padding: 6px 0; border-radius: 6px; cursor: pointer; }
.cal-d:hover { background: var(--surface-2); }
.cal-d.inr { background: var(--surface-3); border-radius: 0; }
.cal-d.sel { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.date-pop-foot { margin-top: 10px; text-align: right; }

/* Novo desde a ultima visita */
.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: middle; }
/* Parado sem contato */
.dot-late { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d99a1e; margin-right: 7px; vertical-align: middle; }
.newbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  background: var(--accent); color: var(--accent-ink); padding: 8px 8px 8px 16px;
  border-radius: 999px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
}
.newbar button { background: rgba(0, 0, 0, 0.18); border: none; color: inherit; padding: 5px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; }

/* Tentativas de contato por canal (WhatsApp / Ligacao / LinkedIn / E-mail) */
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cdot-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-dim); }
.cdot-try { background: #d99a1e; }
.cdot-no { background: var(--err-ink); }
.cdot-ok { background: #2fae76; }
/* grade 2x2 na linha: bolinha (ultimo resultado) + sigla do canal + quantidade de tentativas */
.cg { display: grid; grid-template-columns: auto auto; gap: 3px 12px; font-size: 11.5px; color: var(--text-muted); }
.cg-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cg-item b { color: var(--text); font-weight: 700; min-width: 8px; }
.cg-item.zero { opacity: .55; }
.cattempt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cattempt-chip { position: relative; }
.cattempt-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.cattempt-btn:hover { border-color: var(--text-dim); }
.cattempt-btn b { color: var(--text-muted); font-weight: 700; }
.cattempt-log .log-move { display: inline-flex; align-items: center; gap: 7px; }
.drawer-section-first { margin-top: 0; padding-top: 0; border-top: none; margin-bottom: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.cattempt-log { max-height: 150px; overflow-y: auto; }

/* Anotacoes e historico no drawer */
.err-text { color: var(--err-ink); }
.drawer-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.drawer-section h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.drawer-section form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.drawer-section textarea { width: 100%; min-height: 52px; resize: vertical; }
.note-item { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.note-item:last-child { border-bottom: none; }
.note-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.note-meta a { color: var(--err-ink); }
.note-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.log-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.log-item:last-child { border-bottom: none; }
.log-meta { color: var(--text-dim); font-size: 11px; white-space: nowrap; }

/* Ordenacao e paginacao */
.th-sort { color: inherit; }
.th-sort:hover { color: var(--text); text-decoration: none; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head h2 { margin: 0; }
.per-page { display: flex; align-items: center; gap: 6px; }
.per-opt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; padding: 3px 7px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.per-opt:hover { color: var(--text); text-decoration: none; background: var(--border-soft); }
.per-opt.active { color: var(--accent-ink); background: var(--accent); }

/* Contato rapido do lead */
.lead-contacts { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
.chip {
  font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; line-height: 1;
}
.chip:hover { text-decoration: none; filter: brightness(0.95); }
.chip-wa { background: #25d366; color: #08331b; }
.drawer-actions { display: flex; gap: 8px; padding: 14px 22px 0; flex-wrap: wrap; }

/* Mini-funil + cor por status */
.funnel { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.funnel-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); background: var(--surface);
}
.funnel-pill b { color: var(--text); font-weight: 800; }
.funnel-pill:hover { text-decoration: none; border-color: var(--text-dim); }
.funnel-pill.active { box-shadow: 0 0 0 2px currentColor inset; }
.funnel-pill.st-win, .funnel-pill.st-lose, .funnel-pill.st-c1, .funnel-pill.st-c2,
.funnel-pill.st-c3, .funnel-pill.st-c4, .funnel-pill.st-c5 { border-color: currentColor; }

.st-win { color: #2fae76; }
.st-lose { color: #e5484d; }
.st-c1 { color: #d99a1e; }
.st-c2 { color: #3f7fe0; }
.st-c3 { color: #9a5fe0; }
.st-c4 { color: #2fa8a0; }
.st-c5 { color: #e07f2f; }
.st-none { color: var(--text-dim); }
.st-cell .statusSel { font-weight: 600; }
.st-cell.st-win .statusSel { color: #2fae76; }
.st-cell.st-lose .statusSel { color: #e5484d; }
.st-cell.st-c1 .statusSel { color: #d99a1e; }
.st-cell.st-c2 .statusSel { color: #3f7fe0; }
.st-cell.st-c3 .statusSel { color: #9a5fe0; }
.st-cell.st-c4 .statusSel { color: #2fa8a0; }
.st-cell.st-c5 .statusSel { color: #e07f2f; }
.drawer-actions:empty { display: none; }
.chip-wa-btn { background: #25d366; border-color: #25d366; color: #08331b; }
.chip-wa-btn:hover { background: #25d366; border-color: #25d366; filter: brightness(0.95); }

/* ===== Status editavel ===== */
.statusSel { width: auto; min-width: 138px; padding: 6px 8px; font-size: 12.5px; }
.saveHint { font-size: 11.5px; margin-left: 6px; color: var(--text-dim); }
.saveHint.ok { color: var(--ok-ink); }
.saveHint.err { color: var(--err-ink); }

/* ===== Drawer de detalhes do lead ===== */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 40;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 50;
  transform: translateX(100%); transition: transform 0.2s ease;
  display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-head .drawer-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.drawer-close { background: none; border: none; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.drawer-close:hover { color: var(--text); }
.drawer-body { padding: 8px 22px 28px; overflow-y: auto; }
.kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.kv .kv-row { padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.kv .kv-row:last-child { border-bottom: none; }
.kv .kv-k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 3px; }
.kv .kv-v { font-size: 13.5px; word-break: break-word; }
.kv .kv-v.empty { color: var(--text-dim); }
.kv-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
}
.kv-link:hover { background: var(--surface-2); text-decoration: none; }

/* Escolha de campos visiveis (admin) */
.field-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 7px 16px; margin-top: 10px; }
.fp-item {
  display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0;
}
.fp-item input { width: auto; }

/* Convites pendentes */
.invite-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.invite-row:first-of-type { border-top: none; }
.invite-who { min-width: 180px; font-size: 13px; }
.invite-link {
  flex: 1 1 260px; width: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; padding: 7px 9px; background: var(--surface-2); color: var(--text-muted);
}
.invite-row form { margin: 0; }

/* ===== Login ===== */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 360px; }
.login-box .brand { justify-content: center; padding-bottom: 22px; }
.login-box .card { padding: 28px; }
.login-box h1 { font-size: 17px; margin: 0 0 4px; }

/* ===== Responsivo ===== */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px; padding: 12px 16px;
  }
  .brand { padding: 0 8px 0 0; }
  .nav { flex-direction: row; flex-wrap: wrap; margin: 0; flex: 1; }
  .nav-item { border-left: none; border-bottom: 2px solid transparent; padding: 6px 10px; }
  .nav-item.active { border-left: none; border-bottom-color: var(--accent); }
  .sidebar-foot { margin: 0; padding: 0; border: none; display: flex; align-items: center; gap: 12px; }
  .sidebar-foot .who { display: none; }
  .main-body { padding: 18px 16px 48px; }
  .main-top { padding: 10px 16px; }
}

img { max-width: 100%; }

/* ===== Tabela de leads compacta: tudo importante visivel sem rolar pro lado ===== */
.leads-table th, .leads-table td { padding: 9px 10px; }
.leads-table td.cell-email { max-width: clamp(220px, 20vw, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leads-table .lead-contacts { display: flex; margin: 3px 0 0; }
.leads-table .statusSel { min-width: 118px; }
.leads-table td.cell-det, .leads-table th:last-child { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.35); }
.leads-table tbody tr:hover td.cell-det, .leads-table tbody tr.is-open td.cell-det { background: var(--surface-2); }
.leads-table .btn.sm { padding: 5px 9px; }
.cattempt-chip { display: inline-flex; align-items: center; gap: 4px; }
.cattempt-btn b { color: var(--text); font-size: 13px; min-width: 8px; text-align: center; }
.cattempt-plus {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--accent); font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
}
.cattempt-plus:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cattempt-plus:disabled, .cattempt-btn:disabled { opacity: .5; cursor: default; }
.cattempt-total { margin: 2px 0 6px; font-weight: 600; }

/* "−" (tirar tentativa): mesmo desenho do "+", mas neutro */
.cattempt-minus {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
}
.cattempt-minus:hover:not(:disabled) { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-ink); }
.cattempt-minus:disabled { opacity: .3; cursor: default; }
.cattempt-removed { opacity: .65; }
.cattempt-removed .log-meta { color: var(--err-ink); text-align: right; }
.cattempt-removed s { text-decoration-thickness: 1.5px; }
.log-item.cattempt-removed { flex-direction: column; align-items: flex-start; gap: 2px; }
.cattempt-removed .log-meta { text-align: left; white-space: normal; }
.note-removed { opacity: .65; }
.note-removed .note-meta { color: var(--err-ink); }

.cattempt-static { cursor: default; pointer-events: none; }

/* ===== Visao enxuta do CLIENTE (sem menu lateral): titulo + tabela simples ===== */
.lean { width: 100%; max-width: none; margin: 0; padding: 36px clamp(24px, 3.5vw, 96px) 60px; }
.lean-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.lean-title h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01em; }
.lean-title .sub { color: var(--text-muted); font-size: 13.5px; }
.lean-actions { display: flex; gap: 10px; align-items: center; }
.lean-actions form { margin: 0; }
.lean-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.lean-filters input[type=text] { flex: 1 1 240px; width: auto; min-width: 200px; }
.lean-filters select { width: auto; min-width: 150px; }
.lean-card { padding: 0; overflow: hidden; }
.lean-card > p { padding: 20px; margin: 0; }
.lean-card .pager { padding: 12px 16px; margin: 0; border-top: 1px solid var(--border-soft); }
.table-scroll table.lean-table { min-width: 0; }
.lean-table th, .lean-table td { padding: 12px 12px; vertical-align: top; }
/* A tabela SEMPRE cabe na tela: cabecalhos e textos longos quebram linha dentro da propria coluna
   (nada de nowrap, que forcava a tabela a ficar mais larga que o monitor e escondia o Status). */
.lean-table td { min-width: 84px; overflow-wrap: anywhere; word-break: normal; line-height: 1.4; }
.lean-table th { white-space: normal; overflow-wrap: anywhere; min-width: 84px; line-height: 1.3; }
.lean-table th:first-child, .lean-table td:first-child { min-width: 96px; }
.lean-table td:last-child, .lean-table th:last-child { white-space: nowrap; }
/* se mesmo assim houver muitas colunas, o Status fica grudado na direita, sempre visivel */
.lean-table th:last-child, .lean-table td:last-child { position: sticky; right: 0; background: var(--surface, #14141a); z-index: 1; }
.status-pill {
  display: inline-block; padding: 4px 12px; border: 1px solid currentColor; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
@media (max-width: 760px) { .lean { padding: 20px 16px 40px; } }

/* Seletor de campos com "nome da coluna" (admin) */
.fp-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fp-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) 1fr; gap: 14px; align-items: center; }
.fp-row .fp-item { min-width: 0; word-break: break-word; }
.fp-row input[type=text] { padding: 6px 9px; font-size: 12.5px; }
.fp-head { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.fp-head em { text-transform: none; letter-spacing: 0; font-style: normal; font-weight: 400; }
@media (max-width: 760px) { .fp-row { grid-template-columns: 1fr; gap: 4px; } }
