/* ═══════════════════════════════════════════════════════════════
   Template Base — Dashboard stylesheet
   Plain CSS · no build step · shadcn-inspired design tokens
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────── Tokens ─────────────────────────── */
:root {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input-border: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --primary-hover: #27272a;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --ring: #a1a1aa;
  --sidebar: #fafafa;
  --sidebar-foreground: #09090b;
  --sidebar-accent: #f1f1f3;
  --sidebar-border: #e4e4e7;
  --chart-1: #f97316;
  --chart-2: #14b8a6;
  --chart-3: #3b82f6;
  --chart-4: #eab308;
  --chart-5: #f59e0b;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --success-border: #bbf7d0;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --info-border: #bfdbfe;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.18), 0 4px 12px -4px rgb(0 0 0 / 0.1);
  --sidebar-w: 256px;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #0d0d10;
  --card-foreground: #fafafa;
  --muted: #1d1d21;
  --muted-foreground: #a1a1aa;
  --border: #26262b;
  --input-border: #2e2e33;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --primary-hover: #e4e4e7;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --accent: #1d1d21;
  --accent-foreground: #fafafa;
  --destructive: #f87171;
  --destructive-foreground: #1c0909;
  --ring: #52525b;
  --sidebar: #141417;
  --sidebar-foreground: #fafafa;
  --sidebar-accent: #222227;
  --sidebar-border: #26262b;
  --success: #4ade80;
  --success-soft: rgb(22 163 74 / 0.14);
  --success-border: rgb(74 222 128 / 0.35);
  --info: #60a5fa;
  --info-soft: rgb(37 99 235 / 0.16);
  --info-border: rgb(96 165 250 / 0.35);
  --warn: #fbbf24;
  --warn-soft: rgb(217 119 6 / 0.16);
  --warn-border: rgb(251 191 36 / 0.35);
  color-scheme: dark;
}

/* ─────────────────────────── Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--sidebar);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
svg.lucide { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* Scrollbars */
.sidebar-content { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sidebar-content::-webkit-scrollbar { width: 6px; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* ─────────────────────── Utility classes ─────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.w-full { width: 100%; }
.ml-auto { margin-left: auto; }
.justify-center { justify-content: center; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.separator { width: 1px; height: 20px; background: var(--border); }
.chevron { width: 13px; height: 13px; opacity: 0.7; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; }
.trend svg { width: 12px; height: 12px; }

/* ─────────────────────────── Layout ─────────────────────────── */
.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-w);
  padding: 8px;
  background: var(--sidebar);
  transition: width 0.2s ease, transform 0.2s ease;
}
.sidebar-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 8px; }

.main {
  margin: 8px 8px 8px var(--sidebar-w);
  min-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: margin-left 0.2s ease, margin-right 0.2s ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--background);
}
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.content { display: flex; flex-direction: column; gap: 24px; padding: 24px; flex: 1; }

.grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > * { min-width: 0; }
  .col-span-2 { grid-column: span 2 / span 2; }
  .chat-page { flex: 0 0 auto; height: calc(100vh - 72px); overflow: hidden; }
  .chat-shell { min-height: 0; }
}

/* ─────────────────────────── Sidebar ─────────────────────────── */
.sidebar-header { display: flex; flex-direction: column; gap: 8px; padding: 8px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
}
.logo-mark svg { width: 17px; height: 17px; }
.logo-text { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.logo-lockup {
  display: flex;
  width: 150px;
  height: 36px;
  margin-left: 5px;
  padding: 0;
  gap: 0;
  background: url("../img/logo-minutaplus.png") left center / contain no-repeat;
}
html[data-theme="dark"] .logo-lockup {
  background-image: url("../img/logo-minutaplus-dark.png");
}
.app.collapsed .logo-lockup {
  width: 100%;
  height: 32px;
  background-image: url("../img/logo-minutaplus-mark.png");
  background-position: center;
}
html[data-theme="dark"] .app.collapsed .logo-lockup {
  background-image: url("../img/logo-minutaplus-mark-dark.png");
}

.sidebar-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.sidebar-group { padding: 8px; }
.sidebar-group + .sidebar-group { padding-top: 0; }
.sidebar-group-label {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.sidebar-footer { padding: 8px; border-top: 1px solid var(--border); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-foreground);
  transition: background 0.12s ease;
}
.nav-item:hover { background: var(--sidebar-accent); }
.nav-item.active { background: var(--sidebar-accent); font-weight: 500; }
.nav-item svg { width: 16px; height: 16px; color: var(--muted-foreground); }
.nav-item.active svg { color: var(--foreground); }
.nav-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
}
.nav-badge.new { background: transparent; border: 1px solid var(--success-border); color: var(--success); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgb(0 0 0 / 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Collapsed rail */
.app.collapsed { --sidebar-w: 64px; }
.app.collapsed .logo { justify-content: center; padding: 0; }
.app.collapsed .logo-text,
.app.collapsed .sidebar-group-label,
.app.collapsed .nav-label,
.app.collapsed .nav-badge { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 0; }

/* ─────────────────────────── Buttons ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--border); background: var(--background); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); }
.btn-ghost { color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-sm svg { width: 14px; height: 14px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  color: var(--foreground);
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.bordered { border: 1px solid var(--border); }

.avatar-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─────────────────────────── Inputs ─────────────────────────── */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--foreground);
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--muted-foreground); }
.input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }
select.input { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group svg { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--muted-foreground); pointer-events: none; }
.input-group .input { padding-left: 31px; }
.input-sm .input { height: 32px; font-size: 13px; }

/* ─────────────────────────── Cards ─────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 16px 0;
}
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-description { margin-top: 3px; font-size: 12.5px; color: var(--muted-foreground); }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-content { padding: 16px; flex: 1; }
.card-content.flush { padding: 0; display: flex; flex-direction: column; }

.tip-wrap { position: relative; display: inline-flex; }
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--foreground);
  color: var(--background);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  animation: fade-in 0.12s ease;
}
[data-tip][data-tip-align="start"]:hover::after { left: 0; transform: none; }
[data-tip][data-tip-align="end"]:hover::after { left: auto; right: 0; transform: none; }
.table-actions [data-tip]:hover::after {
  top: auto;
  bottom: calc(100% + 8px);
  left: auto;
  right: 0;
  transform: none;
  z-index: 120;
}
@media (max-width: 1024px) { [data-tip]:hover::after { display: none; } }

/* ─────────────────────── Team members ─────────────────────── */
.member-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.member { display: flex; align-items: center; gap: 10px; }
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 600;
}
.avatar-sm { width: 30px; height: 30px; }
.member-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.member-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-email { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.member-role-mobile { display: none; }
.role-btn { flex: none; gap: 6px; }
.role-btn svg { width: 12px; height: 12px; opacity: 0.7; }

/* ─────────────────────────── KPIs ─────────────────────────── */
.kpi-value { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; }
.kpi-caption { margin-top: 5px; font-size: 12px; color: var(--muted-foreground); }
.trend-up { color: var(--success); }
.trend-down { color: var(--destructive); }
.spark { margin-top: 18px; height: 88px; }
.spark svg { width: 100%; height: 100%; display: block; }

/* ─────────────────────────── Chat ─────────────────────────── */
.chat-card { min-height: 380px; }
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  max-height: 320px;
}
.bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  width: fit-content;
  animation: bubble-in 0.18s ease;
}
.bubble-bot { background: var(--muted); color: var(--foreground); border-bottom-left-radius: 4px; }
.bubble-user { background: var(--primary); color: var(--primary-foreground); margin-left: auto; border-bottom-right-radius: 4px; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 10px 12px; }
.typing i { width: 5px; height: 5px; border-radius: 999px; background: var(--muted-foreground); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.chat-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.chat-footer .input { flex: 1; height: 34px; }
.send-btn { color: var(--primary-foreground); background: var(--primary); }
.send-btn:hover:not(:disabled) { background: var(--primary-hover); }
.send-btn:disabled { background: var(--muted); color: var(--muted-foreground); }

/* ─────────────────────── Nova conversa ─────────────────────── */
.chat-page { gap: 16px; }
.page-subtitle { margin-top: 4px; font-size: 13.5px; color: var(--muted-foreground); }

.chat-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-height: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.chat-thread {
  grid-column: 1;
  grid-row: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: opacity 0.15s ease;
}
.chat-page.is-switching .chat-thread { opacity: 0.55; }
.chat-thread::-webkit-scrollbar { width: 6px; }
.chat-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.chat-thread .bubble {
  position: relative;
  max-width: min(78%, 660px);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.bubble-files {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--primary-foreground) 22%, transparent);
  font-size: 12px;
  opacity: 0.85;
}
.bubble-skill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-foreground) 14%, transparent);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.bubble-skill svg { width: 11px; height: 11px; flex: none; }

.chat-empty {
  margin: auto;
  max-width: 470px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: fade-in 0.25s ease;
}
.chat-empty-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.chat-empty-mark svg { width: 20px; height: 20px; }
.chat-empty h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.chat-empty p { font-size: 13.5px; line-height: 1.6; color: var(--muted-foreground); }

.composer {
  grid-column: 1;
  grid-row: 2;
  padding: 12px 16px 10px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.composer-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  background: var(--background);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer-field:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}
.composer-input {
  width: 100%;
  min-height: 24px;
  max-height: 160px;
  padding: 4px 2px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  overflow-y: auto;
  scrollbar-width: thin;
}
.composer-input::placeholder { color: var(--muted-foreground); }
.composer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 5px 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.skill-tag > svg { width: 13px; height: 13px; flex: none; color: var(--muted-foreground); }
.skill-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-tag > button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  color: var(--muted-foreground);
}
.skill-tag > button:hover { background: var(--border); color: var(--foreground); }
.skill-tag > button svg { width: 11px; height: 11px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-tools,
.composer-actions { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.composer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease;
}
.composer-btn:hover { background: var(--accent); color: var(--foreground); }
.composer-btn svg { width: 16px; height: 16px; }
.composer-btn-text { padding: 0 10px; font-size: 12.5px; font-weight: 500; }
.composer-btn.recording { color: var(--destructive); background: color-mix(in srgb, var(--destructive) 12%, transparent); }
.composer-btn.recording svg { fill: currentColor; }
.composer.is-recording .composer-field {
  border-color: color-mix(in srgb, var(--destructive) 42%, var(--input-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 10%, transparent);
}
.recording-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 9px;
  border: 0;
  border-radius: 9px 0 0 9px;
  background: color-mix(in srgb, var(--destructive) 8%, transparent);
  color: var(--destructive);
  white-space: nowrap;
}
.composer.is-recording .composer-actions { gap: 0; }
.composer.is-recording .composer-send { margin-left: 6px; }
.composer.is-recording #micBtn.recording {
  border-radius: 0 9px 9px 0;
  background: color-mix(in srgb, var(--destructive) 8%, transparent);
}
.composer.is-recording #micBtn.recording:hover {
  background: color-mix(in srgb, var(--destructive) 14%, transparent);
}
.recording-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
  animation: recording-pulse 1.2s ease-in-out infinite;
}
.recording-waves {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}
.recording-waves i {
  display: block;
  width: 2px;
  height: 5px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
  animation: recording-wave 0.82s ease-in-out infinite alternate;
}
.recording-waves i:nth-child(1) { animation-delay: -0.02s; animation-duration: 0.66s; }
.recording-waves i:nth-child(2) { animation-delay: -0.28s; animation-duration: 0.9s; }
.recording-waves i:nth-child(3) { animation-delay: -0.13s; animation-duration: 0.74s; }
.recording-waves i:nth-child(4) { animation-delay: -0.4s; animation-duration: 0.96s; }
.recording-waves i:nth-child(5) { animation-delay: -0.08s; animation-duration: 0.7s; }
.recording-waves i:nth-child(6) { animation-delay: -0.33s; animation-duration: 0.88s; }
.recording-waves i:nth-child(7) { animation-delay: -0.18s; animation-duration: 0.78s; }
.recording-waves i:nth-child(8) { animation-delay: -0.46s; animation-duration: 1s; }
.recording-waves i:nth-child(9) { animation-delay: -0.06s; animation-duration: 0.68s; }
.recording-waves i:nth-child(10) { animation-delay: -0.36s; animation-duration: 0.94s; }
.recording-waves i:nth-child(11) { animation-delay: -0.21s; animation-duration: 0.76s; }
.recording-waves i:nth-child(12) { animation-delay: -0.5s; animation-duration: 0.86s; }
.recording-time {
  min-width: 36px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
@keyframes recording-wave {
  0% { height: 4px; opacity: 0.45; }
  100% { height: 15px; opacity: 1; }
}
@keyframes recording-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .recording-dot,
  .recording-waves i { animation: none; }
  .recording-waves i { height: 9px; opacity: 0.85; }
}
.composer-send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  transition: background 0.15s ease, opacity 0.15s ease;
}
.composer-send:hover:not(:disabled) { background: var(--primary-hover); }
.composer-send:disabled { opacity: 0.35; cursor: not-allowed; }
.composer-send svg { width: 16px; height: 16px; }
.composer-hint { margin-top: 8px; text-align: center; font-size: 11px; color: var(--muted-foreground); }

.composer [data-tip]:hover::after { top: auto; bottom: calc(100% + 8px); }

.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 4px 6px 4px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--muted);
  font-size: 12px;
}
.attachment > svg { width: 14px; height: 14px; flex: none; color: var(--muted-foreground); }
.attachment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment > button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 4px;
  color: var(--muted-foreground);
}
.attachment > button:hover { background: var(--border); color: var(--foreground); }
.attachment > button svg { width: 12px; height: 12px; }

.skill-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: menu-in 0.13s ease;
}
.skill-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
  transition: background 0.12s ease;
}
.skill-item:hover,
.skill-item.active { background: var(--accent); }
.skill-item > svg { width: 15px; height: 15px; margin-top: 1px; flex: none; color: var(--muted-foreground); }
.skill-item > span { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.skill-item small { font-size: 11.5px; color: var(--muted-foreground); }

.suggestions { display: flex; flex-direction: column; gap: 10px; }
.suggestions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.suggestions-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.suggestions-title svg { width: 14px; height: 14px; }
.suggestions-actions { display: flex; align-items: center; gap: 8px; }
.suggestions-hint { font-size: 11.5px; color: var(--muted-foreground); }
.suggestions-toggle {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease;
}
.suggestions-toggle:hover { background: var(--accent); color: var(--foreground); }
.suggestions-toggle svg { width: 14px; height: 14px; }

.suggestions-viewport {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.suggestions-row {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
  animation: marquee-left 58s linear infinite;
}
.suggestions-row.reverse { animation-name: marquee-right; }
.suggestions-viewport:hover .suggestions-row,
.suggestions-viewport:focus-within .suggestions-row,
.suggestions-viewport.is-paused .suggestions-row { animation-play-state: paused; }

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-xs);
  font-size: 12.5px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.suggestion-chip:hover { background: var(--accent); border-color: var(--ring); }
.suggestion-chip svg { width: 13px; height: 13px; color: var(--muted-foreground); }

@keyframes marquee-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ─────────────────── Conversas antigas ─────────────────── */
.history-toggle { display: none; }

.history-panel {
  grid-column: 2;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  width: 300px;
  min-height: 0;
  flex: none;
  background: var(--sidebar);
  border-left: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.2s ease, transform 0.2s ease;
}
.history-panel.collapsed { width: 52px; overflow: visible; }
.history-panel.collapsed .history-content { display: none; }
.history-panel:not(.collapsed) .history-rail { display: none; }

.history-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 10px 0 12px;
}
.history-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  user-select: none;
}
.history-rail-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-top: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 10.5px;
  font-weight: 600;
}

.history-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  animation: fade-in 0.15s ease;
}
.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 10px 10px 16px;
}
.history-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.history-subtitle { margin-top: 2px; font-size: 11.5px; color: var(--muted-foreground); }

.history-search {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
}
.history-search > svg {
  position: absolute;
  left: 22px;
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
  pointer-events: none;
}
.history-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--foreground);
  font-size: 12.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.history-search input::placeholder { color: var(--muted-foreground); }
.history-search input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}

.history-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.history-body::-webkit-scrollbar { width: 6px; }
.history-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.history-group + .history-group { margin-top: 10px; }
.history-group-label {
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.history-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.history-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.history-item:hover { background: var(--accent); }
.history-item.active { background: var(--background); box-shadow: inset 0 0 0 1px var(--border); }
.history-item-title {
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item.active .history-item-title { font-weight: 500; }
.history-item-meta { font-size: 10.5px; color: var(--muted-foreground); }
.history-empty { padding: 24px 12px; text-align: center; font-size: 12px; color: var(--muted-foreground); }

.chat-title-edit { width: 30px; height: 30px; flex: none; }
.chat-title-edit svg { width: 14px; height: 14px; }
.history-header-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.history-entry { position: relative; }
.history-entry .history-item { padding-right: 38px; }
.history-entry .history-item-actions {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 5px;
  display: flex;
  align-items: center;
}
.history-entry[draggable="true"] { cursor: grab; }
.history-entry.dragging { opacity: 0.45; }
.history-panel.collapsed { cursor: pointer; }
.history-folder-group.drag-over {
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--ring);
}
.history-menu-trigger { width: 26px; height: 26px; opacity: 0.55; transition: opacity 0.12s ease; }
.history-menu-trigger svg { width: 14px; height: 14px; }
.history-entry:hover .history-menu-trigger,
.history-entry:focus-within .history-menu-trigger,
.history-item-actions.open .history-menu-trigger { opacity: 1; }
.history-item-menu .menu-item.danger,
.history-item-menu .menu-item.danger svg { color: var(--destructive); }
.history-item-menu .menu-item.danger:hover { background: color-mix(in srgb, var(--destructive) 10%, transparent); }
.history-folder-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
}
.history-folder-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.history-folder-toggle:hover .history-folder-name { color: var(--foreground); }
.history-folder-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
.history-folder-chevron { display: inline-flex; flex: none; transition: transform 0.15s ease; }
.history-folder-chevron svg { width: 12px; height: 12px; }
.history-folder-group.is-open .history-folder-chevron { transform: rotate(90deg); }
.history-folder-toggle > svg { width: 13px; height: 13px; flex: none; }
.history-folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-foreground);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
}
.history-folder-count {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 10px;
  letter-spacing: 0;
}
.history-folder-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 24px;
  flex: none;
  color: var(--muted-foreground);
  opacity: 0.55;
  cursor: grab;
}
.history-folder-drag svg { width: 14px; height: 14px; }
.history-folder-head[draggable="true"] { cursor: grab; }
.history-folder-group:hover .history-folder-drag { opacity: 1; }
.history-folder-group.dragging { opacity: 0.45; }
.history-folder-dropmarker {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin: 4px 8px;
  border: 1px dashed var(--ring);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
}
.history-folder-content[hidden] { display: none; }
.history-folder-group .history-list { padding-left: 7px; }
.history-folder-empty { padding: 5px 10px 8px; font-size: 11.5px; color: var(--muted-foreground); }
.history-folder-trash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  margin: 0 8px 10px;
  padding: 11px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
  color: var(--muted-foreground);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.history-folder-trash svg { width: 14px; height: 14px; }
.history-folder-trash.is-over {
  border-color: var(--destructive);
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  color: var(--destructive);
}

@media (hover: none) {
  .history-menu-trigger,
  .history-folder-drag { opacity: 1; }
}

.history-backdrop { display: none; }

/* ─────────────────────────── Chart ─────────────────────────── */
.legend { display: flex; align-items: center; gap: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; }

.bar-chart { position: relative; height: 240px; display: flex; flex-direction: column; gap: 8px; }
.bar-plot {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--border);
}
.bar-plot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to top, var(--border) 0 1px, transparent 1px 25%);
  background-size: 100% 25%;
  background-position: 0 0;
  opacity: 0.55;
  pointer-events: none;
}
.bar-group {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  border-radius: 6px 6px 0 0;
  transition: background 0.15s ease;
}
.bar-group:hover { background: color-mix(in srgb, var(--muted) 65%, transparent); }
.bar {
  width: 100%;
  max-width: 14px;
  min-width: 4px;
  border-radius: 4px 4px 2px 2px;
  height: 0;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-1 { background: var(--chart-1); }
.bar-2 { background: var(--chart-2); }
.bar-labels { display: flex; gap: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--muted-foreground); }
.chart-tooltip {
  position: absolute;
  z-index: 20;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}
.chart-tooltip .tt-title { font-weight: 600; margin-bottom: 4px; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 6px; color: var(--muted-foreground); }
.chart-tooltip .tt-row b { color: var(--foreground); font-weight: 600; margin-left: auto; padding-left: 12px; }
.tt-dot { width: 8px; height: 8px; border-radius: 3px; }

/* ─────────────────────────── Table ─────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  height: 40px;
  padding: 0 12px;
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s ease; }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.table td { padding: 10px 12px; white-space: nowrap; }
.table .td-customer { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.table .td-email { color: var(--muted-foreground); }
.table .td-amount { font-variant-numeric: tabular-nums; font-weight: 500; }
.th-actions { width: 48px; text-align: right !important; }
.td-actions { text-align: right; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success); }
.badge-processing { background: var(--info-soft); border-color: var(--info-border); color: var(--info); }
.badge-warning { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.badge-failed { background: color-mix(in srgb, var(--destructive) 12%, transparent); color: var(--destructive); }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.table-range { font-size: 12.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.table-pager { display: flex; align-items: center; gap: 6px; }
.table-empty { padding: 32px 16px; text-align: center; color: var(--muted-foreground); font-size: 13px; }

/* ───────────────────── Payment method ───────────────────── */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--muted);
  border-radius: var(--radius-md);
}
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segment:hover { color: var(--foreground); }
.segment.active { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-xs); }
.segment svg { width: 14px; height: 14px; }

.tab-panel { display: flex; flex-direction: column; gap: 14px; animation: fade-in 0.18s ease; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 500; }
.field-row { display: flex; gap: 10px; }

.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.placeholder-panel svg { width: 22px; height: 22px; color: var(--muted-foreground); margin-bottom: 4px; }
.placeholder-title { font-size: 13.5px; font-weight: 600; }
.placeholder-text { font-size: 12.5px; color: var(--muted-foreground); max-width: 240px; }

/* ───────────────────────── Dropdowns ───────────────────────── */
.dropdown { position: relative; }
.menu {
  position: fixed;
  z-index: 100;
  min-width: 190px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: menu-in 0.13s ease;
}
.menu-lg { min-width: 280px; }
.menu-label {
  padding: 7px 10px 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1.35;
}
.menu-sub { font-weight: 400; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
  transition: background 0.12s ease;
}
.menu-item:hover { background: var(--accent); }
.menu-item svg { width: 15px; height: 15px; color: var(--muted-foreground); }
.menu-separator { height: 1px; margin: 5px -5px; background: var(--border); }

.notif-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--chart-3);
  border: 1.5px solid var(--background);
}
.notif-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; padding: 2px 0; }
.notif-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 6px; }
.notif-item:hover { background: var(--accent); }
.notif-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
}
.notif-icon svg { width: 14px; height: 14px; }
.notif-icon.success { background: var(--success-soft); color: var(--success); }
.notif-icon.info { background: var(--info-soft); color: var(--info); }
.notif-icon.warn { background: var(--warn-soft); color: var(--warn); }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-text { font-size: 12.5px; color: var(--muted-foreground); }
.notif-time { font-size: 11.5px; color: var(--muted-foreground); margin-top: 2px; }

/* ─────────────────────────── Dialog ─────────────────────────── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgb(0 0 0 / 0.5);
  animation: fade-in 0.15s ease;
}
.dialog {
  width: min(560px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: dialog-in 0.18s ease;
}
.dialog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.dialog-search svg { width: 16px; height: 16px; color: var(--muted-foreground); }
.dialog-search input {
  flex: 1;
  height: 52px;
  border: 0;
  background: transparent;
  font-size: 14px;
  outline: none;
}
.dialog-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.dialog-group-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--muted-foreground); }
.dialog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.12s ease;
}
.dialog-item svg { width: 15px; height: 15px; color: var(--muted-foreground); }
.dialog-item.active, .dialog-item:hover { background: var(--accent); }
.dialog-item kbd { margin-left: auto; }
.dialog-empty { padding: 28px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.dialog-hint {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.dialog-hint span { display: inline-flex; align-items: center; gap: 5px; }

/* ─────────────────────────── Alert dialog ─────────────────────────── */
.alert-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(9 9 11 / 0.5);
  backdrop-filter: blur(2px);
  animation: fade-in 0.14s ease;
}
.alert-dialog-overlay[hidden] { display: none; }
.alert-dialog {
  width: min(448px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: alert-dialog-in 0.18s ease;
}
.alert-dialog-head { display: flex; flex-direction: column; gap: 6px; }
.alert-dialog-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.alert-dialog-description { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }
.alert-dialog-description[hidden] { display: none; }
.alert-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; }
.alert-dialog-footer .btn { min-width: 96px; height: 36px; }
.alert-dialog-footer .btn[hidden] { display: none; }
.alert-dialog-footer .btn-danger {
  background: color-mix(in srgb, var(--destructive) 12%, transparent);
  color: var(--destructive);
  box-shadow: none;
}
.alert-dialog-footer .btn-danger:hover { background: color-mix(in srgb, var(--destructive) 20%, transparent); }
html[data-theme="dark"] .alert-dialog-footer .btn-danger {
  background: color-mix(in srgb, #f87171 20%, transparent);
  color: #fca5a5;
}
html[data-theme="dark"] .alert-dialog-footer .btn-danger:hover { background: color-mix(in srgb, #f87171 28%, transparent); }
body.alert-open { overflow: hidden; }
@keyframes alert-dialog-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 639px) {
  .alert-dialog { padding: 20px; }
  .alert-dialog-footer { flex-direction: column-reverse; }
  .alert-dialog-footer .btn { width: 100%; }
}

/* ─────────────────────────── Chat modals ─────────────────────────── */
.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(9 9 11 / 0.55);
  backdrop-filter: blur(2px);
  animation: fade-in 0.14s ease;
}
.chat-modal[hidden] { display: none; }
.chat-modal-card {
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: dialog-in 0.18s ease;
}
.chat-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.chat-modal-head h2 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.chat-modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted-foreground); }
.chat-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--muted);
  border-radius: 0 0 16px 16px;
}
body.chat-modal-open { overflow: hidden; }
@media (max-width: 639px) {
  .chat-modal { padding: 10px; }
  .chat-modal-card { width: 100%; }
  .chat-modal-foot .btn { flex: 1; }
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 11px;
}

/* ─────────────────────────── Toasts ─────────────────────────── */
.toast-region {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.leaving { animation: toast-out 0.18s ease forwards; }
.toast-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast-icon.success { color: var(--success); }
.toast-icon.error { color: var(--destructive); }
.toast-icon.info { color: var(--info); }
.toast-title { font-size: 13px; font-weight: 600; }
.toast-message { font-size: 12.5px; color: var(--muted-foreground); }
.toast-close { margin-left: auto; flex: none; color: var(--muted-foreground); padding: 2px; border-radius: 4px; }
.toast-close:hover { color: var(--foreground); background: var(--accent); }

/* ─────────────────────── Habilidades ─────────────────────── */
.skills-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.skills-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  color: var(--muted-foreground);
}
.skills-count svg { width: 14px; height: 14px; }

.skills-search { display: flex; width: 100%; max-width: 460px; }
.skills-search-field { position: relative; display: flex; align-items: center; width: 100%; }
.skills-search-field > svg,
.skills-search-field > i {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted-foreground);
  pointer-events: none;
}
.skills-search-field input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 33px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.skills-search-field input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}
.skills-search-clear {
  position: absolute;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--muted-foreground);
}
.skills-search-clear:hover { background: var(--accent); color: var(--foreground); }
.skills-search-clear svg { width: 14px; height: 14px; }
.skills-search-clear[hidden],
.skills-grid[hidden],
.skills-search-empty[hidden],
.skill-card[hidden] { display: none; }

.skills-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.skill-card:hover {
  border-color: color-mix(in srgb, var(--ring) 50%, var(--border));
  box-shadow: var(--shadow-sm);
}
.skill-card-main { display: flex; align-items: flex-start; gap: 14px; }
.skill-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--muted);
  color: var(--foreground);
}
.skill-icon svg { width: 18px; height: 18px; }
.skill-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.skill-text { margin-top: 5px; font-size: 12.8px; line-height: 1.6; color: var(--muted-foreground); }
.skill-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.skill-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.skill-dialog {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  height: min(760px, 76vh);
  max-height: calc(100vh - 24px);
}
.skill-dialog form { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.skill-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px 20px;
  border-bottom: 1px solid var(--border);
}
.skill-modal-actions { display: flex; align-items: center; gap: 2px; flex: none; }
#skillModal.is-expanded { padding: 10vh 10vw; align-items: stretch; }
#skillModal.is-expanded .skill-dialog {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: var(--radius);
}
#skillModal.is-expanded .skill-modal-body { padding: 20px 24px; }
.skill-modal-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.skill-modal-title { margin-top: 3px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.skill-modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 16px 20px; }
.skill-modal-label { display: block; margin-bottom: 8px; flex: none; font-size: 12.5px; font-weight: 500; }
.skill-modal-textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  resize: none;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.55;
}
.skill-modal-textarea::placeholder { color: var(--muted-foreground); }
.skill-modal-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}
.skill-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────── Responsive ─────────────────────── */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-105%); width: 280px; padding: 8px; box-shadow: var(--shadow-lg); }
  .app.drawer .sidebar { transform: none; }
  .app.drawer .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 8px !important; }
  .app-top-notices { margin-left: 8px !important; }
  .content { padding: 16px; gap: 16px; }
  .grid { gap: 16px; }
  .page-title { font-size: 20px; }
  .bar-chart { height: 180px; }
  .chat-page { gap: 12px; }
  .chat-thread { padding: 16px 64px 16px 16px; }
  .composer { padding: 10px 12px 8px; }

  .history-toggle { display: none; }
  .history-panel {
    grid-area: auto;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 60;
    width: min(320px, 100%);
    height: 100vh;
    height: 100dvh;
    transform: translateX(100%);
    box-shadow: var(--shadow-lg);
  }
  .history-panel.collapsed {
    inset: 50% 16px auto auto;
    width: 46px;
    height: auto;
    transform: translateY(-50%);
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
  }
  .history-panel.collapsed .history-rail {
    display: flex;
    height: auto;
    padding: 8px 0;
    gap: 8px;
  }
  .history-panel.collapsed .history-rail-count { margin-top: 0; }
  .history-panel.collapsed .history-rail-label { font-size: 9.5px; }
  .app.history-open .history-panel { transform: none; }
  .history-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgb(0 0 0 / 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .history-backdrop.open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 639px) {
  .page-subtitle { font-size: 12.5px; }
  .chat-shell { min-height: 340px; }
  .chat-empty h2 { font-size: 18px; }
  .chat-empty p { font-size: 13px; }
  .composer-btn-text { padding: 0; }
  .composer-btn-text span { display: none; }
  .composer-hint { display: none; }
  .suggestions-hint { display: none; }
  .skill-item small { display: none; }
  .skills-grid { gap: 12px; }
  .skill-card { padding: 16px; }
  .skill-modal-header { padding: 16px 12px 12px 16px; }
  .skill-modal-body { padding: 14px 16px; }
  .skill-modal-footer { padding: 12px 16px 14px; }
  #skillModal.is-expanded .skill-modal-body { padding: 14px 16px; }
}

/* ─────────────────────── Animations ─────────────────────── */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(24px); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .suggestions-row { animation: none !important; flex-wrap: wrap; width: auto; }
  .suggestions-viewport { -webkit-mask-image: none; mask-image: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Minuta PLUS — componentes das telas de aplicação
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────── Cabeçalho de página ───────────────────────── */
.page-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-subtitle { max-width: 720px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-xs);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.page-badge svg { width: 14px; height: 14px; }
.page-badge .dot { width: 6px; height: 6px; }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  color: var(--muted-foreground);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-pill:hover { border-color: var(--ring); background: var(--accent); }
.plan-pill svg { width: 15px; height: 15px; color: var(--chart-1); }
.plan-pill span { white-space: nowrap; }
.plan-pill strong { color: var(--foreground); font-weight: 600; }

/* ───────────────────────── KPIs ───────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.kpi-card { overflow: hidden; }
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 0;
}
.kpi-label { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); }
.kpi-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.kpi-icon svg { width: 15px; height: 15px; }
.kpi-card .card-content { display: flex; flex-direction: column; }
.kpi-value { margin-top: 8px; }
.kpi-value-sub {
  margin-left: 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--muted-foreground);
}
.kpi-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 12px;
}
.kpi-empty svg { width: 14px; height: 14px; }
.kpi-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
}
.kpi-link svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.kpi-link:hover svg { transform: translateX(2px); }

/* ───────────────────────── Barras de uso ───────────────────────── */
.usage-bar {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}
.usage-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--chart-1), color-mix(in srgb, var(--chart-1) 60%, var(--chart-4)));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ───────────────────────── Estados vazios ───────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
}
.empty-state-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.empty-state-icon svg { width: 21px; height: 21px; }
.empty-state h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.empty-state p { max-width: 380px; font-size: 13px; color: var(--muted-foreground); }
.empty-state .btn { margin-top: 10px; }
.empty-state.compact { padding: 28px 16px; }
.empty-state.compact .empty-state-icon { width: 38px; height: 38px; }
.empty-state.compact .empty-state-icon svg { width: 17px; height: 17px; }

/* ───────────────────────── Tabelas ───────────────────────── */
.th-actions { width: 1%; text-align: right; }
.td-actions { width: 1%; text-align: right; }
.table-actions { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; }
.table-actions form { display: inline-flex; }
.table-conversation {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 500;
}
.table-conversation > span:last-child {
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-conversation-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.table-conversation-icon svg { width: 14px; height: 14px; }
.table-inline-link { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border); }
.table-inline-link:hover { text-decoration-color: var(--ring); }
.documents-table { min-width: 820px; }
.doc-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.doc-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.doc-icon svg { width: 15px; height: 15px; }
.doc-cell > div { display: flex; flex-direction: column; min-width: 0; }
.doc-name {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.doc-ext { font-size: 11.5px; color: var(--muted-foreground); }

/* ───────────────────────── Armazenamento ───────────────────────── */
.storage-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}
.storage-strip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted-foreground);
}
.storage-strip-meta span { display: inline-flex; align-items: center; gap: 6px; }
.storage-strip-meta svg { width: 14px; height: 14px; }
.storage-strip .usage-bar { margin-top: 0; }

/* ───────────────────────── Equipe ───────────────────────── */
.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (min-width: 1100px) {
  .team-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
.team-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.you-tag {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 500;
  vertical-align: 1px;
}
.invite-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.invite-item.expired { opacity: 0.65; }
.invite-item-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.invite-item-main > div { display: flex; flex-direction: column; min-width: 0; }
.invite-item-main strong { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.invite-item-main small { font-size: 11px; color: var(--muted-foreground); }
.invite-item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.invite-item-icon svg { width: 14px; height: 14px; }
.invite-item-actions { display: flex; align-items: center; gap: 2px; }
.invite-item-actions form { display: inline-flex; }

.invite-link-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  background: var(--success-soft);
}
.invite-link-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}
.invite-link-icon svg { width: 16px; height: 16px; }
.invite-link-content { flex: 1; min-width: 0; }
.invite-link-content strong { font-size: 13px; font-weight: 600; }
.invite-link-content p { margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }
.invite-link-input { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.invite-link-input .input { flex: 1; min-width: 200px; height: 34px; font-size: 12.5px; }
.invite-link-close { flex: none; }

/* ───────────────────────── Plano ───────────────────────── */
.plan-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--chart-1) 12%, transparent), transparent 55%),
    var(--card);
  box-shadow: var(--shadow-xs);
}
.plan-hero-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.plan-hero-name { margin-top: 4px; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.plan-hero-tagline { margin-top: 6px; max-width: 520px; font-size: 13px; color: var(--muted-foreground); }
.plan-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.plan-hero-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.plan-hero-note svg { width: 13px; height: 13px; }
.plan-hero-side { text-align: right; }
.plan-price { display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.plan-price-value { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; white-space: nowrap; }
.plan-price-period { font-size: 12.5px; color: var(--muted-foreground); }
.plan-price-note { margin-top: 3px; font-size: 11.5px; color: var(--muted-foreground); }

.usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 900px) {
  .usage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.usage-card { padding: 16px; }
.usage-head { display: flex; align-items: flex-start; gap: 10px; }
.usage-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.usage-icon svg { width: 15px; height: 15px; }
.usage-head > div { flex: 1; min-width: 0; }
.usage-title { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); }
.usage-caption { margin-top: 2px; font-size: 11.5px; color: var(--muted-foreground); opacity: 0.85; }
.usage-value {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.usage-value small { font-size: 11.5px; font-weight: 400; color: var(--muted-foreground); letter-spacing: normal; }
.usage-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted-foreground); }

.feature-list { list-style: none; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.feature-list svg { width: 15px; height: 15px; margin-top: 2px; flex: none; color: var(--success); }

.plans-section { display: flex; flex-direction: column; gap: 16px; }
.plans-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plans-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.plans-subtitle { margin-top: 4px; max-width: 620px; font-size: 12.5px; color: var(--muted-foreground); }
.plans-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 800px) {
  .plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}
.plan-card.is-current {
  border-color: color-mix(in srgb, var(--chart-1) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart-1) 22%, transparent), var(--shadow-sm);
}
.plan-current-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-bottom: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chart-1) 14%, transparent);
  color: var(--chart-1);
  font-size: 10.5px;
  font-weight: 600;
}
.plan-current-tag svg { width: 12px; height: 12px; }
.plan-name { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.plan-tagline { font-size: 12px; color: var(--muted-foreground); min-height: 34px; }
.plan-price-sm { justify-content: flex-start; }
.plan-price-sm .plan-price-value { font-size: 22px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.plan-features li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; }
.plan-features svg { width: 14px; height: 14px; margin-top: 2px; flex: none; color: var(--success); }
.plan-card .btn { margin-top: auto; }
.plan-soon { border: 1px dashed var(--border); color: var(--muted-foreground); justify-content: center; }
.plans-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.plans-note svg { width: 14px; height: 14px; flex: none; }

/* ───────────────────────── Perfil ───────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (min-width: 1024px) {
  .profile-layout { grid-template-columns: 300px minmax(0, 1fr); }
}
.profile-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1024px) {
  .profile-aside {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
  }
}
.profile-identity .card-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.profile-name { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.profile-email { margin-top: 2px; font-size: 12.5px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.profile-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.profile-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.profile-facts dt { font-size: 11.5px; color: var(--muted-foreground); }
.profile-facts dd { margin: 0; font-size: 12.5px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.profile-trial {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-size: 12px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.profile-trial:hover { border-color: var(--ring); background: var(--accent); }
.profile-trial svg:first-child { color: var(--chart-1); }
.profile-trial svg:last-child { margin-left: auto; color: var(--muted-foreground); }
.profile-trial strong { font-weight: 600; }
.profile-nav { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.profile-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background 0.12s ease;
}
.profile-nav a:hover { background: var(--accent); }
.profile-nav svg { width: 15px; height: 15px; color: var(--muted-foreground); }
.profile-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-hint { font-size: 11.5px; color: var(--muted-foreground); }
.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-size: 12.5px;
}
.inline-note > svg { width: 16px; height: 16px; margin-top: 1px; flex: none; color: var(--muted-foreground); }
.inline-note p { margin-top: 2px; color: var(--muted-foreground); }
.workspace-list { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.workspace-list-head { display: flex; align-items: center; gap: 8px; }
.workspace-list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
}
.workspace-items { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.workspace-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.workspace-item.is-active { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.workspace-item-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.workspace-item-meta strong { font-size: 13px; font-weight: 500; }
.workspace-item-meta small { font-size: 11.5px; color: var(--muted-foreground); }
.workspace-item-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--success);
  white-space: nowrap;
}
.workspace-item-current svg { width: 13px; height: 13px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.session-info { display: flex; align-items: center; gap: 10px; }
.session-info p { margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }
.session-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.session-icon svg { width: 16px; height: 16px; }

/* ───────────────────────── Workspace na sidebar ───────────────────────── */
.workspace-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease;
  min-width: 0;
}
.workspace-chip:hover { border-color: var(--ring); }
.workspace-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 10.5px;
  font-weight: 600;
}
.workspace-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.workspace-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.workspace-kicker { font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-foreground); }
.workspace-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-chip > svg { width: 13px; height: 13px; flex: none; color: var(--muted-foreground); }
.app.collapsed .workspace-chip { justify-content: center; padding: 4px; }
.app.collapsed .workspace-meta,
.app.collapsed .workspace-chip > svg { display: none; }
.logo-plus { color: var(--chart-1); }

/* ───────────────────────── Topbar ───────────────────────── */
.topbar-context { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-workspace {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.notif-link { color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ───────────────────────── Menus extras ───────────────────────── */
.menu-user { min-width: 240px; }
.menu-account { display: flex; align-items: center; gap: 9px; padding: 8px 10px; }
.menu-account > div { min-width: 0; }
.menu-account-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-account-email { font-size: 11.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────────────────── Botões extras ───────────────────────── */
.btn-danger { background: var(--destructive); color: var(--destructive-foreground); box-shadow: var(--shadow-xs); }
.btn-danger:hover { background: color-mix(in srgb, var(--destructive) 86%, #000); }
.btn-danger-ghost { color: var(--destructive); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--destructive) 10%, transparent); }
.icon-btn-danger { color: var(--destructive); }
.icon-btn-danger:hover { background: color-mix(in srgb, var(--destructive) 10%, transparent); color: var(--destructive); }

/* ───────────────────────── Avisos inline ───────────────────────── */
.toast-body { flex: 1; min-width: 0; }
.toast-icon.warn { color: var(--warn); }
.toast-warn { border-color: var(--warn-border); }
.attachment.is-uploading { color: var(--muted-foreground); border-style: dashed; }
.attachment.is-uploading > svg { animation: mp-spin 0.9s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }

.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-size: 12.5px;
}
.inline-alert svg { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.inline-alert.warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--warn); }
.inline-alert.warn p { color: inherit; }
.inline-alert.info { border-color: var(--info-border); background: var(--info-soft); color: var(--info); }
.inline-alert.success { border-color: var(--success-border); background: var(--success-soft); color: var(--success); }

/* ───────────────────────── Chat: detalhes das mensagens ───────────────────────── */
.chat-demo-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 11.5px;
}
.chat-demo-note svg { width: 13px; height: 13px; }
.chat-toolbar { align-items: flex-end; }
.bubble-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.bubble-author svg { width: 12px; height: 12px; color: var(--chart-1); }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-thread .bubble-text { padding-right: 22px; }
.bubble-text + .bubble-text { margin-top: 8px; }
.bubble-text.is-rich { white-space: normal; }
.bubble-text.is-rich > :first-child { margin-top: 0; }
.bubble-text.is-rich > :last-child { margin-bottom: 0; }
.bubble-text.is-rich p { margin: 0 0 8px; }
.bubble-text.is-rich h3,
.bubble-text.is-rich h4,
.bubble-text.is-rich h5,
.bubble-text.is-rich h6 {
  margin: 10px 0 5px;
  font-weight: 650;
  line-height: 1.35;
}
.bubble-text.is-rich h3 { font-size: 14px; }
.bubble-text.is-rich h4 { font-size: 13.5px; }
.bubble-text.is-rich h5,
.bubble-text.is-rich h6 { font-size: 13px; }
.bubble-text.is-rich ul,
.bubble-text.is-rich ol { margin: 6px 0 8px; padding-left: 20px; }
.bubble-text.is-rich li { margin: 2px 0; }
.bubble-text.is-rich li::marker { color: var(--muted-foreground); }
.bubble-text.is-rich hr { margin: 10px 0; border: 0; border-top: 1px solid var(--border); }
.bubble-text.is-rich blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  color: var(--muted-foreground);
}
.bubble-text.is-rich code {
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.bubble-text.is-rich pre {
  margin: 8px 0;
  padding: 8px 10px;
  overflow-x: auto;
  border-radius: 8px;
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
}
.bubble-text.is-rich pre code { padding: 0; background: none; }
.bubble-meta {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted-foreground);
}
.bubble-user .bubble-meta { color: color-mix(in srgb, var(--primary-foreground) 65%, transparent); }
.bubble-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--background);
  color: var(--muted-foreground);
  box-shadow: var(--shadow-xs);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px) scale(0.96);
  transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.bubble:hover > .bubble-copy,
.bubble:focus-within > .bubble-copy {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.bubble-copy:hover { background: var(--accent); border-color: var(--ring); color: var(--foreground); }
.bubble-copy svg { width: 13px; height: 13px; }
.bubble-user .bubble-copy {
  background: color-mix(in srgb, var(--primary-foreground) 12%, var(--primary));
  border-color: color-mix(in srgb, var(--primary-foreground) 18%, transparent);
  color: var(--primary-foreground);
}
.bubble-user .bubble-copy:hover {
  background: color-mix(in srgb, var(--primary-foreground) 22%, var(--primary));
  color: var(--primary-foreground);
}
@media (hover: none) {
  .bubble-copy { opacity: 0.72; pointer-events: auto; transform: none; }
}
.bubble-attachments { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.bubble-attachment {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  color: var(--foreground);
  font-size: 11.5px;
  max-width: 360px;
}
.bubble-attachment:hover { border-color: var(--ring); }
.bubble-attachment.is-removed {
  border-style: dashed;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  color: var(--muted-foreground);
  cursor: default;
}
.bubble-attachment.is-removed:hover { border-color: var(--border); }
.bubble-attachment.is-removed > span { text-decoration: line-through; text-decoration-thickness: 1px; }
.bubble-attachment svg { width: 14px; height: 14px; flex: none; color: var(--muted-foreground); }
.bubble-attachment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-attachment small { margin-left: auto; flex: none; color: var(--muted-foreground); font-size: 10.5px; }
.bubble-audio {
  display: block;
  width: min(320px, 100%);
  max-width: 100%;
  height: 36px;
  margin-top: 2px;
}
.bubble.has-audio-player { width: min(78%, 420px); max-width: min(78%, 420px); }
.audio-player {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 4px 12px 4px 4px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 999px;
  background: #29292c;
  color: #fafafa;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.16);
}
.audio-player > .bubble-audio { display: none; }
.audio-play {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #18181b;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.audio-play:hover { background: #f4f4f5; }
.audio-play:active { transform: scale(0.95); }
.audio-play:focus-visible,
.audio-waveform:focus-visible { outline: 2px solid rgb(255 255 255 / 0.75); outline-offset: 2px; }
.audio-play svg { width: 16px; height: 16px; fill: currentColor; }
.audio-icon-pause { display: none; }
.audio-player.is-playing .audio-icon-play { display: none; }
.audio-player.is-playing .audio-icon-pause { display: block; }
.audio-waveform {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 25px;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  touch-action: none;
}
.audio-waveform-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  height: 100%;
}
.audio-waveform-fill {
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  will-change: clip-path;
}
.audio-bar {
  flex: 0 0 2px;
  min-width: 2px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.28);
}
.audio-waveform-fill .audio-bar { background: #fff; }
.audio-duration {
  flex: none;
  color: #fafafa;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.bubble-user .bubble-audio { color-scheme: light; }
.bubble-user .bubble-attachment { border-color: color-mix(in srgb, var(--primary-foreground) 18%, transparent); }
.bubble-user .bubble-skill { background: color-mix(in srgb, var(--primary-foreground) 15%, transparent); color: var(--primary-foreground); }
.bubble-user .bubble-attachment { background: color-mix(in srgb, var(--primary-foreground) 10%, transparent); color: var(--primary-foreground); }
.bubble-user .bubble-attachment.is-removed { background: color-mix(in srgb, var(--primary-foreground) 6%, transparent); color: color-mix(in srgb, var(--primary-foreground) 70%, transparent); }
.bubble-user .bubble-attachment svg, .bubble-user .bubble-attachment small { color: color-mix(in srgb, var(--primary-foreground) 70%, transparent); }
.bubble-user .bubble-attachment.is-removed svg, .bubble-user .bubble-attachment.is-removed small { color: color-mix(in srgb, var(--primary-foreground) 55%, transparent); }

/* ───────────────────────── Habilidades extras ───────────────────────── */
.skill-card.is-customized { border-color: color-mix(in srgb, var(--chart-1) 32%, var(--border)); }
.skill-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skill-meta { margin-right: auto; font-size: 11.5px; color: var(--muted-foreground); }
.skill-customize { flex: none; }
.skill-modal-hint { flex: none; margin-top: 7px; font-size: 11.5px; color: var(--muted-foreground); }

/* ───────────────────────── Em breve ───────────────────────── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: auto;
  padding: 56px 24px;
  text-align: center;
}
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.coming-soon-badge .dot { color: var(--chart-1); }
.coming-soon-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 8px;
  border-radius: 16px;
  background: var(--muted);
  color: var(--foreground);
}
.coming-soon-icon svg { width: 28px; height: 28px; }
.coming-soon h1 { margin-top: 4px; font-size: 30px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.coming-soon-text { max-width: 460px; font-size: 13.5px; color: var(--muted-foreground); }
.coming-soon-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.coming-soon-points span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.coming-soon-points svg { width: 12px; height: 12px; }
.coming-soon-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.coming-soon-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.coming-soon-note svg { width: 13px; height: 13px; }

/* ───────────────────────── Responsivo extra ───────────────────────── */
@media (max-width: 767px) {
  .page-toolbar { gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .plan-hero { padding: 18px; }
  .plan-hero-side { text-align: left; }
  .plan-price { justify-content: flex-start; }
  .plan-card { padding: 16px; }
  .profile-identity .card-content { padding: 20px 16px; }
  .coming-soon { padding: 36px 16px; }
  .coming-soon h1 { font-size: 24px; }
  .doc-name { max-width: 220px; }
  .session-row { align-items: flex-start; }

  /* Conversas recentes: esconde colunas secundárias e deixa o título em duas linhas */
  .table-conversations { min-width: 0; }
  .table-conversations thead th:nth-child(2),
  .table-conversations tbody td:nth-child(2),
  .table-conversations thead th:nth-child(3),
  .table-conversations tbody td:nth-child(3) { display: none; }
  .table-conversations td { white-space: normal; }
  .table-conversations .table-conversation { align-items: flex-start; }
  .table-conversations .table-conversation > span:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: none;
    overflow: hidden;
    white-space: normal;
    line-height: 1.35;
  }

  /* Equipe: função vira etiqueta sob o nome e colunas secundárias somem */
  .table-members { min-width: 0; table-layout: fixed; }
  .table-members thead th:nth-child(2),
  .table-members tbody td:nth-child(2),
  .table-members thead th:nth-child(3),
  .table-members tbody td:nth-child(3),
  .table-members thead th:nth-child(4),
  .table-members tbody td:nth-child(4) { display: none; }
  .table-members tbody td { white-space: normal; }
  .table-members thead th:last-child { width: 48px; }
  .table-members .member { align-items: flex-start; }
  .badge.member-role-mobile { display: inline-flex; margin-top: 5px; align-self: flex-start; }
}

.table-members th,
.table-members td { padding-left: 9px; padding-right: 9px; }

/* ═══════════════════════════════════════════════════════════════
   SaaS: banners, perfil, notificações, plano e consentimento
   ═══════════════════════════════════════════════════════════════ */

.app-banner {
  position: relative;
  z-index: 10;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #78350f;
}
.app-banner.impersonation {
  background: #18181b;
  border-bottom-color: #27272a;
  color: #fafafa;
}
.app-banner.subtle {
  background: var(--muted);
  border-bottom-color: var(--border);
  color: var(--foreground);
}
.app-banner.warn { background: #fffbeb; border-bottom-color: #fde68a; color: #78350f; }
.app-banner.info { background: #eff6ff; border-bottom-color: #bfdbfe; color: #1e3a8a; }
.app-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}
.app-banner-inner > div { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.app-banner-inner strong { font-size: 12.5px; }
.app-banner-inner span { opacity: .9; }
.app-banner-inner .btn { flex: none; }
.app-banner.impersonation .btn-outline { border-color: #3f3f46; color: #fafafa; background: transparent; }
.app-banner.impersonation .btn-outline:hover { background: #27272a; }
.app-banner-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0,0,0,.05); flex: none; }
.app-banner.impersonation .app-banner-icon { background: rgba(255,255,255,.08); }
.app-banner-icon svg { width: 15px; height: 15px; }

.app-notices { display: flex; flex-direction: column; gap: 10px; }
.app-top-notices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 8px 0 var(--sidebar-w);
}
.app-top-notices + .main { margin-top: 8px; }
.app-notice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}
.app-notice-icon {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--muted); color: var(--muted-foreground);
}
.app-notice-icon svg { width: 17px; height: 17px; }
.app-notice-copy { flex: 1; min-width: 0; padding-top: 1px; }
.app-notice-copy strong { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.app-notice-copy p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); }
.app-notice-actions { flex: none; margin-left: auto; padding-top: 1px; }
.app-notice-card.warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.app-notice-card.warning .app-notice-icon { background: #fef3c7; color: #b45309; }
.app-notice-card.warning .app-notice-copy p { color: #92400e; }
.app-notice-card.danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.app-notice-card.danger .app-notice-icon { background: #fee2e2; color: #b91c1c; }
.app-notice-card.danger .app-notice-copy p { color: #991b1b; }
.app-notice-card.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.app-notice-card.info .app-notice-icon { background: #dbeafe; color: #1d4ed8; }
.app-notice-card.info .app-notice-copy p { color: #1e40af; }

html[data-theme="dark"] .app-notice-card.warning {
  background: #2b2110;
  border-color: #654a12;
  color: #fcd34d;
}
html[data-theme="dark"] .app-notice-card.warning .app-notice-icon { background: #3a2a0d; color: #fbbf24; }
html[data-theme="dark"] .app-notice-card.warning .app-notice-copy p { color: #fde68a; }
html[data-theme="dark"] .app-notice-card.danger {
  background: #2a1414;
  border-color: #642424;
  color: #fca5a5;
}
html[data-theme="dark"] .app-notice-card.danger .app-notice-icon { background: #3a1717; color: #f87171; }
html[data-theme="dark"] .app-notice-card.danger .app-notice-copy p { color: #fecaca; }
html[data-theme="dark"] .app-notice-card.info {
  background: #0f1b2d;
  border-color: #1e3a5f;
  color: #bfdbfe;
}
html[data-theme="dark"] .app-notice-card.info .app-notice-icon { background: #152a45; color: #93c5fd; }
html[data-theme="dark"] .app-notice-card.info .app-notice-copy p { color: #dbeafe; }
html[data-theme="dark"] .app-notice-card .btn-outline { border-color: color-mix(in srgb, currentColor 35%, transparent); color: inherit; background: transparent; }
html[data-theme="dark"] .app-notice-card .btn-outline:hover { background: rgb(255 255 255 / 0.08); }

.avatar-btn img,
.avatar img,
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.avatar-btn { overflow: hidden; }
.avatar { overflow: hidden; }
.profile-avatar.profile-avatar-img { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; object-fit: cover; }
.profile-avatar-wrap { position: relative; width: 72px; height: 72px; margin: 0 auto; flex: none; }
.profile-avatar-wrap > .profile-avatar { width: 100%; height: 100%; margin: 0; }
.profile-avatar-edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgb(9 9 11 / 0.55);
  color: #fafafa;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.profile-avatar-edit svg { width: 20px; height: 20px; }
.profile-avatar-wrap:hover .profile-avatar-edit,
.profile-avatar-wrap:focus-within .profile-avatar-edit { opacity: 1; }
.profile-avatar-edit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (hover: none) {
  .profile-avatar-edit {
    inset: auto 0 0 auto;
    width: 26px;
    height: 26px;
    opacity: 1;
    border: 2px solid var(--card);
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .profile-avatar-edit svg { width: 13px; height: 13px; }
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(9 9 11 / 0.65);
  backdrop-filter: blur(3px);
}
.photo-modal[hidden] { display: none; }
.photo-modal-card {
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.photo-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.photo-modal-head h2 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.photo-modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted-foreground); }
.photo-modal-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.photo-crop-stage {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 45deg, var(--muted) 0 25%, var(--card) 0 50%) 0 0 / 20px 20px;
  box-shadow: inset 0 0 0 1px var(--border);
  touch-action: none;
  cursor: grab;
}
.photo-crop-stage:active { cursor: grabbing; }
.photo-crop-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.photo-zoom-row { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); }
.photo-zoom-row svg { width: 16px; height: 16px; flex: none; }
.photo-zoom-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.photo-hint { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--muted-foreground); text-align: center; }
.photo-status { min-height: 17px; margin: 0; font-size: 12px; line-height: 1.4; color: var(--destructive); text-align: center; }
.photo-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--muted);
}
.photo-modal-foot .btn[disabled] { opacity: .6; cursor: not-allowed; }
body.photo-modal-open { overflow: hidden; }

@media (max-width: 639px) {
  .photo-modal { padding: 0; align-items: flex-end; }
  .photo-modal-card { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .photo-modal-body { padding: 16px; }
  .photo-modal-head, .photo-modal-foot { padding-left: 16px; padding-right: 16px; }
}


.menu-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-label-row a { color: var(--foreground); font-weight: 500; text-transform: none; letter-spacing: 0; }
.menu-label-row a:hover { text-decoration: underline; }

.notif-item { text-decoration: none; color: inherit; }
.notif-item.is-unread { background: color-mix(in srgb, var(--chart-1) 5%, transparent); }
.notif-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item .notif-title { display: block; }
.notif-item .notif-text { display: block; }
.notif-icon.neutral { background: var(--muted); color: var(--muted-foreground); }
.notif-icon.neutral svg { width: 14px; height: 14px; }

/* Perfil */
.profile-avatar-form { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.workspace-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}
.workspace-logo-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: none;
  overflow: hidden;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.workspace-logo-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.workspace-logo-edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgb(9 9 11 / 0.55);
  color: #fafafa;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.workspace-logo-edit svg { width: 20px; height: 20px; }
.workspace-logo-preview:hover .workspace-logo-edit,
.workspace-logo-preview:focus-within .workspace-logo-edit { opacity: 1; }
.workspace-logo-edit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.workspace-logo-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.workspace-logo-info strong { font-size: 13px; font-weight: 600; }
.workspace-logo-info p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted-foreground); }
.workspace-logo-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.workspace-logo-form.is-busy { opacity: 0.65; }
.workspace-logo-status { font-size: 11.5px; color: var(--muted-foreground); }
.workspace-logo-status.is-success { color: var(--success); }
.workspace-logo-status.is-error { color: var(--destructive); }
.profile-dev-link { margin-top: 6px; font-size: 12px !important; }
.profile-dev-link a { color: inherit; text-decoration: underline; }
.profile-block { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.profile-block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.profile-block-title { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.profile-block-text { margin: 0 0 12px; font-size: 12.5px; line-height: 1.65; color: var(--muted-foreground); }
.ai-provider-fields[hidden] { display: none; }
#ia .field-hint a { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }
.ai-settings-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
}
.ai-settings-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--card);
  color: var(--muted-foreground);
}
.ai-settings-icon svg { width: 15px; height: 15px; }
.ai-settings-status strong { display: block; font-size: 12.5px; font-weight: 600; }
.ai-settings-status p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted-foreground); }
.ai-settings-status.is-connected { border-color: var(--success-border); background: var(--success-soft); }
.ai-settings-status.is-connected .ai-settings-icon { color: var(--success); }
.ai-settings-status.is-warning { border-color: var(--warn-border); background: var(--warn-soft); }
.ai-settings-status.is-warning .ai-settings-icon { color: var(--warn); }
.ai-settings-status.is-warning p { color: var(--warn); }
.profile-actions-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.profile-main .form-actions { justify-content: flex-end; }
.profile-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-history li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.profile-history li span:last-child { color: var(--muted-foreground); text-align: right; }
.profile-prefs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.profile-prefs-group { display: flex; flex-direction: column; gap: 10px; }
.profile-workspaces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-workspaces li { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.profile-workspaces li.is-active { border-color: color-mix(in srgb, var(--chart-1) 35%, var(--border)); background: color-mix(in srgb, var(--chart-1) 4%, transparent); }
.profile-workspaces .workspace-meta { flex: 1; min-width: 0; }
.profile-workspaces .workspace-name { display: block; font-size: 13px; font-weight: 500; }
.profile-workspaces small { font-size: 11.5px; color: var(--muted-foreground); }
.profile-danger-card { border-color: color-mix(in srgb, var(--destructive) 25%, var(--border)); }
.profile-delete-form .field-row { align-items: flex-end; }
.profile-delete-form .form-actions { margin-top: 16px; }

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}
.auth-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.auth-check > label {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}
.auth-check > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}
.auth-check small { display: block; color: var(--muted-foreground); font-size: 11.5px; line-height: 1.45; }
.auth-check.has-error { border-color: var(--destructive); }

/* Plano / checkout */
.plan-cycle-toggle { flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 190px; }
.plan-price-note { margin-top: 4px; }
.plan-checkout-form { display: flex; flex-direction: column; gap: 8px; }
.plan-checkout-form .btn[disabled] { opacity: .55; cursor: not-allowed; }
.plan-soon { font-size: 11px; color: var(--muted-foreground); text-align: center; }
.checkout-coupon-row { max-width: 440px; margin-bottom: 18px; }
.coupon-input-row { display: flex; gap: 8px; align-items: center; }
.coupon-input-row .input { flex: 1; min-width: 0; }
.coupon-input-row .btn { flex: none; }
.plan-billing-year { color: var(--success); }

/* Notificações (página) */
.notif-page-list { display: flex; flex-direction: column; }
.notif-page-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}
.notif-page-item:last-child { border-bottom: 0; }
.notif-page-item:hover { background: var(--accent); }
.notif-page-item.is-unread { background: color-mix(in srgb, var(--chart-1) 4%, transparent); }
.notif-page-icon {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--muted); color: var(--muted-foreground); flex: none;
}
.notif-page-icon.billing { background: #eff6ff; color: #2563eb; }
.notif-page-icon.security { background: #ecfdf5; color: #059669; }
.notif-page-icon.team { background: #fff7ed; color: #ea580c; }
.notif-page-icon.product { background: #faf5ff; color: #9333ea; }
.notif-page-icon svg { width: 17px; height: 17px; }
.notif-page-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.notif-page-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-page-head strong { font-size: 13.5px; }
.notif-page-text { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.55; }
.notif-page-time { font-size: 11px; color: var(--muted-foreground); }
.notif-page-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chart-1); flex: none; }
.notif-page-chevron { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }

/* Tabelas auxiliares */
.table-pager-links { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.admin-strong { font-weight: 600; }
.admin-break { overflow-wrap: anywhere; }
.admin-content .table { min-width: 0; }
.admin-content .table td,
.admin-content .table thead th { white-space: normal; }
.admin-content .table .td-customer { display: table-cell; }
.admin-content .table .td-email { display: block; margin-top: 2px; font-size: 11px; overflow-wrap: anywhere; }
.admin-content .table .badge { white-space: nowrap; }
.admin-content .table .td-actions { white-space: nowrap; }
.role-form { display: inline-flex; align-items: center; gap: 4px; }
.role-select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 11.5px;
}

/* ═══════════════════════════════════════════════════════════════
   Administração da plataforma
   ═══════════════════════════════════════════════════════════════ */
.admin-body { background: var(--muted); }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--border); z-index: 60;
}
.admin-brand { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.admin-brand .logo { text-decoration: none; }
.admin-brand-badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 4px 9px; border-radius: 999px; background: var(--muted);
  font-size: 10.5px; font-weight: 600; color: var(--muted-foreground);
}
.admin-brand-badge svg { width: 12px; height: 12px; }
.admin-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-label {
  padding: 14px 10px 5px; font-size: 10px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.admin-nav-label:first-child { padding-top: 4px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--muted-foreground); text-decoration: none; transition: background .15s ease, color .15s ease;
}
.admin-nav-item svg { width: 15px; height: 15px; flex: none; }
.admin-nav-item:hover { background: var(--accent); color: var(--foreground); }
.admin-nav-item.active { background: var(--primary); color: var(--primary-foreground); }
.admin-sidebar-footer { padding: 12px 12px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.admin-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-account > div { display: flex; flex-direction: column; min-width: 0; }
.admin-account strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-account span:last-child { font-size: 10.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30; height: 58px; display: flex; align-items: center; gap: 12px;
  padding: 0 24px; background: color-mix(in srgb, var(--background) 88%, transparent);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
}
.admin-topbar-context { display: flex; flex-direction: column; }
.admin-topbar-kicker { font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.admin-topbar-title { font-size: 13px; font-weight: 600; }
.admin-topbar-right { margin-left: auto; }
.admin-content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.admin-page-toolbar { margin-bottom: 0; }
.admin-nav-toggle { display: none; }
.admin-scrim { display: none; }
.admin-status-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-size: 11.5px; color: var(--muted-foreground);
}
.admin-status svg { width: 13px; height: 13px; }
.admin-status.ok { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); color: var(--success); }
.admin-status.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.admin-status.error { border-color: color-mix(in srgb, var(--destructive) 30%, var(--border)); color: var(--destructive); }
.admin-kpi-foot { margin-top: 10px; font-size: 11.5px; color: var(--muted-foreground); }
.admin-kpi-foot strong { color: var(--foreground); }
.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.admin-split-wide { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.admin-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.admin-bars { display: flex; align-items: flex-end; gap: 4px; height: 118px; padding-top: 6px; }
.admin-bars span {
  flex: 1; min-width: 3px; min-height: 4px; border-radius: 3px 3px 0 0;
  background: var(--chart-1); opacity: .82; transition: height .2s ease;
}
.admin-bars span:hover { opacity: 1; }
.admin-bars.alt span { background: var(--chart-3); }
.admin-bars-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--muted-foreground); }
.admin-feed { display: flex; flex-direction: column; gap: 13px; }
.admin-feed-item { display: flex; gap: 10px; align-items: flex-start; }
.admin-feed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chart-1); margin-top: 6px; flex: none; }
.admin-feed-item > div { min-width: 0; }
.admin-feed-item p { margin: 0 0 2px; font-size: 12.5px; line-height: 1.5; }
.admin-feed-item span { font-size: 11px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.admin-dl { display: grid; margin: 0; }
.admin-dl > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.admin-dl > div:last-child { border-bottom: 0; }
.admin-dl dt { font-size: 12px; color: var(--muted-foreground); flex: none; }
.admin-dl dd { margin: 0; font-size: 12.5px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-list-item:last-child { border-bottom: 0; }
.admin-list-item strong { display: block; font-size: 12.5px; }
.admin-list-item span { font-size: 11px; color: var(--muted-foreground); }
.admin-list-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-summary-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-summary-label { font-size: 12px; color: var(--muted-foreground); }
.admin-summary-pill {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); font-size: 11.5px; color: var(--muted-foreground);
}
.admin-summary-pill strong { font-size: 14px; color: var(--foreground); }
.admin-summary-pill.success { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.admin-summary-pill.success strong { color: var(--success); }
.admin-summary-pill.danger { border-color: color-mix(in srgb, var(--destructive) 30%, var(--border)); }
.admin-summary-pill.danger strong { color: var(--destructive); }
.admin-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-filter .input-group { flex: 1; min-width: 220px; }
.admin-segmented { flex-wrap: wrap; }
.admin-select { width: auto; min-width: 190px; height: 34px; font-size: 12.5px; }
.admin-pager { flex-wrap: wrap; gap: 10px; }
.admin-back-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-details { position: relative; }
.admin-details summary { list-style: none; cursor: pointer; }
.admin-details summary::-webkit-details-marker { display: none; }
.admin-details pre {
  max-width: 420px; max-height: 260px; overflow: auto; margin: 6px 0 0; padding: 10px;
  background: var(--muted); border: 1px solid var(--border); border-radius: 8px;
  font-size: 10.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.admin-details .admin-pre-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.admin-inline-warn { color: #b45309; }
.admin-kpi-compact .kpi-value { font-size: 22px; }
.admin-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.admin-textarea { height: auto; min-height: 72px; padding: 9px 12px; resize: vertical; line-height: 1.55; }
.admin-check-stack { gap: 8px; justify-content: flex-end; }
.admin-check-stack .auth-check { padding: 8px 10px; }
.admin-check-stack .auth-check small { font-size: 10.5px; }
.admin-uptime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-uptime-grid > div {
  display: flex; flex-direction: column; gap: 2px; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--muted);
}
.admin-uptime-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.admin-uptime-value { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.admin-uptime-grid small { font-size: 10.5px; color: var(--muted-foreground); }
.admin-link-sm { font-size: 11.5px; color: var(--muted-foreground); text-decoration: underline; cursor: pointer; }
.mt-1 { margin-top: 6px; }

@media (max-width: 1023px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 282px; transform: translateX(-102%);
    transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .admin-shell.admin-nav-open .admin-sidebar { transform: translateX(0); }
  .admin-scrim:not([hidden]) {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(9, 9, 11, .45);
  }
  .admin-nav-toggle { display: inline-flex; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .admin-split, .admin-split-wide, .admin-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-plan-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-topbar-right { display: none; }
}

@media (max-width: 639px) {
  .app-banner-inner { padding: 10px 14px; align-items: flex-start; flex-wrap: wrap; }
  .app-banner-inner .btn { width: 100%; justify-content: center; }
  .app-notice-card { flex-wrap: wrap; }
  .app-notice-actions { width: calc(100% - 48px); margin-left: 48px; }
  .app-notice-actions .btn { width: 100%; justify-content: center; }
  .profile-prefs-grid { grid-template-columns: 1fr; }
  .notif-page-item { padding: 14px; align-items: flex-start; }
  .notif-page-chevron { display: none; }
  .admin-summary-row { align-items: flex-start; }
  .admin-days-row .segment { padding: 5px 8px; font-size: 11px; }
  .admin-filter .input-group { min-width: 100%; }
  .admin-select { width: 100%; }
  .admin-uptime-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   Consentimento de cookies (base usada no app e no site)
   ═══════════════════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed; left: 50%; right: auto; bottom: 16px; z-index: 90;
  width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%);
  background: #18181b; color: #fafafa; border: 1px solid #27272a; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { max-width: none; margin: 0; padding: 14px 18px; display: flex; align-items: center; gap: 18px; }
.cookie-banner-copy { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.cookie-banner-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(249, 115, 22, .14); color: #fdba74; flex: none; }
.cookie-banner-icon svg { width: 17px; height: 17px; }
.cookie-banner-copy strong { display: block; font-size: 13px; }
.cookie-banner-copy p { margin: 3px 0 0; font-size: 11.5px; line-height: 1.6; color: #a1a1aa; max-width: 560px; }
.cookie-banner-copy a { color: #fdba74; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.cookie-banner .btn { height: 34px; }
.cookie-banner .btn-primary { background: #fafafa; color: #18181b; }
.cookie-banner .btn-primary:hover { background: #e4e4e7; }
.cookie-banner .btn-outline { background: transparent; border-color: #3f3f46; color: #e4e4e7; }
.cookie-banner .btn-outline:hover { background: #27272a; }
.cookie-banner .btn-ghost { color: #a1a1aa; }
.cookie-banner .btn-ghost:hover { background: #27272a; color: #fafafa; }

.cookie-prefs {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(9, 9, 11, .55); backdrop-filter: blur(2px);
}
.cookie-prefs[hidden] { display: none; }
.cookie-prefs-card {
  width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.cookie-prefs-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cookie-prefs-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.cookie-prefs-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted-foreground); }
.cookie-prefs-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.cookie-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer;
}
.cookie-option.is-locked { opacity: .8; cursor: default; background: var(--muted); }
.cookie-option input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.cookie-option span { display: flex; flex-direction: column; gap: 2px; }
.cookie-option strong { font-size: 12.5px; }
.cookie-option small { font-size: 11.5px; line-height: 1.5; color: var(--muted-foreground); }
.cookie-prefs-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.cookie-prefs-foot > div { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cookie-save-status { font-size: 11.5px; color: var(--muted-foreground); }
.cookie-save-status.is-ok { color: var(--success); }
.cookie-save-status.is-error { color: var(--destructive); }
body.cookie-open { overflow: hidden; }

@media (max-width: 767px) {
  .cookie-banner { left: 50%; right: auto; bottom: 10px; width: calc(100vw - 20px); max-width: none; transform: translateX(-50%); }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; padding: 14px; gap: 12px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; justify-content: center; }
  .cookie-prefs { align-items: flex-end; padding: 0; }
  .cookie-prefs-card { max-width: none; border-radius: 14px 14px 0 0; }
  .field-row { flex-direction: column; align-items: stretch; }
  .field-row .field { width: 100%; }
  .profile-delete-form .field-row { align-items: stretch; }
  .plan-cycle-toggle { width: 100%; }
  .plan-cycle-toggle .segment { flex: 1; justify-content: center; }
  .checkout-coupon-row { max-width: none; }
}


/* Ícones de confirmação */
svg.lucide-check,
svg.lucide-check-check { color: var(--success); }

/* Processos */
.process-context-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--muted) 38%, transparent);
}
.process-context-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--muted-foreground);
}
.process-context-icon svg { width: 15px; height: 15px; }
.process-context-info {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  margin-left: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.process-context-info:hover,
.process-context-info:focus-visible {
  border-color: var(--border);
  background: var(--background);
  color: var(--foreground);
}
.process-context-info svg { width: 15px; height: 15px; }
.process-context-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.process-context-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.process-context-number { font-size: 12.5px; font-weight: 600; color: var(--foreground); overflow-wrap: anywhere; }
.process-context-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.process-timeline-event.is-processing .process-context-card {
  border-style: dashed;
  background: color-mix(in srgb, var(--muted) 24%, transparent);
}
.process-context-card.is-loading .process-context-number { color: var(--muted-foreground); }
.process-thinking-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  flex: none;
  border: 2px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: process-spin 0.8s linear infinite;
}
.process-thinking-dots { display: inline-flex; gap: 1px; }
.process-thinking-dots span { animation: process-thinking-dot 1.2s ease-in-out infinite; }
.process-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.process-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes process-thinking-dot {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .process-thinking-spinner { animation: none; }
  .process-thinking-dots span { animation: none; opacity: 1; }
}
.process-import-form { display: flex; flex-direction: column; gap: 18px; }
.process-import-number { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.process-import-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.process-state { color: var(--muted-foreground); }
.process-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.processes-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.processes-search-input { position: relative; display: flex; align-items: center; }
.processes-search-input > svg {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--muted-foreground);
  pointer-events: none;
}
.processes-search-input .input {
  width: 300px;
  max-width: 100%;
  height: 32px;
  padding-left: 32px;
  padding-right: 32px;
  font-size: 12.5px;
}
.processes-search-clear {
  position: absolute;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--muted-foreground);
}
.processes-search-clear:hover { background: var(--accent); color: var(--foreground); }
.processes-search-clear svg { width: 14px; height: 14px; }
.pagination-ellipsis { display: inline-flex; align-items: center; padding: 0 4px; color: var(--muted-foreground); font-size: 12px; }
.process-import-form-state { padding: 20px 24px 24px; }
.processes-table { table-layout: fixed; min-width: 1040px; }
.processes-table th:nth-child(1), .processes-table td:nth-child(1) { width: 23%; }
.processes-table th:nth-child(2), .processes-table td:nth-child(2) { width: 20%; }
.processes-table th:nth-child(3), .processes-table td:nth-child(3) { width: 8%; }
.processes-table th:nth-child(4), .processes-table td:nth-child(4) { width: 13%; }
.processes-table th:nth-child(5), .processes-table td:nth-child(5) { width: 12%; }
.processes-table th:nth-child(6), .processes-table td:nth-child(6) { width: 24%; }
.processes-table .doc-name { display: block; max-width: 100%; }
.processes-table .doc-ext { display: block; overflow: hidden; text-overflow: ellipsis; }
.process-court { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-date { display: block; }
.process-time { display: block; font-size: 11px; color: var(--muted-foreground); }
.process-status.is-active { background: var(--success-soft); color: var(--success); }
.process-status.is-suspended { background: var(--warn-soft); color: var(--warn); }
.process-import-modal-card { width: min(620px, 100%); }
.process-import-modal-card .chat-modal-head { align-items: center; }
.process-import-loading,
.process-import-summary,
.process-import-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 24px 24px;
  text-align: center;
}
.process-import-summary { align-items: stretch; text-align: left; }
.process-import-loading h3,
.process-import-error h3 { margin: 4px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.process-import-loading p,
.process-import-error p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted-foreground); }
.process-import-loading small { margin-top: 10px; font-size: 11px; color: var(--muted-foreground); }
.process-loader {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 2px 0 8px;
}
.process-loader-ring {
  position: absolute;
  inset: 4px;
  border: 1px dashed color-mix(in srgb, var(--ring) 55%, var(--border));
  border-radius: 50%;
  animation: process-spin 7s linear infinite;
}
.process-loader-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 24%, transparent);
}
.process-loader-core svg { position: relative; z-index: 2; width: 22px; height: 22px; }
.process-loader-scan {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 35%, rgb(255 255 255 / 0.45) 50%, transparent 65%);
  transform: translateY(-110%);
  animation: process-scan 1.7s ease-in-out infinite;
}
.process-loader-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.65;
  animation: process-dot 2.2s ease-in-out infinite;
}
.process-loader-dot.one { left: 3px; top: 30px; animation-delay: -0.2s; }
.process-loader-dot.two { right: 8px; top: 19px; animation-delay: -0.9s; }
.process-loader-dot.three { right: 16px; bottom: 7px; animation-delay: -1.4s; }
.process-progress {
  width: 100%;
  max-width: 300px;
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}
.process-progress span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 65%, #fff));
  transition: width 0.35s ease;
}
.process-summary-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.process-summary-kicker svg { width: 14px; height: 14px; }
.process-summary-case {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.process-summary-number {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.process-summary-text { margin-top: 16px; }
.process-summary-text p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted-foreground); }
.process-summary-text p + p { margin-top: 10px; }
.process-summary-note { margin: 16px 0 0; font-size: 11.5px; color: var(--muted-foreground); }
.process-existing-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 11.5px;
  line-height: 1.5;
}
.process-existing-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--warn); }
.process-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.process-error-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  color: var(--destructive);
}
.process-error-icon svg { width: 20px; height: 20px; }
.process-import-error .btn { margin-top: 16px; }
.process-summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  color: var(--muted-foreground);
  font-size: 13px;
}
.process-summary-loading svg { width: 24px; height: 24px; color: var(--primary); animation: process-spin 0.9s linear infinite; }
.process-summary-loading p { margin: 0; }
@keyframes process-spin { to { transform: rotate(360deg); } }
@keyframes process-scan {
  0% { transform: translateY(-110%); }
  55%, 100% { transform: translateY(110%); }
}
@keyframes process-dot {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.55); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .process-loader-ring,
  .process-loader-scan,
  .process-loader-dot { animation: none; }
  .process-loader-scan { display: none; }
}
@media (max-width: 767px) {
  .process-import-actions { align-items: flex-start; flex-direction: column; }
  .process-import-actions .btn { width: 100%; justify-content: center; }
  .process-context-meta { white-space: normal; }
  .processes-search { width: 100%; }
  .processes-search-input { flex: 1; }
  .processes-search-input .input { width: 100%; }
  .processes-table .btn-sm { white-space: nowrap; }
  .process-summary-actions { flex-direction: column-reverse; }
  .process-summary-actions .btn { width: 100%; justify-content: center; }
}

/* Seletor de processo no chat */
.process-picker-card { width: min(540px, 100%); }
.process-picker-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  min-height: 180px;
}
.process-picker-search { margin: 0; }
.process-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}
.process-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.process-picker-item:hover { background: var(--accent); }
.process-picker-item.is-current { background: var(--background); box-shadow: inset 0 0 0 1px var(--border); }
.process-picker-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.process-picker-icon svg { width: 14px; height: 14px; }
.process-picker-body-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.process-picker-case {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
}
.process-picker-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--muted-foreground);
}
.process-picker-check { display: none; flex: none; margin-left: auto; color: var(--success); }
.process-picker-check svg { width: 15px; height: 15px; }
.process-picker-item.is-current .process-picker-check { display: block; }
.process-picker-remove {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 7px 9px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--destructive) 7%, transparent);
  color: var(--destructive);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
}
.process-picker-remove svg { width: 13px; height: 13px; }
.process-picker-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 12px;
  color: var(--muted-foreground);
  font-size: 12.5px;
}
.process-picker-loading svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  animation: process-spin 1s linear infinite;
}
.process-picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 12px;
  color: var(--muted-foreground);
  font-size: 12.5px;
  text-align: center;
}
.process-picker-error { padding: 22px 12px; color: var(--destructive); font-size: 12.5px; text-align: center; }
@media (max-width: 767px) {
  .process-picker-body { padding: 12px 14px; }
  .process-picker-list { max-height: 260px; }
  .process-picker-remove { width: 100%; justify-content: center; }
}

