/* Ritmo — compositor, prévia, drawer e utilitários */

/* ---------- composer ---------- */
.composer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column;
  animation: composerIn 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes composerIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.composer.is-closing { animation: composerOut 0.18s ease-in forwards; }
@keyframes composerOut { to { opacity: 0; transform: translateY(8px); } }
.composer-top {
  flex: none;
  height: 72px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
}
.composer-back {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface);
  flex: none;
  transition: background 0.15s, color 0.15s;
}
.composer-back:hover { background: var(--surface-2); color: var(--ink); }
.composer-back .i { width: 18px; height: 18px; }
.composer-title { min-width: 0; }
.composer-title .eyebrow { font-size: 8px; letter-spacing: 0.13em; }
.composer-title h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.composer-body { flex: 1; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.composer-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 18px; align-items: start; }
.c-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px;
  margin-bottom: 13px;
}
.c-panel:last-child { margin-bottom: 0; }
.c-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.c-panel-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: -0.01em; }
.c-step {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: 8.5px; font-weight: 800;
  display: grid; place-items: center;
}
.c-optional { font-size: 9px; font-weight: 600; color: var(--faint); }
.c-panel .field + .field { margin-top: 12px; }
.c-media-wrap {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px;
  display: flex; justify-content: center;
  position: relative;
}
.c-media {
  position: relative;
  width: 100%; max-width: 350px;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #101116;
  box-shadow: 0 20px 36px -24px rgba(23, 22, 19, 0.5);
  flex: none;
}
.c-media.is-story { aspect-ratio: 9 / 16; max-width: 246px; }
.c-media img { width: 100%; height: 100%; object-fit: cover; }
.c-media-shade { position: absolute; inset: 0; background: linear-gradient(transparent 42%, rgba(5, 8, 16, 0.74)); pointer-events: none; }
.c-media-art {
  position: absolute; left: 15px; right: 15px; bottom: 16px;
  color: #fff; text-align: center;
  font-size: 15px; line-height: 1.28; font-weight: 800; letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.c-media-badge {
  position: absolute; top: 9px; left: 9px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(12, 12, 12, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 8px; font-weight: 800; letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}
.c-media-badge .i { width: 11px; height: 11px; }
.c-media-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.c-media-play span {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  display: grid; place-items: center;
  color: #171613;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.c-media-play .i { width: 18px; height: 18px; margin-left: 2px; }
.c-media-tools {
  display: flex; gap: 5px;
  position: absolute; top: 18px; right: 18px;
  z-index: 2;
}
.c-media-tool {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: #171613;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}
.c-media-tool:hover { background: #fff; }
.c-media-tool .i { width: 14px; height: 14px; }
.c-media-picker { display: flex; gap: 7px; overflow-x: auto; margin-top: 10px; padding-bottom: 3px; scrollbar-width: thin; }
.media-pick {
  position: relative;
  width: 48px; height: 48px; border-radius: 9px;
  overflow: hidden; flex: none;
  border: 2px solid transparent;
  background: var(--surface-3);
  transition: border-color 0.15s, transform 0.15s;
}
.media-pick:hover { transform: translateY(-1px); }
.media-pick.is-on { border-color: var(--accent); }
.media-pick img { width: 100%; height: 100%; object-fit: cover; }
.media-pick.is-upload { border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); background: var(--surface); }
.media-pick.is-upload:hover { border-color: var(--accent); color: var(--accent-text); }
.media-pick.is-upload .i { width: 16px; height: 16px; }
.caption-box { position: relative; }
.caption-box .textarea { padding-bottom: 28px; }
.caption-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.char-count { font-size: 9.5px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.char-count.is-over { color: var(--red); font-weight: 800; }
.mini-hint { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--faint); }
.mini-hint .i { width: 11px; height: 11px; }
.c-art-input { position: relative; }
.c-art-input .input { padding-right: 34px; }
.c-art-input .icon-btn { position: absolute; right: 3px; top: 3px; }

.ch-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ch-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  opacity: 0.56;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.ch-tile:hover { opacity: 0.85; border-color: var(--line-strong); }
.ch-tile.is-on { opacity: 1; color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ch-tile .plat { --plat-size: 31px; }
.ch-tile-check {
  position: absolute; top: 5px; right: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.ch-tile.is-on .ch-tile-check { opacity: 1; transform: none; }
.ch-tile-check .i { width: 8px; height: 8px; }
.ch-tile.is-disabled { opacity: 0.3; cursor: not-allowed; }

.c-when { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 8px; }
.c-quick { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.c-quick button {
  font-size: 9px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 8px; background: var(--surface);
}
.c-quick button:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.c-summary {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-2);
  border-radius: 9px;
  padding: 8px 10px;
  margin-top: 10px;
  font-size: 10px; color: var(--muted);
}
.c-summary .i { width: 14px; height: 14px; color: var(--accent-text); flex: none; }
.c-summary strong { color: var(--ink); font-weight: 800; }
.c-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.c-toggle-label { font-size: 10px; font-weight: 600; color: var(--ink-2); }
.c-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.c-time-row { display: flex; align-items: center; gap: 6px; }
.c-time-row .plat { --plat-size: 20px; border-radius: 6px; }
.c-time-row .input { height: 32px; font-size: 10.5px; padding: 0 7px; border-radius: 8px; }

.ch-acc { border: 1px solid var(--line); border-radius: 11px; margin-top: 6px; overflow: hidden; background: var(--surface); }
.ch-acc:first-of-type { margin-top: 0; }
.ch-acc-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 9px; text-align: left; }
.ch-acc-head:hover { background: var(--surface-2); }
.ch-acc-head .plat { --plat-size: 24px; border-radius: 7px; }
.ch-acc-name { font-size: 10.5px; font-weight: 800; line-height: 1.2; }
.ch-acc-handle { font-size: 8.5px; color: var(--faint); line-height: 1.25; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-acc-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ch-acc-actions .switch { transform: scale(0.82); transform-origin: right center; }
.ch-acc-chev { color: var(--faint); display: grid; place-items: center; transition: transform 0.18s; }
.ch-acc-chev .i { width: 13px; height: 13px; }
.ch-acc.is-open .ch-acc-chev { transform: rotate(180deg); }
.ch-acc-body { display: none; padding: 8px 9px 10px; border-top: 1px solid var(--line); }
.ch-acc.is-open .ch-acc-body { display: block; }
.ch-acc-pick { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.ch-acc-pick .mini-hint { flex: none; }
.ch-acc-pick .select { flex: 1; min-width: 0; height: 30px; font-size: 11px; padding: 0 8px; }
.ch-acc-body .textarea { min-height: 78px; font-size: 11.5px; }
.ch-acc-note { display: flex; gap: 5px; font-size: 8.5px; line-height: 1.45; color: var(--muted); background: var(--surface-2); border-radius: 7px; padding: 6px 7px; margin-top: 6px; }
.ch-acc-note .i { width: 11px; height: 11px; flex: none; margin-top: 1px; }
.ch-acc-off {
  font-size: 9.5px; color: var(--muted); line-height: 1.45;
  padding: 3px 0 1px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.c-errors {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--red-soft);
  border: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
  border-radius: 10px;
  padding: 9px 10px;
  margin-top: 10px;
  font-size: 10px; color: var(--red); font-weight: 600;
}
.c-errors span { display: flex; gap: 5px; align-items: flex-start; }
.c-errors .i { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.c-save-note { font-size: 9px; color: var(--faint); display: flex; align-items: center; gap: 4px; }
.c-save-note .i { width: 11px; height: 11px; }

/* composer preview button */
.c-preview-trigger { display: inline-flex; }
.composer-foot-mobile { display: none; }

/* ---------- phone preview ---------- */
.phone {
  width: 100%; max-width: 310px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 8px;
  box-shadow: var(--shadow-md);
}
.phone-notch { height: 15px; display: flex; justify-content: center; align-items: flex-start; }
.phone-notch i { width: 66px; height: 4px; border-radius: 99px; background: var(--ink); opacity: 0.12; }
.phone-screen {
  border-radius: 21px; overflow: hidden;
  background: #fff; color: #151515;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.pv-head { display: flex; align-items: center; gap: 7px; padding: 8px; }
.pv-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 8px; font-weight: 800; flex: none; }
.pv-name { font-size: 9px; font-weight: 800; line-height: 1.2; }
.pv-sub { font-size: 7.5px; color: #8a8a8a; line-height: 1.2; }
.pv-more { margin-left: auto; color: #666; display: grid; place-items: center; }
.pv-more .i { width: 14px; height: 14px; }
.pv-media { position: relative; aspect-ratio: 4 / 5; background: #111; overflow: hidden; }
.pv-media.is-story { aspect-ratio: 9 / 16; }
.pv-media img { width: 100%; height: 100%; object-fit: cover; }
.pv-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 48%, rgba(4, 6, 14, 0.62)); }
.pv-art {
  position: absolute; left: 9%; right: 9%; bottom: 9%;
  z-index: 1; color: #fff; text-align: center;
  font-size: 12px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.pv-actions { display: flex; align-items: center; gap: 10px; padding: 7px 9px 3px; color: #151515; }
.pv-actions .i { width: 15px; height: 15px; }
.pv-actions .pv-save { margin-left: auto; }
.pv-likes { font-size: 8px; font-weight: 800; padding: 0 9px; color: #151515; }
.pv-caption { font-size: 8.5px; line-height: 1.5; padding: 4px 9px 5px; color: #2a2a2a; white-space: pre-line; max-height: 82px; overflow: hidden; }
.pv-caption b { font-weight: 800; color: #111; }
.pv-time { font-size: 7px; color: #9a9a9a; padding: 0 9px 9px; text-transform: uppercase; letter-spacing: 0.04em; }
.phone.is-tiktok .phone-screen { background: #0c0c0f; color: #fff; border-color: #222; }
.phone.is-tiktok .pv-name, .phone.is-tiktok .pv-actions, .phone.is-tiktok .pv-likes { color: #fff; }
.phone.is-tiktok .pv-sub, .phone.is-tiktok .pv-time { color: rgba(255, 255, 255, 0.55); }
.phone.is-tiktok .pv-caption { color: rgba(255, 255, 255, 0.9); position: relative; margin-top: -34px; z-index: 2; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); padding-top: 18px; max-height: 100px; }
.phone.is-tiktok .pv-likes { position: relative; z-index: 2; color: rgba(255,255,255,.8); }
.phone.is-tiktok .pv-time { position: relative; z-index: 2; }
.pv-tabs { display: flex; align-items: center; gap: 3px; justify-content: center; margin: 10px 0 8px; flex-wrap: wrap; }
.pv-tab { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid transparent; opacity: 0.45; transition: opacity 0.14s, border-color 0.14s; }
.pv-tab:hover { opacity: 0.8; }
.pv-tab.is-on { opacity: 1; border-color: var(--ink); }
.pv-tab .plat { --plat-size: 21px; border-radius: 6px; }
.pv-meta { text-align: center; font-size: 8.5px; color: var(--faint); margin-top: 6px; }

.preview-modal { width: min(390px, calc(100% - 32px)); }
.preview-modal .panel-body { background: var(--surface-2); display: flex; flex-direction: column; align-items: center; }

/* ---------- drawer de publicação ---------- */
.post-drawer .panel-body { padding: 0 0 16px; }
.pd-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(4, 6, 14, 0.6)); }
.pd-media-art { position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 1; color: #fff; font-size: 15px; font-weight: 800; text-align: center; line-height: 1.25; }
.pd-copy { padding: 16px 20px 0; }
.pd-topline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pd-title { font-size: 23px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; margin-top: 7px; }
.pd-client { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.pd-caption {
  margin-top: 13px;
  background: var(--surface-2);
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 11.5px; line-height: 1.6;
  white-space: pre-line;
  color: var(--ink-2);
}
.pd-section { padding: 14px 20px 0; }
.pd-section-title { font-size: 8.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.pd-channel { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pd-channel:last-child { border-bottom: 0; }
.pd-channel .plat { --plat-size: 28px; }
.pd-channel-copy { min-width: 0; flex: 1; }
.pd-channel-name { font-size: 11px; font-weight: 800; }
.pd-channel-handle { font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-channel-time { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.pd-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.pd-metric { background: var(--surface); padding: 9px 10px; }
.pd-metric strong { display: block; font-size: 13px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pd-metric span { font-size: 8px; color: var(--faint); font-weight: 600; }
.pd-actions { display: flex; gap: 7px; flex-wrap: wrap; padding: 14px 20px 6px; }
.pd-actions .btn { flex: 1; min-width: 100px; }
.pd-actions .icon-btn { flex: none; border: 1px solid var(--line); }

/* ---------- command palette ---------- */
.palette-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(15, 14, 12, 0.45);
  backdrop-filter: blur(5px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 11vh 16px 16px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.palette-panel {
  width: min(590px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.palette-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input-row .i { width: 19px; height: 19px; }
.palette-input-row input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); }
.palette-input-row input::placeholder { color: var(--faint); }
.palette-input-row kbd { flex: none; }
.palette-body { max-height: min(52vh, 430px); overflow: auto; padding: 7px; }
.palette-group { padding: 8px 9px 4px; font-size: 8px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px; width: 100%; text-align: left; font-size: 12px; color: var(--ink-2); }
.palette-item:hover, .palette-item.is-sel { background: var(--surface-2); color: var(--ink); }
.palette-item .thumb { width: 30px; height: 30px; border-radius: 7px; }
.palette-item .i { width: 16px; height: 16px; color: var(--muted); }
.palette-item-copy { min-width: 0; flex: 1; }
.palette-item-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item-sub { font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .palette-arrow { color: var(--faint); font-size: 10px; }
.palette-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 9px; color: var(--faint); }
.palette-foot span { display: inline-flex; gap: 5px; align-items: center; }
.palette-empty { padding: 28px 16px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- configurações / mais ---------- */
.settings-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h3 { font-size: 10px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--faint); margin-bottom: 11px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row-copy strong { display: block; font-size: 11.5px; font-weight: 700; }
.settings-row-copy span { display: block; font-size: 9.5px; color: var(--faint); margin-top: 1px; line-height: 1.4; }
.settings-row .switch { transform: scale(0.92); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.theme-option {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px;
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 700;
  color: var(--muted);
  background: var(--surface);
}
.theme-option.is-on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.theme-swatch { width: 26px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); position: relative; overflow: hidden; flex: none; }
.theme-swatch::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--ink); opacity: 0.85; }
.theme-option[data-theme-choice="dark"] .theme-swatch { background: #161613; }
.theme-option[data-theme-choice="dark"] .theme-swatch::after { background: #f1ece1; }
.settings-about { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.settings-about .brand-mark { width: 32px; height: 32px; flex: none; }
.settings-about p { font-size: 9.5px; color: var(--faint); line-height: 1.45; }
.settings-about strong { font-size: 11px; font-weight: 800; display: block; color: var(--ink-2); }
.more-sheet-list { padding: 4px 8px 8px; }
.more-sheet-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 10px; border-radius: 12px; text-align: left; font-size: 13px; font-weight: 700; }
.more-sheet-item:hover { background: var(--surface-2); }
.more-sheet-item .i { width: 19px; height: 19px; color: var(--muted); }
.more-sheet-item .chev { margin-left: auto; color: var(--faint); }
.more-sheet-item .chev .i { width: 15px; height: 15px; }
.more-head { padding: 16px 18px 6px; }
.more-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.more-head p { font-size: 10px; color: var(--faint); margin-top: 2px; }

/* ---------- responsivo composer ---------- */
@media (max-width: 1080px) {
  .composer-grid { grid-template-columns: minmax(0, 1fr) 370px; gap: 14px; }
  .c-media { max-width: 320px; }
}
/* ---------- ajustes de layout do compositor ---------- */
.c-side { position: sticky; top: 0; }
.settings-modal { width: min(620px, calc(100% - 32px)); }
.connect-modal { width: min(520px, calc(100% - 32px)); }
.pd-section .c-summary { margin-top: 10px; }
.pd-actions .btn-soft { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.pd-actions .btn-soft:hover { background: var(--surface-3); }
.settings-modal .settings-section:first-of-type { padding-top: 16px; }
@media (max-width: 900px) {
  .c-side { position: static; }
  .composer-grid { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
  .c-main, .c-side { min-width: 0; }
  .c-side .c-panel { margin-bottom: 13px; }
  .c-media { max-width: 340px; }
  .composer-body { padding: 16px; }
  .composer-top { height: 64px; padding: 0 14px; }
  .composer-title h2 { font-size: 14.5px; }
  .composer-title .eyebrow { display: none; }
  .composer-actions .composer-draft-label { display: none; }
  .composer-actions .btn { height: 36px; font-size: 11.5px; padding: 0 11px; }
  .c-panel { border-radius: 16px; padding: 14px; }
  .c-media-wrap { padding: 10px; }
  .phone { max-width: 290px; }
}
@media (max-width: 600px) {
  .composer-top { height: 58px; gap: 7px; }
  .composer-back { width: 34px; height: 34px; }
  .composer-title h2 { font-size: 13.5px; }
  .composer-actions { gap: 5px; }
  .composer-actions .btn-primary { display: none; }
  .composer-actions .preview-label { display: none; }
  .composer-actions .c-preview-trigger { width: 34px; padding: 0; }
  .composer-actions .btn { height: 34px; font-size: 10.5px; padding: 0 9px; }
  .composer-actions .btn .i { width: 14px; height: 14px; }
  .composer-body { padding: 12px 10px 110px; }
  .c-panel { padding: 13px; border-radius: 15px; margin-bottom: 10px; }
  .c-media { max-width: 300px; }
  .ch-tiles { grid-template-columns: repeat(3, 1fr); }
  .ch-tile { padding: 9px 4px 7px; }
  .ch-tile .plat { --plat-size: 28px; }
  .composer-foot-mobile {
    display: flex; align-items: center; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(16px);
  }
  .composer-foot-mobile .foot-summary { flex: 1; min-width: 0; }
  .composer-foot-mobile .foot-summary strong { display: block; font-size: 10.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .composer-foot-mobile .foot-summary span { display: block; font-size: 8.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .composer-foot-mobile .btn { height: 40px; font-size: 11.5px; flex: none; }
  .pd-title { font-size: 20px; }
  .palette-overlay { padding: 7vh 10px 10px; }
  .palette-panel { border-radius: 15px; }
  .palette-input-row { padding: 12px; }
  .palette-input-row kbd { display: none; }
}

/* ---------- cadastro de clientes ---------- */
.client-modal .panel-body { display: grid; gap: 14px; }
.client-modal .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cl-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cl-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line, rgba(0,0,0,.1)); cursor: pointer; }
.cl-color.is-on { border-color: var(--paper, #fff); box-shadow: 0 0 0 2px var(--ink, #111); }
.cl-nets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cl-net { display: flex; align-items: center; gap: 8px; }
.cl-net .input { flex: 1; min-width: 0; height: 38px; }
.cl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cl-del { color: var(--danger, #C0392B); }
@media (max-width: 560px) {
  .client-modal .field-row, .cl-nets { grid-template-columns: 1fr; }
}

/* ---------- login e sincronização ---------- */
.login-screen { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: var(--paper, #F3F0E8); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 12px; text-align: center; color: var(--ink, #121210); }
.login-card .brand-mark { margin: 0 auto 6px; }
.login-card h1 { font-size: 22px; font-weight: 800; margin: 0; }
.login-card p { font-size: 12.5px; color: var(--muted, #6E685C); margin: 0 0 6px; line-height: 1.5; }
.login-card .input { height: 46px; font-size: 15px; }
.login-card .field-error { text-align: left; }
.sync-status { position: fixed; right: 14px; bottom: 14px; z-index: 90; font-size: 10.5px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--surface, #fff); color: var(--muted, #6E685C); box-shadow: 0 2px 10px rgba(0,0,0,.08); pointer-events: none; }
.sync-status[data-kind="ok"] { opacity: .75; }
.sync-status[data-kind="offline"], .sync-status[data-kind="login"] { color: #B23A48; }
@media (max-width: 860px) { .sync-status { bottom: 84px; right: 10px; } }

/* ---------- publicação automática ---------- */
.meta-panel { margin-bottom: 14px; }
.meta-list { display: grid; gap: 8px; margin-top: 10px; }
.meta-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2, #F5F2EA); }
.meta-row-copy { flex: 1; min-width: 0; display: grid; }
.meta-row-copy strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-row-copy span { font-size: 10px; color: var(--muted, #6E685C); font-weight: 600; }
.meta-row .select { width: 190px; height: 34px; font-size: 11.5px; }
.pd-pub-error { color: #B23A48; }
@media (max-width: 560px) { .meta-row { flex-wrap: wrap; } .meta-row .select { width: 100%; } }

/* ---------- várias mídias e vídeo ---------- */
.c-media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.c-media-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted, #6E685C); background: transparent; border: 0; cursor: pointer; font: inherit; }
.c-media-empty strong { font-size: 13px; color: var(--ink, #121210); }
.c-media-empty span { font-size: 10.5px; }
.c-media-empty .i { margin: 0 auto; width: 26px; height: 26px; }
.c-upload { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 10px 10px; border-radius: 10px; background: rgba(0,0,0,.66); color: #fff; font-size: 11px; font-weight: 700; }
.c-upload i { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: #F26A2E; transition: width .2s; }
.media-pick { position: relative; }
.media-pick-n { position: absolute; left: 3px; top: 3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.media-pick-kind { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.media-pick-kind .i { width: 16px; height: 16px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.media-pick-btn { position: absolute; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.media-pick-btn .i { width: 11px; height: 11px; }
.media-pick-btn.is-del { right: 3px; }
.media-pick-btn.is-left { left: 3px; }
.media-pick-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: #F26A2E; }
.pv-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; }
.pv-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.55); }
.pv-dots i.on { background: #fff; }
.meta-invites { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line, rgba(0,0,0,.15)); font-size: 11.5px; color: var(--muted, #6E685C); }
.meta-invites > span { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.meta-invites > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line, rgba(0,0,0,.12)); background: var(--surface, #fff); color: var(--ink, #121210); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent, #F26A2E); }
