/* ============================================================
   NekoTab sign-in, sign-up and Google sign-up completion.
   Black / white / marine (#0B3D91), the site's signature palette.
   Phones: black header with the logo, then a white sheet holding the form.
   Computers (>= 960px): black brand panel on the left, white card on the right.
   ============================================================ */

:root {
  --nk-black: #000000;
  --nk-ink: #0c0c0e;
  --nk-line: #24242a;
  --nk-white: #ffffff;
  --nk-marine: #0B3D91;
  --nk-marine-hover: #0e4bb3;
  --nk-marine-soft: rgba(11, 61, 145, 0.14);
  --nk-marine-text: #9db8ee;
  --nk-muted: #52525b;
  --nk-muted-dark: #a1a1aa;
  --nk-field: #d4d4d8;
  --nk-error: #b91c1c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--nk-black);
  color: var(--nk-black);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ── Layout ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--nk-black);
}

/* Phone header: logo + one line, on black */
.auth-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 26px;
  padding-top: max(18px, env(safe-area-inset-top));
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(11, 61, 145, 0.55), transparent 60%),
    var(--nk-black);
  color: var(--nk-white);
}
.auth-mobile-head a { color: var(--nk-white); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.auth-mobile-head img { width: 34px; height: 34px; filter: invert(1); }
.auth-mobile-head strong { font-size: 1.15rem; letter-spacing: .2px; }
.auth-mobile-head .auth-home { font-size: .85rem; color: var(--nk-muted-dark); }

.auth-form-col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--nk-white);
  border-radius: 22px 22px 0 0;
  margin-top: -12px;
  padding: 28px 20px 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.auth-card { width: 100%; max-width: 420px; }
.auth-card-logo { display: none; }

/* Phones: the brand panel follows the form as a compact black section. */
.auth-form-col { flex: 0 0 auto; border-radius: 22px 22px 22px 22px; }
.auth-brand-col {
  display: block;
  padding: 30px 20px 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  color: var(--nk-white);
  background:
    radial-gradient(120% 80% at 100% 100%, rgba(11, 61, 145, 0.45), transparent 60%),
    var(--nk-black);
}
.auth-brand-col .auth-brand-home { display: none; }
@media (max-width: 959px) {
  .auth-brand-tagline { font-size: 1.6rem !important; margin-top: 12px !important; }
  .auth-brand-sub { font-size: .95rem !important; margin-bottom: 20px !important; }
  .auth-brand-feature { padding: 11px 13px !important; font-size: .9rem !important; }
  .auth-brand-feature-icon { width: 34px !important; height: 34px !important; }
}

@media (min-width: 960px) {
  .auth-page { flex-direction: row; }
  .auth-mobile-head { display: none; }
  .auth-brand-col .auth-brand-home { display: inline-flex; }
  .auth-brand-col {
    display: flex;
    order: 1;
    flex: 1.05;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(40px, 5vw, 80px);
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(90% 70% at 15% 10%, rgba(11, 61, 145, 0.55), transparent 60%),
      radial-gradient(70% 60% at 100% 100%, rgba(11, 61, 145, 0.28), transparent 60%),
      var(--nk-black);
    color: var(--nk-white);
  }
  .auth-form-col {
    order: 2;
    flex: 1;
    align-items: center;
    margin: 0;
    border-radius: 0;
    padding: 48px 40px;
    background: var(--nk-black);
    border-left: 1px solid var(--nk-line);
  }
  .auth-card {
    background: var(--nk-white);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  .auth-card-logo { display: block; width: 44px; height: 44px; margin: 0 0 18px; }
}

/* ── Brand panel ────────────────────────────────────────── */
.auth-brand-content { max-width: 470px; width: 100%; position: relative; z-index: 1; }
.auth-brand-home { display: inline-flex; align-items: center; gap: 12px; color: var(--nk-white); text-decoration: none; margin-bottom: 44px; }
.auth-brand-logo { width: 46px; height: 46px; filter: invert(1); }
.auth-brand-home strong { font-size: 1.35rem; letter-spacing: .2px; }
.auth-brand-kicker {
  display: inline-block; border: 1px solid rgba(76, 125, 214, .55); color: var(--nk-marine-text);
  border-radius: 99px; padding: 4px 12px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.auth-brand-tagline { font-size: clamp(2rem, 3vw, 2.7rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin: 16px 0 14px; }
.auth-brand-tagline span { color: var(--nk-marine-text); }
.auth-brand-sub { color: #c4c4cc; font-size: 1.02rem; line-height: 1.6; margin: 0 0 30px; }
.auth-brand-features { display: grid; gap: 12px; }
.auth-brand-feature {
  display: flex; align-items: center; gap: 14px; padding: 13px 15px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7; font-size: .95rem; line-height: 1.4;
}
.auth-brand-feature-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--nk-marine); color: var(--nk-white);
}
.auth-brand-feature-icon svg { width: 20px; height: 20px; }
.auth-brand-foot { margin-top: 34px; color: var(--nk-muted-dark); font-size: .85rem; }
.auth-brand-foot a { color: var(--nk-marine-text); }

/* ── Card text ──────────────────────────────────────────── */
.auth-card-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: var(--nk-black); line-height: 1.2; }
.auth-card-subtitle { color: var(--nk-muted); font-size: .98rem; margin: 0 0 24px; line-height: 1.5; }

/* ── Google ─────────────────────────────────────────────── */
.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px;
  border: 1px solid var(--nk-field); border-radius: 12px; background: var(--nk-white); color: var(--nk-black);
  font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-google-btn:hover { border-color: var(--nk-black); background: #fafafa; }
.auth-google-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--nk-marine-soft); border-color: var(--nk-marine); }
.auth-google-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-google-btn.is-static { pointer-events: none; background: #f4f4f5; border-color: #e4e4e7; font-size: .9rem; margin-bottom: 20px; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #71717a; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e4e4e7; }

/* ── Fields ─────────────────────────────────────────────── */
.auth-field { margin-bottom: 16px; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.auth-label { display: block; font-size: .88rem; font-weight: 600; color: var(--nk-black); margin: 0 0 7px; }
.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--nk-field); background: var(--nk-white);
  color: var(--nk-black); padding: 12px 14px; font: inherit; font-size: 1rem; /* 16px stops iOS zooming in */
  transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #a1a1aa; }
.auth-input:hover { border-color: #a1a1aa; }
.auth-input:focus { outline: none; border-color: var(--nk-marine); box-shadow: 0 0 0 4px var(--nk-marine-soft); }
.auth-input[readonly] { background: #f4f4f5; color: var(--nk-muted); cursor: not-allowed; }
.auth-input.is-invalid { border-color: var(--nk-error); }
.auth-input-wrap .auth-input { padding-right: 72px; }
.auth-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 38px; padding: 0 12px;
  border: 0; border-radius: 9px; background: transparent; color: var(--nk-marine); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.auth-toggle:hover { background: var(--nk-marine-soft); }
.auth-toggle:focus-visible { outline: 2px solid var(--nk-marine); outline-offset: 1px; }
.auth-error { color: var(--nk-error); font-size: .85rem; margin-top: 6px; }
.auth-help { color: var(--nk-muted); font-size: .84rem; margin-top: 6px; line-height: 1.45; }

.auth-errors-box {
  border-left: 4px solid var(--nk-marine); background: #eef2fb; color: var(--nk-black);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; font-size: .92rem; line-height: 1.5;
}
.auth-errors-box.is-error { border-left-color: var(--nk-error); background: #fef2f2; }

.auth-forgot { font-size: .85rem; font-weight: 600; color: var(--nk-marine); text-decoration: none; white-space: nowrap; }
.auth-forgot:hover { text-decoration: underline; }

.auth-pw-hints { list-style: none; margin: -6px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.auth-pw-hints li { font-size: .78rem; color: var(--nk-muted); background: #f4f4f5; border-radius: 99px; padding: 4px 10px; }

.auth-note { color: var(--nk-muted); font-size: .86rem; margin: 2px 0 16px; line-height: 1.5; }

/* ── Submit + footer ────────────────────────────────────── */
.auth-submit {
  width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--nk-marine); color: var(--nk-white);
  font: inherit; font-size: 1.02rem; font-weight: 700; cursor: pointer; margin-top: 6px;
  transition: background .15s, transform .05s;
}
.auth-submit:hover { background: var(--nk-marine-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(11, 61, 145, .35); outline-offset: 2px; }

.auth-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e4e4e7; text-align: center; color: var(--nk-muted); font-size: .94rem; }
.auth-footer a { color: var(--nk-black); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--nk-marine); }
.auth-footer a:hover { color: var(--nk-marine); }
.auth-legal { margin-top: 14px; text-align: center; color: #71717a; font-size: .78rem; line-height: 1.5; }
.auth-legal a { color: inherit; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
