/* The sign-in page in CAIRN's look: LoginShell (cairn-frontend packages/auth/src/login-ui.tsx) with @cairn/ui theme
   values, as style.css. Plain CSS, no build step. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("montserrat-latin.woff2") format("woff2");
}

:root {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --card: 168 46% 13%;
  --secondary: 173 44% 28%;
  --input: 173 44% 28%;
  --primary: 176 66% 60%;
  --primary-foreground: 168 46% 13%;
  --muted-foreground: 0 0% 78%;
  --border: 175 44% 44%;
  --destructive: 0 72% 51%;
  --glow-teal: 176 66% 60%;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.glow {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, hsl(var(--glow-teal) / 0.14) 0%, transparent 65%);
}

.edge {
  position: fixed; inset: 0 0 auto 0; height: 1px; pointer-events: none;
  background: linear-gradient(to right, transparent, hsl(var(--primary) / 0.4), transparent);
}

.shell {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px;
}

.card {
  width: 100%; max-width: 400px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border) / 0.7);
  box-shadow: 0 0 20px -5px hsl(var(--glow-teal) / 0.4);
  padding: 40px 32px 32px;
  display: flex; flex-direction: column; gap: 24px;
}

.head { text-align: center; display: flex; flex-direction: column; gap: 16px; }
.logo { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1; }
.logo .ai { color: hsl(var(--primary)); }
h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.head p { margin: -10px 0 0; font-size: 14px; line-height: 1.6; color: hsl(var(--muted-foreground)); }

form { display: flex; flex-direction: column; gap: 16px; }
form[hidden], [hidden] { display: none !important; }

.field { display: flex; flex-direction: column; gap: 8px; }

label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
}

input {
  height: 40px; width: 100%;
  padding: 8px 12px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
  border-radius: 0;
  font: 14px var(--font);
}
input:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 1px; }
input.otp { text-align: center; font: 18px ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.35em; }

button[type="submit"] {
  margin-top: 8px; height: 44px; width: 100%;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--secondary)); border-radius: 0;
  font: 600 14px var(--font); cursor: pointer;
}
button[type="submit"]:hover { background: hsl(var(--primary) / 0.9); }
button[type="submit"]:active { background: hsl(var(--secondary)); }
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.hint { margin: -8px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }

.alert {
  margin: 0; padding: 10px 12px;
  border: 1px solid hsl(var(--destructive) / 0.6);
  background: hsl(var(--destructive) / 0.12);
  font-size: 13px;
}

.demo {
  width: 100%; max-width: 400px;
  border: 1px solid hsl(var(--border) / 0.5);
  padding: 16px 20px;
  text-align: center;
}
.demo h2 {
  margin: 0 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: hsl(var(--muted-foreground));
}
.demo dl { margin: 0; display: grid; grid-template-columns: auto auto; justify-content: center; gap: 4px 12px; }
.demo dt { font-size: 12px; color: hsl(var(--muted-foreground)); text-align: right; }
.demo dd { margin: 0; text-align: left; font: 14px ui-monospace, Menlo, Consolas, monospace; user-select: all; }
.demo dd#demo-password { color: hsl(var(--primary)); }

.link {
  margin-top: 12px; background: none; border: 0; padding: 0;
  color: hsl(var(--primary)); font: 13px var(--font); cursor: pointer;
}
.link:hover { color: hsl(var(--primary) / 0.8); }
