/* AccMaster login, 2026 design.
   Shared form pieces (.lv2-*) and the Super Admin "platform" layout.
   The tenant login layout lives in login_tenant.css. */

.login-v2 {
  --lv2-teal-950: #021f1b;
  --lv2-teal-900: #04342c;
  --lv2-teal-800: #085041;
  --lv2-teal-600: #0f8a73;
  --lv2-teal-400: #2fc79f;
  --lv2-teal-50: #e3f4ee;
  --lv2-gold: #f2b23a;
  --lv2-gold-deep: #c98712;
  --lv2-ink: #0d1f1c;
  --lv2-muted: #5b716e;
  --lv2-line: #d6e3e0;
  font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--lv2-ink);
  background: #f7faf9;
}

.login-v2 .login-shell {
  display: block;
  place-items: normal;
  padding: 0;
}

.lv2 {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* ---------- shared form pieces ---------- */

.lv2-logo {
  display: block;
  width: 190px;
  height: auto;
  mix-blend-mode: multiply;
}

.lv2-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lv2-teal-50);
  color: var(--lv2-teal-800);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lv2-pill svg {
  width: 14px;
  height: 14px;
}

.lv2-card-title {
  margin: 0 0 4px;
  color: var(--lv2-ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lv2-sub {
  margin: 0 0 26px;
  color: var(--lv2-muted);
  font-size: 0.93rem;
}

.lv2-alert {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-left: 4px solid var(--tblr-danger, #d63939);
  border-radius: 10px;
  background: #fdecec;
  color: #8a1f1f;
  font-size: 0.86rem;
}

.lv2-field {
  margin-bottom: 16px;
}

.lv2-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lv2-label {
  display: block;
  margin-bottom: 7px;
  color: var(--lv2-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.lv2-link {
  margin-bottom: 7px;
  color: var(--lv2-teal-600);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.lv2-link:hover {
  color: var(--lv2-teal-800);
  text-decoration: underline;
}

.lv2-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 6px 0 14px;
  border: 1.5px solid var(--lv2-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lv2-input:focus-within {
  border-color: var(--lv2-teal-600);
  box-shadow: 0 0 0 4px rgba(15, 138, 115, 0.12);
}

.lv2-input.is-invalid {
  border-color: var(--tblr-danger, #d63939);
}

.lv2-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--lv2-muted);
}

.lv2-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--lv2-ink);
  font: inherit;
  font-size: 0.93rem;
}

.lv2-input input::placeholder {
  color: #9aaba8;
}

.lv2-eye {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--lv2-muted);
  cursor: pointer;
}

.lv2-eye svg {
  width: 18px;
  height: 18px;
}

.lv2-eye:hover,
.lv2-eye:focus-visible {
  background: var(--lv2-teal-50);
  color: var(--lv2-teal-600);
}

.lv2-eye:focus-visible,
.lv2-link:focus-visible,
.lv2-btn:focus-visible {
  outline: 3px solid rgba(15, 138, 115, 0.3);
  outline-offset: 2px;
}

.lv2-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--lv2-teal-900);
  box-shadow: 0 14px 28px -14px rgba(4, 52, 44, 0.8);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.lv2-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.lv2-btn:hover {
  background: #06493c;
  transform: translateY(-1px);
}

.lv2-btn:hover svg {
  transform: translateX(3px);
}

.lv2-btn:disabled {
  opacity: 0.75;
  cursor: progress;
  transform: none;
}

.lv2 .field-error {
  margin-top: 6px;
  color: var(--tblr-danger, #d63939);
  font-size: 0.8rem;
}

/* ---------- Super Admin: light platform ---------- */

.login-v2--platform {
  background: #fbfaf7;
}

.lv2--platform {
  grid-template-columns: 1fr 1fr;
}

/* Centred frame with wide margins on every side (same frame as the tenant
   login, login_tenant.css .lt-page / .lt). Only the outer box changes; the
   Super Admin design inside stays the same. */
.lv2-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 32px 24px;
  background: linear-gradient(135deg, #fbfaf6 0%, #f4f3ee 55%, #efeee7 100%);
}

.lv2-page::before,
.lv2-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.lv2-page::before {
  top: -60px;
  left: 3%;
  width: 270px;
  height: 270px;
  background: rgba(255, 255, 255, 0.9);
}

.lv2-page::after {
  right: -130px;
  bottom: -170px;
  width: 400px;
  height: 400px;
  background: rgba(242, 178, 58, 0.14);
}

.lv2-page > .lv2--platform {
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  min-height: min(620px, calc(100dvh - 64px));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: #fbfaf7;
  box-shadow: 0 1px 3px rgba(4, 52, 44, 0.05), 0 24px 60px -28px rgba(4, 52, 44, 0.3);
}

.lv2-gridbg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(4, 52, 44, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 52, 44, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 30% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(70% 70% at 30% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}

.lv2-spot {
  position: absolute;
  top: var(--spot-y, 40%);
  left: var(--spot-x, 25%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 178, 58, 0.2), rgba(47, 199, 159, 0.08) 45%, transparent 68%);
  transform: translate(-50%, -50%);
  transition: left 0.25s ease-out, top 0.25s ease-out;
  pointer-events: none;
}

/* Left half: dark green "control room" panel with a faint grid and a gold
   glow (Nov 2026). The sign-in card stays on the light right half. */
.lv2--platform .lv2-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  order: 1;
  overflow: hidden;
  padding: 40px clamp(28px, 5vw, 56px);
  background:
    radial-gradient(420px 320px at 85% 105%, rgba(242, 178, 58, 0.2), transparent 70%),
    radial-gradient(380px 300px at 0% 0%, rgba(47, 199, 159, 0.16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(160deg, #0a4a43 0%, #073f3a 45%, #04302b 100%);
  color: #e4f1ee;
}

.lv2--platform .lv2-main {
  position: relative;
  display: grid;
  order: 2;
  place-items: center;
  padding: 32px;
}

.lv2-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Super Admin logo: icon + "AccMaster" + tagline (about 222 x 44 px) */
.lv2-brandmark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 6px;
}

.lv2-brandmark img {
  width: 52px;
  height: auto;
}

.lv2-brandmark b {
  display: block;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.lv2-brandmark span {
  display: block;
  margin-top: 4px;
  color: #b9d3cd;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.lv2-tag {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d3e6e1;
  font-size: 0.72rem;
  font-weight: 700;
}

.lv2-pill--gold {
  width: max-content;
  margin-top: auto;
  border: 1px solid rgba(242, 178, 58, 0.45);
  background: rgba(242, 178, 58, 0.14);
  color: #f6c35a;
}

.lv2-hero-title {
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(2.2rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lv2-hero-title em {
  color: var(--lv2-gold);
  font-style: normal;
}

.lv2-hero-text {
  max-width: 430px;
  margin: 0 0 24px;
  color: #b9d3cd;
  font-size: 0.95rem;
}

.lv2-features {
  display: grid;
  gap: 10px;
  max-width: 430px;
  margin: 0 0 auto;
  padding: 0;
  list-style: none;
}

.lv2-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #b9d3cd;
  font-size: 0.78rem;
  line-height: 1.35;
}

.lv2-features b {
  display: block;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.lv2-feature-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(47, 199, 159, 0.16);
  color: #7fe0c4;
}

.lv2-feature-icon.is-gold {
  background: rgba(242, 178, 58, 0.16);
  color: var(--lv2-gold);
}

.lv2-feature-icon svg {
  width: 19px;
  height: 19px;
}

/* gold lock badge above the card title */
.lv2-card-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 1px solid rgba(201, 135, 18, 0.25);
  border-radius: 12px;
  background: #fdf3df;
  color: var(--lv2-gold-deep);
}

.lv2-card-badge svg {
  width: 22px;
  height: 22px;
}

.lv2--platform .lv2-card {
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid #e4ece9;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(242, 178, 58, 0.08), 0 40px 80px -36px rgba(4, 52, 44, 0.35);
}

.lv2--platform .lv2-input:focus-within {
  border-color: var(--lv2-gold-deep);
  box-shadow: 0 0 0 4px rgba(242, 178, 58, 0.18);
}

.lv2--platform .lv2-btn {
  background: linear-gradient(135deg, #f6c35a, #d9921a);
  box-shadow: 0 14px 30px -14px rgba(201, 135, 18, 0.75);
  color: #2a1a02;
}

.lv2--platform .lv2-btn:hover {
  background: linear-gradient(135deg, #f3b94a, #c98712);
}

.lv2-audit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #edf1f0;
  color: var(--lv2-muted);
  font-size: 0.76rem;
}

.lv2-audit svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--lv2-gold-deep);
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
  .lv2--platform {
    grid-template-columns: minmax(0, 1fr);
  }

  .lv2--platform .lv2-hero {
    order: 1;
    padding: 24px 16px 26px;
  }

  .lv2--platform .lv2-main {
    order: 2;
    padding: 20px 16px 32px;
  }

  .lv2-pill--gold {
    margin-top: 22px;
  }

  .lv2-hero-title {
    margin: 12px 0 8px;
    font-size: 1.9rem;
  }

  .lv2-hero-text {
    margin-bottom: 0;
  }

  .lv2-features {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .lv2-logo {
    width: 160px;
  }

  .lv2--platform .lv2-card {
    padding: 26px 20px;
  }
}

/* phones: the frame fills the screen, like the tenant login */
@media (max-width: 639.98px) {
  .lv2-page {
    display: block;
    padding: 0;
  }

  .lv2-page::before,
  .lv2-page::after {
    display: none;
  }

  .lv2-page > .lv2--platform {
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lv2-spot { transition: none; }
}
