@font-face {
  font-family: "Hack Nerd Font Mono";
  src: url("/fonts/HackNerdFontMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Hack Nerd Font Mono";
  src: url("/fonts/HackNerdFontMono-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1015;
  color: #e2e8f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #8a99ab;
  --line: #27313d;
  --cyan: #67e8f9;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-view {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(45, 212, 191, .09), transparent 34%),
    linear-gradient(150deg, #0d1015 0%, #111722 100%);
}

.auth-card {
  width: min(100%, 420px);
  padding: 38px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(15, 20, 28, .86);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .38);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(103, 232, 249, .35);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(103, 232, 249, .07);
  font: 700 17px/1 ui-monospace, monospace;
}

.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.eyebrow { margin: 28px 0 7px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; font-size: 27px; font-weight: 650; letter-spacing: -.035em; }
.lede { margin: 10px 0 30px; color: #9aa7b6; font-size: 14px; line-height: 1.6; }
label { display: block; margin-bottom: 8px; color: #cbd5e1; font-size: 12px; font-weight: 600; }
input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #354252;
  border-radius: 9px;
  outline: none;
  background: #0b0f14;
  color: #f8fafc;
  font: 13px ui-monospace, monospace;
  letter-spacing: .02em;
}
input:focus { border-color: #67e8f9; box-shadow: 0 0 0 3px rgba(103, 232, 249, .12); }
.hint { margin: 9px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.primary-button {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 9px;
  background: #a5f3fc;
  color: #0b1720;
  font-size: 13px;
  font-weight: 700;
  transition: filter .15s ease, transform .15s ease;
}
.primary-button:hover { filter: brightness(1.05); }
.primary-button:active { transform: translateY(1px); }
.error { margin: 17px 0 0; color: #fca5a5; font-size: 12px; line-height: 1.5; }
.local-note { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 9px; color: #738195; font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, .45); }

.terminal-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #10141b;
}
.terminal-shell:fullscreen { width: 100vw; height: 100vh; }
.toolbar {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 0 max(15px, env(safe-area-inset-right)) 0 max(15px, env(safe-area-inset-left));
  border-bottom: 1px solid #27313d;
  background: #141a23;
  user-select: none;
}
.toolbar-brand, .toolbar-center, .toolbar-actions { display: flex; align-items: center; }
.toolbar-brand { gap: 9px; color: #dce5ef; font-size: 12px; font-weight: 650; }
.toolbar-center { gap: 8px; color: #8291a3; font-size: 11px; }
.toolbar-actions { gap: 7px; }
.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid #303b49;
  border-radius: 7px;
  background: #1a222d;
  color: #cbd5e1;
  font-size: 11px;
}
.toolbar-button:hover { background: #222d3a; color: white; }
.icon-button { width: 32px; padding: 0; font-size: 17px; }
.terminal-container { position: relative; flex: 1; min-height: 0; padding: 13px 16px 4px; }
.terminal-container .xterm { height: 100%; }
.terminal-container .xterm-viewport { scrollbar-color: #344151 #10141b; }
.terminal-status {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 9px 14px;
  border: 1px solid #4a5b6f;
  border-radius: 8px;
  background: #1c2936;
  color: #e2e8f0;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
}
.terminal-help { padding: 7px 16px max(8px, env(safe-area-inset-bottom)); color: #6e7b8d; background: #10141b; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .auth-card { padding: 29px 24px; }
  .toolbar { min-height: 47px; padding-inline: max(10px, env(safe-area-inset-left)); }
  .toolbar-center { display: none; }
  .toolbar-actions { gap: 5px; }
  .toolbar-button { padding-inline: 8px; }
  .terminal-container { padding: 9px 8px 2px; }
  .terminal-help { display: none; }
}
