/* The products' standard sign-in surface, in plain CSS: a fixed-dark form column and a showcase
   beside it from 1024px up. Values are the Design System's dark theme (the same ones the Console's
   login page sets inline: Infinity Dark page, Infinity surface, Seal Blue lines, Snow Cloud text). */

@font-face {
  font-family: "D-DIN";
  src: url("/static/fonts/D-DIN-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("/static/fonts/D-DIN-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --color-background: #0e1215;
  --color-surface: #1a2028;
  --color-surface-subtle: #2a3440;
  --color-foreground: #f5f8fa;
  --color-foreground-muted: #b4c0ca;
  --color-muted: #8c9ca9;
  --color-border: #2a333e;
  --color-border-soft: #1d242b;
  --color-border-strong: #8393a0;
  --color-danger: #eb5555;
  --color-danger-soft: #3a1f20;
  --color-warning: #e6b667;
  --volis-red: #ef3938;
  /* A product's accent replaces it (set by the page when the client has one). */
  --accent: var(--volis-red);
  --radius-sm: 4px;
  --radius-lg: 12px;
  --font: "D-DIN", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  letter-spacing: 0.01em;
  font-feature-settings: "tnum" 1;
  color: var(--color-foreground);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--color-foreground);
  outline-offset: 2px;
}

/* --- layout --------------------------------------------------------------------------------- */

.split {
  display: flex;
  min-height: 100dvh;
  background: linear-gradient(90deg, var(--color-background) 0, var(--color-background) 585px, var(--color-surface) 100%);
}
.form-column {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 22dvh 16px 48px;
}
.showcase { display: none; }

@media (min-width: 640px) {
  .form-column { align-items: center; padding: 48px 16px; }
}
@media (min-width: 1024px) {
  .form-column { width: 585px; flex-shrink: 0; }
  .showcase {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 80px 32px 26px;
    border-left: 1px solid rgba(245, 248, 250, 0.06);
  }
}
@media (min-width: 1536px) {
  .showcase { padding-left: 56px; padding-right: 56px; }
}

.lang {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}
.lang a { color: inherit; text-decoration: none; padding: 4px 2px; }
.lang a.on { color: var(--color-foreground); font-weight: 700; }

/* --- the card ------------------------------------------------------------------------------- */

.card {
  width: 100%;
  max-width: 384px;
  padding: 40px 0;
}
.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.lockup .mark { height: 26px; width: auto; }
/* A product's lockup: any width, one fixed height, so every product's SVG fits the same slot. */
.product-lockup {
  display: block;
  height: auto;
  max-height: 28px;
  max-width: 100%;
  width: auto;
}
.product-lockup.hero { max-height: 44px; margin-bottom: 28px; }

.lockup .wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
}
.lockup .product {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--color-border-strong);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--color-foreground-muted);
}

.context {
  margin: -16px 0 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--color-muted);
}
.context b { color: var(--color-foreground); font-weight: 700; }

.title.lead { margin-bottom: 24px; }
.title { margin: 0 0 10px; font-size: 20px; font-weight: 700; text-align: center; }
.text { margin: 0 0 8px; font-size: 15px; text-align: center; color: var(--color-foreground-muted); }
.hint { margin: 0 0 16px; font-size: 13px; text-align: center; color: var(--color-muted); }

.step { display: flex; flex-direction: column; gap: 12px; }
.step[hidden] { display: none; }

/* --- fields and buttons --------------------------------------------------------------------- */

.field { display: block; }
.field .label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--color-foreground);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.field input:focus { border-color: var(--color-border-strong); outline: none; }
.field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--color-surface) inset;
  -webkit-text-fill-color: var(--color-foreground);
  caret-color: var(--color-foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-foreground);
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 120ms ease;
}
.btn:hover { border-color: var(--color-foreground); }
.btn:disabled { cursor: not-allowed; color: var(--color-muted); border-color: var(--color-border); }
.btn.provider { min-height: 46px; font-size: 14px; }

.link {
  align-self: center;
  margin-top: 4px;
  padding: 6px 2px;
  font: inherit;
  font-size: 13px;
  color: var(--color-muted);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--color-foreground); }

.providers { display: flex; flex-direction: column; gap: 10px; }

/* --- alerts and waiting --------------------------------------------------------------------- */

.alert {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 16px 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-danger);
  background: var(--color-danger-soft);
  border-left: 4px solid var(--color-danger);
}
.alert[hidden] { display: none; }

.busy { align-items: center; gap: 16px; padding: 24px 0; }
.busy-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--color-border);
  border-top-color: var(--color-foreground);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- the showcase --------------------------------------------------------------------------- */

.showcase-inner { max-width: 560px; }
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
/* A product's own name, when it has no lockup, takes its accent color. */
.eyebrow.accent { color: var(--accent); }
.statement { margin: 12px 0 0; font-size: 34px; font-weight: 700; line-height: 1.15; color: var(--color-foreground); }
.showcase-body { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: var(--color-foreground-muted); }

/* --- the way back to the product ------------------------------------------------------------ */

.back { margin: 28px 0 0; text-align: center; }
.back-link {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
  padding: 6px 2px;
}
.back-link:hover { color: var(--color-foreground); text-decoration: underline; text-underline-offset: 3px; }

/* --- the panel's toolbar (language, system status), top left like the products' ------------------- */

.toolbar {
  position: absolute;
  top: 32px;
  left: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 1536px) { .toolbar { left: 56px; } }
.toolbar .lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border: 1px solid rgba(245, 248, 250, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(71, 88, 100, 0.34);
  backdrop-filter: blur(18px);
}
.toolbar .lang-switch a { color: inherit; text-decoration: none; }
.toolbar .lang-switch a.on { color: var(--color-foreground); }
.toolbar .status-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-foreground-muted);
  text-decoration: none;
  border: 1px solid rgba(245, 248, 250, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(71, 88, 100, 0.34);
  backdrop-filter: blur(18px);
}
.toolbar .status-link:hover { color: var(--color-foreground); }
.toolbar .dot { width: 8px; height: 8px; border-radius: 50%; background: #3dd68c; }
body { overflow-x: clip; }

/* From 1024px up the language switch lives in the panel's toolbar; the form column keeps its own below. */
@media (min-width: 1024px) { .lang { display: none; } }
