/* =====================================================================
   Samify AI client portal: sign-in page (2026-11-23)
   Matches samifyai.com (css/home.css): the studio plate, frosted glass,
   Lato display + Open Sans text + IBM Plex Mono labels, blue pill buttons,
   one light/dark toggle (same theme values as the website). Stand-alone:
   the dashboards keep portal-base/portal/portal-theme.css.
   ===================================================================== */

:root {
  --blue: #2E5FB0;
  --blue-hi: #3A6CC4;
  --blue-soft: #8FB2EE;
  --orange: #FB6B3A;
  --orange-deep: #C24A1C;
  --green: #0F8F63;

  --bg: #F3F6FA;
  --card: #FFFFFF;
  --ink: #111C2B;
  --ink-soft: #3F4F66;
  --ink-faint: #5F6F86;
  --line: #D8E1EC;
  --em: #E85A28; /* headline word on light: deeper brand orange that passes 3:1 (#FB6B3A was 2.7:1), same as samifyai.com (Samin, 2026-12-01) */
  --kick: var(--blue);
  --accent: var(--blue);
  --ok: var(--green);
  --err: var(--orange-deep);

  --glass-bg: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .98);
  --glass-ring: rgba(46, 95, 176, .2);
  --glass-shadow: 0 60px 110px -40px rgba(15, 30, 55, .5);
  --cap-bg: rgba(250, 252, 255, .72);
  --cap-line: rgba(20, 40, 70, .08);
  --cap-shadow: 0 10px 30px -14px rgba(20, 40, 70, .28), 0 1px 2px rgba(20, 40, 70, .06);

  --plate: url("https://samifyai.com/assets/v2/studio-light-1440.jpg");
  --plate-m: url("https://samifyai.com/assets/v2/studio-light-portrait.jpg");
  --tint: radial-gradient(120% 90% at 50% 45%, rgba(243, 246, 250, .55) 0%, rgba(243, 246, 250, .2) 55%, rgba(243, 246, 250, .5) 100%);

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(1rem, 5vw, 3rem);
  color-scheme: light;
}

:root[data-theme="dark-blue-cool"] {
  --em: var(--orange); /* dark keeps the bright brand orange */
  --bg: #070D17;
  --card: #121B28;
  --ink: #F2F5F9;
  --ink-soft: #A9B6C8;
  --ink-faint: #8593A8;
  --line: rgba(255, 255, 255, .12);
  --kick: var(--blue-soft);
  --accent: var(--blue-soft);
  --ok: #34D399;
  --err: #FF9A74;

  --glass-bg: rgba(14, 22, 36, .66);
  --glass-line: rgba(255, 255, 255, .1);
  --glass-ring: rgba(143, 178, 238, .14);
  --glass-shadow: 0 60px 110px -40px rgba(0, 0, 0, .9);
  --cap-bg: rgba(14, 22, 36, .66);
  --cap-line: rgba(255, 255, 255, .1);
  --cap-shadow: 0 14px 34px -14px rgba(0, 0, 0, .7);

  --plate: url("https://samifyai.com/assets/v2/studio-dark-1440.jpg");
  --plate-m: url("https://samifyai.com/assets/v2/studio-dark-portrait.jpg");
  --tint: radial-gradient(120% 90% at 50% 45%, rgba(7, 13, 23, .45) 0%, rgba(7, 13, 23, .2) 55%, rgba(7, 13, 23, .55) 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  font-family: "Open Sans", system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* the studio, same plate as the homepage */
.studio { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--bg) var(--plate) center 40% / cover no-repeat; }
.studio::after { content: ""; position: absolute; inset: 0; background: var(--tint); }
@media (max-width: 760px) { .studio { background-image: var(--plate-m); background-position: center 30%; } }

/* ------------------------------------------------------------ bar -- */
.bar {
  position: relative; z-index: 2; width: min(1180px, calc(100% - 28px)); margin: 14px auto 0;
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 9px 0 18px;
  border-radius: 999px; background: var(--cap-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--cap-line), inset 0 1px 0 rgba(255, 255, 255, .25), var(--cap-shadow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 28px; height: 28px; display: block; }
.wordmark {
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 1.06rem; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(105deg, #2E5FB0, #FB6B3A); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
:root[data-theme="dark-blue-cool"] .wordmark { background-image: linear-gradient(105deg, #6A93DA, #FB6B3A); }
.bar-act { display: flex; align-items: center; gap: 8px; }
.back { color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 12px; white-space: nowrap; transition: color 140ms var(--ease); }
.back:hover { color: var(--ink); }
.theme-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--cap-line);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.theme-btn:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
.theme-btn:active { transform: scale(.94); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark-blue-cool"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark-blue-cool"] .theme-btn .i-moon { display: none; }

/* ----------------------------------------------------------- card -- */
.portal-login-wrap { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: clamp(28px, 6vh, 72px) var(--gutter); }
.portal-login-card {
  width: min(440px, 100%); padding: clamp(28px, 4vw, 40px);
  border-radius: 28px; background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 0 0 1px var(--glass-ring), var(--glass-shadow);
  animation: card-in 600ms var(--ease) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .portal-login-card { animation: none; } }

.kicker { margin: 0 0 14px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--kick); }
.portal-login-card h1 {
  margin: 0; font-family: "Lato", system-ui, sans-serif; font-weight: 900; font-size: clamp(2.1rem, 1.7rem + 1.6vw, 2.6rem);
  letter-spacing: -0.034em; line-height: 1.04; color: var(--ink);
}
.portal-login-card h1 em { font-style: italic; color: var(--em); letter-spacing: -0.02em; padding-right: .04em; }
.login-subtitle { margin: 10px 0 26px; color: var(--ink-soft); font-size: 1.02rem; }

/* spacing by margins, not grid gap: portal-auth.js switches the forms with style.display = 'block' */
form > * + * { margin-top: 18px; }
form > .btn { margin-top: 24px; }
.form-group { display: grid; gap: 7px; }
.form-group label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.form-group input {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 11px 14px; font: inherit; font-size: 1rem;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), background-color 140ms var(--ease);
}
.form-group input::placeholder { color: var(--ink-faint); opacity: 1; }
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); background: var(--card); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink-faint); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: color 140ms var(--ease), background-color 140ms var(--ease);
}
.password-toggle:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.password-toggle svg { width: 20px; height: 20px; }

/* the website's pill button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--blue); color: #fff; font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(8, 16, 28, .2), 0 8px 22px -8px rgba(46, 95, 176, .55);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:active { transform: scale(.97); transition-duration: 80ms; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--blue-hi); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 2px 4px rgba(8, 16, 28, .2), 0 14px 28px -10px rgba(46, 95, 176, .7); }
  .btn:hover:active { transform: scale(.97); }
}
.btn[disabled] { opacity: .6; cursor: progress; }

/* portal-auth.js sets "form-status show success|error" */
.form-status { display: none; margin: 0; padding: 10px 14px; border-radius: 12px; font-size: .92rem; font-weight: 600; line-height: 1.45; }
.form-status.show { display: block; }
.form-status.success { color: var(--ok); background: color-mix(in oklab, var(--ok) 10%, transparent); }
.form-status.error { color: var(--err); background: color-mix(in oklab, var(--err) 10%, transparent); }

.login-links { text-align: center; }
.login-links a {
  color: var(--accent); font-size: .92rem; font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color 140ms var(--ease);
}
.login-links a:hover { text-decoration-color: currentColor; }

@media (max-width: 520px) {
  .back { display: none; }
  .portal-login-card { border-radius: 24px; }
}
