/* =========================================================================
   ACORE — camada premium: degradê, brilho e textura tech sobre o fundo escuro
   ========================================================================= */
:root {
  --glow: rgba(204, 255, 0, .38);
  --glow-soft: rgba(204, 255, 0, .14);
  --glow-green: rgba(47, 211, 106, .28);
  --panel-fill: linear-gradient(180deg, #181b11 0%, #111309 100%);
  --edge: linear-gradient(140deg, rgba(204,255,0,.42) 0%, rgba(255,255,255,.07) 32%, rgba(255,255,255,.03) 60%, rgba(47,211,106,.32) 100%);
  --edge-quiet: linear-gradient(140deg, rgba(204,255,0,.18) 0%, rgba(255,255,255,.05) 40%, rgba(47,211,106,.14) 100%);
}

/* Fundo: duas luzes ambiente + grade fina que some nas bordas */
body {
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(204,255,0,.10), transparent 60%),
    radial-gradient(800px 700px at 110% 110%, rgba(47,211,106,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(204,255,0,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,255,0,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
}
.shell, .login { position: relative; z-index: 1; }

/* Scrollbar discreta */
* { scrollbar-width: thin; scrollbar-color: #2f3524 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2f3524; border-radius: 8px; }

/* Marca com brilho */
.mark .c { filter: drop-shadow(0 0 14px var(--glow)); }
.mark { font-size: 1.85rem; }

/* Superfícies com borda em degradê */
.panel, .kpis, .modal, .starter, .composer, .login-card {
  border: 1px solid transparent;
  background: var(--panel-fill) padding-box, var(--edge) border-box;
}
.starter, .kpis { background: var(--panel-fill) padding-box, var(--edge-quiet) border-box; }
.panel { box-shadow: 0 20px 50px -30px rgba(0,0,0,.8); }
.kpis { background-color: transparent; gap: 0; }
.kpi { background: transparent; position: relative; }
.kpi + .kpi::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: linear-gradient(transparent, rgba(255,255,255,.09), transparent); }
.kpi:first-child .v {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px var(--glow-soft));
}
@media (max-width: 760px) {
  .kpi:nth-child(3)::before { display: none; }
  .kpi:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.06); }
}

/* Botões */
.btn { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.09); }
.btn:hover { border-color: rgba(204,255,0,.35); background: rgba(204,255,0,.05); }
.btn.primary {
  position: relative; overflow: hidden; border: 0; color: #0d0e0a;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgba(204,255,0,.35), 0 8px 28px -6px var(--glow), inset 0 1px 0 rgba(255,255,255,.45);
  transition: box-shadow .2s, transform .2s;
}
.btn.primary:hover { background: var(--grad); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(204,255,0,.6), 0 10px 36px -4px var(--glow), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn.primary:hover::after { left: 130%; }

/* Campos */
.input { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.09); }
.input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(204,255,0,.10), 0 0 22px -6px var(--glow); }

/* Sidebar e topo com vidro */
.sidebar { background: rgba(14,16,10,.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right-color: rgba(255,255,255,.06); }
.sidebar .btn.new { background: var(--panel-fill) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.sidebar .btn.new:hover { box-shadow: 0 0 24px -8px var(--glow); }
.sidebar-foot { border-top-color: rgba(255,255,255,.06); }
.conv-item.active { background: linear-gradient(90deg, rgba(204,255,0,.10), rgba(204,255,0,0) 85%); box-shadow: inset 2px 0 0 var(--neon), -6px 0 18px -6px var(--glow); }
.avatar { background: var(--panel-fill) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.topbar { background: rgba(13,14,10,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(255,255,255,.06); }
.tab.active {
  color: #0d0e0a; background: var(--grad);
  box-shadow: 0 0 22px -4px var(--glow), inset 0 1px 0 rgba(255,255,255,.4);
}

/* Status da mentora */
.status {
  display: inline-flex; align-items: center; gap: .45rem; margin-left: auto;
  font-size: .8rem; color: var(--muted); padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid rgba(204,255,0,.18); background: rgba(204,255,0,.04);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Avatar da IA: anel em degradê, gira só enquanto ela está respondendo */
.msg .ai-dot {
  position: relative; background: #0d0e0a; color: var(--neon);
  box-shadow: 0 0 16px -2px var(--glow);
}
.msg .ai-dot::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, var(--neon), var(--green), transparent 70%, var(--neon));
}
.msg .ai-dot { isolation: isolate; }
.msg.thinking .ai-dot::before { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing i { background: var(--neon); box-shadow: 0 0 8px var(--glow); }

.msg.user .bubble {
  background: linear-gradient(160deg, rgba(204,255,0,.10), rgba(47,211,106,.05)) padding-box, var(--edge-quiet) border-box;
  border: 1px solid transparent;
}
.creative img { box-shadow: 0 20px 60px -20px rgba(204,255,0,.25); }
.saved-note { color: #b9d66a; }
.md strong { color: #fff; }
.md blockquote { border-left-color: var(--neon); box-shadow: -8px 0 16px -12px var(--glow); }
.md th { background: rgba(204,255,0,.06); }

/* Composer */
.composer { transition: box-shadow .2s; }
.composer:focus-within { box-shadow: 0 0 0 1px rgba(204,255,0,.35), 0 0 40px -10px var(--glow); }
.send-btn { background: var(--grad); box-shadow: 0 0 20px -4px var(--glow); }
.send-btn:disabled { background: rgba(255,255,255,.06); box-shadow: none; }

/* Boas-vindas */
.welcome { position: relative; }
.welcome h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); }
.welcome::before {
  content: ''; position: absolute; width: 420px; height: 420px; left: -120px; top: -40px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(204,255,0,.14), transparent 65%); filter: blur(10px);
}
.welcome h1 .line2 { display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px var(--glow-soft)); }
.starter { transition: box-shadow .2s, transform .2s; }
.starter:hover { border-color: transparent; background: var(--panel-fill) padding-box, var(--edge) border-box; box-shadow: 0 0 30px -10px var(--glow); transform: translateY(-2px); }
.starter .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .6rem; color: var(--neon); background: rgba(204,255,0,.08); border: 1px solid rgba(204,255,0,.2); }
.starter .ico svg { width: 18px; height: 18px; }

/* Títulos de página */
.page-head h1 { font-size: 2.6rem; }
.pill.on { color: var(--neon); border-color: rgba(204,255,0,.35); background: rgba(204,255,0,.06); box-shadow: 0 0 12px -4px var(--glow); }

/* Tabela */
table.data tr.click:hover td { background: rgba(204,255,0,.04); }
table.data th { border-bottom-color: rgba(255,255,255,.08); }
table.data td { border-bottom-color: rgba(255,255,255,.05); }

/* Modal */
.modal-bg { background: rgba(5,6,3,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 60px -30px var(--glow); }

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */
.login-brand { border-right: 0; isolation: isolate; }
.login-brand::after {
  content: ''; position: absolute; right: 0; top: 10%; bottom: 10%; width: 1px;
  background: linear-gradient(transparent, rgba(204,255,0,.4), transparent);
}
.login-brand .stage { position: relative; align-self: flex-start; }
.login-brand .orb {
  position: absolute; width: 130%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(circle, rgba(204,255,0,.26) 0%, rgba(47,211,106,.12) 35%, transparent 65%);
  filter: blur(20px);
}
.login-brand .stage { font-size: clamp(15rem, 30vw, 27rem); align-self: flex-start; margin-left: .5rem; }
.login-brand .symbol { display: block; width: 1em; height: auto; filter: drop-shadow(0 0 28px rgba(204,255,0,.32)); animation: ignite 1.6s cubic-bezier(.2,.7,.2,1) both; }
.login-brand .ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; z-index: -1;
  border: 1px solid rgba(204,255,0,.16);
}
.login-brand .ring.r1 { width: .8em; height: .8em; margin: -.4em 0 0 -.4em; animation: spin 40s linear infinite reverse; }
.login-brand .ring.r2 { width: 1.1em; height: 1.1em; margin: -.55em 0 0 -.55em; border-style: dashed; border-color: rgba(255,255,255,.08); animation: spin 90s linear infinite; }
.login-brand .ring.r1::after {
  content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; top: 50%; left: -5px; margin-top: -4.5px;
  background: var(--neon); box-shadow: 0 0 14px 2px var(--glow);
}
.login-brand .giant { animation: ignite 1.6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ignite {
  0% { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
.brand-wordmark { height: 34px; width: auto; align-self: flex-start; }
.brand-line { font-family: var(--display); font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin: 0; }
.brand-line span { display: block; font-family: var(--body); font-size: 1rem; line-height: 1.5; margin-top: .5rem; color: var(--muted); }
.login-card { width: 100%; max-width: 400px; padding: 2.2rem 2rem; border-radius: var(--r-lg); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 80px -40px var(--glow); }
.login-form form { max-width: none; }
.chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--muted); padding: .28rem .7rem; border-radius: 999px; border: 1px solid rgba(204,255,0,.2); background: rgba(204,255,0,.05); margin-bottom: 1.2rem; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulse 2.4s ease-in-out infinite; }

@media (max-width: 820px) {
  .login-brand::after { display: none; }
  .login-brand { padding: 2rem 1.3rem 1rem; align-items: center; border-bottom: 0; }
  .brand-wordmark, .brand-line { display: none; }
  .login-brand .stage { font-size: 9rem; align-self: center; margin: 1rem 0 .5rem; }
  .login-form { padding: 1rem 1rem 2rem; }
  .login-card { padding: 1.6rem 1.3rem; }
}
@media (max-width: 860px) {
  .status span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-brand .ring, .msg .ai-dot::before, .status i, .chip i { animation: none !important; }
}

/* Logo oficial */
.side-logo { height: 30px; width: auto; display: block; margin-bottom: .35rem; filter: drop-shadow(0 0 10px rgba(204,255,0,.18)); }
.msg .ai-dot img { width: 20px; height: auto; display: block; }

/* Login centralizado: logo pequeno em cima, card embaixo */
.login.login-simple { display: flex; min-height: 100%; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-simple .login-form { flex-direction: column; gap: 1.8rem; padding: 0; width: 100%; }
.login-logo { height: 40px; width: auto; filter: drop-shadow(0 0 16px rgba(204,255,0,.2)); }
.login-simple .login-card { max-width: 420px; }
.login-simple .login-card h1 { font-size: 1.85rem; }
.login-simple .login-card .chip, .login-simple .login-card h1, .login-simple .login-card > p { text-align: center; }
.login-simple .login-card .chip { display: flex; width: max-content; margin: 0 auto 1.1rem; }
.login-simple .login-card > p.small { margin: 1.2rem 0 0 !important; }
.login-simple::after {
  content: ''; position: fixed; left: 50%; top: 50%; width: 640px; height: 640px; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(204,255,0,.10), transparent 60%);
}
.creative { max-width: 380px; } .creative img { max-height: 72vh; width: auto; max-width: 100%; }
