/* ==========================================================================
   Synzel CRM — CRM (quadro, lista, tabela, gaveta, filtros, editor)
   Mobile-first.
   ========================================================================== */

/* ---------------------------------------------------------- Barra da lista -- */
.board-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.board-bar__title { display: flex; align-items: center; gap: 6px; min-width: 0; margin-right: auto; }
.board-bar__title h2 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-bar__hint { display: none; font-size: 12px; color: var(--muted); }
@media (min-width: 960px) {
  .board-bar__title { margin-right: 6px; }
  .board-bar__hint { display: block; margin-left: auto; }
}
@media (max-width: 639.98px) { .board-bar__import span, .board-bar__import { padding-left: 10px; padding-right: 10px; } }

/* ---------------------------------------------------------- Barra de visões -- */
.viewbar { display: flex; align-items: center; gap: 8px; margin: 0 -14px 10px; padding: 0 14px 2px; overflow-x: auto; scrollbar-width: none; }
.viewbar::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .viewbar { margin: 0 0 10px; padding: 0; flex-wrap: wrap; overflow: visible; } }
.vtabs { display: inline-flex; flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; }
.vtab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 500; min-height: 32px; }
.vtab:hover { color: var(--ink); }
.vtab.is-active { background: var(--purple); color: #fff; }
.vtab.is-soft { background: var(--purple-tint); color: var(--purple); }
.vtab .i { width: 14px; height: 14px; }
.vsep { width: 1px; height: 22px; background: var(--border-2); flex: none; }
.vsaved { display: flex; gap: 6px; flex: none; }
.vchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 32px; border-radius: 9px; border: 1px dashed var(--border-3); background: transparent; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.vchip .i { width: 13px; height: 13px; color: var(--muted); }
.vchip:hover { border-color: var(--purple-border); color: var(--ink); }
.vchip.is-active { border-style: solid; border-color: var(--purple); background: var(--purple-tint); color: var(--purple); font-weight: 600; }
.vchip.is-active .i { color: var(--purple); }
.vactions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.vsort { width: auto; max-width: 220px; min-height: 34px; }
@media (min-width: 960px) { .vsort { min-height: 32px; } }

/* ------------------------------------------------------------------ Filtros -- */
.kfil { margin-bottom: 12px; }
.kfil__line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kfil__search { position: relative; flex: 1 1 100%; }
.kfil__search > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.kfil__search .input { padding-left: 36px; }
@media (min-width: 640px) { .kfil__search { flex: 1 1 320px; } }
.kfil__toggle.is-on { background: var(--purple-tint); border-color: var(--purple-border); color: var(--purple); }
.kfil__n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--purple); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.kfil__count { font-size: 12.5px; color: var(--ink-3); margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kfil__count.is-empty { color: var(--red-ink); font-weight: 600; }
.kfil__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.kfil__active { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 8px 5px 11px; border-radius: 999px; background: var(--purple-tint); border: 1px solid var(--purple-border); color: var(--purple); font-size: 12px; }
.kfil__active span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfil__active .i { width: 12px; height: 12px; opacity: .7; }
.kfil__active:hover .i { opacity: 1; }

.kfil__panel { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 14px 12px; animation: pop .16s ease both; }
.kfil__group { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.kfil__group h4 { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kfil__range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 420px; }
.kfil__range .field > span { font-size: 11.5px; }
.kfil__fields { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .kfil__fields { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.kfil__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kfil__foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-3); color: var(--ink-2); font-size: 12.5px;
}
.fchip > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.fchip:hover { border-color: var(--purple-border); color: var(--ink); }
.fchip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.fchip.is-on > i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; }
.prio-dot--urgente { background: var(--red); } .prio-dot--alta { background: var(--amber); } .prio-dot--media { background: var(--blue); } .prio-dot--garantia { background: var(--teal); }

/* ------------------------------------------------------------ Peças de card -- */
.prio { display: inline-flex; align-items: center; flex: none; padding: 2px 7px; border-radius: var(--r-badge); font-size: 9.5px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; background: var(--surface-3); color: var(--ink-3); border: 0; }
.prio--urgente { background: var(--prio-urgente-bg); color: var(--prio-urgente); }
.prio--alta { background: var(--prio-alta-bg); color: var(--prio-alta); }
.prio--media { background: var(--prio-media-bg); color: var(--prio-media); }
.prio--garantia { background: var(--prio-garantia-bg); color: var(--prio-garantia); }
.prio[data-urgent], .prio.is-clickable { cursor: pointer; }
.prio-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.prio--pick { font-size: 11px; padding: 6px 10px; border-radius: 8px; opacity: .55; border: 1px solid transparent; min-height: 32px; }
.prio--pick:hover { opacity: .85; }
.prio--pick.is-on { opacity: 1; border-color: currentColor; }

.avatars { display: inline-flex; align-items: center; flex: none; }
.avatar--xs { width: 22px; height: 22px; border-radius: 50%; font-size: 9px; background: var(--av); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar--xs + .avatar--xs { margin-left: -6px; }
.avatar--more { background: var(--muted-2); --av: var(--muted-2); }
.mini-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mini-badge .i { width: 12px; height: 12px; }
.mini-badge.is-done { color: var(--green-ink); }
.opt-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--ink)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.opt-chip--toggle { min-height: 30px; padding: 4px 11px; font-size: 12px; opacity: .55; }
.opt-chip--toggle.is-on { opacity: 1; box-shadow: inset 0 0 0 1px var(--c); }
.opt-toggle { display: flex; flex-wrap: wrap; gap: 6px; }
.field-chip { font-size: 11px; color: var(--ink-3); background: var(--surface-3); border-radius: 6px; padding: 1px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-chip b { font-weight: 600; color: var(--muted); }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.stage-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* -------------------------------------------------------------------- Quadro -- */
.view-root { position: relative; min-height: 200px; }
.view-root.is-loading::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--purple), transparent); background-size: 50% 100%; animation: shimmer 1s infinite linear; }

.board {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 14px;
  margin: 0 -14px; padding: 2px 14px 16px;
}
@media (min-width: 640px) { .board { margin: 0 -20px; padding: 2px 20px 16px; scroll-padding: 0 20px; } }
@media (min-width: 960px) { .board { gap: 16px; margin: 0; padding: 2px 0 16px; scroll-snap-type: none; } }
html.is-dragging .board { scroll-snap-type: none; }

.col {
  flex: none; width: min(84vw, 310px); scroll-snap-align: start;
  background: var(--column); border-radius: var(--r-col); padding: 10px 9px 10px;
  display: flex; flex-direction: column; max-height: calc(100dvh - 250px);
}
@media (min-width: 960px) { .col { width: 290px; max-height: calc(100vh - 235px); } }
.col--closed { opacity: .92; }
.col__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; min-height: 36px; user-select: none; -webkit-user-select: none; }
.col__dot, .col-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; }
i.col__dot { display: inline-block; }
.col__name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col__sum { font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.col__pill { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); border-radius: 20px; padding: 1px 8px; flex: none; font-variant-numeric: tabular-nums; }
.col__menu { margin-right: -4px; }
.col__cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; overflow-y: auto; overscroll-behavior-y: contain; padding: 2px; margin: -2px; border-radius: 10px; }
.col__cards.dnd-over { background: color-mix(in srgb, var(--purple) 8%, transparent); }
.col__empty { padding: 12px 6px; text-align: center; font-size: 12px; color: var(--muted-2); font-style: italic; }
.col__more { margin-top: 8px; width: 100%; border: 0; background: var(--surface); color: var(--purple); border-radius: 9px; padding: 8px; font-size: 12px; font-weight: 600; }
.col__more:hover { background: var(--purple-tint); }
.col__add-wrap { margin-top: 8px; }
.col__add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 38px; border: 1px dashed var(--border-3); background: transparent; color: var(--ink-3); border-radius: 10px; font-size: 12.5px; font-weight: 500; }
.col__add:hover { border-color: var(--purple); color: var(--purple); }
.quick-add { display: flex; flex-direction: column; gap: 6px; }
.quick-add__input { min-height: 64px; font-size: 14px; }
.quick-add__actions { display: flex; align-items: center; gap: 6px; }

.board--skeleton .col.sk { height: 320px; }

.card {
  position: relative; flex: none;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-card);
  padding: 11px 12px; box-shadow: var(--shadow-card); cursor: pointer;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: border-color .12s, box-shadow .12s;
}
.card:hover { border-color: var(--purple-border); box-shadow: var(--shadow-hover); }
.card:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.card--urgent { box-shadow: inset 3px 0 0 var(--red), var(--shadow-card); }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card__title { font-size: 13px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.card__sub { margin-top: 5px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__sub--empty { color: var(--muted-2); }
.card__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.card__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border-2); min-height: 22px; }
.card__badges { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.card__value { font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ---- arrastar ---- */
.dnd-ghost { position: fixed; z-index: 500; pointer-events: none; margin: 0; box-shadow: 0 18px 40px rgba(20, 18, 40, .3) !important; opacity: .96; will-change: transform; }
.dnd-placeholder { flex: none; border-radius: var(--r-card); border: 2px dashed var(--purple-border); background: color-mix(in srgb, var(--purple) 7%, transparent); }
tr.dnd-placeholder { display: table-row; }
.dnd-source { display: none !important; }
html.is-dragging, html.is-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }

/* --------------------------------------------------------------------- Lista -- */
.lview { display: flex; flex-direction: column; gap: 10px; }
.lgroup { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.lgroup__head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lgroup.is-collapsed .lgroup__head { border-bottom: 0; }
.lgroup__toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px; min-height: 36px; color: var(--ink); font-size: 13.5px; text-align: left; }
.lgroup__toggle strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgroup__caret { width: 13px; height: 13px; color: var(--muted); transition: transform .15s; }
.lgroup.is-collapsed .lgroup__caret { transform: rotate(-90deg); }
.lgroup.is-collapsed .lgroup__rows, .lgroup.is-collapsed .col__more { display: none; }
.lgroup__rows { display: flex; flex-direction: column; min-height: 8px; }
.lgroup__rows.dnd-over { background: color-mix(in srgb, var(--purple) 6%, transparent); }
.lgroup__empty { padding: 12px; font-size: 12px; color: var(--muted-2); font-style: italic; }
.lgroup .col__more { border-radius: 0; margin: 0; border-top: 1px solid var(--border); }
.lrow { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 4px; border-bottom: 1px solid var(--border); cursor: pointer; background: var(--surface); -webkit-touch-callout: none; user-select: none; }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--surface-2); }
.lrow.dnd-placeholder { height: 48px !important; border-radius: 0; }
.lrow__grip { color: var(--muted-2); padding: 4px 2px; display: none; }
.lrow__grip .i { width: 14px; height: 14px; }
@media (hover: hover) { .lrow__grip { display: block; opacity: 0; } .lrow:hover .lrow__grip { opacity: 1; } }
.lrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-left: 6px; }
.lrow__title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__sub:empty { display: none; }
.lrow__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.lrow__meta { display: flex; align-items: center; gap: 8px; flex: none; }
.lrow__meta .mini-badge, .lrow__value { display: none; }
@media (min-width: 640px) { .lrow__meta .mini-badge, .lrow__value { display: inline-flex; } .lrow__value { font-size: 12px; font-weight: 600; } }

/* -------------------------------------------------------------------- Tabela -- */
.tview__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tview__scroll { overflow: auto; max-height: calc(100dvh - 270px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.tview__table { font-size: 13px; min-width: 100%; width: max-content; }
.tview__table th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.tview__table th.is-sortable { cursor: pointer; user-select: none; }
.tview__table th.is-sortable:hover { color: var(--ink); }
.sort-ind { margin-left: 4px; color: var(--purple); }
.tview__table td { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; padding: 8px 10px; height: 44px; }
.tview__table td:nth-child(2), .tview__table th:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.tview__table th:nth-child(2) { z-index: 3; background: var(--surface-2); }
.tview__open { width: 40px; padding: 0 0 0 6px !important; }
.tview__title { font-weight: 600; }
.tview__table tr:hover td { background: var(--surface-2); }
.tview__table td.is-editable { cursor: text; }
.tview__table td.is-editable:hover { box-shadow: inset 0 0 0 1px var(--purple-border); }
.tview__table td.is-editing { padding: 3px 4px; overflow: visible; box-shadow: inset 0 0 0 2px var(--purple); }
.tview__table td.is-editing .input { min-width: 160px; }
.tview__table td .opt-chip + .opt-chip { margin-left: 4px; }
.tview__more { display: flex; justify-content: center; padding: 12px; }
.col-chooser { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.col-chooser .is-disabled { opacity: .6; }

/* --------------------------------------------------------------------- Gaveta -- */
.drawer { position: fixed; inset: 0; z-index: 140; display: flex; justify-content: flex-end; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(10, 10, 20, .45); animation: fade .18s; }
.drawer__panel {
  position: relative; width: 100%; height: 100%;
  background: var(--surface); display: flex; flex-direction: column;
  box-shadow: var(--shadow-modal); animation: slide-left .22s ease both; outline: none;
  padding-top: env(safe-area-inset-top, 0px);
}
@media (min-width: 640px) { .drawer__panel { width: min(100%, 720px); border-radius: 18px 0 0 18px; } }
@media (min-width: 1100px) { .drawer__panel { width: min(1080px, 94vw); } }
.drawer.is-closing .drawer__panel { transform: translateX(100%); transition: transform .18s ease; }
.drawer.is-closing .drawer__backdrop { opacity: 0; transition: opacity .18s; }
html.is-drawer-card { overflow: hidden; }
.drawer__loading { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sk--line { height: 22px; border-radius: 8px; }
.sk--short { width: 50%; }
.sk--block { height: 220px; border-radius: 14px; }

.drawer__head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--border); flex: none; }
.drawer__spacer { flex: 1; }
.stage-select-wrap { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; min-height: 36px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); max-width: 60vw; }
.stage-select-wrap > .i { width: 13px; height: 13px; color: var(--muted); pointer-events: none; }
.stage-select { appearance: none; border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--ink); padding: 6px 0; min-width: 0; max-width: 100%; text-overflow: ellipsis; cursor: pointer; }
.stage-select:focus { outline: none; }
.stage-select-wrap:focus-within { box-shadow: var(--ring); border-color: var(--purple); }
.drawer__saved { font-size: 11.5px; color: var(--green-ink); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.drawer__saved.is-on { opacity: 1; }

.drawer__tabs { display: flex; gap: 4px; padding: 8px 14px 0; border-bottom: 1px solid var(--border); flex: none; }
.drawer__tab { border: 0; background: none; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.drawer__tab.is-active { color: var(--purple); border-color: var(--purple); }
@media (min-width: 1100px) { .drawer__tabs { display: none; } }

.drawer__body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.drawer__main, .drawer__side { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(24px + var(--safe-bottom)); }
.drawer__main { flex: 1; min-width: 0; }
.drawer__side { width: 100%; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.drawer__panel[data-tab="main"] .drawer__side { display: none; }
.drawer__panel[data-tab="side"] .drawer__main { display: none; }
@media (min-width: 1100px) {
  .drawer__panel .drawer__side { display: flex !important; }
  .drawer__panel .drawer__main { display: block !important; }
  .drawer__main { padding: 18px 24px 30px; }
  .drawer__side { width: 380px; flex: none; border-left: 1px solid var(--border); }
}

.drawer__title { width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; font-size: 21px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; color: var(--ink); padding: 4px 6px; margin: 0 -6px 8px; border-radius: 8px; }
.drawer__title:hover { background: var(--surface-3); }
.drawer__title:focus { outline: none; background: var(--surface-3); box-shadow: var(--ring); }

.props { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.prop { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
@media (min-width: 400px) { .prop { grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 8px; padding: 2px 0; } }
@media (min-width: 640px) { .prop { grid-template-columns: 170px minmax(0, 1fr); gap: 10px; } }
.prop__label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.prop__label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop__label .i { width: 14px; height: 14px; }
.prop__value { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.prop__value > .input, .prop__value > .input-group, .prop__value > select { flex: 1; min-width: 0; }
.prop__hint { width: 100%; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.prop__hint--urgent { color: var(--red-ink); }
.prop__hint .i { width: 12px; height: 12px; }
.input--prop { border-color: transparent; background: transparent; }
.input--prop:hover { background: var(--surface-3); }
.input--prop:focus { background: var(--surface); border-color: var(--purple); }
select.input--prop.has-color { box-shadow: inset 3px 0 0 var(--c); }
.input-group { display: flex; align-items: center; gap: 6px; min-width: 0; }
.input-group .input { flex: 1; min-width: 0; }
.props__add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 8px 0; }
.props__add:hover { color: var(--purple); }
.props__meta { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

.who-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); font-size: 12.5px; }
.who-chip button { width: 22px; height: 22px; border: 0; background: none; color: var(--muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.who-chip button:hover { background: var(--red-bg); color: var(--red-ink); }
.who-chip .i { width: 12px; height: 12px; }
.who-add { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 3px 10px; border-radius: 999px; border: 1px dashed var(--border-3); background: none; color: var(--muted); font-size: 12.5px; }
.who-add:hover { border-color: var(--purple); color: var(--purple); }
.who-add .i { width: 13px; height: 13px; }

.section { margin-top: 18px; }
.section__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.section__title .i { width: 15px; height: 15px; color: var(--purple); }
.extras { border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; }
.extras summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.extras summary .i { width: 14px; height: 14px; color: var(--muted); }
.extras__list { display: grid; grid-template-columns: minmax(100px, 40%) 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 12.5px; }
.extras__list dt { color: var(--muted); word-break: break-word; }
.extras__list dd { margin: 0; word-break: break-word; }

/* atividade */
.composer { background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; padding: 8px; }
.composer:focus-within { border-color: var(--purple); box-shadow: var(--ring); }
.composer__input { border: 0; min-height: 44px; padding: 4px 6px; box-shadow: none !important; background: transparent; }
.composer__bar { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.composer__bar .check .i { width: 13px; height: 13px; }
.composer__hint { display: none; }
@media (hover: hover) { .composer__hint { display: inline; margin-left: auto; } }
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed__more { align-self: center; margin: 8px 0; }
.act { display: flex; gap: 10px; padding: 8px 2px; }
.act--log { padding: 4px 2px; }
.act__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-3); margin: 7px 8px 0 9px; flex: none; }
.act__main { flex: 1; min-width: 0; }
.act__meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--ink-3); }
.act__meta strong { color: var(--ink); font-weight: 600; }
.act--log .act__meta { font-size: 12px; }
.act--log .act__body { display: inline; color: var(--ink-3); }
.act__meta time { color: var(--muted-2); font-size: 11px; }
.act__meta .badge .i { width: 11px; height: 11px; }
.act--comentario .act__body { margin-top: 4px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; font-size: 13px; line-height: 1.5; color: var(--ink); word-break: break-word; }
.act.is-restricted .act__body { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); background: color-mix(in srgb, var(--amber) 7%, var(--surface)); }
.act__del { margin-left: auto; border: 0; background: none; color: var(--muted-2); padding: 2px; opacity: 0; }
.act:hover .act__del, .act__del:focus-visible { opacity: 1; }
@media (hover: none) { .act__del { opacity: .7; } }
.act__del .i { width: 13px; height: 13px; }
.mention { color: var(--purple); background: var(--purple-tint); border-radius: 5px; padding: 0 3px; font-weight: 500; }
.mention-pop { position: fixed; z-index: 400; width: 250px; }
.menu__search { padding: 4px 4px 6px; }
.menu__hint { margin-left: auto; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.menu__item.is-focus { background: var(--surface-3); }
.menu .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.menu--palette { display: grid; grid-template-columns: repeat(5, 34px); gap: 6px; padding: 10px; min-width: 0; }
.swatch-btn { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; background: var(--c); }
.swatch-btn.is-on, .swatch-btn:hover { border-color: var(--ink); }
.color-dot { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-2); background: var(--c); }

/* checklist */
.cl-host { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cl { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px 10px; }
.cl__head { display: flex; align-items: center; gap: 8px; }
.cl__head > .i { width: 15px; height: 15px; color: var(--purple); }
.cl__title { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 600; font-size: 13.5px; padding: 6px; border-radius: 6px; }
.cl__title:focus { outline: none; background: var(--surface-3); }
.cl__pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 4px 0 6px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .25s; }
.cl__items { display: flex; flex-direction: column; }
.cl__item { display: flex; align-items: center; gap: 6px; padding: 2px 0; border-radius: 8px; background: var(--surface); }
.cl__item:hover { background: var(--surface-2); }
.cl__item.dnd-placeholder { height: 38px !important; }
.cl__grip { color: var(--muted-2); cursor: grab; padding: 6px 0 6px 2px; touch-action: none; }
.cl__grip .i { width: 13px; height: 13px; }
.cl__check { width: 18px; height: 18px; flex: none; margin: 0; }
.cl__text { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 6px; border-radius: 6px; font-size: 13px; }
.cl__text:focus { outline: none; background: var(--surface-3); }
.cl__item.is-done .cl__text { text-decoration: line-through; color: var(--muted); }
.cl__due { position: relative; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted-2); padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cl__due .i { width: 13px; height: 13px; }
.cl__due.date-chip--today { color: var(--amber-ink); }
.cl__due.date-chip--late { color: var(--red-ink); }
.cl__date-input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.cl__who { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted-2); border-radius: 50%; }
.cl__who .i { width: 14px; height: 14px; }
.cl__del { opacity: .5; }
.cl__item:hover .cl__del { opacity: 1; }
.cl__add { margin-top: 6px; padding-left: 24px; }

/* ------------------------------------------------------------ Editor rico -- */
.editor { position: relative; border: 1px solid transparent; border-radius: 12px; }
.editor:focus-within { border-color: var(--border-2); }
.editor__toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); opacity: 0; height: 0; overflow: hidden; transition: opacity .15s; }
.editor:focus-within .editor__toolbar { opacity: 1; height: auto; }
.editor__tool { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.editor__tool:hover { background: var(--surface-3); color: var(--ink); }
.editor__tool--strong { font-weight: 800; } .editor__tool--em { font-style: italic; } .editor__tool--u { text-decoration: underline; } .editor__tool--s { text-decoration: line-through; }
.editor__tool--code { font-family: var(--mono); font-size: 11px; }
.editor__tool .i { width: 14px; height: 14px; }
.editor__sep { width: 1px; background: var(--border); margin: 6px 4px; }
.editor__content { min-height: 90px; padding: 10px 12px; outline: none; font-size: 14px; line-height: 1.6; color: var(--ink); word-break: break-word; border-radius: 12px; }
.editor__content:hover { background: var(--surface-2); }
.editor:focus-within .editor__content { background: transparent; }
.editor__content.is-empty::before { content: attr(data-placeholder); color: var(--muted-2); pointer-events: none; position: absolute; }
.editor__content > * { margin: 0 0 .5em; }
.editor__content h2 { font-size: 18px; font-weight: 700; margin-top: .8em; }
.editor__content h3 { font-size: 15px; font-weight: 700; margin-top: .6em; }
.editor__content ul, .editor__content ol { padding-left: 1.4em; }
.editor__content ul[data-todo] { list-style: none; padding-left: 0; }
.editor__content ul[data-todo] > li { position: relative; padding-left: 28px; }
.editor__content ul[data-todo] > li::before { content: ''; position: absolute; left: 2px; top: .3em; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--border-3); background: var(--surface); cursor: pointer; }
.editor__content ul[data-todo] > li[data-checked="true"] { color: var(--muted); text-decoration: line-through; }
.editor__content ul[data-todo] > li[data-checked="true"]::before { background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--purple); }
.editor__content blockquote { border-left: 3px solid var(--purple-border); padding-left: 12px; color: var(--ink-2); }
.editor__content pre { background: var(--surface-3); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; }
.editor__content code { background: var(--surface-3); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.editor__content hr { border: 0; border-top: 1px solid var(--border-2); margin: 1em 0; }
.editor__content a { text-decoration: underline; }
.editor__slash { position: fixed; width: 240px; max-height: 320px; overflow-y: auto; }

/* ---------------------------------------------------------- Modais do CRM -- */
.modal__text { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.modal__body > .form + .form { margin-top: 12px; }

.tm__folders { display: flex; flex-direction: column; gap: 10px; }
.tm__folder { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tm__folder.dnd-placeholder { height: 60px !important; }
.tm__folder-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: 12px 12px 0 0; }
.tm__grip { color: var(--muted-2); cursor: grab; padding: 6px 4px; touch-action: none; display: flex; }
.tm__grip .i { width: 14px; height: 14px; }
.tm__icon { width: 15px; height: 15px; color: var(--ink-3); }
.tm__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tm__count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm__lists { display: flex; flex-direction: column; padding: 4px; min-height: 20px; }
.tm__lists.dnd-over { background: color-mix(in srgb, var(--purple) 6%, transparent); }
.tm__list { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 12px; border-radius: 8px; background: var(--surface); }
.tm__list:hover { background: var(--surface-3); }
.tm__list.is-hidden .tm__name { opacity: .6; font-style: italic; }
.tm__list.is-new { animation: pop .4s ease; box-shadow: inset 0 0 0 1px var(--purple); }
.tm__list.dnd-placeholder { height: 38px !important; }
.tm__add { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 8px 12px; align-self: flex-start; }
.tm__add:hover { color: var(--purple); }
.tm__add .i { width: 13px; height: 13px; }
.empty--compact { margin: 20px auto; }

.perm { display: flex; flex-direction: column; gap: 8px; }
.perm__status { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--green-bg); color: var(--green-ink); font-size: 13px; font-weight: 500; }
.perm__status.is-restricted { background: var(--amber-bg); color: var(--amber-ink); }
.perm__group { display: flex; flex-direction: column; gap: 2px; }
.perm__group--scroll { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.perm__opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.perm__opt:hover { background: var(--surface-3); }
.perm__opt input { width: 17px; height: 17px; margin: 0; }
.perm .avatar--sm { width: 24px; height: 24px; }

.lset__tabs { margin-bottom: 14px; }
.lset { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.lset > .btn { align-self: flex-start; }
.lset__list { display: flex; flex-direction: column; gap: 6px; }
.lset__row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.lset__row.dnd-placeholder { height: 46px !important; }
.lset__row .input { flex: 1; min-width: 0; }
.lset__grip { color: var(--muted-2); cursor: grab; padding: 6px 2px; display: flex; touch-action: none; }
.lset__grip .i { width: 14px; height: 14px; }
.lset__closed { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 479.98px) { .lset__closed span { display: none; } }
.lset__type { width: 30px; height: 30px; border-radius: 8px; background: var(--purple-tint); color: var(--purple); display: flex; align-items: center; justify-content: center; flex: none; }
.lset__type .i { width: 14px; height: 14px; }
.lset__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lset__name strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lset__name small { font-size: 11.5px; color: var(--muted); }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opts__row { display: flex; align-items: center; gap: 8px; }
.opts__row .input { flex: 1; }

.bulk-row { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 4px 10px; font-size: 13px; }
.bulk-row input[type=checkbox] { width: 17px; height: 17px; margin: 0; }
.bulk-row > .input { grid-column: 2; }
@media (min-width: 640px) { .bulk-row { grid-template-columns: 20px 160px 1fr; } .bulk-row > .input { grid-column: auto; } }

.dest-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.dest { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; }
.dest span { display: flex; flex-direction: column; min-width: 0; }
.dest strong { font-size: 13px; }
.dest small { font-size: 11.5px; color: var(--muted); }
.dest .i { color: var(--muted); }
.dest.is-on { border-color: var(--purple); background: var(--purple-tint); }
.dest.is-on .i { color: var(--purple); }

/* ----------------------------------------------------------------- Importar -- */
.import { max-width: 980px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 28px 16px; border: 2px dashed var(--border-3); border-radius: 14px; background: var(--surface-2); cursor: pointer; margin-bottom: 12px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--purple); background: var(--purple-tint-2); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone > .i { width: 32px; height: 32px; color: var(--purple); }
.dropzone small { color: var(--muted); font-size: 12px; }
.import-file { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.import-file__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.import-file__head > .i { color: var(--purple); }
.import-file__head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.import-file .table td .input { min-width: 200px; }

/* card somente leitura */
.is-readonly .props :disabled { cursor: default; opacity: 1; }
.is-readonly .props select:disabled { appearance: none; background-image: none; }
