/* HelloJade Account — jade glass identity (tokens shared with hellojade.ai) */

:root {
  --jade-950: #04120d;
  --jade-900: #06231a;
  --jade-700: #0e5c41;
  --jade-500: #17aa77;
  --jade-300: #4fe0a8;
  --jade-200: #8ef0c9;
  --jade-100: #d7fbe9;
  --ink: #e6f7ee;
  --ink-dim: #9dc9b4;
  --glass-bg: rgba(10, 42, 31, 0.55);
  --glass-line: rgba(120, 235, 180, 0.22);
  --warn: #eac054;
  --danger: #ef7b6d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--jade-950);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

#stage { position: fixed; inset: 0; }

/* ---------- HUD chrome ---------- */
.hud {
  position: fixed;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  pointer-events: none;
  z-index: 10;
}
.hud-top { top: 0; }
.hud-bottom { bottom: 0; }
.hud > * { pointer-events: auto; }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(190, 255, 220, 0.10);
}

.brand { display: flex; align-items: center; gap: 12px; user-select: none; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 9px;
  box-shadow: 0 0 22px rgba(79, 224, 168, 0.35);
}
.brand-text h1 {
  margin: 0; font-size: 18px; font-weight: 650; letter-spacing: 0.2px;
  text-shadow: 0 0 18px rgba(79, 224, 168, 0.35);
}
.brand-text p {
  margin: 0; font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--ink-dim);
}

.hud-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  color: var(--ink); font: inherit; font-size: 13px;
  padding: 8px 15px; cursor: pointer; transition: all 0.18s ease;
}
.btn:hover {
  border-color: rgba(140, 240, 195, 0.55);
  box-shadow: 0 0 22px rgba(79, 224, 168, 0.25), inset 0 1px 0 rgba(190,255,220,.12);
  transform: translateY(-1px);
}
.btn-accent {
  background: linear-gradient(160deg, rgba(23, 170, 119, 0.75), rgba(14, 92, 65, 0.75));
  border-color: rgba(140, 240, 195, 0.4);
}

.field {
  color: var(--ink); font: inherit; font-size: 13.5px;
  padding: 10px 12px; outline: none; width: 100%;
}
.field:focus { border-color: rgba(140, 240, 195, 0.6); }
.mono, #sql-input { font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace; }

.chip {
  font-size: 12px; color: var(--ink-dim);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.chip.caps b { color: var(--jade-300); font-weight: 600; }
#status b { color: var(--jade-200); font-weight: 600; }
.hint { opacity: 0.85; }
.mode-badge { letter-spacing: 1.5px; text-transform: uppercase; font-weight: 650; }
.mode-badge.mock { color: var(--warn); border-color: rgba(234, 192, 84, 0.4); }
.mode-badge.api { color: var(--jade-200); }
.user-chip b { color: var(--jade-200); font-weight: 600; }

/* ---------- MathML formula chips ---------- */
.formula {
  position: fixed; z-index: 9;
  padding: 7px 14px; border-radius: 12px;
  font-size: 13.5px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.formula math { color: var(--ink); }
.formula mi { color: var(--ink-dim); }
.formula mn { color: var(--jade-200); font-style: normal; }
.formula-mark { color: var(--jade-300); font-weight: 700; font-size: 15px; text-shadow: 0 0 12px rgba(79,224,168,.6); }
.formula-mark.bad { color: var(--danger); text-shadow: 0 0 12px rgba(239,123,109,.6); }

/* ---------- SQL console dock ---------- */
#sql-dock { position: fixed; z-index: 9; display: flex; flex-direction: column; gap: 8px; }
#sql-input {
  width: 100%; height: 100%; flex: 1; resize: none;
  font-size: 13px; line-height: 1.5; padding: 12px 14px;
  color: var(--jade-100);
}
.sql-dock-actions { display: flex; align-items: center; gap: 12px; }
.sql-meta { font-size: 11.5px; color: var(--ink-dim); }
.sql-meta b { color: var(--jade-200); }
.sql-meta.err { color: var(--danger); }

/* ---------- change-password dock (Account panel) ---------- */
#pw-dock { position: fixed; z-index: 9; }
.pw-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pw-form label {
  font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-dim); display: flex; flex-direction: column; gap: 5px;
}
.pw-dock-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- auth veil ---------- */
.auth-veil {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, rgba(4,18,13,0.5), rgba(4,18,13,0.2) 30%, rgba(4,18,13,0.2) 70%, rgba(4,18,13,0.6));
  transition: opacity 0.45s ease;
}
.auth-veil.off { opacity: 0; pointer-events: none; }

.auth-card {
  width: 380px; max-width: calc(100vw - 40px);
  padding: 30px 34px 22px;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-logo { width: 58px; height: 58px; border-radius: 13px; box-shadow: 0 0 34px rgba(79,224,168,.45); }
.auth-card h2 { margin: 14px 0 2px; font-size: 21px; font-weight: 650; }
.auth-sub {
  margin: 0 0 20px; font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-dim);
}
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-form label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); display: flex; flex-direction: column; gap: 5px; }
.auth-submit { margin-top: 6px; padding: 11px; font-weight: 600; }
.auth-error { min-height: 16px; font-size: 12px; color: var(--danger); text-align: center; }
.auth-link {
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); font-size: 12px; padding: 2px;
}
.auth-link:hover { color: var(--jade-200); }
.auth-mode { margin-top: 14px; font-size: 10.5px; letter-spacing: 1px; color: rgba(157, 201, 180, 0.55); }

/* HelloJade animated gem + wordmark (identity from hellojade.ai) */
.brand-gem {
  display: inline-block;
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 32% 30%, #8ef0c9, #17aa77 55%, #0e5c41);
  box-shadow: 0 0 24px rgba(79, 224, 168, 0.55), inset 0 -4px 10px rgba(4, 18, 13, 0.5);
  animation: gem-breathe 5s ease-in-out infinite;
}
.brand-gem-lg { width: 52px; height: 52px; margin: 0 auto 10px; display: block; }
@keyframes gem-breathe {
  0%, 100% { box-shadow: 0 0 18px rgba(79, 224, 168, 0.4), inset 0 -4px 10px rgba(4,18,13,.5); }
  50% { box-shadow: 0 0 34px rgba(79, 224, 168, 0.75), inset 0 -4px 10px rgba(4,18,13,.5); }
}
.hj-wordmark { letter-spacing: 0.3px; font-weight: 650; }
.hj-hello { color: #ffffff; }
.hj-jade { color: #17aa77; text-shadow: 0 0 14px rgba(23, 170, 119, 0.45); }

/* canonical animated hellojade mark hosts (canvas mounted by js/logo.js) */
.mark-host { display: inline-block; width: 34px; height: 34px; flex: 0 0 auto; }
.mark-host-lg { width: 96px; height: 96px; margin: 0 auto 4px; display: block; }
.brand-gem, .brand-gem-lg { display: none; } /* superseded by the real mark */
