/* ============================================================================
   login.css — page overlay for /Account/Login.

   Loaded AFTER cmm-base.css. Declares NO theme tokens — it consumes them.
   That is the whole point of the layering: receivx re-declares the full
   three-theme block in all nine of its page stylesheets, so a palette change
   means editing nine files.

   --panel-gradient is the one token this page adds, because nothing else in
   the application uses it.
   ========================================================================== */

:root, [data-theme="light"] {
  --panel-gradient: linear-gradient(135deg, #1f4d2b 0%, #0a8a92 100%);
}
[data-theme="midnight"] {
  --panel-gradient: linear-gradient(135deg, #0e1116 0%, #1f3d2b 50%, #0a4a52 100%);
}
[data-theme="slate"] {
  --panel-gradient: linear-gradient(135deg, #2e4d6b 0%, #1e6fc4 100%);
}

.login-body { min-height: 100vh; }

.login-shell {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ---- Left: brand panel ---- */
.login-panel {
  background: var(--panel-gradient);
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.login-panel-inner { max-width: 380px; color: #fff; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-brand .logo {
  width: 52px; height: 52px; border-radius: 13px;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center;
  font-size: 24px; color: #fff;
  backdrop-filter: blur(6px);
}
.login-brand .name { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.login-brand .ver {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  opacity: 0.85; margin-top: 5px;
}
.login-blurb { font-size: 14px; line-height: 1.65; opacity: 0.9; margin: 0; }

/* ---- Right: form ---- */
.login-form-pane {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.login-card { width: 100%; max-width: 380px; }
.login-title {
  font-size: 30px; font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.1; margin: 0 0 6px 0; color: var(--text);
}
.login-subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 26px 0; }

.login-field { margin-bottom: 16px; }
.login-field .field-label { margin-bottom: 2px; }
.login-field .form-control { padding: 10px 12px; font-size: 15px; }

.login-password-wrap { position: relative; }
.login-password-wrap .form-control { padding-right: 42px; }
.login-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none;
  color: var(--text-muted); font-size: 15px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  line-height: 1;
}
.login-reveal:hover { color: var(--text); background: var(--surface-2); }

.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim);
  margin: 4px 0 20px 0; cursor: pointer; user-select: none;
}
.login-remember input { accent-color: var(--accent); width: 15px; height: 15px; }

.login-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid color-mix(in srgb, var(--error) 30%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.login-error[hidden] { display: none; }

.login-submit { width: 100%; justify-content: center; padding: 11px 16px; font-size: 12px; }
.login-submit.is-busy { opacity: 0.65; pointer-events: none; }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-panel { padding: 36px 28px; }
  .login-panel-inner { max-width: none; }
  .login-blurb { display: none; }
  .login-form-pane { padding: 36px 24px 56px; }
}

/* ---- development-only sign-in panel ---------------------------------------
 * Rendered ONLY when the hosting environment is Development — the gate is in
 * Login.cshtml, not here. CSS cannot hide a credential: markup that reaches
 * the browser is in the page source whatever this file says, which is why the
 * gate is server-side and why LoginPageEnvironmentTests asserts on the HTML.
 *
 * Dashed border on purpose: it should never read as a normal part of the form.
 * -------------------------------------------------------------------------- */
.demo-signin {
  background: var(--surface-2);
  border: 1px dashed var(--border-bright);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
}
.demo-signin-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.demo-signin-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--warn);
}
.demo-signin-fill {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 5px; cursor: pointer;
}
.demo-signin-fill:hover { background: var(--surface); color: var(--text); }

.demo-signin-body { display: flex; flex-direction: column; gap: 6px; }
.demo-signin-account {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 1px solid transparent;
  border-radius: 6px; padding: 5px 8px; cursor: pointer;
}
.demo-signin-account:hover { background: var(--surface); border-color: var(--border); }
.demo-signin-role {
  min-width: 52px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
}
.demo-signin-user { font-size: 13px; color: var(--text); }

.demo-signin-note {
  margin: 10px 0 0 0;
  font-size: 11px; line-height: 1.5;
  color: var(--text-muted);
}
