:root {
  --bg: #070b14;
  --bg-dark: #04070f;
  --surface: rgba(12, 18, 32, 0.9);
  --surface-solid: #0c1220;
  --surface-2: rgba(18, 28, 48, 0.92);
  --border: rgba(160, 200, 255, 0.1);
  --text: #eef4ff;
  --muted: #8fa3c4;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-glow: rgba(59, 130, 246, 0.28);
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 12px 36px rgba(2, 8, 24, 0.55);
  --shadow-lg: 0 20px 56px rgba(2, 8, 24, 0.6);
  --font: "Sora", system-ui, sans-serif;
  --glass: blur(18px) saturate(1.25);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(6, 182, 212, 0.06), transparent 50%);
}

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background 0.2s;
}

.btn.has-ripple { overflow: hidden; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripplePop 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes ripplePop {
  to { transform: scale(2.5); opacity: 0; }
}

.btn:active { transform: scale(0.96); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #67e8f9 0%, var(--accent) 50%, var(--accent-hover) 100%);
  background-size: 200% 200%;
  color: #0a0a0b;
  box-shadow: 0 4px 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: btnShine 4s ease infinite;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes btnShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-soft {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-soft:hover { background: var(--border); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

/* Form */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--text); }

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.status { margin: 0; font-size: 0.88rem; text-align: center; }
.status.ok { color: var(--accent); }
.status.err { color: #ef4444; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.15); }
  50% { box-shadow: 0 0 32px rgba(34, 211, 238, 0.35); }
}

@keyframes shimmerText {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes msgPop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.revealed { opacity: 1; transform: none; }
.reduce-motion .reveal { opacity: 1; transform: none; transition: none; }

/* Painéis: views ocultas não disparam reveal — forçar visível na aba ativa */
.page-panel .view.active .reveal {
  opacity: 1;
  transform: none;
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
}

/* Tilt cards */
.tilt-card {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease-out, box-shadow 0.2s;
  position: relative;
}
.tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(34, 211, 238, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.tilt-card:hover::after { opacity: 1; }

/* Confetti */
.confetti-bit {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 1px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFly 0.9s ease-out forwards;
}
@keyframes confettiFly {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.field-focus .compile-label,
.field-focus > span:first-child { color: var(--accent); transition: color 0.2s; }

/* ===== LOGIN ===== */
.page-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
}

.login-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: linear-gradient(145deg, #050506 0%, rgba(20, 20, 22, 0.95) 55%, rgba(12, 26, 31, 0.98) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
  --hero-x: 0px;
  --hero-y: 0px;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='rgba(34,211,238,0.04)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero-visual {
  position: relative;
  max-width: 420px;
  z-index: 1;
  transform: translate(var(--hero-x), var(--hero-y));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: floatY 6s ease-in-out infinite;
}
.hero-orb-1 {
  width: 220px; height: 220px;
  background: #22d3ee;
  top: -50px; right: -50px;
  opacity: 0.4;
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 160px; height: 160px;
  background: #52525b;
  bottom: -40px; left: -40px;
  opacity: 0.45;
  animation-delay: -3s;
}

.hero-floating {
  position: absolute;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}
.hero-float-1 { top: 8%; right: -10%; animation: floatY 5s ease-in-out infinite; }
.hero-float-2 { bottom: 12%; left: -8%; animation: floatY 7s ease-in-out infinite reverse; }

.hero-chip {
  padding: 8px 14px;
  background: rgba(20, 20, 22, 0.7);
  backdrop-filter: var(--glass);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-card { position: relative; animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fafafa 20%, var(--accent) 50%, #67e8f9 80%, #fafafa 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 5s linear infinite;
}

.hero-card p { margin: 0 0 24px; opacity: 0.85; font-size: 1.05rem; line-height: 1.6; }

.hero-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.hero-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  opacity: 0.9;
  animation: slideIn 0.5s ease both;
}
.hero-list li:nth-child(1) { animation-delay: 0.2s; }
.hero-list li:nth-child(2) { animation-delay: 0.35s; }
.hero-list li:nth-child(3) { animation-delay: 0.5s; }

.hero-list li::before {
  content: "✓";
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: rgba(20, 20, 22, 0.75);
  backdrop-filter: var(--glass);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(34, 211, 238, 0.05);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  position: relative;
}

.login-box::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), transparent 40%, transparent 60%, rgba(34, 211, 238, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.login-box h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.login-sub { margin: 0 0 28px; color: var(--muted); font-size: 0.95rem; }

/* ===== PANEL ===== */
.page-panel { min-height: 100vh; background: var(--bg); }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w, 260px) 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  background: rgba(20, 20, 22, 0.82);
  backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 8px 12px 28px;
}

.brand-icon {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #0a0a0b;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 16px var(--accent-glow);
  animation: glowPulse 3s ease-in-out infinite;
}

.sidebar-nav { flex: 1; position: relative; }

.nav-pill {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius);
  z-index: 0;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.35s ease, opacity 0.2s;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

.nav-group {
  margin: 16px 12px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  position: relative;
  z-index: 1;
  transition: color 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s; }

.nav-item:hover {
  color: var(--text);
  transform: translateX(4px);
}
.nav-item:hover svg { transform: scale(1.1); }

.nav-item.active {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent-soft), rgba(34, 211, 238, 0.06));
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(34, 211, 238, 0.2);
  animation: navCtaGlow 3s ease-in-out infinite;
}

@keyframes navCtaGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(34, 211, 238, 0); }
  50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.15); }
}

.sidebar-foot {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(28, 28, 31, 0.9);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0a0a0b;
  border-radius: 8px;
  font-size: 0.85rem;
}

.main-wrap { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(20, 20, 22, 0.75);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}

.topbar-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  animation: slideIn 0.4s ease both;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 999px;
}

.online-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.menu-toggle {
  display: none;
  margin-right: auto;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; }

.main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 100px;
}

.view { display: none; opacity: 0; }
.view.active {
  display: block;
  animation: viewIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.view.view-enter { animation: viewIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.view-head { margin-bottom: 28px; }
.view-head h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.view-head p { margin: 0; color: var(--muted); }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(20, 20, 22, 0.8);
  backdrop-filter: blur(12px);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.25);
}

.stat-num {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

/* Cards */
.dash-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.stat-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

.card {
  background: rgba(20, 20, 22, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card:hover { border-color: rgba(34, 211, 238, 0.15); }

.card h2 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; }

.card-highlight {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(34, 211, 238, 0.04));
  border-color: rgba(34, 211, 238, 0.25);
  animation: glowPulse 4s ease-in-out infinite;
}

.card-highlight p { margin: 0 0 20px; color: var(--muted); font-size: 0.9rem; }

.feed { display: grid; gap: 0; }

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: transform 0.2s, padding-left 0.2s;
}
.feed-item:hover { transform: translateX(6px); padding-left: 4px; }

.feed-item:last-child { border-bottom: 0; }
.feed-name { font-weight: 600; }
.feed-meta { color: var(--muted); font-size: 0.8rem; }

.empty-state { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.empty-card { text-align: center; padding: 40px 24px; }
.empty-card p { margin: 0 0 16px; color: var(--muted); }

.builds-list { display: grid; gap: 10px; }

.build-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px !important;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.build-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.2) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.build-row-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.build-row-body { flex: 1; min-width: 0; }
.build-row strong { display: block; font-size: 0.95rem; }
.build-row span { font-size: 0.82rem; color: var(--muted); }

/* Build */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== COMPILE PANEL (estilo profissional) ===== */
.compile-panel {
  max-width: 560px;
  display: grid;
  gap: 22px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.compile-field {
  display: grid;
  gap: 8px;
  position: relative;
}

.compile-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compile-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.compile-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 24px rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
}

.compile-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a1a1aa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.compile-file-input {
  padding: 12px 14px;
  cursor: pointer;
}

.compile-file-input::file-selector-button {
  padding: 10px 18px;
  margin-right: 14px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.compile-file-input::file-selector-button:hover {
  background: rgba(34, 211, 238, 0.22);
}

.compile-file-status {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.compile-file-status.ok {
  color: var(--accent);
  font-weight: 600;
}

.compile-file-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.file-input-native {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.compile-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 168px;
  padding: 28px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 20, 22, 0.6);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.compile-pick-btn {
  display: inline-flex;
  align-self: center;
  margin-top: 4px;
  cursor: pointer;
}

.compile-dropzone:hover,
.compile-dropzone.drag {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.06);
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.1);
}

.compile-dropzone.has-file {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.04);
  border-style: solid;
  animation: glowPulse 2s ease-in-out infinite;
}

.compile-drop-icon {
  width: 44px;
  height: 44px;
  color: #71717a;
}

.compile-dropzone.has-file .compile-drop-icon { color: var(--accent); }

.compile-dropzone-icon {
  min-height: 120px;
  padding: 1rem 1.1rem;
}

.compile-dropzone-icon .compile-drop-icon-sm {
  width: 36px;
  height: 36px;
}

.compile-optional {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.35rem;
}

.compile-drop-text {
  font-size: 0.9rem;
  color: #d4d4d8;
}

.compile-drop-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.compile-file {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.compile-file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  background: #27272a;
  border-right: 1px solid var(--border);
  color: #e4e4e7;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  overflow: hidden;
}

.compile-file-btn:hover { background: #3f3f46; }

.compile-file-name {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compile-file-name.chosen { color: var(--text); }

.compile-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.compile-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 16px 20px;
  border: none;
  border-radius: 10px;
  background: #27272a;
  color: #fafafa;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.compile-submit:hover:not(:disabled) {
  background: #3f3f46;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.compile-submit:active:not(:disabled) { transform: scale(0.98); }
.compile-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.compile-submit:not(:disabled)::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: sweepShine 3s ease-in-out infinite;
}

@keyframes sweepShine {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

.compile-submit-ok {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent), #67e8f9);
  background-size: 200% 200%;
  color: #0a0a0b;
  animation: btnShine 3s ease infinite;
  box-shadow: 0 6px 24px var(--accent-glow);
}

.compile-result {
  max-width: 560px;
  margin: 20px auto 0;
  padding: 22px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(20, 20, 22, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.1);
}

.icon-preview-wrap {
  margin-top: 10px;
}

.icon-preview {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.card-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card-step span {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

.card-step h2 { margin: 0; font-size: 1rem; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 200px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone input { display: none; }
.dropzone-icon { font-size: 2.5rem; margin-bottom: 4px; }
.dropzone strong { font-size: 0.95rem; color: var(--text); }
.dropzone span { font-size: 0.82rem; color: var(--muted); }

.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.has-file { border-style: solid; border-color: var(--accent); }

.file-meta {
  margin-top: 14px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.meta-row { display: flex; justify-content: space-between; padding: 4px 0; }
.meta-row span { color: var(--muted); }

.progress-wrap { margin-top: 18px; }
.progress-top { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }

.progress-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-hover), var(--accent), #67e8f9, var(--accent));
  background-size: 200% 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: progressShimmer 1.5s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.result-card { margin-top: 16px; }
.result-head { font-weight: 700; color: var(--accent); margin-bottom: 8px; font-size: 1.05rem; }

.build-log {
  margin: 12px 0 16px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--muted);
  max-height: 140px;
  overflow: auto;
}

/* ===== LEVI — assistente amigável ===== */
#levi {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  animation: fadeUp 0.8s ease 0.5s both;
  /* Só mascote/ações clicam — o box grande NAO pode bloquear Entrar/Criar conta */
  pointer-events: none;
}

#levi .levi-body,
#levi .levi-actions,
#levi .levi-bubble.levi-bubble--ask {
  pointer-events: auto;
}

.levi-bubble {
  max-width: 240px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 16px 16px 4px 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.levi-bubble.show {
  opacity: 1;
  transform: none;
}

.levi-bubble p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}

.levi-body {
  position: relative;
  width: 80px;
  height: 80px;
  padding: 4px;
  border: 2px solid rgba(34, 211, 238, 0.45);
  cursor: pointer;
  background: rgba(34, 211, 238, 0.12);
  border-radius: 50%;
  overflow: visible;
  box-shadow: 0 8px 32px var(--accent-glow), 0 0 0 0 rgba(34, 211, 238, 0.4);
  animation: leviFloat 3s ease-in-out infinite, leviPulse 2.5s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.levi-help-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.levi-help-hint {
  font-family: Syne, Sora, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(34, 211, 238, 0.9));
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
  white-space: nowrap;
  animation: leviHintBob 2.4s ease-in-out infinite;
  pointer-events: none;
  max-width: 200px;
}

.levi-help-badge {
  position: absolute;
  top: -6px;
  left: -10px;
  z-index: 2;
  font-family: Syne, Sora, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #041018;
  background: #fbbf24;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.45);
  pointer-events: none;
  animation: leviBadgePulse 1.8s ease-in-out infinite;
}

#levi.levi--helping .levi-help-hint,
#levi.levi--helping .levi-help-badge {
  opacity: 0.35;
}

@keyframes leviHintBob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-4px); opacity: 0.92; }
}

@keyframes leviBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.levi-body:hover { transform: scale(1.1); }

@keyframes leviPulse {
  0%, 100% { box-shadow: 0 8px 32px var(--accent-glow), 0 0 0 0 rgba(34, 211, 238, 0.35); }
  50% { box-shadow: 0 8px 40px var(--accent-glow), 0 0 0 12px rgba(34, 211, 238, 0); }
}
.levi-body.wave { animation: leviWave 0.6s ease; }
.levi-body.happy .levi-smile { height: 10px; border-radius: 0 0 12px 12px; }

@keyframes leviFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes leviWave {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

.levi-antenna {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
  opacity: 0.8;
}

.levi-antenna::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #fafafa;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.levi-face {
  position: absolute;
  inset: 14px;
  transition: transform 0.1s;
}

.levi-eyes {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.levi-eye {
  width: 14px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.levi-pupil {
  width: 6px;
  height: 6px;
  background: #0a0a0b;
  border-radius: 50%;
  transition: transform 0.08s;
  display: block;
}

.levi-smile {
  width: 18px;
  height: 6px;
  margin: 8px auto 0;
  border: 2px solid #fff;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transition: height 0.2s;
}

/* Responsive */
@media (max-width: 900px) {
  .page-login { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 28px; min-height: 40vh; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    z-index: 100;
    width: 260px;
    transition: left 0.25s;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: flex; }
  .stats-grid, .panel-grid, .dash-row, .build-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  #levi { right: 16px; bottom: 16px; transform: scale(0.9); transform-origin: bottom right; }
}

@media (max-height: 640px) {
  #levi {
    right: 12px;
    bottom: 12px;
    transform: scale(0.82);
    transform-origin: bottom right;
  }
  .levi-help-hint { display: none; }
}

/* Chat */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 360px;
  max-height: 640px;
  background: rgba(20, 20, 22, 0.85);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  color: var(--muted);
  text-align: center;
  margin: auto;
  max-width: 280px;
}

.chat-msg {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  animation: msgPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.chat-msg-mine,
.chat-msg-admin {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.25);
}

.chat-msg-them,
.chat-msg-user {
  align-self: flex-start;
}

.chat-msg-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.chat-msg-head strong { color: var(--accent); font-weight: 600; }
.chat-msg-head span { color: var(--muted); }
.chat-msg p { margin: 0; line-height: 1.45; word-break: break-word; }

.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.chat-send { flex-shrink: 0; }

.chat-panel-admin { max-height: 720px; }

/* Admin */
.page-admin-login .login-main-full {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-box { max-width: 400px; width: 100%; }

.admin-login-badge {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  border-radius: 999px;
}

.admin-back-link,
.login-admin-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.admin-back-link:hover,
.login-admin-link:hover { color: var(--accent); }

.page-admin .sidebar-admin { border-right-color: rgba(34, 211, 238, 0.15); }

.brand-icon-admin {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
}

.nav-badge.hidden { display: none; }

@media (max-width: 900px) {
  .chat-panel { height: calc(100vh - 180px); }
  .cursor-glow { display: none; }
  .hero-float-1, .hero-float-2 { display: none; }
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ── Loader ── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.page-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { text-align: center; position: relative; }
.loader-ring {
  width: 64px; height: 64px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-logo {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #0a0a0b;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}
.loader-text {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Toasts ── */
.toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 99990;
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(20, 20, 22, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  pointer-events: auto;
  max-width: 320px;
}
.toast.show { transform: none; opacity: 1; }
.toast-ok { border-color: rgba(34, 211, 238, 0.35); }
.toast-err { border-color: rgba(239, 68, 68, 0.35); }
.toast-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.toast-ok .toast-icon { background: var(--accent-soft); color: var(--accent); }
.toast-err .toast-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ── Cursor dot ── */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: width 0.2s, height 0.2s, margin 0.2s;
}
body.cursor-hover .cursor-dot {
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

body.view-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 9997;
  animation: flashFade 0.4s ease forwards;
}
@keyframes flashFade {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── Hero stats ── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stat {
  text-align: center;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  border: 1px solid rgba(34, 211, 238, 0.12);
}
.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}
.hero-stat span { font-size: 0.72rem; color: var(--muted); margin-top: 4px; display: block; }

/* ── Quick actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px;
  background: rgba(20, 20, 22, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.quick-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.quick-action:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
}
.quick-action:hover::before { opacity: 1; }
.qa-icon { font-size: 1.4rem; margin-bottom: 4px; }
.quick-action strong { font-size: 0.92rem; position: relative; }
.quick-action small { font-size: 0.75rem; color: var(--muted); position: relative; }

/* ── Activity chart ── */
.activity-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 120px;
  padding: 0 4px 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  max-width: 32px;
  height: 0%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #67e8f9, var(--accent), var(--accent-hover));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chart-bar-wrap span { font-size: 0.65rem; color: var(--muted); font-weight: 600; }
.card-subhead { margin-top: 8px !important; }

/* ── Stat icons ── */
.stat-icon {
  font-size: 1.3rem;
  margin-bottom: 8px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.3));
}

/* ── Build steps ── */
.build-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.build-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(20, 20, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.3s ease;
}
.build-step span {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: all 0.3s;
}
.build-step.active {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
}
.build-step.active span {
  background: var(--accent);
  color: #0a0a0b;
  box-shadow: 0 0 12px var(--accent-glow);
}
.build-step.done {
  color: var(--text);
  opacity: 0.7;
}
.build-step.done span {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent);
}

@media (max-width: 900px) {
  .quick-actions { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .build-steps { flex-wrap: wrap; }
  .build-step { flex: 1 1 45%; }
  .build-layout { grid-template-columns: 1fr !important; }
  .phone-preview-wrap { order: -1; }
  .toast-stack { left: 16px; right: 16px; }
  .cursor-dot { display: none; }
  .hero-phone { display: none; }
}

/* ── Welcome banner ── */
.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(20, 20, 22, 0.9));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--border-angle, 0deg), transparent, var(--accent), transparent 30%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderSpin 4s linear infinite;
  pointer-events: none;
}
@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderSpin { to { --border-angle: 360deg; } }
.welcome-banner h1 {
  margin: 4px 0 6px;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome-time {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.welcome-banner p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.welcome-glow {
  position: absolute;
  top: -50%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15), transparent 70%);
  pointer-events: none;
  animation: floatY 6s ease-in-out infinite;
}

/* ── Phone preview ── */
.build-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.build-col-form { min-width: 0; }
.phone-preview-wrap {
  position: sticky;
  top: 100px;
  text-align: center;
}
.phone-preview-label {
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.phone-preview {
  width: 220px;
  margin: 0 auto;
  background: #1c1c1f;
  border-radius: 32px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(34, 211, 238, 0.08);
  transition: transform 0.2s ease-out, box-shadow 0.3s;
}
.phone-preview.phone-active {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.3);
}
.phone-notch {
  width: 60px; height: 6px;
  background: #3f3f46;
  border-radius: 999px;
  margin: 0 auto 10px;
}
.phone-screen {
  background: linear-gradient(180deg, #27272a, #18181b);
  border-radius: 22px;
  padding: 24px 16px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.phone-status { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.phone-app-icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), rgba(34, 211, 238, 0.05));
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 16px;
  color: var(--accent);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.phone-active .phone-app-icon { transform: scale(1.05); }
.phone-app-icon-empty::before {
  content: "+";
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
}
.preview-icon-img { width: 100%; height: 100%; object-fit: cover; }
.phone-app-name.is-placeholder { color: var(--muted); font-weight: 500; }
.phone-app-name {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  max-width: 160px;
  word-break: break-word;
}
.phone-install-btn {
  padding: 10px 28px;
  background: var(--accent);
  color: #0a0a0b;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.pulse-install { animation: installPulse 2s ease-in-out infinite; }
@keyframes installPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
}
.phone-lang { font-size: 0.72rem; color: var(--muted); }

.hero-phone {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  animation: floatY 5s ease-in-out infinite;
}
.phone-preview-hero { width: 180px; }
.phone-preview-hero .phone-screen { min-height: 220px; }

/* ── Empty illustrated ── */
.empty-illustrated {
  text-align: center;
  padding: 48px 32px !important;
}
.empty-illustrated h3 { margin: 16px 0 8px; font-size: 1.1rem; }
.empty-illustrated p { margin: 0 0 20px; color: var(--muted); }
.empty-art {
  width: 80px; height: 80px;
  margin: 0 auto;
  border-radius: 20px;
  position: relative;
  animation: floatY 4s ease-in-out infinite;
}
.empty-art-box {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 2px dashed rgba(34, 211, 238, 0.3);
}
.empty-art-box::after {
  content: "📦";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: 2rem;
}
.empty-art-shield {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), transparent);
  border: 2px solid rgba(34, 211, 238, 0.2);
}
.empty-art-shield::after {
  content: "🛡";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: 2rem;
}

/* ── Chat header & typing ── */
.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(28, 28, 31, 0.6);
}
.chat-agent {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-agent-avatar {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #0a0a0b;
  border-radius: 12px;
  font-weight: 800;
}
.chat-agent strong { display: block; font-size: 0.9rem; }
.chat-agent-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #22c55e;
}
.chat-agent-status i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: onlinePulse 2s ease-in-out infinite;
}
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 8px 20px 12px;
  align-items: center;
}
.chat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.chat-empty-icon { display: block; font-size: 2rem; margin-bottom: 8px; }
.chat-ping { animation: chatPing 0.5s ease; }
@keyframes chatPing {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 0 40px rgba(34, 211, 238, 0.3); }
}

.brand-pulse { animation: brandSpin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes brandSpin {
  from { transform: scale(0.5) rotate(-180deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-hover), var(--accent), #67e8f9);
  z-index: 99999;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.1s linear;
}

/* ── Sidebar overlay ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

/* ── Command palette ── */
.cmd-palette {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: grid;
  place-items: start center;
  padding-top: 15vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}
.cmd-palette.hidden { display: none; }
.cmd-box {
  width: min(420px, 92vw);
  background: rgba(20, 20, 22, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp 0.25s ease both;
}
.cmd-input {
  width: 100%;
  padding: 16px 18px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.cmd-input:focus { outline: none; }
.cmd-list { list-style: none; margin: 0; padding: 8px; max-height: 240px; overflow-y: auto; }
.cmd-item {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.cmd-item:hover, .cmd-item.active { background: var(--accent-soft); color: var(--accent); }

.kbd-hint {
  padding: 3px 8px;
  font-size: 0.68rem;
  font-family: inherit;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
}
@media (max-width: 900px) { .kbd-hint { display: none; } }

/* ── Ambient blobs ── */
.ambient-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: blobMove 20s ease-in-out infinite;
}
.ambient-blobs span:nth-child(1) {
  width: 400px; height: 400px;
  background: rgba(34, 211, 238, 0.15);
  top: -10%; left: -5%;
}
.ambient-blobs span:nth-child(2) {
  width: 350px; height: 350px;
  background: rgba(6, 182, 212, 0.12);
  bottom: -15%; right: -8%;
  animation-delay: -7s;
  animation-duration: 25s;
}
.ambient-blobs span:nth-child(3) {
  width: 280px; height: 280px;
  background: rgba(113, 113, 122, 0.1);
  top: 40%; left: 50%;
  animation-delay: -14s;
  animation-duration: 18s;
}
@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Clock & streak ── */
.topbar-clock {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.welcome-streak {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 999px;
}

/* ── Phone build states ── */
.phone-screen { position: relative; }
.phone-build-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(10, 10, 11, 0.85);
  border-radius: 22px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
.phone-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(34, 211, 238, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.phone-success {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #0a0a0b;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 0 40px var(--accent-glow);
}
@keyframes successPop {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.phone-building { animation: phoneShake 0.4s ease-in-out infinite; }
@keyframes phoneShake {
  0%, 100% { transform: perspective(600px) rotateY(0); }
  50% { transform: perspective(600px) rotateY(2deg); }
}
.phone-done .phone-install-btn { background: #22c55e; animation: none; }

/* ── Success modal ── */
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease both;
}
.success-modal.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.success-modal-box {
  text-align: center;
  padding: 40px 36px;
  max-width: 380px;
  width: 90%;
  background: rgba(20, 20, 22, 0.98);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 80px rgba(34, 211, 238, 0.15);
  animation: fadeUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-check {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  color: #0a0a0b;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.success-modal-box h2 { margin: 0 0 8px; font-size: 1.4rem; }
.success-modal-box p { margin: 0 0 24px; color: var(--muted); }
.success-modal-actions { display: grid; gap: 10px; }

/* ── Terms modal (obrigatório pós-login) ── */
.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px 12px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
}
.terms-modal[hidden] { display: none !important; }
.terms-box {
  width: min(560px, 96vw);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 16, 0.98);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(34, 211, 238, 0.1);
  animation: fadeUp 0.35s ease both;
  overflow: hidden;
}
.terms-head {
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.terms-doc { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.terms-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.terms-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.terms-body {
  padding: 16px 22px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}
.terms-body p { margin: 0 0 12px; }
.terms-body ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--muted);
}
.terms-body li { margin-bottom: 6px; }
.terms-warn { color: #fbbf24; }
.terms-thanks { color: var(--muted); font-size: 0.85rem; }
.terms-actions {
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 10px;
}
.terms-foot {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.terms-foot.err { color: #f87171; }
body.terms-locked {
  overflow: hidden;
}
body.terms-locked .app-shell,
body.terms-locked .sidebar,
body.terms-locked .main {
  pointer-events: none;
  user-select: none;
}

/* ── Help modal ── */
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 99994;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}
.help-modal.hidden { display: none; }
.help-box {
  width: min(360px, 92vw);
  padding: 28px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.3s ease both;
}
.help-box h3 { margin: 0 0 16px; font-size: 1.1rem; }
.help-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.help-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.help-list kbd {
  padding: 2px 8px;
  font-size: 0.75rem;
  font-family: inherit;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
}

/* ── Footer ── */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(20, 20, 22, 0.5);
}
.footer-sep { opacity: 0.4; }
.footer-link {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-link:hover { color: var(--accent); }

/* ── Typewriter ── */
.typewriter.typing::after {
  content: "|";
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Stat card shine sweep ── */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: statShine 5s ease-in-out infinite;
}
@keyframes statShine {
  0% { left: -100%; }
  40%, 100% { left: 150%; }
}

/* ── Brand images ── */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}
.login-hero { position: relative; }

.hero-logo-img {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.login-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-icon-img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.welcome-banner-img {
  position: absolute;
  right: 0; top: 0;
  width: 45%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  mask-image: linear-gradient(to left, black 30%, transparent);
  -webkit-mask-image: linear-gradient(to left, black 30%, transparent);
  pointer-events: none;
}

.chat-agent-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  background: none;
}
.chat-agent-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.levi-mascot-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.1s;
  overflow: hidden;
}

/* Levi — aula guiada */
.levi-bubble.levi-bubble--ask {
  max-width: min(300px, 86vw);
  pointer-events: auto;
  z-index: 1002;
}

.levi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.levi-act {
  appearance: none;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background: rgba(8, 14, 24, 0.85);
  color: #e2e8f0;
  font: 600 0.78rem Syne, Sora, sans-serif;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.levi-act:hover {
  border-color: rgba(34, 211, 238, 0.55);
  transform: translateY(-1px);
}

.levi-act--primary {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  border-color: transparent;
  color: #041018;
}

#levi-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  pointer-events: none;
  background: transparent;
}

.levi-spotlight {
  position: absolute;
  border-radius: 12px;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(2, 4, 10, 0.68),
    0 0 0 2.5px rgba(34, 211, 238, 0.95),
    0 0 0 6px rgba(34, 211, 238, 0.2),
    0 0 32px rgba(34, 211, 238, 0.4);
  transition:
    left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.28s ease;
  pointer-events: none;
  outline: none;
}

.levi-spotlight::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid rgba(103, 232, 249, 0.55);
  animation: leviSpotRing 1.5s ease-in-out infinite;
  pointer-events: none;
}

.levi-spotlight--nav {
  box-shadow:
    0 0 0 9999px rgba(2, 4, 10, 0.7),
    0 0 0 2px #22d3ee,
    0 0 0 5px rgba(34, 211, 238, 0.22),
    0 0 24px rgba(34, 211, 238, 0.45);
}

.levi-spotlight--field {
  box-shadow:
    0 0 0 9999px rgba(2, 4, 10, 0.66),
    0 0 0 2px #67e8f9,
    0 0 0 5px rgba(103, 232, 249, 0.18),
    0 0 28px rgba(34, 211, 238, 0.35);
}

.levi-spotlight--btn {
  box-shadow:
    0 0 0 9999px rgba(2, 4, 10, 0.66),
    0 0 0 2.5px #fbbf24,
    0 0 0 6px rgba(251, 191, 36, 0.18),
    0 0 30px rgba(251, 191, 36, 0.28);
}

@keyframes leviSpotRing {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.015); }
}

.levi-hl {
  position: relative;
  z-index: 990 !important;
  filter: brightness(1.08);
}

#levi.touring .levi-body,
.levi-body.touring {
  animation: leviFloat 2.2s ease-in-out infinite, leviPulse 1.6s ease-in-out infinite;
}

@media (max-width: 720px) {
  .levi-bubble.levi-bubble--ask { max-width: min(280px, 78vw); }
}

.loader-logo-img {
  width: 48px; height: 48px;
  border-radius: 12px;
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: brandSpin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loader-inner { position: relative; width: 64px; margin: 0 auto; }
.loader-ring { margin-top: 56px; }

/* Toggle MODO CAIXA */
.compile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.2s ease;
}
.toggle-thumb {
  width: 20px;
  height: 20px;
  background: var(--bg-dark);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.toggle-thumb .toggle-logo {
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.toggle-label {
  font-weight: 600;
  letter-spacing: 0.4px;
}
.toggle-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.compile-toggle input {
  display: none;
}
.compile-toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.compile-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: #fff;
  border-color: var(--accent);
}
