/* ============================================================
   FORGE IA — style.css  |  Visual Premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;700;800;900&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #070711;
  --bg2:        #0d0d1a;
  --surface:    rgba(255,255,255,0.035);
  --surface2:   rgba(255,255,255,0.06);
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.14);
  --text:       #eeeef5;
  --text2:      #9898b0;
  --text3:      #5a5a72;
  --purple:     #a855f7;
  --purple2:    #c084fc;
  --blue:       #38bdf8;
  --green:      #34d399;
  --amber:      #fbbf24;
  --pink:       #f472b6;
  --sidebar-w:  230px;
  --topbar-h:   52px;
  --r:          14px;
  --r-sm:       10px;
}

html, body { height: 100%; font-family: 'Instrument Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; overflow: hidden; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

/* ══════════════════════════════════════════
   BACKGROUND ANIMATED
══════════════════════════════════════════ */
.bg-canvas { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.22;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb1 { width: 600px; height: 600px; background: radial-gradient(circle, #7c3aed, transparent 70%); top: -200px; left: -150px; animation-delay: 0s; }
.orb2 { width: 500px; height: 500px; background: radial-gradient(circle, #0ea5e9, transparent 70%); bottom: -150px; right: -100px; animation-delay: -6s; }
.orb3 { width: 400px; height: 400px; background: radial-gradient(circle, #ec4899, transparent 70%); top: 40%; left: 40%; animation-delay: -12s; opacity: 0.12; }
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(40px,-30px) scale(1.05); }
  66%  { transform: translate(-20px,50px) scale(0.95); }
  100% { transform: translate(30px,20px) scale(1.08); }
}
.grain {
  position: absolute; inset: 0; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.app  { display: flex; height: 100vh; position: relative; z-index: 1; }
.main { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: rgba(10,10,22,0.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 0;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(56,189,248,0.3));
  border: 1px solid rgba(168,85,247,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(168,85,247,0.2);
}
.logo-text { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -0.3px; }
.logo-hl { background: linear-gradient(90deg, var(--purple2), var(--blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-group { padding: 12px 10px 4px; }
.nav-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 10px 6px; }

.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border-radius: var(--r-sm); cursor: pointer; font-size: 13px; color: var(--text2);
  border: 1px solid transparent; transition: all 0.18s; margin-bottom: 1px;
  font-weight: 500;
}
.nav-item svg { opacity: 0.6; flex-shrink: 0; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(56,189,248,0.08));
  border-color: rgba(168,85,247,0.25); color: var(--purple2);
  box-shadow: inset 0 0 20px rgba(168,85,247,0.05);
}
.nav-item.active svg { opacity: 1; color: var(--purple2); }

.type-nav {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--r-sm); cursor: pointer; font-size: 12px; color: var(--text2);
  transition: all 0.15s; margin-bottom: 1px; border: 1px solid transparent;
}
.type-nav:hover { background: var(--surface); color: var(--text); }
.type-nav.active { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.type-nav .hot {
  margin-left: auto; font-style: normal; font-size: 9px; padding: 1px 6px;
  border-radius: 99px; background: rgba(52,211,153,0.15); color: var(--green);
  border: 1px solid rgba(52,211,153,0.2); font-weight: 600;
}

.sidebar-foot {
  margin-top: auto; padding: 14px 16px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.status-pill {
  display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text2);
  background: var(--surface); border: 1px solid var(--border2);
  padding: 7px 12px; border-radius: 99px;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(52,211,153,0.4)} 50%{opacity:0.7;box-shadow:0 0 0 4px rgba(52,211,153,0)} }

/* ══════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid var(--border);
  background: rgba(7,7,17,0.7); backdrop-filter: blur(20px);
  flex-shrink: 0;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.hamburger {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); transition: all 0.15s;
}
.hamburger:hover { background: var(--surface2); color: var(--text); }
.tb-title { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 14px; color: var(--text); }
.tb-right { display: flex; gap: 8px; }
.tb-chip {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2);
  background: var(--surface); border: 1px solid var(--border2);
  padding: 5px 11px; border-radius: 99px; font-weight: 500;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.claude-dot { background: var(--purple2); box-shadow: 0 0 6px var(--purple2); }
.lovable-dot { background: var(--blue); box-shadow: 0 0 6px var(--blue); }

/* ══════════════════════════════════════════
   PAGES
══════════════════════════════════════════ */
.pages { flex: 1; overflow: hidden; position: relative; }
.page { display: none; height: 100%; overflow-y: auto; padding: 28px 32px; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ══════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════ */
.hero-section { text-align: center; padding: 20px 0 32px; max-width: 640px; margin: 0 auto; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  color: var(--purple2); background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.25);
  padding: 5px 14px; border-radius: 99px; margin-bottom: 18px;
}
.hero-h1 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 900; font-size: clamp(28px,4vw,44px);
  color: var(--text); line-height: 1.1; letter-spacing: -1px; margin-bottom: 14px;
}
.g-text {
  background: linear-gradient(135deg, var(--purple2) 0%, var(--blue) 60%, var(--pink) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-p { font-size: 15px; color: var(--text2); line-height: 1.6; max-width: 500px; margin: 0 auto; }

/* ══════════════════════════════════════════
   GLASS CARD
══════════════════════════════════════════ */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 4px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.glass-card:hover { border-color: var(--border2); }

/* ══════════════════════════════════════════
   PROMPT CARD
══════════════════════════════════════════ */
.prompt-card { max-width: 760px; margin: 0 auto 20px; }
.prompt-card:focus-within { border-color: rgba(168,85,247,0.4) !important; box-shadow: 0 4px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(168,85,247,0.2), inset 0 1px 0 rgba(255,255,255,0.06); }
.pc-top { padding: 16px 16px 12px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.p-pill {
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border2); background: transparent; color: var(--text2);
  cursor: pointer; font-family: 'Instrument Sans', sans-serif; transition: all 0.15s;
}
.p-pill:hover { border-color: rgba(168,85,247,0.4); color: var(--purple2); background: rgba(168,85,247,0.08); }
.p-pill.active { border-color: rgba(168,85,247,0.5); color: var(--purple2); background: rgba(168,85,247,0.12); }

.prompt-ta {
  width: 100%; background: transparent; border: none; outline: none;
  color: var(--text); font-family: 'Instrument Sans', sans-serif; font-size: 14px;
  resize: vertical; min-height: 90px; line-height: 1.65; caret-color: var(--purple2);
}
.prompt-ta::placeholder { color: var(--text3); }

.pc-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2); border-radius: 0 0 var(--r) var(--r);
  gap: 12px; flex-wrap: wrap;
}
.quick-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.q-btn {
  padding: 5px 11px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text2); font-size: 11px; font-weight: 500;
  cursor: pointer; font-family: 'Instrument Sans', sans-serif; transition: all 0.15s;
}
.q-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

.btn-gen {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border: none; color: white; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Cabinet Grotesk', sans-serif;
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  letter-spacing: 0.2px;
}
.btn-gen:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-gen:active { transform: translateY(0); }
.btn-gen:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════
   RESULT CARD
══════════════════════════════════════════ */
.result-card { max-width: 760px; margin: 0 auto; display: none; }
.result-card.show { display: block; }
.rc-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(168,85,247,0.05); border-radius: var(--r) var(--r) 0 0;
}
.rc-av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(168,85,247,0.4);
}
.rc-title { font-size: 13px; font-weight: 600; color: var(--text); font-family: 'Cabinet Grotesk', sans-serif; }
.rc-sub   { font-size: 11px; color: var(--text2); margin-top: 1px; }
.ring-loader {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(168,85,247,0.2); border-top-color: var(--purple2);
  animation: spin 0.8s linear infinite;
}
.ring-loader.done { border-color: rgba(52,211,153,0.3); border-top-color: var(--green); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.steps-row {
  display: flex; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border); gap: 0;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.step-line { flex: 1; height: 1px; background: var(--border2); margin: 0 6px; position: relative; top: -8px; }
.st-bubble {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text2);
  transition: all 0.3s;
}
.st-lbl { font-size: 10px; color: var(--text3); white-space: nowrap; }
.step.active .st-bubble { background: rgba(168,85,247,0.2); border-color: var(--purple2); color: var(--purple2); box-shadow: 0 0 12px rgba(168,85,247,0.3); }
.step.active .st-lbl { color: var(--purple2); }
.step.done  .st-bubble { background: rgba(52,211,153,0.15); border-color: var(--green); color: var(--green); }
.step.done  .st-lbl { color: var(--green); }

.output-box {
  display: none; padding: 18px 20px;
  font-size: 13px; color: var(--text2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  border-bottom: 1px solid var(--border);
  max-height: 320px; overflow-y: auto;
}
.output-box.show { display: block; }
.output-box strong, .output-box b { color: var(--text); font-weight: 600; }

.btn-lovable {
  display: none; align-items: center; justify-content: center; gap: 10px;
  width: calc(100% - 40px); margin: 16px 20px 6px;
  padding: 14px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, #0ea5e9, #6366f1, #a855f7);
  background-size: 200% 200%; animation: gradShift 4s ease infinite;
  border: none; color: white; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: 'Cabinet Grotesk', sans-serif;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 30px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-lovable.show { display: flex; }
.btn-lovable:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(99,102,241,0.5), inset 0 1px 0 rgba(255,255,255,0.15); }
@keyframes gradShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.lovable-hint { display: none; text-align: center; font-size: 11px; color: var(--text3); padding: 0 20px 16px; }
.lovable-hint.show { display: block; }

/* ══════════════════════════════════════════
   ASSISTENTE / CHAT
══════════════════════════════════════════ */
#page-assistente { padding: 0; display: none; }
#page-assistente.active { display: flex; flex-direction: column; }
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.cmsg { display: flex; gap: 12px; }
.cmsg.user { flex-direction: row-reverse; }
.cavatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  box-shadow: 0 0 16px rgba(168,85,247,0.3);
}
.cmsg.user .cavatar { background: var(--surface2); border: 1px solid var(--border2); box-shadow: none; font-size: 16px; }
.cbubble {
  padding: 12px 16px; border-radius: 14px; font-size: 13px;
  line-height: 1.7; max-width: 75%;
}
.cmsg.ai   .cbubble { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); border-radius: 4px 14px 14px 14px; }
.cmsg.user .cbubble { background: linear-gradient(135deg,rgba(124,58,237,0.25),rgba(79,70,229,0.2)); border: 1px solid rgba(124,58,237,0.3); color: var(--text); border-radius: 14px 4px 14px 14px; }

.chat-bar {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 24px; border-top: 1px solid var(--border);
  background: rgba(7,7,17,0.8); backdrop-filter: blur(20px);
  flex-shrink: 0;
}
.chat-ta {
  flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: 11px 14px; color: var(--text);
  font-family: 'Instrument Sans', sans-serif; font-size: 13px; outline: none;
  resize: none; min-height: 44px; max-height: 140px; line-height: 1.5;
  transition: border-color 0.15s; caret-color: var(--purple2);
}
.chat-ta:focus { border-color: rgba(168,85,247,0.4); }
.chat-ta::placeholder { color: var(--text3); }
.send-btn {
  width: 42px; height: 42px; border-radius: var(--r-sm); border: none;
  background: linear-gradient(135deg,var(--purple),#4f46e5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
  transition: all 0.15s;
}
.send-btn:hover { transform: scale(1.05); }

.typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */
.ph { margin-bottom: 22px; }
.ph-title { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 22px; color: var(--text); margin-bottom: 4px; }
.ph-sub   { font-size: 13px; color: var(--text2); }

/* ══════════════════════════════════════════
   TEMPLATES
══════════════════════════════════════════ */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tcard {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.tcard::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(56,189,248,0.05));
  transition: opacity 0.2s;
}
.tcard:hover { border-color: rgba(168,85,247,0.35); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.tcard:hover::before { opacity: 1; }
.tc-emoji { font-size: 28px; margin-bottom: 12px; display: block; position: relative; }
.tc-name  { font-family: 'Cabinet Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 5px; position: relative; }
.tc-desc  { font-size: 12px; color: var(--text2); line-height: 1.5; position: relative; }
.tc-arrow { margin-top: 12px; font-size: 11px; font-weight: 600; color: var(--purple2); position: relative; display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════════
   PROJETOS
══════════════════════════════════════════ */
.btn-new {
  padding: 9px 18px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(79,70,229,0.15));
  border: 1px solid rgba(124,58,237,0.3); color: var(--purple2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Cabinet Grotesk', sans-serif; transition: all 0.15s;
}
.btn-new:hover { background: linear-gradient(135deg,rgba(124,58,237,0.3),rgba(79,70,229,0.25)); }

.srow { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 24px; }
.sc {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px; text-align: center;
}
.sv { font-family: 'Cabinet Grotesk', sans-serif; font-size: 28px; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 4px; }
.sl { font-size: 11px; color: var(--text2); font-weight: 500; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pcard {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; cursor: pointer; transition: all 0.2s;
}
.pcard:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.pthumb { height: 96px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.pbody { padding: 12px 14px; border-top: 1px solid var(--border); }
.pname { font-family: 'Cabinet Grotesk', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.pmeta { font-size: 11px; color: var(--text3); }
.ptags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.ptag  { font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.ptag.p { background: rgba(168,85,247,0.12); color: var(--purple2); border: 1px solid rgba(168,85,247,0.2); }
.ptag.g { background: rgba(52,211,153,0.10); color: var(--green);   border: 1px solid rgba(52,211,153,0.2); }
.ptag.a { background: rgba(251,191,36,0.10); color: var(--amber);   border: 1px solid rgba(251,191,36,0.2); }

.pcard-new {
  background: transparent; border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--r); min-height: 170px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.pcard-new:hover { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.05); }
.pcard-new-inner { text-align: center; color: var(--text3); }
.pcard-new-inner .pn-plus { font-size: 24px; margin-bottom: 6px; }
.pcard-new-inner .pn-lbl  { font-size: 12px; font-weight: 500; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .page { padding: 20px 16px; }
  .hero-h1 { font-size: 26px; }
  .srow { grid-template-columns: repeat(2,1fr); }
  .steps-row { overflow-x: auto; }
}
@media (min-width: 769px) {
  .hamburger { display: none; }
}

/* ══════════════════════════════════════════
   MOCKUP DALL-E 3
══════════════════════════════════════════ */
.mockup-box {
  display: none; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mockup-box.show { display: block; }
.mockup-label {
  font-size: 12px; font-weight: 600; color: var(--purple2);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.mockup-img {
  width: 100%; border-radius: var(--r-sm);
  border: 1px solid var(--border2); cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.mockup-img:hover { transform: scale(1.01); box-shadow: 0 8px 40px rgba(168,85,247,0.2); }
.mockup-hint {
  font-size: 10px; color: var(--text3); text-align: center;
  margin-top: 8px;
}

/* ══════════════════════════════════════════
   TELA DE LOGIN
══════════════════════════════════════════ */
#login-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #070711;
}
#login-screen.hide {
  animation: loginFadeOut 0.5s ease forwards;
}
@keyframes loginFadeOut {
  to { opacity: 0; transform: scale(1.02); pointer-events: none; }
}

.login-bg { position: absolute; inset: 0; overflow: hidden; }
.login-orb { position: absolute; border-radius: 50%; filter: blur(80px); animation: drift 18s ease-in-out infinite alternate; }
.login-orb.orb1 { width: 600px; height: 600px; background: radial-gradient(circle, #7c3aed, transparent 70%); top: -200px; left: -150px; opacity: .25; }
.login-orb.orb2 { width: 500px; height: 500px; background: radial-gradient(circle, #0ea5e9, transparent 70%); bottom: -150px; right: -100px; opacity: .2; animation-delay: -6s; }
.login-orb.orb3 { width: 350px; height: 350px; background: radial-gradient(circle, #ec4899, transparent 70%); top: 40%; left: 40%; opacity: .12; animation-delay: -12s; }

.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; margin: 16px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: loginCardIn 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.login-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 28px;
}
.login-logo-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(168,85,247,.3), rgba(56,189,248,.3));
  border: 1px solid rgba(168,85,247,.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(168,85,247,.3);
}
.login-logo-text {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 900; font-size: 26px; color: #eeeef5; letter-spacing: -0.5px;
}
.login-logo-hl {
  background: linear-gradient(90deg, #c084fc, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.login-header { text-align: center; margin-bottom: 28px; }
.login-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800; font-size: 22px; color: #eeeef5; margin-bottom: 6px;
}
.login-sub { font-size: 13px; color: #9898b0; line-height: 1.5; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-field { display: flex; flex-direction: column; gap: 7px; }
.login-label { font-size: 12px; font-weight: 600; color: #9898b0; letter-spacing: 0.03em; }

.login-input-wrap {
  position: relative; display: flex; align-items: center;
}
.login-input-icon {
  position: absolute; left: 13px; color: #5a5a72; pointer-events: none;
}
.login-input {
  width: 100%; padding: 12px 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #eeeef5;
  font-family: 'Instrument Sans', sans-serif; font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: #c084fc;
}
.login-input::placeholder { color: #5a5a72; }
.login-input:focus {
  border-color: rgba(168,85,247,0.5);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
  background: rgba(255,255,255,0.07);
}

.toggle-pass {
  position: absolute; right: 12px; background: none; border: none;
  color: #5a5a72; cursor: pointer; padding: 4px; transition: color 0.15s;
}
.toggle-pass:hover { color: #9898b0; }

.login-error {
  display: none; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 8px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  color: #f87171; font-size: 12px; font-weight: 500;
}
.login-error.show { display: flex; animation: shake 0.35s ease; }
@keyframes shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)}
}

.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white; font-size: 14px; font-weight: 700;
  font-family: 'Cabinet Grotesk', sans-serif; cursor: pointer;
  letter-spacing: 0.2px; margin-top: 4px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.15); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.login-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 24px; font-size: 11px; color: #5a5a72;
}
.login-footer-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 6px #34d399; animation: pulse 2s infinite;
}

/* App fica escondido até login */
.app { display: none; }
.app.logged { display: flex; }

/* ── BOTÃO LOGOUT ── */
.logout-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 99px;
  border: 1px solid rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.08);
  color: #f87171; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: 'Instrument Sans', sans-serif;
  transition: all 0.15s;
}
.logout-btn:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.45);
  color: #fca5a5;
}

/* ══════════════════════════════════════════
   PAINEL ADMIN
══════════════════════════════════════════ */
.admin-badge {
  margin-left: auto; font-size: 9px; padding: 2px 6px; border-radius: 4px;
  background: linear-gradient(135deg,rgba(168,85,247,.4),rgba(56,189,248,.3));
  color: #c084fc; border: 1px solid rgba(168,85,247,.3); font-weight: 700; letter-spacing:.05em;
}
.nav-item[data-page="admin"].active { background: linear-gradient(135deg,rgba(168,85,247,.2),rgba(56,189,248,.12)); border-color: rgba(168,85,247,.4); }

.admin-topbar { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.admin-crown  { font-size:20px; }
.admin-user-badge {
  display:flex; align-items:center; gap:6px; padding:7px 14px;
  border-radius:99px; font-size:11px; font-weight:600; color:#c084fc;
  background:rgba(168,85,247,.12); border:1px solid rgba(168,85,247,.3);
}

/* STATS */
.admin-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.astat { border-radius:var(--r); padding:18px; border:1px solid var(--border); text-align:center; }
.astat-purple { background:rgba(168,85,247,.08); border-color:rgba(168,85,247,.2); }
.astat-blue   { background:rgba(56,189,248,.08); border-color:rgba(56,189,248,.2); }
.astat-green  { background:rgba(52,211,153,.08); border-color:rgba(52,211,153,.2); }
.astat-amber  { background:rgba(251,191,36,.08); border-color:rgba(251,191,36,.2); }
.astat-val { font-family:'Cabinet Grotesk',sans-serif; font-size:28px; font-weight:900; color:var(--text); }
.astat-lbl { font-size:11px; color:var(--text2); margin-top:3px; }

/* TABS INTERNAS */
.admin-tabs { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.atab {
  padding:8px 16px; border-radius:var(--rsm); border:1px solid var(--border);
  background:var(--surface); color:var(--text2); font-size:12px; font-weight:500;
  cursor:pointer; font-family:'Instrument Sans',sans-serif; transition:all .15s;
}
.atab:hover { background:var(--surface2); color:var(--text); }
.atab.active { background:rgba(168,85,247,.15); border-color:rgba(168,85,247,.35); color:var(--purple2); }

.admin-tab-content { display:none; }
.admin-tab-content.active { display:block; }

/* SEÇÃO */
.admin-section { background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:var(--r); padding:20px; margin-bottom:14px; }
.admin-section-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.admin-section-title { font-family:'Cabinet Grotesk',sans-serif; font-size:14px; font-weight:700; color:var(--text); }

/* BOTÕES ADMIN */
.admin-btn-add {
  padding:7px 14px; border-radius:var(--rsm); border:1px solid rgba(168,85,247,.35);
  background:rgba(168,85,247,.12); color:var(--purple2); font-size:12px; font-weight:600;
  cursor:pointer; font-family:'Cabinet Grotesk',sans-serif; transition:all .15s;
}
.admin-btn-add:hover { background:rgba(168,85,247,.22); }
.admin-btn-save {
  padding:9px 18px; border-radius:var(--rsm); border:none;
  background:linear-gradient(135deg,#7c3aed,#4f46e5); color:#fff; font-size:12px; font-weight:600;
  cursor:pointer; font-family:'Cabinet Grotesk',sans-serif; transition:all .15s;
  box-shadow:0 4px 16px rgba(124,58,237,.3);
}
.admin-btn-save:hover { transform:translateY(-1px); }
.admin-btn-cancel {
  padding:9px 14px; border-radius:var(--rsm); border:1px solid var(--border2);
  background:transparent; color:var(--text2); font-size:12px; cursor:pointer;
  font-family:'Instrument Sans',sans-serif; transition:all .15s;
}
.admin-btn-cancel:hover { background:var(--surface2); color:var(--text); }

/* FORM ADICIONAR USUÁRIO */
.add-user-form {
  display:none; background:rgba(168,85,247,.05); border:1px solid rgba(168,85,247,.2);
  border-radius:var(--rsm); padding:16px; margin-bottom:16px;
  animation:fadeIn .2s ease;
}
.add-user-form.show { display:block; }
.auf-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.auf-field { display:flex; flex-direction:column; gap:6px; }
.auf-label { font-size:11px; font-weight:600; color:var(--text2); }
.auf-input {
  padding:9px 12px; border-radius:var(--rsm); border:1px solid var(--border2);
  background:rgba(255,255,255,.05); color:var(--text); font-size:13px;
  font-family:'Instrument Sans',sans-serif; outline:none; transition:border-color .15s;
}
.auf-input:focus { border-color:rgba(168,85,247,.5); }
.auf-note { font-size:11px; color:var(--amber); margin-top:8px; background:rgba(251,191,36,.07); padding:8px 12px; border-radius:6px; border:1px solid rgba(251,191,36,.15); }

/* TABELA USUÁRIOS */
.users-table { display:flex; flex-direction:column; gap:8px; }
.user-row {
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--rsm);
  transition:border-color .15s;
}
.user-row:hover { border-color:var(--border2); }
.user-avatar {
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700;
}
.user-avatar.admin { background:linear-gradient(135deg,rgba(168,85,247,.3),rgba(56,189,248,.2)); color:var(--purple2); border:1px solid rgba(168,85,247,.3); }
.user-avatar.user  { background:rgba(255,255,255,.06); color:var(--text2); border:1px solid var(--border2); }
.user-name  { font-size:13px; font-weight:600; color:var(--text); }
.user-role-badge { font-size:10px; padding:2px 8px; border-radius:99px; font-weight:600; }
.user-role-badge.admin { background:rgba(168,85,247,.15); color:var(--purple2); border:1px solid rgba(168,85,247,.25); }
.user-role-badge.user  { background:rgba(255,255,255,.06); color:var(--text2); border:1px solid var(--border); }
.user-actions { margin-left:auto; display:flex; gap:6px; }
.user-del-btn {
  padding:5px 10px; border-radius:6px; border:1px solid rgba(239,68,68,.2);
  background:rgba(239,68,68,.08); color:#f87171; font-size:11px; cursor:pointer; transition:all .15s;
}
.user-del-btn:hover { background:rgba(239,68,68,.18); }

/* HISTÓRICO */
.hist-list { display:flex; flex-direction:column; gap:8px; max-height:400px; overflow-y:auto; }
.hist-row {
  display:flex; align-items:flex-start; gap:12px; padding:12px 14px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--rsm);
}
.hist-icon { font-size:18px; flex-shrink:0; margin-top:1px; }
.hist-user { font-size:11px; font-weight:600; color:var(--purple2); margin-bottom:3px; }
.hist-prompt { font-size:12px; color:var(--text); line-height:1.4; }
.hist-meta { font-size:10px; color:var(--text3); margin-top:4px; }
.hist-empty { text-align:center; padding:32px; color:var(--text3); font-size:13px; }

/* API CARDS */
.api-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--rsm); padding:16px; margin-bottom:12px; }
.api-card-hdr { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.api-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.api-dot-green { background:var(--green); box-shadow:0 0 6px var(--green); }
.api-name  { font-size:13px; font-weight:600; color:var(--text); }
.api-model { font-size:11px; color:var(--text3); margin-top:1px; }
.api-status-badge { margin-left:auto; font-size:10px; padding:3px 9px; border-radius:99px; background:rgba(52,211,153,.12); color:var(--green); border:1px solid rgba(52,211,153,.25); font-weight:600; }
.api-key-row { display:flex; gap:8px; }
.api-key-input { flex:1; padding:8px 12px; border-radius:var(--rsm); border:1px solid var(--border2); background:rgba(255,255,255,.03); color:var(--text2); font-size:12px; font-family:monospace; outline:none; }
.api-key-btn { padding:8px 16px; border-radius:var(--rsm); border:1px solid rgba(168,85,247,.3); background:rgba(168,85,247,.1); color:var(--purple2); font-size:12px; font-weight:600; cursor:pointer; transition:all .15s; white-space:nowrap; }
.api-key-btn:hover { background:rgba(168,85,247,.2); }
.api-info-box { display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:var(--rsm); background:rgba(56,189,248,.07); border:1px solid rgba(56,189,248,.2); color:#7dd3fc; font-size:12px; }

/* PLATAFORMA */
.plat-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.plat-field { display:flex; flex-direction:column; gap:6px; }

@media(max-width:768px){
  .admin-stats{grid-template-columns:repeat(2,1fr)}
  .auf-grid{grid-template-columns:1fr}
  .plat-grid{grid-template-columns:1fr}
}
