:root {
  --login-ink: #0b1e3a;
  --login-copy: #637694;
  --login-green: #079276;
  --login-green-dark: #04745f;
  --login-line: #d9e2ec;
  --login-soft: #edf8f6;
  --login-card: rgba(255,255,255,.94);
  --login-page: #f9fcfc;
  --login-shadow: 0 28px 70px rgba(26,65,83,.13), 0 6px 18px rgba(26,65,83,.07);
}

[data-theme="dark"] {
  --login-ink: #eef8f7;
  --login-copy: #9eb0c5;
  --login-green: #2bc4a5;
  --login-green-dark: #19a88c;
  --login-line: #2c4050;
  --login-soft: #143d3a;
  --login-card: rgba(16,31,43,.94);
  --login-page: #09151f;
  --login-shadow: 0 28px 80px rgba(0,0,0,.42), 0 6px 18px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

body.login-v2-body {
  margin: 0;
  /* assets/style.css sets a global `body{padding-top:calc(var(--v2-header-h) + 24px)}`
     (70px) to clear the app shell's fixed topbar. The login page has no
     topbar and never had one — that padding was leaking in from the
     shared stylesheet and pushing .login-v2-shell down by 70px, which is
     what earlier commits' translateY() compensation was actually working
     around. Reset it at the source instead. */
  padding-top: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--login-ink);
  background: var(--login-page);
  font-family: "IBM Plex Sans Arabic", "Cairo", system-ui, sans-serif;
}

/* The application adds a global branded footer through app.js. A login page is
   a self-contained authentication surface, so neither global nor local footer
   belongs here. */
body.login-v2-body .rwt-footer { display: none !important; }

.login-v2-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 51% 34%, rgba(80,195,174,.10), transparent 30%),
    linear-gradient(145deg, rgba(239,249,248,.72), transparent 55%);
}

/* Quiet enterprise-data texture fills the upper breathing room without
   competing with the form or introducing another brand mark. */
.login-v2-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 18px;
  inset-inline-start: 6.5%;
  width: 340px;
  height: 156px;
  pointer-events: none;
  opacity: .42;
  background-image: radial-gradient(circle, rgba(7,146,118,.32) 1.35px, transparent 1.6px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(100deg, #000 5%, rgba(0,0,0,.72) 55%, transparent 100%);
  mask-image: linear-gradient(100deg, #000 5%, rgba(0,0,0,.72) 55%, transparent 100%);
}

[dir="rtl"] .login-v2-shell::before {
  -webkit-mask-image: linear-gradient(260deg, #000 5%, rgba(0,0,0,.72) 55%, transparent 100%);
  mask-image: linear-gradient(260deg, #000 5%, rgba(0,0,0,.72) 55%, transparent 100%);
}

[data-theme="dark"] .login-v2-shell {
  background:
    radial-gradient(circle at 51% 34%, rgba(35,175,151,.10), transparent 31%),
    linear-gradient(145deg, rgba(13,52,55,.46), transparent 55%);
}

.login-v2-bg {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 48% 52% 59% 41% / 43% 41% 59% 57%;
  background: rgba(217,241,238,.54);
}

.login-v2-bg-a { width: 72vw; height: 42vw; left: -24vw; bottom: -23vw; transform: rotate(14deg); }
.login-v2-bg-b { width: 68vw; height: 36vw; right: -28vw; top: 5vw; transform: rotate(23deg); opacity: .62; }
[data-theme="dark"] .login-v2-bg { background: rgba(20,77,75,.32); }

.login-v2-header {
  width: min(1390px, calc(100% - 80px));
  margin: 0 auto;
  min-height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.albero-brand-logo-dark { display: none !important; }
[data-theme="dark"] .albero-brand-logo-light { display: none !important; }
[data-theme="dark"] .albero-brand-logo-dark { display: block !important; }

.login-v2-tools { display: flex; align-items: center; gap: 16px; color: var(--login-copy); }
.login-v2-promise { font-size: 15px; font-weight: 500; margin-inline-end: 10px; }
.login-v2-control { display: flex; align-items: center; padding: 3px; border: 1px solid var(--login-line); border-radius: 11px; background: rgba(255,255,255,.55); }
[data-theme="dark"] .login-v2-control { background: rgba(255,255,255,.03); }
.login-v2-icon-btn {
  width: 34px; height: 30px; border: 0; border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  color: var(--login-copy); background: transparent; transition: .18s ease;
}
.login-v2-icon-btn:hover, .login-v2-icon-btn.active { color: var(--login-green); background: var(--login-soft); }
.login-v2-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-v2-language { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.login-v2-language a { color: var(--login-copy); text-decoration: none; opacity: .65; }
.login-v2-language a.active { color: var(--login-green); opacity: 1; }
.login-v2-language span { width: 1px; height: 13px; background: var(--login-line); }

.login-v2-layout {
  width: min(1390px, calc(100% - 80px));
  margin: 0 auto;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(430px, 520px) minmax(300px, .92fr);
  gap: clamp(44px, 6vw, 100px);
  align-items: center;
  align-content: center;
  padding-block: 24px;
}

.login-v2-story { align-self: center; max-width: 375px; }
.login-v2-eyebrow { margin: 0 0 24px; color: #7693a6; font-size: 11px; font-weight: 700; letter-spacing: .32em; }
.login-v2-story h1 {
  margin: 0;
  color: var(--login-ink);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(46px, 4.25vw, 70px);
  line-height: .99;
  letter-spacing: -.025em;
  font-weight: 400;
}
[dir="rtl"] .login-v2-story h1 { font-family: "Cairo", sans-serif; font-size: clamp(40px, 3.65vw, 61px); line-height: 1.25; font-weight: 600; }
.login-v2-accent { display: block; width: 48px; height: 4px; margin: 38px 0 26px; border-radius: 99px; background: var(--login-green); }
.login-v2-intro { margin: 0; max-width: 340px; color: var(--login-copy); font-size: 18px; line-height: 1.55; }

.login-v2-card {
  width: 100%;
  padding: 48px 42px 38px;
  border: 1px solid rgba(224,233,239,.92);
  border-radius: 22px;
  background: var(--login-card);
  box-shadow: var(--login-shadow);
  backdrop-filter: blur(16px);
}
[data-theme="dark"] .login-v2-card { border-color: rgba(84,107,123,.34); }
.login-v2-card-logo { display: flex; justify-content: center; min-height: 82px; margin-bottom: 20px; }
.login-v2-card-logo img { display: block; width: auto; height: 82px; max-width: 320px; object-fit: contain; }
.login-v2-card h2 {
  margin: 0; text-align: center; color: var(--login-ink); font-family: "DM Serif Display", Georgia, serif;
  font-size: 43px; line-height: 1.1; font-weight: 400;
}
[dir="rtl"] .login-v2-card h2 { font-family: "Cairo", sans-serif; font-size: 38px; font-weight: 600; }
.login-v2-subtitle { width: min(340px, 100%); margin: 11px auto 30px; color: var(--login-copy); text-align: center; font-size: 16px; line-height: 1.5; }
.login-v2-alert { margin: 0 0 18px !important; }
.login-v2-form { display: grid; gap: 18px; }
.login-v2-field label { display: block; margin-bottom: 8px; color: var(--login-ink); font-size: 14px; font-weight: 700; }
.login-v2-input-wrap { position: relative; }
.login-v2-input-wrap > svg {
  position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px;
  fill: none; stroke: #546b84; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.login-v2-input-wrap input {
  width: 100%; height: 56px; padding: 0 48px; color: var(--login-ink); background: rgba(255,255,255,.7);
  border: 1px solid #cad6e1; border-radius: 10px; outline: 0; font: inherit; font-size: 15px; transition: .18s ease;
}
[data-theme="dark"] .login-v2-input-wrap input { background: rgba(255,255,255,.035); border-color: var(--login-line); }
.login-v2-input-wrap input::placeholder { color: #91a0b2; }
.login-v2-input-wrap input:hover { border-color: #a9bdc9; }
.login-v2-input-wrap input:focus { border-color: var(--login-green); box-shadow: 0 0 0 3px rgba(7,146,118,.12); }
.login-v2-password-toggle {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #6e8298; cursor: pointer;
}
.login-v2-password-toggle:hover, .login-v2-password-toggle.active { color: var(--login-green); background: var(--login-soft); }
.login-v2-password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-v2-submit {
  height: 58px; margin-top: 7px; padding: 0 22px; display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0b9a7b, #07886e); box-shadow: 0 12px 26px rgba(4,135,108,.22);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.login-v2-submit:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(4,135,108,.29); }
.login-v2-submit:active { transform: translateY(0); }
.login-v2-submit:disabled { cursor: wait; opacity: .66; }
.login-v2-submit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .login-v2-submit svg { transform: rotate(180deg); }
.login-v2-help { margin: 28px 0 0; color: var(--login-copy); text-align: center; font-size: 13px; }

.login-v2-benefits { max-width: 355px; display: grid; gap: 38px; }
.login-v2-benefit { display: grid; grid-template-columns: 54px 1fr; align-items: start; gap: 19px; }
.login-v2-benefit-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--login-green); background: rgba(226,244,241,.85); }
[data-theme="dark"] .login-v2-benefit-icon { background: rgba(32,96,88,.46); }
.login-v2-benefit-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-v2-benefit h3 { margin: 3px 0 5px; color: var(--login-ink); font-size: 16px; line-height: 1.3; }
.login-v2-benefit p { margin: 0; color: var(--login-copy); font-size: 14px; line-height: 1.48; }
.login-v2-data-art { height: 106px; margin-top: 4px; display: flex; align-items: flex-end; justify-content: center; gap: 17px; color: rgba(7,146,118,.26); }
.login-v2-chart { width: 212px; height: 92px; overflow: visible; }
.login-v2-chart .grid { fill: none; stroke: currentColor; stroke-width: 1; opacity: .38; }
.login-v2-chart .line { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.login-v2-chart circle { fill: var(--login-page); stroke: currentColor; stroke-width: 3; }
.login-v2-doc { width: 48px; height: 60px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-v2-modules { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px; color: #6c8297; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.login-v2-modules span:not(:last-child)::after { content: "•"; margin-inline-start: 13px; color: var(--login-green); }

@media (max-width: 1180px) {
  .login-v2-layout { grid-template-columns: minmax(250px, .8fr) minmax(410px, 500px); gap: 60px; justify-content: center; }
  .login-v2-benefits { display: none; }
}

@media (max-width: 820px) {
  .login-v2-shell { overflow-y: auto; }
  .login-v2-header { width: min(100% - 36px, 620px); min-height: 86px; }
  .login-v2-promise { display: none; }
  .login-v2-layout { width: min(100% - 36px, 540px); min-height: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 28px; padding-block: 0 34px; }
  .login-v2-shell::before { width: 210px; height: 90px; top: 28px; opacity: .28; }
  .login-v2-story { max-width: 520px; text-align: center; }
  .login-v2-eyebrow { margin-bottom: 14px; }
  .login-v2-story h1 { font-size: clamp(38px, 10vw, 54px); line-height: 1.04; }
  [dir="rtl"] .login-v2-story h1 { font-size: clamp(34px, 9vw, 48px); }
  .login-v2-accent { margin: 24px auto 18px; }
  .login-v2-intro { max-width: 470px; margin: 0 auto; font-size: 16px; }
  .login-v2-card { padding: 38px 28px 32px; }
}

@media (max-width: 520px) {
  .login-v2-header { width: calc(100% - 28px); }
  .login-v2-tools { gap: 8px; }
  .login-v2-layout { width: calc(100% - 28px); margin-top: 10px; }
  .login-v2-story h1 { font-size: 39px; }
  [dir="rtl"] .login-v2-story h1 { font-size: 34px; }
  .login-v2-intro { font-size: 15px; }
  .login-v2-card { padding: 32px 20px 27px; border-radius: 18px; }
  .login-v2-card-logo { min-height: 64px; }
  .login-v2-card-logo img { height: 64px; max-width: 255px; }
  .login-v2-card h2 { font-size: 37px; }
  [dir="rtl"] .login-v2-card h2 { font-size: 32px; }
  .login-v2-subtitle { font-size: 14px; margin-bottom: 25px; }
  .login-v2-input-wrap input { height: 54px; }
  .login-v2-submit { height: 55px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-v2-submit, .login-v2-icon-btn, .login-v2-input-wrap input { transition: none; }
}
