:root {
  color-scheme: dark;
  --accent: #6d4aff;
  --accent-hover: #8266ff;
  --accent-soft: rgba(109, 74, 255, 0.17);
  --accent-border: rgba(109, 74, 255, 0.45);
  --accent-contrast: #ffffff;
  --ink: #f1f1f4;
  --muted: #a1a1ab;
  --muted-2: #75757f;
  --bg: #0b0b0f;
  --card: #15151a;
  --border: #2c2c33;
  --border-soft: #232328;
  --border-hover: #3a3a43;
  --danger: #ff7a7a;
  --danger-soft: rgba(255, 122, 122, 0.14);
  --success: #3ecf9a;
  --success-soft: rgba(62, 207, 154, 0.14);
  --warn: #5b9bf0;
  --warn-soft: rgba(91, 155, 240, 0.14);
  --radius-lg: 12px;
  --radius-md: 9px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  color-scheme: light;
  --accent: #5b36f5;
  --accent-hover: #4a26e0;
  --accent-soft: #efebff;
  --accent-border: #d3c8ff;
  --accent-contrast: #ffffff;
  --ink: #1a1d24;
  --muted: #6b7280;
  --muted-2: #9aa1b1;
  --bg: #fafafb;
  --card: #ffffff;
  --border: #e5e7ee;
  --border-soft: #f1f2f6;
  --border-hover: #cfd4e6;
  --danger: #c0293f;
  --danger-soft: #fbeaed;
  --success: #0f8a6f;
  --success-soft: #e9f7f3;
  --warn: #1f6fd1;
  --warn-soft: #e8f1fd;
  --shadow-sm: 0 1px 2px rgba(20, 22, 31, 0.045);
  --shadow-md: 0 2px 10px rgba(20, 22, 31, 0.07);
}

* { box-sizing: border-box; }

/* A plain class selector with `display:` (e.g. `.foo { display: flex }`) has
   the same specificity as `[hidden]` and, coming later in the file, would
   silently win -- so any element toggled via `.hidden = true/false` in JS
   needs this to actually disappear, no matter what display value its own
   class sets. Global + !important once here beats chasing this per-component. */
[hidden] { display: none !important; }

html, body { height: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* slim, theme-matched scrollbars everywhere instead of the chunky OS default */
* { scrollbar-width: thin; scrollbar-color: var(--border-hover) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: padding-box; }

svg.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -3px; }
svg.icon.icon-fill { fill: currentColor; stroke: none; }

/* ---------- shell layout ---------- */
/* Fixed to the viewport height, with .app-content as the only scrolling
   region -- this keeps the sidebar always visible and lets .view-chat use a
   plain height:100% instead of a hardcoded 100vh, so it still fits correctly
   even on the mobile layout below, where the sidebar becomes a horizontal
   bar that eats into the vertical space above it. */
.app-shell { display: flex; height: 100vh; }

.sidebar {
  width: 100px;
  flex-shrink: 0;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 10px;
  height: 100%;
}

.sidebar-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 2px 0 20px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: #0b0b0f; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: #f4f4f6;
  flex-shrink: 0;
}
:root[data-theme="light"] .logo-mark { background: #0b0b0f; border-color: #0b0b0f; }
.logo-mark svg { width: 22px; height: 22px; }
.brand-nome { font-size: 9.5px; font-weight: 800; letter-spacing: 0.02em; color: var(--ink); line-height: 1; text-align: center; }
.brand-nome b { display: block; font-size: 8px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
:root:not([data-theme="light"]) .brand-nome b { color: #a594ff; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none; text-align: center;
  padding: 11px 8px; border-radius: 12px;
  font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: -0.01em;
  cursor: pointer; transition: background 0.12s, color 0.12s;
  font-family: inherit;
}
.nav-item .icon { color: inherit; width: 20px; height: 20px; }
.nav-item:hover { background: var(--border-soft); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }

.sidebar-footer { padding: 10px 0 0; border-top: 1px solid var(--border-soft); margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.settings-btn, .theme-toggle-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 100%; text-align: center; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 10.5px; font-weight: 600; color: var(--muted);
  padding: 9px 4px; border-radius: 12px;
}
.settings-btn .icon, .theme-toggle-btn .icon { width: 20px; height: 20px; }
.settings-btn:hover, .theme-toggle-btn:hover { background: var(--border-soft); color: var(--ink); }

/* Each .view owns its own scrollbar (sized to its own content width) instead
   of .app-content -- otherwise a narrow, centered view (like the chat) would
   get a scrollbar stranded at the far edge of the full remaining viewport
   width, way outside its actual content column. */
.app-content { flex: 1; min-width: 0; min-height: 0; overflow: hidden; position: relative; }
.view { display: none; padding: 36px 40px 72px; max-width: 1120px; margin: 0 auto; height: 100%; overflow-y: auto; }
/* the reference grid should use all available width (more thumbnails per
   row on wide screens) instead of being capped like a reading-width form */
#view-refs, #view-influencers { max-width: none; margin: 0; }
.view.active { display: block; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 20px; font-weight: 700; margin: 0 0 5px; letter-spacing: -0.01em; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 600px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Estúdio: chat (left) + canvas (right), always both visible ---------- */
.view-chat {
  padding: 0; height: 100%; max-width: none; width: 100%;
  overflow: hidden; align-items: stretch;
}
.view.active.view-chat { display: flex; }
.chat-page {
  display: flex; flex-direction: column; height: 100%; width: 500px; flex-shrink: 0;
  max-width: none; padding: 0 28px 0 24px; border-right: 1px solid var(--border-soft);
}

.chat-log { flex: 1; overflow-y: auto; padding: 20px 0 24px; display: flex; flex-direction: column; gap: 22px; }
.chat-empty { margin: auto; text-align: center; max-width: 420px; padding-bottom: 24px; }
.chat-empty-icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.chat-empty-icon .icon { width: 22px; height: 22px; }
.chat-empty h2 { font-size: 21px; font-weight: 700; margin: 0 0 9px; letter-spacing: -0.01em; }
.chat-empty p { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.chat-empty-attach-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 auto;
  background: var(--accent); color: var(--accent-contrast); border: none;
  border-radius: var(--radius-lg); padding: 11px 20px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  transition: filter 0.15s;
}
.chat-empty-attach-btn:hover { filter: brightness(1.06); }
.chat-empty-attach-btn .icon { width: 16px; height: 16px; stroke: currentColor; }

.chat-msg { display: flex; gap: 10px; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; align-items: flex-start; }
.chat-avatar {
  width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.chat-avatar .icon { width: 14px; height: 14px; }
.chat-msg-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 640px; }
.chat-bubble { font-size: 14px; line-height: 1.6; }
.chat-msg.user .chat-bubble {
  background: var(--accent-soft); color: var(--ink); border-radius: 16px 16px 4px 16px;
  padding: 10px 15px; max-width: 480px;
}
.chat-msg.assistant .chat-bubble { padding: 2px 0; }
.chat-msg-thumbs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.chat-msg-thumbs img, .chat-msg-thumbs video { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; }
.chat-thinking { display: inline-flex; gap: 4px; align-items: center; height: 26px; }
.chat-thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); animation: pulse 1.2s infinite ease-in-out; }
.chat-thinking span:nth-child(2) { animation-delay: 0.15s; }
.chat-thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.chat-error-bubble { color: var(--danger); }

/* the fully editable plan, generated right inside the chat -- reuses the
   same .form-group/.field styles as the manual "Novo Vídeo" tab */
.inline-plan-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.inline-plan-card .form-group { background: var(--bg); }
.inline-plan-card .render-bar { position: static; background: none; padding: 4px 0 0; margin-top: 0; }

.plan-summary { display: flex; gap: 12px; align-items: center; }
.plan-summary-media {
  width: 56px; height: 56px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0;
  background: var(--border-soft); border: 1px solid var(--border);
}
.plan-summary-media img, .plan-summary-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.plan-summary-text { min-width: 0; }
.plan-summary-template {
  font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px;
}
.plan-summary-headline { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.plan-summary-cta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* The plan's scenes/groups, so its structure is scannable at a glance
   without opening "Ajustar detalhes" -- this is the part that lives in the
   canvas, so progress on the plan itself is trackable there too. */
.plan-parts { display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 9px 0; }
.plan-part { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 11.5px; }
.plan-part-label { color: var(--muted-2); font-weight: 700; flex-shrink: 0; }
.plan-part-value { color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.plan-adjust-toggle {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 600; color: var(--muted-2);
}
.plan-adjust-toggle:hover { color: var(--muted); }
.plan-adjust-toggle.open { color: var(--accent); }
.plan-adjust-toggle .icon { width: 13px; height: 13px; }
.plan-fields { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.plan-fields[hidden] { display: none; }
.inline-link-btn {
  background: none; border: none; padding: 0; margin-left: 4px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: underline;
}

.chat-composer-wrap { position: sticky; bottom: 0; padding: 14px 0 22px; background: linear-gradient(0deg, var(--bg) 70%, transparent); }

/* Context bar: pick an influencer/product to feature, and which AI provider
   interprets the instruction -- sits right above the composer so it reads
   as part of "what you're about to send", not a settings panel. */
.chat-context-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.context-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 11px 5px 8px; cursor: pointer; font-family: inherit; color: var(--muted);
  font-size: 12px; font-weight: 600; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.context-chip:hover { border-color: var(--border-hover); color: var(--ink); }
.context-chip.filled { border-color: var(--accent-border); background: var(--accent-soft); color: var(--ink); padding-left: 4px; }
.context-chip .icon { width: 14px; height: 14px; flex-shrink: 0; }
.context-chip-thumb { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.context-chip-clear {
  display: flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  border-radius: 50%; color: var(--muted-2); margin-left: 2px;
}
.context-chip-clear:hover { color: var(--danger); }
.context-chip-clear svg { width: 8px; height: 8px; stroke: currentColor; stroke-width: 2.5; }
.context-provider-wrap { position: relative; }
.context-provider-chip { padding: 5px 10px 5px 9px; }
.context-provider-chip .icon { color: var(--accent); }
.context-provider-chip .chip-caret { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.5; margin-left: -1px; transition: transform 0.12s; }
.context-provider-chip.open { border-color: var(--accent-border); background: var(--accent-soft); color: var(--ink); }
.context-provider-chip.open .chip-caret { transform: rotate(180deg); }

.provider-dropdown {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20; min-width: 210px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 5px; display: flex; flex-direction: column; gap: 1px;
}
.provider-dropdown[hidden] { display: none; }
.provider-option-row {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  background: none; border: none; border-radius: var(--radius-sm); padding: 8px 9px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.provider-option-row span:first-child { width: 13px; height: 13px; flex-shrink: 0; display: flex; color: var(--accent); }
.provider-option-row span:first-child svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; }
.provider-option-row .provider-option-label { flex: 1; }
.provider-option-row .hint { font-size: 10px; font-weight: 700; color: var(--muted-2); }
.provider-option-row:hover:not(.disabled) { background: var(--border-soft); color: var(--ink); }
.provider-option-row.active { color: var(--ink); }
.provider-option-row.disabled { opacity: 0.42; cursor: not-allowed; }

/* Picker modals (influencer / product) -- a thumbnail grid instead of a
   dropdown, consistent with the tile pickers elsewhere in the app. */
.picker-clear-btn { margin-bottom: 14px; }
.picker-empty-note { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.picker-modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.picker-modal-item {
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 0; overflow: hidden; cursor: pointer; font-family: inherit; text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}
.picker-modal-item:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.picker-modal-item.selected { border-color: var(--accent); }
.picker-modal-thumb { width: 100%; aspect-ratio: 1; background: var(--border-soft); position: relative; }
.picker-modal-thumb img, .picker-modal-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-modal-label { display: block; padding: 8px 9px; font-size: 12px; font-weight: 600; color: var(--muted); word-break: break-all; }
.picker-modal-item.selected .picker-modal-label { color: var(--ink); }
.picker-modal-check {
  position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast); display: none; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.picker-modal-item.selected .picker-modal-check { display: flex; }
.picker-modal-check svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 3; }

.picker-upload-tile { cursor: pointer; }
.picker-upload-thumb {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--border-hover); background: var(--border-soft); color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.picker-upload-tile:hover .picker-upload-thumb { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.picker-upload-thumb .icon { width: 24px; height: 24px; }
.picker-upload-thumb span { font-size: 11.5px; font-weight: 700; text-align: center; padding: 0 6px; }
.picker-upload-tile.uploading .picker-upload-thumb { opacity: 0.6; pointer-events: none; }

.chat-shell-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow-md); padding: 9px 9px 9px 7px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.chat-shell-box:focus-within { border-color: var(--accent-border); box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft); }
.chat-page.drag-over .chat-shell-box { border-color: var(--accent); background: var(--accent-soft); }
.chat-attachments {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 6px 12px;
  margin-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.chat-attachments:empty { display: none; padding: 0; margin: 0; border: none; }
.chat-attachment-chip {
  position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--border-soft);
}
.chat-attachment-chip img, .chat-attachment-chip video { width: 100%; height: 100%; object-fit: cover; }
.chat-attachment-chip .remove {
  position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(20,22,31,0.75); color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0;
}
.chat-attachment-chip .remove svg { width: 9px; height: 9px; stroke: white; }
.chat-input-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-attach-btn {
  background: var(--border-soft); border: 1px solid var(--border); cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  flex-shrink: 0; transition: background 0.12s, border-color 0.12s, color 0.12s; color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.chat-attach-btn:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.chat-input-row textarea {
  flex: 1; resize: none; border: none; padding: 10px 6px;
  font-size: 14.5px; font-family: inherit; max-height: 160px; background: none; line-height: 1.55;
  overflow: hidden; color: var(--ink);
}
.chat-input-row textarea::placeholder { color: var(--muted-2); }
.chat-input-row textarea:focus { outline: none; }
.chat-send-btn {
  background: var(--accent); color: var(--accent-contrast); border: none; width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, opacity 0.12s, transform 0.12s;
}
.chat-send-btn svg { width: 15px; height: 15px; }
.chat-send-btn:hover:not(:disabled) { background: var(--accent-hover); transform: scale(1.04); }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.chat-disclaimer {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  text-align: center; font-size: 10.5px; color: var(--muted-2); margin-top: 13px; line-height: 1.45;
  padding: 0 26px; max-width: 400px; margin-left: auto; margin-right: auto;
}
.chat-disclaimer .icon { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.75; }

.settings-form .field { margin-bottom: 14px; }
.settings-form input[type="password"], .settings-form input[type="text"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit;
  background: var(--bg); color: var(--ink);
}
.settings-hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.settings-hint a { color: var(--accent); }
.settings-hint code { background: var(--border-soft); padding: 1px 5px; border-radius: 4px; }

.provider-list { display: flex; flex-direction: column; gap: 6px; }
.provider-option {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: border-color 0.12s, background 0.12s;
}
.provider-option:hover { border-color: var(--border-hover); }
.provider-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.provider-option input { margin: 0; accent-color: var(--accent); }
.provider-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; color: var(--success);
  background: var(--success-soft); padding: 2px 8px; border-radius: 20px;
}

/* ---------- form ---------- */
.form-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 12px;
}
.form-group h4 {
  margin: 0 0 15px; font-size: 11.5px; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input[type="text"], .field textarea, .field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}
.field input[type="text"]:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: var(--card);
}
.field textarea { resize: vertical; min-height: 60px; }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--border);
  transition: box-shadow 0.12s;
}
.color-swatch:hover { box-shadow: 0 0 0 1px var(--muted-2); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--ink); }

.asset-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.asset-preview {
  width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--border-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.asset-picker select { flex: 1; min-width: 160px; }
.asset-upload-mini {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 7px 11px; border-radius: var(--radius-sm); border: 1px dashed var(--border-hover);
  background: none; cursor: pointer; color: var(--muted); font-weight: 600; font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.asset-upload-mini:hover { border-color: var(--accent); color: var(--accent); }

.render-bar { position: sticky; bottom: 0; background: linear-gradient(0deg, var(--bg) 65%, transparent); padding: 18px 0 8px; margin-top: 4px; display: flex; align-items: center; }
.render-hint { margin-left: 12px; color: var(--muted); font-size: 13px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent);
  color: var(--accent-contrast); border: none; padding: 12px 22px;
  border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary.btn-danger { background: var(--danger); color: #fff; }
.btn-primary.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.modal-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--card); color: var(--ink); border: 1px solid var(--border); padding: 7px 12px;
  border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; font-weight: 600; font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- studio canvas (right side of Estúdio, always visible next to the chat) ---------- */
.studio-canvas { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 24px 28px 24px 28px; }
.canvas-viewport {
  flex: 1; position: relative; overflow: hidden; cursor: grab;
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--bg);
}
.canvas-viewport.panning { cursor: grabbing; }
.canvas-surface {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  display: flex; align-items: flex-start; gap: 40px; padding: 40px 200px 200px 40px; will-change: transform;
}
.canvas-group { width: 300px; flex-shrink: 0; }
.canvas-group h2 {
  font-size: 12px; font-weight: 700; margin: 0 0 12px; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted); display: flex; align-items: center; gap: 7px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-progress { background: var(--warn); }
.dot-green { background: var(--success); }
.dot-red { background: var(--danger); }
.dot-plan { background: var(--accent); }

.canvas-cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }

.canvas-zoom {
  position: absolute; left: 16px; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 2px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 4px; box-shadow: var(--shadow-md);
}
.canvas-zoom button {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: none; color: var(--muted);
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.canvas-zoom button:hover { background: var(--border-soft); color: var(--ink); }
.canvas-zoom button .icon { width: 13px; height: 13px; }
.canvas-zoom span { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 38px; text-align: center; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-hover); }
.card-thumb {
  width: 100%; aspect-ratio: 9/16; max-height: 220px; background: var(--border-soft);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 9px;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-spinner { animation: spin 1.6s linear infinite; }
.card-spinner svg { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.card h4 { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; }
.card .meta { font-size: 11.5px; color: var(--muted-2); margin-bottom: 8px; }
.card .status-line {
  font-size: 11.5px; font-weight: 600; color: var(--warn); margin-bottom: 9px;
  background: var(--warn-soft); padding: 4px 8px; border-radius: 6px; display: inline-block;
}
.card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.card .actions a { text-decoration: none; }
.card.error .status-line { color: var(--danger); background: var(--danger-soft); }

/* ---------- influencers tab ---------- */
.influencer-toolbar { margin-bottom: 18px; }
.influencer-form {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 24px;
  max-width: 760px;
}
.influencer-form[hidden] { display: none; }
.influencer-form .form-group { margin-bottom: 0; background: var(--bg); }
.influencer-form .render-bar { position: static; background: none; padding: 4px 0 0; margin-top: 0; }
.influencer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.influencer-grid .ref-tile .thumb { aspect-ratio: 3 / 4; }
.influencer-grid .ref-tile .label { font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 12px 12px 4px; }

/* Visual pickers (tile grid / color swatches) instead of <select> dropdowns */
.tile-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.tile-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg); cursor: pointer; font-family: inherit; color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tile-option:hover { border-color: var(--border-hover); color: var(--ink); }
.tile-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.tile-option .icon { width: 22px; height: 22px; }
.tile-option.selected .icon { color: var(--accent); }
.tile-option span { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.3; }

/* Photo variant: real reference-photo thumbnail instead of an icon */
.tile-picker.tile-picker-photo { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.tile-option.tile-option-photo { padding: 0; gap: 0; overflow: hidden; position: relative; border-width: 2px; }
.tile-option-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--border-soft); }
.tile-photo-fallback { display: none; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--border-soft); color: var(--muted); }
.tile-photo-fallback .icon { width: 26px; height: 26px; }
.tile-option-photo > span:not(.tile-check) { padding: 7px 4px; font-size: 12px; }
.tile-option-photo .tile-check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast); display: none; align-items: center; justify-content: center;
}
.tile-option-photo .tile-check svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 3; }
.tile-option-photo.selected .tile-check { display: flex; }

.swatch-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-option {
  background: none; border: none; padding: 3px; border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 1px var(--border); transition: box-shadow 0.15s;
}
.swatch-option:hover { box-shadow: 0 0 0 1px var(--muted-2); }
.swatch-option.selected { box-shadow: 0 0 0 2px var(--accent); }
.swatch-dot { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); }
.influencer-empty { color: var(--muted-2); font-size: 13px; padding: 30px 4px; text-align: center; background: var(--border-soft); border-radius: var(--radius-md); grid-column: 1 / -1; }

/* ---------- references tab ---------- */
.upload-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: var(--accent-contrast);
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.12s;
}
.upload-btn:hover { background: var(--accent-hover); }
.refs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.refs-grid .ref-tile .thumb { aspect-ratio: 3 / 4; }
.refs-grid .ref-tile .label { font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 12px 12px 4px; }
.ref-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; position: relative;
}
.tile-menu-btn {
  position: absolute; top: 7px; right: 7px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10,10,12,0.55); border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.12s, background 0.12s;
}
.ref-tile:hover .tile-menu-btn, .tile-menu-btn.open { opacity: 1; }
.tile-menu-btn:hover { background: rgba(10,10,12,0.8); }
.tile-menu-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.tile-dropdown {
  position: absolute; top: 36px; right: 7px; z-index: 3; min-width: 130px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 4px; display: flex; flex-direction: column; gap: 1px;
}
.tile-dropdown[hidden] { display: none; }
.tile-dropdown-item {
  background: none; border: none; text-align: left; padding: 7px 9px; border-radius: 5px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.tile-dropdown-item:hover { background: var(--border-soft); }
.tile-dropdown-item.danger { color: var(--danger); }
.tile-dropdown-item.danger:hover { background: var(--danger-soft); }
.ref-tile .thumb { width: 100%; aspect-ratio: 1; background: var(--border-soft); }
.ref-tile .thumb img, .ref-tile .thumb video { width: 100%; height: 100%; object-fit: cover; }
.ref-tile .label { font-size: 10.5px; padding: 7px 9px; word-break: break-all; color: var(--muted); font-weight: 500; }
.ref-tile .badge { font-size: 9.5px; padding: 2px 8px; border-radius: 20px; display: inline-block; margin: 5px 0 7px 9px; font-weight: 700; }
.ref-tile .badge.builtin { background: var(--border-soft); color: var(--muted); }
.ref-tile .badge.uploaded { background: var(--success-soft); color: var(--success); }
.ref-tile .badge.influencer { background: var(--accent-soft); color: var(--accent); }
.ref-tile .badge.generated { background: var(--warn-soft); color: var(--warn); }

.influencer-section-title { font-size: 15px; font-weight: 700; margin: 30px 0 4px; }
.influencer-section-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.preset-tile .label { padding: 7px 9px 2px; }
.preset-use-btn, .influencer-use-btn { width: calc(100% - 24px); margin: 8px 12px 12px; justify-content: center; display: flex; padding: 9px 12px; }
.preset-use-btn:disabled, .influencer-use-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 9, 14, 0.68); backdrop-filter: blur(2px); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 24px;
  animation: modal-backdrop-in 0.15s ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes modal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card); border-radius: 18px; max-width: 400px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
  max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
  animation: modal-pop-in 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes modal-pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal.modal-wide { max-width: 660px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--border-soft); flex-shrink: 0;
}
.modal-title { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.modal-title:empty { display: none; }
.modal-header:has(.modal-title:empty) { justify-content: flex-end; }
.modal-close {
  border: none; background: var(--border-soft); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background 0.12s, color 0.12s;
}
.modal-close:hover { background: var(--border-hover); color: var(--ink); }
.modal-close svg { width: 13px; height: 13px; }
.modal-body-scroll { padding: 20px 22px 22px; overflow-y: auto; }
.modal video { width: 100%; border-radius: var(--radius-md); display: block; }
.modal-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 0 16px; }

.empty-hint { color: var(--muted-2); font-size: 13px; padding: 22px 4px; text-align: center; background: var(--border-soft); border-radius: var(--radius-md); }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; align-items: center; padding: 12px 16px; }
  .sidebar-nav { flex-direction: row; }
  .sidebar-footer { display: none; }
  .view { padding: 22px 16px 56px; }
  .view.active.view-chat { flex-direction: column; }
  .chat-page { width: 100%; height: 46%; border-right: none; border-bottom: 1px solid var(--border-soft); padding: 0 16px; }
  .studio-canvas { padding: 16px; height: 54%; }
}

/* ---------- transições entre telas: a tela entra suave, os blocos em sequência ---------- */
@keyframes lab-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lab-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lab-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes lab-desliza-prox { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes lab-desliza-ant { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
:root { --lab-ease: cubic-bezier(0.2, 0.7, 0.2, 1); }

.view.is-entrando:not(.view-canais):not(.view-tema) > * { animation: lab-entra 0.36s var(--lab-ease) both; }
/* Vídeos: fila e conversa */
.view-tema.is-entrando .tm > * { animation: lab-entra 0.38s var(--lab-ease) both; }
.view-tema.is-entrando .tm > *:nth-child(2) { animation-delay: 0.05s; }
.view-tema.is-entrando .tm > *:nth-child(3) { animation-delay: 0.1s; }
/* Canais: topo, canais, agenda e lateral, um depois do outro */
.view-canais.is-entrando .cn > *,
.view-canais.is-entrando .cn-corpo > * { animation: lab-entra 0.4s var(--lab-ease) both; }
.view-canais.is-entrando .cn > *:nth-child(2) { animation-delay: 0.05s; }
.view-canais.is-entrando .cn > *:nth-child(3) { animation-delay: 0.1s; }
.view-canais.is-entrando .cn-corpo > *:nth-child(1) { animation-delay: 0.14s; }
.view-canais.is-entrando .cn-corpo > *:nth-child(2) { animation-delay: 0.2s; }
.view-canais.is-entrando .cn-dia { animation: lab-entra 0.4s var(--lab-ease) both; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 1) { animation-delay: 0.18s; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 2) { animation-delay: 0.21s; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 3) { animation-delay: 0.24s; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 4) { animation-delay: 0.27s; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 5) { animation-delay: 0.3s; }
.view-canais.is-entrando .cn-dia:nth-child(7n + 6) { animation-delay: 0.33s; }
.view-canais.is-entrando .cn-dia:nth-child(7n) { animation-delay: 0.36s; }
.view-canais.is-entrando .cn-video { animation: lab-entra 0.4s var(--lab-ease) both; }
.view-canais.is-entrando .cn-video:nth-child(2) { animation-delay: 0.26s; }
.view-canais.is-entrando .cn-video:nth-child(3) { animation-delay: 0.3s; }
.view-canais.is-entrando .cn-video:nth-child(n + 4) { animation-delay: 0.34s; }
/* agenda: semana/mês seguinte desliza para o lado certo */
.cn-cal.is-prox { animation: lab-desliza-prox 0.32s var(--lab-ease) both; }
.cn-cal.is-ant { animation: lab-desliza-ant 0.32s var(--lab-ease) both; }
.cn-cal.is-troca { animation: lab-fade 0.28s ease both; }
.cn-lado.is-troca, .cn-agenda.is-troca { animation: lab-fade 0.28s ease both; }
/* conversa aberta: mensagens sobem em sequência */
.tm-log-inner.is-entrando > * { animation: lab-entra 0.34s var(--lab-ease) both; }
.tm-log-inner.is-entrando > *:nth-child(2) { animation-delay: 0.04s; }
.tm-log-inner.is-entrando > *:nth-child(3) { animation-delay: 0.08s; }
.tm-log-inner.is-entrando > *:nth-child(n + 4) { animation-delay: 0.12s; }
/* janelas */
.tm-modal-fundo { animation: lab-fade 0.18s ease both; }
.tm-modal-fundo > .tm-modal { animation: lab-pop 0.26s var(--lab-ease) both; }

@media (prefers-reduced-motion: reduce) {
  .view.is-entrando *, .view.is-entrando > *, .cn-cal, .cn-lado, .cn-agenda, .tm-log-inner > *, .tm-modal-fundo, .tm-modal { animation: none !important; }
}

/* menu: bolinha laranja pulsando enquanto algum vídeo está sendo gerado */
.nav-item { position: relative; }
.nav-item.tem-trabalho::after {
  content: ""; position: absolute; top: 8px; right: 14px; width: 9px; height: 9px; border-radius: 50%;
  background: #ff8a1f; box-shadow: 0 0 0 2px var(--card), 0 0 0 0 rgba(255, 138, 31, 0.6);
  animation: lab-trabalho 1.6s ease-out infinite;
}
@keyframes lab-trabalho {
  0% { box-shadow: 0 0 0 2px var(--card), 0 0 0 0 rgba(255, 138, 31, 0.6); opacity: 1; }
  60% { box-shadow: 0 0 0 2px var(--card), 0 0 0 7px rgba(255, 138, 31, 0); opacity: 0.75; }
  100% { box-shadow: 0 0 0 2px var(--card), 0 0 0 0 rgba(255, 138, 31, 0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .nav-item.tem-trabalho::after { animation: none; } }

/* ---------- carregando: bloco com brilho (usado nos esqueletos de todas as telas) ---------- */
@keyframes lab-brilho { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.lab-sk {
  display: block; height: 12px; border-radius: 6px; flex-shrink: 0;
  background: var(--border) linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.07) 50%, transparent 70%) no-repeat;
  background-size: 200% 100%; animation: lab-brilho 1.5s ease-in-out infinite;
}
:root[data-theme="light"] .lab-sk { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.8) 50%, transparent 70%); }
@media (prefers-reduced-motion: reduce) { .lab-sk { animation: none; } }

/* esqueleto da casca enquanto os módulos do Studio carregam */
.lab-boot { position: absolute; inset: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; pointer-events: none; }
.app-content { position: relative; }
.lab-boot-linha { display: flex; gap: 12px; }
.lab-boot-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* destaque do menu deslizando até o item ativo */
.sidebar-nav { position: relative; }
.nav-pill { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 12px; background: var(--accent-soft); opacity: 0; pointer-events: none; transition: transform .38s cubic-bezier(.3, .8, .25, 1), width .38s cubic-bezier(.3, .8, .25, 1), height .38s cubic-bezier(.3, .8, .25, 1), opacity .2s; }
.nav-pill.sem-anim { transition: none; }
.sidebar-nav .nav-item { position: relative; z-index: 1; }
.sidebar-nav.tem-pill .nav-item.active { background: transparent; }
.sidebar-nav .nav-item .icon { transition: transform .25s cubic-bezier(.3, .8, .25, 1); }
.sidebar-nav .nav-item.active .icon { transform: translateY(-1px) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .nav-pill, .sidebar-nav .nav-item .icon { transition: none; } }

/* destaque que desliza entre opções (abas, filtros, chips) — ver deslizar.js */
.seg-fantasma { position: absolute; pointer-events: none; box-sizing: border-box; margin: 0; transition: left .34s cubic-bezier(.3, .8, .25, 1), top .34s cubic-bezier(.3, .8, .25, 1), width .34s cubic-bezier(.3, .8, .25, 1), height .34s cubic-bezier(.3, .8, .25, 1); }
.seg-anim > :not(.seg-fantasma) { position: relative; z-index: 1; }
.seg-alvo { background: transparent !important; box-shadow: none !important; border-color: transparent !important; transition: none !important; }
.seg-alvo-cima { box-shadow: none !important; transition: none !important; }
.sidebar-nav.tem-pill .nav-item.active:hover { background: transparent; }
.sidebar-nav .nav-item { transition: background 0.15s, color 0.25s; }
.seg-voo { position: fixed; z-index: 60; pointer-events: none; box-sizing: border-box; margin: 0; will-change: left, top, width, height; transition: left .3s cubic-bezier(.3, .8, .25, 1), top .3s cubic-bezier(.3, .8, .25, 1), width .3s cubic-bezier(.3, .8, .25, 1), height .3s cubic-bezier(.3, .8, .25, 1); }

/* ---------- oferta de assinatura (sem créditos) ---------- */
.lab-of { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; animation: lab-of-in 0.18s ease both; }
.lab-of.is-saindo { animation: lab-of-out 0.18s ease both; }
.lab-of-fundo { position: absolute; inset: 0; background: rgba(5, 5, 8, 0.72); }
.lab-of-caixa {
  position: relative; width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); color: var(--ink);
  border: 1px solid var(--border); border-radius: 20px; padding: 32px 32px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 16px; animation: lab-of-sobe 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.lab-of-x { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.lab-of-x:hover { background: var(--border-soft); color: var(--ink); }
.lab-of-tag { align-self: flex-start; font-size: 12.5px; font-weight: 800; color: #c4b6ff; background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 999px; padding: 5px 12px; }
.lab-of-caixa h2 { margin: 0; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; padding-right: 30px; }
.lab-of-sub { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.lab-of-sub b { color: var(--ink); }
.lab-of-ganhos { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-of-ganhos span { font-size: 13.5px; font-weight: 700; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; }
.lab-of-ganhos span::before { content: '✓'; color: var(--success); margin-right: 7px; font-weight: 900; }
.lab-of-planos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 6px; }
.lab-of-plano {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 18px 18px; border-radius: 16px; background: var(--bg);
  border: 1px solid var(--border); color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.lab-of-plano:hover, .lab-of-plano:focus-visible { border-color: var(--border-hover); transform: translateY(-2px); outline: none; }
.lab-of-plano.is-top { border: 2px solid var(--accent); padding: 19px 17px 17px; }
.lab-of-selo { position: absolute; top: -11px; left: 16px; font-size: 11.5px; font-weight: 800; background: var(--accent); color: #fff; border-radius: 999px; padding: 3px 10px; }
.lab-of-plano > b { font-size: 15px; color: var(--muted); font-weight: 700; }
.lab-of-plano strong { font-size: 30px; letter-spacing: -0.02em; font-weight: 800; }
.lab-of-plano strong small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.lab-of-dia { font-size: 13px; color: var(--success); font-weight: 700; }
.lab-of-plano ul { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.lab-of-plano ul em { font-style: normal; color: var(--ink); font-weight: 800; }
.lab-of-cta { margin-top: auto; display: block; text-align: center; font-size: 14.5px; font-weight: 800; border-radius: 11px; padding: 12px 14px; background: var(--border-soft); color: var(--ink); text-decoration: none; }
.lab-of-plano.is-top .lab-of-cta, .lab-of-cta-solo { background: var(--accent); color: #fff; }
.lab-of-plano:hover .lab-of-cta { background: var(--border-hover); }
.lab-of-plano.is-top:hover .lab-of-cta { background: var(--accent-hover); }
.lab-of-rodape { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.lab-of-agora { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px 2px; }
.lab-of-agora:hover { color: var(--ink); }
@keyframes lab-of-in { from { opacity: 0; } }
@keyframes lab-of-out { to { opacity: 0; } }
@keyframes lab-of-sobe { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@media (max-width: 640px) {
  .lab-of-caixa { padding: 26px 18px 18px; border-radius: 16px; }
  .lab-of-planos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .lab-of, .lab-of-caixa, .lab-of.is-saindo { animation: none; } }
