:root {
  --login-navy: #07152e;
  --login-blue: #2563eb;
  --login-cyan: #22d3ee;
  --login-text: #10213f;
  --login-muted: #64748b;
  --login-line: rgba(148, 163, 184, 0.24);
}

* { box-sizing: border-box; }

body.login-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--login-text);
  background:
    radial-gradient(circle at 14% 18%, rgba(37, 99, 235, 0.34), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(34, 211, 238, 0.22), transparent 29%),
    linear-gradient(135deg, #030817 0%, #07152e 45%, #0b2550 100%);
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.login-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.login-orb { position: absolute; display: block; border-radius: 50%; filter: blur(2px); opacity: .82; animation: login-float 12s ease-in-out infinite; }
.login-orb--one { width: 320px; height: 320px; top: -120px; right: -80px; background: radial-gradient(circle at 35% 35%, rgba(96,165,250,.56), rgba(37,99,235,.08) 70%); }
.login-orb--two { width: 250px; height: 250px; bottom: -100px; left: 4%; background: radial-gradient(circle at 35% 35%, rgba(34,211,238,.42), rgba(14,116,144,.04) 72%); animation-delay: -4s; }
.login-orb--three { width: 110px; height: 110px; top: 18%; left: 10%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); backdrop-filter: blur(8px); animation-delay: -8s; }

.login-layout { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: clamp(20px, 4vw, 56px); }
.login-shell {
  width: min(1080px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(430px, .96fr);
  direction: ltr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 32px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 36px 100px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  animation: login-enter .72s cubic-bezier(.2,.8,.2,1) both;
}

.login-brand {
  position: relative;
  direction: rtl;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(34px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(6,21,48,.7), rgba(13,55,108,.35)),
    radial-gradient(circle at 80% 10%, rgba(34,211,238,.18), transparent 40%);
}

.login-brand::after { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.08); border-radius: 23px; pointer-events: none; }
.login-brand__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-brand__logo-wrap { width: 74px; height: 74px; display: grid; place-items: center; padding: 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 22px; background: rgba(255,255,255,.12); box-shadow: 0 14px 32px rgba(0,0,0,.18); backdrop-filter: blur(12px); }
.login-brand__logo { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0,0,0,.2)); }
.login-brand__status { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.07); font-size: .76rem; }
.login-brand__status i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 5px rgba(74,222,128,.12), 0 0 18px #4ade80; }
.login-brand__content { position: relative; z-index: 1; max-width: 480px; margin: 52px 0 42px; }
.login-eyebrow { margin: 0 0 13px; color: #67e8f9; font-size: .8rem; font-weight: 800; letter-spacing: .03em; }
.login-brand__content h2 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.5rem); line-height: 1.32; letter-spacing: -.045em; }
.login-brand__content h2 strong { color: transparent; background: linear-gradient(90deg, #67e8f9, #93c5fd); background-clip: text; -webkit-background-clip: text; font-weight: 900; }
.login-brand__content > p:not(.login-eyebrow) { max-width: 450px; margin: 24px 0 0; color: rgba(226,232,240,.75); line-height: 2; font-size: .94rem; }
.login-feature-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.login-feature-list span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: rgba(255,255,255,.86); background: rgba(255,255,255,.07); font-size: .76rem; }
.login-feature-list svg, .login-panel__footer svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-brand__footer { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.44); font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.login-brand__footer b { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.32); }

.login-panel {
  direction: rtl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(38px, 5vw, 68px);
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(241,247,255,.9));
  box-shadow: -26px 0 70px rgba(2,8,23,.12);
}

.login-panel__header { margin-bottom: 30px; }
.login-panel__icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid rgba(37,99,235,.14); border-radius: 17px; color: #2563eb; background: linear-gradient(145deg, #eff6ff, #dbeafe); box-shadow: 0 12px 28px rgba(37,99,235,.12); }
.login-panel__icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.login-panel__welcome { margin: 0 0 8px; color: #2563eb; font-size: .78rem; font-weight: 850; }
.login-panel__header h1 { margin: 0; color: #0f1f3d; font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.4; letter-spacing: -.025em; }
.login-panel__header > p:last-child { margin: 10px 0 0; color: var(--login-muted); font-size: .86rem; line-height: 1.8; }

.login-form { display: grid; gap: 20px; }
.login-field { display: grid; gap: 9px; margin: 0; }
.login-field__label { color: #334155; font-size: .78rem; font-weight: 800; }
.login-field__control { position: relative; display: flex; align-items: center; }
.login-field__control > svg { position: absolute; right: 16px; z-index: 1; width: 20px; height: 20px; fill: none; stroke: #94a3b8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .2s ease; }
.login-field input { width: 100%; height: 56px; margin: 0; padding: 0 48px 0 48px; border: 1px solid #dce4ef; border-radius: 15px; outline: none; color: #0f172a; background: rgba(255,255,255,.8); box-shadow: 0 6px 18px rgba(15,23,42,.035), inset 0 1px 1px rgba(15,23,42,.02); font: inherit; font-size: .86rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease; }
.login-field input::placeholder { color: #a5b2c3; }
.login-field__control:focus-within > svg { stroke: #2563eb; }
.login-field input:focus { border-color: #60a5fa; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.1), 0 12px 28px rgba(37,99,235,.08); transform: translateY(-1px); }
.login-password-toggle { position: absolute; left: 10px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: #94a3b8; background: transparent; cursor: pointer; transition: color .2s ease, background .2s ease; }
.login-password-toggle:hover, .login-password-toggle:focus-visible { color: #2563eb; background: #eff6ff; outline: none; }
.login-password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-password-toggle .eye-closed { display: none; }
.login-password-toggle[aria-pressed="true"] .eye-open { display: none; }
.login-password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.login-submit { position: relative; width: 100%; height: 57px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 5px; padding: 0 22px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(105deg, #1d4ed8, #2563eb 56%, #0891b2); box-shadow: 0 16px 30px rgba(37,99,235,.25), inset 0 1px 0 rgba(255,255,255,.24); font: inherit; font-size: .9rem; font-weight: 850; cursor: pointer; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.login-submit::before { content: ""; position: absolute; width: 70px; height: 140px; transform: translateX(240px) rotate(25deg); background: rgba(255,255,255,.18); transition: transform .55s ease; }
.login-submit:hover { transform: translateY(-2px); filter: saturate(1.12); box-shadow: 0 19px 36px rgba(37,99,235,.33); }
.login-submit:hover::before { transform: translateX(-240px) rotate(25deg); }
.login-submit:active { transform: translateY(0); }
.login-submit:focus-visible { outline: 3px solid rgba(59,130,246,.3); outline-offset: 3px; }
.login-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); }

.login-notice { display: flex; align-items: flex-start; gap: 11px; margin: -8px 0 22px; padding: 13px 14px; border: 1px solid; border-radius: 13px; font-size: .78rem; line-height: 1.8; }
.login-notice svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-notice--error { color: #b91c1c; border-color: #fecaca; background: #fff1f2; }
.login-notice--setup { color: #9a3412; border-color: #fed7aa; background: #fff7ed; }
.login-notice--setup div { display: grid; gap: 2px; }
.login-notice--setup strong { color: #7c2d12; }
.login-notice--setup span { color: #9a3412; }

.login-panel__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--login-line); color: #7c8ca3; }
.login-panel__footer > span { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; }
.login-panel__footer > span svg { color: #10b981; }
.login-panel__footer small { font-size: .65rem; }
@keyframes login-enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes login-float { 0%, 100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(12px,-18px,0) scale(1.04); } }

@media (max-width: 860px) {
  .login-layout { padding: 18px; }
  .login-shell { width: min(560px, 100%); min-height: auto; grid-template-columns: 1fr; border-radius: 26px; }
  .login-brand { min-height: 230px; padding: 28px 30px; }
  .login-brand::after { inset: 13px; border-radius: 18px; }
  .login-brand__logo-wrap { width: 58px; height: 58px; border-radius: 17px; }
  .login-brand__content { margin: 28px 0 12px; }
  .login-brand__content h2 { font-size: 1.75rem; }
  .login-brand__content > p:not(.login-eyebrow), .login-feature-list, .login-brand__footer { display: none; }
  .login-panel { padding: 36px 30px 32px; box-shadow: 0 -20px 50px rgba(2,8,23,.1); }
  .login-panel__icon { display: none; }
  .login-panel__header { margin-bottom: 25px; }
}

@media (max-width: 480px) {
  .login-layout { align-items: start; padding: 10px; }
  .login-shell { border-radius: 22px; }
  .login-brand { min-height: 188px; padding: 24px; }
  .login-brand__status { max-width: 180px; padding: 7px 10px; font-size: .65rem; }
  .login-brand__content { margin-top: 22px; }
  .login-brand__content h2 { font-size: 1.45rem; }
  .login-eyebrow { font-size: .7rem; }
  .login-panel { padding: 30px 22px 26px; }
  .login-panel__header h1 { font-size: 1.45rem; }
  .login-field input, .login-submit { height: 54px; }
  .login-panel__footer { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell, .login-orb { animation: none; }
  .login-submit, .login-field input { transition: none; }
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .login-shell { background: #0b1f42; }
  .login-brand__status, .login-feature-list span { background: rgba(15,23,42,.72); }
}
