/* =========================================================================
   app.css — design do protótipo 1 (claro, macio, arredondado)
   Mobile-first; ≥ 960px vira o layout do protótipo 2 (grade com pontinhos).
   ========================================================================= */

:root {
  --bg: #E7E8E3;
  --card: #F3F3F0;
  --surface: #FFFFFF;
  --tile: #DEDCCF;
  --tile-desk: #EEEEEA;
  --ink: #121212;
  --ink-2: #323230;
  --muted: #767670;
  --line: rgba(18, 18, 18, .09);
  --accent: #22C55E;
  --danger: #E5484D;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 11px;

  --sh-soft: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 30px rgba(20, 20, 10, .06);
  --sh-btn: 0 4px 12px rgba(20, 20, 10, .08);
  --sh-float: 0 30px 60px rgba(10, 10, 5, .18), 0 6px 18px rgba(10, 10, 5, .08);

  --font: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--font); font-size: 15px; line-height: 1.4;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Primitivos ---------- */
.card { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--sh-soft); }
.title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.section-title { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.empty { color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--sh-btn);
  transition: transform .15s var(--ease), background .15s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: scale(.96); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.xs { width: 32px; height: 32px; }
.icon-btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.icon-btn.ghost:hover { color: var(--danger); background: rgba(229,72,77,.1); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(145deg, #2b2b2b, #0e0e0e); color: #fff;
  font-weight: 700; font-size: 16px;
  box-shadow: var(--sh-btn), 0 0 0 2.5px var(--surface);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: transform .15s var(--ease), background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2a2a; }
.btn-soft { background: var(--surface); box-shadow: var(--sh-btn); }
.btn-ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: rgba(18,18,18,.04); }
.btn-ghost.danger { color: var(--danger); }
.btn-block { width: 100%; }

.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input:not([type=color]), .field select, .mini-field select {
  height: 46px; padding: 0 14px; border-radius: var(--r-md); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  width: 100%; outline: none; transition: box-shadow .15s;
}
.field input:focus, .field select:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.form-error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 0 0 10px; }

/* ---------- Toast (com botão Desfazer opcional) ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px);
  box-shadow: var(--sh-float); transition: .25s var(--ease); font-size: 14px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-act {
  color: #4ADE80; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); font-size: 13px;
}
.toast-act:hover { background: rgba(255,255,255,.2); }

/* =======================================================================
   LOGIN
   ======================================================================= */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); padding: 32px 26px 26px; text-align: left; }
.login-card .title { margin-top: 18px; }
.login-card .muted { margin-bottom: 26px; }
.brand-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 24px; height: 24px; }
.hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }

/* =======================================================================
   SHELL / TOPO
   ======================================================================= */
.shell {
  max-width: 520px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(36px + env(safe-area-inset-bottom));
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 2px 4px 14px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }

/* =======================================================================
   CALENDÁRIO — mobile (protótipo 1)
   ======================================================================= */
.cal-card { padding: 14px 12px 14px; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px; padding: 0 2px;
}
.cal-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.month {
  margin: 0; min-width: 96px; text-align: center;
  font-size: 17.5px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap;
}
.today-pill {
  height: 32px; padding: 0 12px; border-radius: 999px;
  font-weight: 700; font-size: 12.5px; color: var(--ink-2);
  background: var(--surface); box-shadow: var(--sh-btn);
  transition: opacity .15s, transform .15s;
}
.today-pill.is-current {
  background: transparent; box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
}

.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 6px; }
.weekdays span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.weekdays .wd-m { display: none; }
.weekdays b { font-weight: 700; }

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

.day {
  --fill: var(--tile); --fill-ink: var(--ink-2); --ring: transparent;
  position: relative; width: 100%; min-width: 0; aspect-ratio: 1 / 1; border-radius: var(--r-sm);
  background: var(--fill); color: var(--fill-ink);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 5px 6px; text-align: left;
  transition: transform .16s var(--ease), box-shadow .16s;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset;
}
.day:hover { transform: translateY(-1.5px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.day:active { transform: scale(.95); }
.day .num { font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.day.has-board { box-shadow: 0 5px 12px rgba(0,0,0,.08); }
.day.pending { box-shadow: none; }
.day.pending::after {   /* tracejado = quadro de hoje/futuro ainda vazio */
  content: ''; position: absolute; inset: 2.5px; border-radius: 8.5px;
  border: 1.5px dashed var(--ring); opacity: .75; pointer-events: none;
}
.day.past-empty::before { /* dia passado cujo quadro ficou vazio: traço discreto */
  content: ''; position: absolute; top: 7px; right: 7px;
  width: 6px; height: 2px; border-radius: 1px;
  background: rgba(18, 18, 18, .22);
}
.day.out { opacity: .32; background: rgba(222, 220, 207, .55); box-shadow: none; }
.day.today { outline: 2px solid var(--ink); outline-offset: 1.5px; }
.day.today .num { font-weight: 800; }

/* Indicadores no canto superior direito no mobile (contagem + post avulso) */
.dots {
  position: absolute; top: 5px; right: 5px;
  display: flex; gap: 2.5px; align-items: center; justify-content: flex-end;
  max-width: 72%;
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.dot.hollow { display: none; } /* no mobile o fundo tracejado já indica quadro vazio */
.dot.filled {
  background: currentColor; opacity: .78;
}
.dot.free {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1.5px #fff;
}

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  margin: 14px 2px 0; padding-top: 12px; border-top: 1px solid var(--line);
}
.legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--ink-2);
}
.legend-item b { font-weight: 700; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-item i.free {
  background: var(--ink); border-radius: 50%; width: 8px; height: 8px;
  box-shadow: 0 0 0 1.5px var(--surface);
}
.legend-item em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; }

/* =======================================================================
   PRÓXIMOS POSTS
   ======================================================================= */
.side { margin-top: 22px; }
.side .section-title { margin: 0 4px 12px; }
.upcoming { display: grid; gap: 10px; }
.up-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--r-lg); padding: 12px;
  box-shadow: var(--sh-soft); transition: transform .18s var(--ease);
  min-width: 0;
}
.up-card:hover { transform: translateY(-2px); }
.up-icon {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center;
}
.up-icon.hollow { background: transparent; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.up-badge {
  position: absolute; right: -1px; top: -1px; width: 13px; height: 13px;
  border-radius: 50%; box-shadow: 0 0 0 2.5px var(--surface);
}
.up-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.up-body strong {
  font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-date {
  color: var(--muted); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px; min-width: 0;
}
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.status-chip i {
  width: 16px; height: 16px; border-radius: 5px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); position: relative; flex: none;
}
.status-chip i::after { content: ''; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--c); }
.status-chip i.hollow::after { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.up-card.empty-slot { background: rgba(255,255,255,.45); box-shadow: inset 0 0 0 1.5px var(--line); }
.up-nets { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.up-nets b {
  font-size: 10.5px; font-weight: 700; color: var(--ink-2);
  background: var(--card); padding: 2px 6px; border-radius: 6px;
}

/* =======================================================================
   SHEET (bottom sheet no mobile / centralizado em telas médias / modal no desktop)
   ======================================================================= */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 10, .34); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s; }
.sheet {
  position: relative; width: 100%; max-width: 540px; max-height: 92dvh;
  background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-float); transform: translateY(100%); transition: transform .26s var(--ease);
  display: flex; flex-direction: column;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-drag {
  padding: 10px 0 4px; cursor: grab; touch-action: none; flex: none;
  display: grid; place-items: center;
}
.sheet-drag:active { cursor: grabbing; }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: rgba(0,0,0,.2); }
.sheet-inner { overflow-y: auto; padding: 4px 14px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 2px 14px;
}
.sh-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.sheet-head h2 {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.today-tag {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--ink); color: #fff; flex: none;
}
.sh-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.save-state {
  font-size: 12px; font-weight: 600; color: #15803D;
  background: rgba(22, 163, 74, .12); padding: 4px 9px; border-radius: 999px;
  opacity: 0; transition: opacity .2s; white-space: nowrap;
}
.save-state.visible { opacity: 1; }
.save-state.saving { color: var(--muted); background: rgba(0,0,0,.06); }

/* ---------- Painel do dia ---------- */
.board-sec {
  background: var(--card); border-radius: var(--r-lg);
  padding: 12px; margin-bottom: 12px; box-shadow: var(--sh-soft);
}
.board-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.board-head .sw { width: 32px; height: 32px; border-radius: 10px; background: var(--c); flex: none; display: grid; place-items: center; color: #fff; }
.board-head .free-sw { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.bh-text { display: grid; flex: 1; min-width: 0; }
.bh-text strong { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-text span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-head .count {
  font-style: normal; font-weight: 700; font-size: 12px; color: var(--ink-2);
  background: var(--surface); padding: 4px 9px; border-radius: 999px; flex: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Cartão de post (expandido) */
.post {
  background: var(--surface); border-radius: var(--r-md);
  padding: 12px; margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
  border-left: 4px solid var(--c);
}
.post-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.post-title {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 15px; outline: none;
  transition: border-color .15s, background .15s;
}
.post-title::placeholder { font-weight: 500; color: var(--muted); }
.post-title:focus { border-color: var(--ink); background: var(--surface); }

.post-content {
  width: 100%; border: 1px solid var(--line); outline: 0; resize: none; overflow: hidden;
  min-height: 76px; background: var(--card); border-radius: 9px;
  padding: 9px 11px; margin: 0 0 10px; line-height: 1.45; font-size: 14.5px;
  transition: border-color .15s, background .15s;
}
.post-content::placeholder { color: var(--muted); }
.post-content:focus { border-color: var(--ink); background: var(--surface); }

.post-row-label {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 6px;
}

.mini-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mini-field select { height: 38px; flex: 1; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* Cartão de post recolhido (Postado) */
.post.collapsed {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer; background: rgba(255,255,255,.75);
  transition: background .15s;
}
.post.collapsed:hover { background: var(--surface); }
.done-pill {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; flex: none;
}
.collapsed-title {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collapsed-nets { display: flex; gap: 3px; flex: none; }
.collapsed-nets b { font-size: 10px; font-weight: 700; background: var(--card); color: var(--ink-2); padding: 2px 5px; border-radius: 5px; }
.collapsed-tag { font-size: 11.5px; font-weight: 700; color: var(--muted); flex: none; }
.collapsed-chev { color: var(--muted); display: grid; place-items: center; flex: none; }

/* Chips de redes */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--card); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line); transition: .15s;
}
.chip i {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip.on i { box-shadow: 0 0 0 1.5px rgba(255,255,255,.9); }
.chip-check { display: inline-grid; place-items: center; margin-left: -1px; color: #4ADE80; }

/* Seletor de status */
.seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px; background: var(--card); padding: 4px; border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  height: 32px; padding: 0 6px; border-radius: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.seg button i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none;
}
.seg button.on {
  background: var(--sc); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.seg button.on i { background: #fff; }

.add-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 44px;
  border-radius: var(--r-md); font-weight: 700; font-size: 14px; color: var(--ink);
  border: 1.5px dashed color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  transition: background .15s, transform .15s;
}
.add-btn:hover { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.add-btn.free-add {
  border-style: solid; border-color: var(--line);
  background: var(--surface); box-shadow: var(--sh-btn);
}
.add-btn.free-add:hover { background: #FAFAFA; }
.limit { margin: 4px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* =======================================================================
   CONFIGURAÇÕES
   ======================================================================= */
.shell.narrow { max-width: 760px; }
.cfg-sec { padding: 18px 14px; margin-bottom: 16px; }
.cfg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.board-list { display: grid; gap: 10px; }
.board-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-soft); flex-wrap: wrap; }
.board-card .sw { width: 44px; height: 44px; border-radius: 13px; background: var(--c); flex: none; align-self: flex-start; }
.board-card.ended { opacity: .6; }
.bc-body { display: grid; gap: 3px; flex: 1; min-width: 160px; }
.bc-body strong { font-size: 16px; font-weight: 700; }
.bc-body > span { font-size: 13px; color: var(--muted); }
.bc-nets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.bc-nets b { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--card); padding: 2px 8px; border-radius: 999px; }
.bc-dates { font-size: 12px !important; }
.bc-actions { display: flex; gap: 6px; margin-left: auto; }
.ended-list { margin-top: 14px; }
.ended-list summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 4px; }
.ended-list .board-card { margin-top: 10px; }

.pw-form { display: grid; gap: 0; margin: 16px 0 6px; max-width: 420px; }
.pw-form .btn { justify-self: start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- API para Agentes ---------- */
.token-field { margin: 16px 0 12px; }
.token-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.field input.token-input {
  flex: 1 1 240px; min-width: 0; width: auto; height: 38px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px; letter-spacing: .01em; color: var(--ink);
  user-select: all;
}
.token-actions { display: flex; gap: 8px; flex: none; }
.token-row .btn.sm { height: 38px; }
.api-endpoints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.api-endpoints code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); padding: 4px 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Form de quadro ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 36px; height: 36px; border-radius: 12px; box-shadow: 0 3px 8px rgba(0,0,0,.1); transition: transform .15s; }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch:hover { transform: scale(1.06); }
.swatch.custom { cursor: pointer; display: grid; place-items: center; overflow: hidden; background-image: conic-gradient(from 0deg, #f87171, #facc15, #4ade80, #60a5fa, #c084fc, #f87171) !important; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.wd-toggle { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wd-toggle button { height: 42px; border-radius: 11px; font-weight: 700; font-size: 13px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wd-toggle button.on { background: var(--ink); color: #fff; box-shadow: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* =======================================================================
   DESKTOP ≥ 960px — layout do protótipo 2 com a estética do protótipo 1
   ======================================================================= */
@media (min-width: 960px) {
  body { font-size: 15.5px; }
  .shell { max-width: 1280px; padding: 28px clamp(20px, 3vw, 40px) 56px; }
  .topbar { margin-bottom: 24px; }
  .title { font-size: 34px; }

  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); gap: clamp(18px, 2.4vw, 28px); align-items: start; }

  .cal-card { padding: clamp(18px, 2.2vw, 26px); background: var(--surface); min-width: 0; }
  .cal-head { margin-bottom: 20px; }
  .month { font-size: 22px; min-width: 150px; }

  .weekdays { gap: 8px; margin-bottom: 10px; }
  .weekdays span { font-size: 14px; color: var(--ink-2); }
  .weekdays .wd-s { display: none; }
  .weekdays .wd-m { display: inline; }

  .grid { gap: 8px; }
  .day {
    aspect-ratio: 1 / .86; border-radius: 14px;
    background: var(--tile-desk); color: var(--ink);
    align-items: center; justify-content: center; gap: 6px; padding: 6px;
    box-shadow: none;
  }
  .day.has-board, .day.pending { box-shadow: none; }
  .day.pending::after, .day.past-empty::before { display: none; }
  .day .num { font-size: clamp(19px, 2vw, 25px); font-weight: 500; letter-spacing: -.01em; line-height: 1; }
  .day.out .num { color: #b9b9b4; }
  .day.out { opacity: 1; background: #F6F6F3; }
  .day:hover { background: #E6E6E1; box-shadow: 0 10px 22px rgba(0,0,0,.06); }
  .day.today { outline: 0; background: color-mix(in srgb, var(--ink) 6%, white); box-shadow: inset 0 0 0 1.8px var(--ink); }
  .day.today .num { font-weight: 700; }

  .dots { position: static; max-width: 100%; justify-content: center; gap: 4px; min-height: 7px; }
  .dot, .dot.filled { display: block; width: 7px; height: 7px; border-radius: 2px; background: var(--c); opacity: 1; }
  .dot.hollow { display: block; width: 7px; height: 7px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
  .dot.free { background: var(--ink); border-radius: 50%; box-shadow: none; }

  .legend { margin-top: 22px; }

  .side { margin-top: 0; position: sticky; top: 24px; }
  .side .section-title { font-size: 23px; }

  /* Sheet vira cartão flutuante central */
  .sheet-wrap { align-items: center; }
  .sheet {
    width: 580px; max-width: calc(100vw - 48px); max-height: 86dvh;
    border-radius: var(--r-xl); transform: translateY(16px) scale(.97); opacity: 0;
    transition: transform .24s var(--ease), opacity .2s;
  }
  .sheet-wrap.open .sheet { transform: none; opacity: 1; }
  .sheet-drag { display: none; }
  .sheet-inner { padding: 20px 24px 24px; }

  .cfg-sec { padding: 26px; }
}

@media (min-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
