:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: rgba(10, 20, 34, .86);
  --surface-solid: #0b1625;
  --border: rgba(177, 218, 238, .14);
  --border-focus: rgba(91, 199, 235, .7);
  --text: #f1f7fb;
  --text-soft: #becbd6;
  --muted: #8394a5;
  --primary: #7bd8f2;
  --primary-strong: #58c5e8;
  --danger: #ff879b;
  --focus: 0 0 0 3px rgba(86, 196, 232, .16);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 8%, rgba(39, 143, 187, .15), transparent 32%),
    linear-gradient(180deg, #07111d 0%, #040a12 100%);
  font-family: Vazirmatn, IRANSansX, Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(137, 195, 220, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 195, 220, .018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 72%);
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.noise {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.login-card {
  position: relative;
  width: min(440px, 100%);
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(17, 32, 51, .9), var(--surface));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px) saturate(112%);
  -webkit-backdrop-filter: blur(20px) saturate(112%);
}

.login-card::before {
  position: absolute;
  top: 0;
  right: 14%;
  left: 14%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(175, 230, 249, .46), transparent);
}

.logo-plate {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 20px;
  background: #f3f4f5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.logo-plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

header { text-align: center; }

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 6vw, 29px);
  line-height: 1.4;
  letter-spacing: -.035em;
}

header p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.8;
}

form { margin-top: 24px; }

form > label,
.label-row label {
  display: block;
  color: #dbe7ee;
  font-size: 12px;
  font-weight: 750;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.label-row span {
  color: var(--muted);
  font-size: 11px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  margin-top: 7px;
  border: 1px solid rgba(173, 209, 229, .14);
  border-radius: 13px;
  background: rgba(1, 8, 16, .56);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.field:focus-within {
  border-color: var(--border-focus);
  background: rgba(2, 10, 20, .82);
  box-shadow: var(--focus);
}

.field:has(input[aria-invalid="true"]) {
  border-color: rgba(255, 135, 155, .7);
  box-shadow: 0 0 0 3px rgba(255, 135, 155, .1);
}

.field input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 44px 0 76px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
}

.field-icon {
  position: absolute;
  right: 15px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #869bad;
  font: 700 17px Arial, sans-serif;
}

.field-icon.lock {
  width: 13px;
  height: 15px;
  border: 1.5px solid #869bad;
  border-radius: 4px;
}

.field-icon.lock::before {
  position: absolute;
  top: -7px;
  width: 7px;
  height: 8px;
  border: 1.5px solid #869bad;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  content: "";
}

.reveal {
  position: absolute;
  left: 4px;
  min-width: 68px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.reveal:hover { background: rgba(123, 216, 242, .07); }

.reveal:focus-visible,
.submit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.error {
  min-height: 0;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 135, 155, .25);
  border-radius: 11px;
  color: #ffc1cb;
  background: rgba(112, 25, 43, .16);
  font-size: 12px;
  line-height: 1.7;
}

.error:empty { display: none; }

.submit {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 1px solid rgba(190, 239, 253, .44);
  border-radius: 13px;
  color: #07131b;
  background: linear-gradient(180deg, #95e2f5, #70cfe9);
  box-shadow: 0 10px 24px rgba(31, 140, 181, .14), inset 0 1px rgba(255, 255, 255, .44);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.submit:hover:not(:disabled) { filter: brightness(1.04); }
.submit:active:not(:disabled) { transform: translateY(1px); }
.submit:disabled { cursor: wait; opacity: .68; }
.submit.loading .submit-label { opacity: 0; }

.spinner {
  position: absolute;
  display: none;
  width: 21px;
  height: 21px;
  border: 2px solid rgba(4, 22, 31, .24);
  border-top-color: #06151e;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit.loading .spinner { display: block; }

footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .065);
  color: var(--muted);
}

footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.75;
}

.shield {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid rgba(123, 216, 242, .22);
  border-radius: 9px;
  color: var(--primary);
  background: rgba(123, 216, 242, .06);
  font-size: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  .login-card { padding: 22px 20px; border-radius: 19px; }
  .logo-plate { width: 86px; height: 86px; margin-bottom: 16px; border-radius: 17px; }
  form { margin-top: 20px; }
  footer { margin-top: 17px; }
}

@media (max-height: 700px) {
  .login-shell { place-items: start center; }
  .login-card { padding-top: 20px; padding-bottom: 20px; }
  .logo-plate { width: 78px; height: 78px; margin-bottom: 12px; border-radius: 15px; }
  header p { margin-top: 4px; }
  form { margin-top: 16px; }
  .label-row { margin-top: 12px; }
  .submit { margin-top: 14px; }
  footer { margin-top: 14px; padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card { background: var(--surface-solid); }
}

/* Luminous glass redesign inspired by the supplied admin UI */
:root {
  --bg: #080d18;
  --surface: rgba(15, 24, 40, .76);
  --surface-solid: #111b2d;
  --border: rgba(222, 241, 255, .16);
  --border-focus: rgba(84, 190, 255, .78);
  --text: #f8fbff;
  --text-soft: #c9d6e5;
  --muted: #8fa2b8;
  --primary: #68d2ff;
  --primary-strong: #278cda;
  --accent: #8b7cff;
  --danger: #ff8da4;
  --focus: 0 0 0 4px rgba(73, 177, 242, .15);
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 80% 12%, rgba(40, 139, 233, .2), transparent 30%),
    radial-gradient(circle at 18% 86%, rgba(42, 203, 209, .12), transparent 29%),
    radial-gradient(circle at 54% 54%, rgba(122, 105, 255, .075), transparent 33%),
    linear-gradient(145deg, #0d1524 0%, #070c16 48%, #090d18 100%);
  font-family: Vazirmatn, IRANSansX, "Segoe UI", Tahoma, Arial, sans-serif;
}

body::before {
  opacity: .72;
  background-image:
    linear-gradient(rgba(197, 229, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 229, 255, .018) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 78%);
}

.noise { opacity: .02; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .18;
  pointer-events: none;
  animation: login-drift 18s cubic-bezier(.22, 1, .36, 1) infinite alternate;
}

.ambient-one { top: -16rem; right: -8rem; background: #2794ef; }
.ambient-two { bottom: -18rem; left: -10rem; background: #2bcad1; animation-duration: 24s; }
.ambient-three { top: 36%; left: 42%; width: 23rem; height: 23rem; background: #8174ff; opacity: .1; animation-delay: -9s; }

.login-shell {
  place-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: clamp(48px, 8vw, 112px);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: max(38px, env(safe-area-inset-top)) 24px max(38px, env(safe-area-inset-bottom));
}

.login-intro {
  position: relative;
  max-width: 570px;
  animation: intro-enter .78s cubic-bezier(.22, 1, .36, 1) both;
}

.intro-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  direction: ltr;
}

.intro-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 19px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 18px 50px rgba(26, 126, 205, .24), inset 0 1px rgba(255, 255, 255, .8);
}

.intro-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.intro-brand > span:last-child { text-align: left; }
.intro-brand strong, .intro-brand small { display: block; }
.intro-brand strong { font: 850 17px/1 "Segoe UI", Arial, sans-serif; letter-spacing: .12em; }
.intro-brand small { margin-top: 7px; color: #7690aa; font: 700 10px/1 "Segoe UI", Arial, sans-serif; letter-spacing: .18em; }

.intro-kicker {
  display: block;
  margin-top: 58px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .035em;
}

.login-intro h2 {
  margin: 13px 0 0;
  color: var(--text);
  font-size: clamp(42px, 4.4vw, 64px);
  line-height: 1.42;
  letter-spacing: -.055em;
}

.login-intro h2 em {
  color: transparent;
  background: linear-gradient(105deg, #71ddff 4%, #3fa8f7 50%, #a79aff 96%);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.login-intro > p {
  max-width: 510px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 2.05;
}

.intro-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.intro-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(207, 233, 255, .105);
  border-radius: 13px;
  color: #bacadb;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.intro-features i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  color: #051421;
  background: linear-gradient(145deg, #8ee5ff, #48b9ef);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.intro-status {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(430px, 100%);
  margin-top: 34px;
  padding: 15px 17px;
  border: 1px solid rgba(211, 237, 255, .12);
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .055);
  backdrop-filter: blur(20px) saturate(115%);
}

.status-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: #5ee0b0;
  box-shadow: 0 0 18px rgba(94, 224, 176, .62);
}

.status-pulse::before {
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(94, 224, 176, .35);
  border-radius: inherit;
  content: "";
  animation: status-ring 2.2s ease-out infinite;
}

.intro-status strong, .intro-status small { display: block; }
.intro-status strong { font-size: 12px; }
.intro-status small { margin-top: 5px; color: var(--muted); font-size: 11px; }

.auth-column {
  width: min(470px, 100%);
  justify-self: center;
  animation: card-enter .7s cubic-bezier(.22, 1, .36, 1) both;
}

.login-card {
  width: 100%;
  padding: 34px;
  border-color: rgba(221, 241, 255, .17);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .085), transparent 34%),
    linear-gradient(160deg, rgba(22, 35, 56, .91), rgba(10, 17, 30, .84));
  box-shadow: 0 38px 100px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .095);
  backdrop-filter: blur(30px) saturate(125%);
  -webkit-backdrop-filter: blur(30px) saturate(125%);
}

.login-card::before {
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132, 218, 255, .72), rgba(167, 154, 255, .34), transparent);
}

.login-card::after {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(44, 157, 232, .12);
  filter: blur(38px);
  pointer-events: none;
  content: "";
}

.logo-plate {
  position: relative;
  z-index: 1;
  width: 94px;
  height: 94px;
  margin-bottom: 18px;
  border-color: rgba(255, 255, 255, .3);
  border-radius: 26px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 18px 46px rgba(20, 112, 191, .22), inset 0 1px rgba(255, 255, 255, .9);
}

header { position: relative; z-index: 1; }
.eyebrow { margin-bottom: 6px; color: var(--primary); font-size: 11px; letter-spacing: .035em; }
h1 { font-size: clamp(27px, 5vw, 32px); letter-spacing: -.045em; }
header p { margin-top: 8px; color: #aebdd0; }
form { position: relative; z-index: 1; margin-top: 27px; }
form > label, .label-row label { color: #e4edf6; }
.label-row { margin-top: 18px; }

.field {
  min-height: 56px;
  margin-top: 8px;
  border-color: rgba(207, 232, 249, .13);
  border-radius: 16px;
  background: rgba(2, 8, 17, .42);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18);
}

.field:hover { border-color: rgba(207, 232, 249, .22); }
.field:focus-within { border-color: var(--border-focus); background: rgba(4, 12, 24, .68); box-shadow: var(--focus); }
.field input { height: 54px; color: var(--text); }
.field input::placeholder { color: #60758a; }
.field-icon { color: #7f96aa; }
.field-icon.lock, .field-icon.lock::before { border-color: #7f96aa; }
.reveal { color: #7edaff; }
.reveal:hover { background: rgba(104, 210, 255, .08); }

.submit {
  min-height: 56px;
  margin-top: 20px;
  overflow: hidden;
  border-color: rgba(205, 240, 255, .5);
  border-radius: 16px;
  color: #04131f;
  background: linear-gradient(110deg, #80e1ff 0%, #4bbbf3 47%, #7d8cff 112%);
  box-shadow: 0 18px 42px rgba(30, 138, 218, .26), inset 0 1px rgba(255, 255, 255, .52);
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), filter 260ms ease, box-shadow 260ms ease, opacity 180ms ease;
}

.submit::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: skewX(-18deg);
  transition: left .7s cubic-bezier(.22, 1, .36, 1);
  content: "";
}

.submit:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.055); box-shadow: 0 23px 48px rgba(30, 138, 218, .34); }
.submit:hover:not(:disabled)::after { left: 118%; }
.submit:active:not(:disabled) { transform: translateY(0) scale(.99); }

footer { position: relative; z-index: 1; border-top-color: rgba(220, 240, 255, .08); }
.shield { border-color: rgba(94, 224, 176, .28); color: #68e0b3; background: rgba(94, 224, 176, .075); }
.login-legal { margin: 18px 18px 0; color: #6f8398; font-size: 10px; line-height: 1.8; text-align: center; }

@keyframes login-drift { to { transform: translate3d(42px, 28px, 0) scale(1.09); } }
@keyframes intro-enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes card-enter { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes status-ring { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }

@media (max-width: 960px) {
  .login-shell { display: grid; grid-template-columns: minmax(0, 470px); justify-content: center; gap: 0; }
  .login-intro { display: none; }
  .auth-column { width: 100%; }
}

@media (max-width: 520px) {
  .login-shell { place-items: center; padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
  .login-card { padding: 25px 20px 22px; border-radius: 25px; }
  .logo-plate { width: 82px; height: 82px; margin-bottom: 15px; border-radius: 22px; }
  h1 { font-size: 27px; }
  form { margin-top: 23px; }
  .field { min-height: 54px; }
  .field input { height: 52px; }
  .login-legal { margin-top: 13px; }
}

@media (max-height: 700px) and (min-width: 961px) {
  .login-shell { align-items: center; padding-top: 24px; padding-bottom: 24px; }
  .intro-kicker { margin-top: 30px; }
  .intro-features { margin-top: 20px; }
  .intro-status { margin-top: 24px; }
  .login-card { padding-top: 25px; padding-bottom: 25px; }
  .logo-plate { width: 76px; height: 76px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card { background: #111b2d; }
  .intro-status, .intro-features span { background: #111a2b; }
}

.login-shell {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
  gap: 0;
  width: 100%;
}

.auth-column { width: min(440px, 100%); }
.login-card { padding: 32px; }
.logo-plate { width: 88px; height: 88px; margin-bottom: 20px; }
header h1 { font-size: clamp(25px, 5vw, 30px); }
form { margin-top: 27px; }
.label-row { justify-content: flex-start; }

@media (max-width: 520px) {
  .login-card { padding: 26px 20px 24px; }
  .logo-plate { width: 80px; height: 80px; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body {
  background:
    radial-gradient(circle at 80% 4%, rgba(52, 151, 210, .13), transparent 30%),
    radial-gradient(circle at 8% 100%, rgba(34, 180, 176, .09), transparent 31%),
    #080b11;
}

.login-shell { grid-template-columns: minmax(0, 560px); padding: 28px 16px; }
.auth-column { width: min(560px, 100%); }
.login-card {
  width: 100%;
  padding: 36px;
  border-color: rgba(210, 230, 245, .16);
  border-radius: 18px;
  background: rgba(20, 27, 38, .91);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .44), inset 0 1px rgba(255, 255, 255, .05);
}

.login-toolbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.login-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.login-brand > span { min-width: 0; }
.login-brand strong,
.login-brand small { display: block; }
.login-brand strong { font: 850 18px/1.1 Arial, sans-serif; letter-spacing: .045em; }
.login-brand small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.logo-plate { width: 58px; height: 58px; margin: 0; border-radius: 14px; }
.login-tools { display: flex; align-items: center; gap: 6px; }
.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 48px;
  height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #d9e4ed;
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.toolbar-button.icon-only { min-width: 44px; padding: 0; }
.toolbar-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.toolbar-button span { color: var(--text-soft); font: 750 11px/1 Arial, sans-serif; }
.toolbar-button:hover { border-color: rgba(123, 216, 242, .18); background: rgba(123, 216, 242, .065); transform: translateY(-1px); }

header { margin-top: 42px; }
header h1 { font-size: clamp(27px, 5vw, 32px); }
header p { margin-top: 9px; color: #91a2b3; font-size: 14px; }
form { margin-top: 40px; }
form > label,
.label-row label { font-size: 14px; }
.label-row { margin-top: 22px; }
.field {
  min-height: 66px;
  margin-top: 10px;
  border-color: rgba(209, 225, 239, .17);
  border-radius: 14px;
  background: #2b3545;
}
.field:hover { border-color: rgba(209, 225, 239, .28); }
.field:focus-within { border-color: rgba(103, 198, 239, .76); background: #303b4c; }
.field input { height: 64px; padding-inline: 57px; color: #fff; font-size: 17px; }
.field-icon { right: 18px; width: 23px; height: 23px; color: #a1adba; }
.field-icon svg,
.reveal svg,
.submit-icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reveal { left: 8px; display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0; color: #a7b3c0; }
.reveal:hover { color: var(--primary); background: rgba(123, 216, 242, .075); }
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 64px;
  margin-top: 30px;
  border-radius: 14px;
  color: #03121e;
  background: linear-gradient(110deg, #78dcf7, #56baf4 58%, #6f8dff 120%);
  font-size: 17px;
}
.submit.loading .submit-icon { opacity: 0; }

html[dir="ltr"] .field-icon { right: auto; left: 18px; }
html[dir="ltr"] .reveal { right: 8px; left: auto; }

body.light-theme {
  --bg: #edf3f8;
  --surface: rgba(255, 255, 255, .92);
  --text: #172536;
  --text-soft: #4f6071;
  --muted: #718092;
  background:
    radial-gradient(circle at 80% 3%, rgba(67, 165, 220, .18), transparent 31%),
    radial-gradient(circle at 5% 100%, rgba(61, 192, 181, .13), transparent 30%),
    #edf3f8;
}
body.light-theme .login-card { border-color: rgba(33, 68, 94, .14); background: rgba(249, 252, 255, .92); box-shadow: 0 32px 80px rgba(42, 72, 96, .18), inset 0 1px rgba(255, 255, 255, .8); }
body.light-theme .toolbar-button { color: #344b60; }
body.light-theme .field { border-color: rgba(48, 76, 100, .2); background: #e1e9f1; }
body.light-theme .field:focus-within { background: #e9f0f6; }
body.light-theme .field input { color: #142333; }
body.light-theme form > label,
body.light-theme .label-row label { color: #2d4153; }

@media (max-width: 520px) {
  .login-shell { padding: max(14px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom)); }
  .login-card { padding: 24px 18px 22px; border-radius: 19px; }
  .logo-plate { width: 50px; height: 50px; border-radius: 13px; }
  .login-brand strong { font-size: 15px; }
  .login-brand small { font-size: 10px; }
  .login-tools { gap: 2px; }
  .toolbar-button { min-width: 42px; height: 42px; padding: 0 8px; }
  .toolbar-button.icon-only { min-width: 40px; }
  header { margin-top: 30px; }
  header h1 { font-size: 27px; }
  header p { font-size: 12px; }
  form { margin-top: 30px; }
  .field { min-height: 58px; }
  .field input { height: 56px; font-size: 15px; }
  .submit { min-height: 58px; margin-top: 23px; }
}

.login-shell { grid-template-columns: minmax(0, 430px); padding: 18px 12px; }
.auth-column { width: min(430px, 100%); }
.login-card { padding: 24px; border-radius: 16px; }
.login-toolbar { gap: 12px; }
.logo-plate { width: 46px; height: 46px; border-radius: 12px; }
.login-brand { gap: 10px; }
.login-brand strong { font-size: 15px; }
.login-brand small { margin-top: 3px; font-size: 9px; }
.toolbar-button { min-width: 40px; height: 38px; padding: 0 8px; border-radius: 10px; }
.toolbar-button.icon-only { min-width: 38px; }
.toolbar-button svg { width: 18px; height: 18px; }
header { margin-top: 24px; }
header h1 { font-size: 25px; }
header p { margin-top: 5px; font-size: 12px; }
form { margin-top: 24px; }
form > label,
.label-row label { font-size: 12px; }
.label-row { margin-top: 16px; }
.field { min-height: 54px; margin-top: 7px; border-radius: 12px; }
.field input { height: 52px; padding-inline: 49px; font-size: 14px; }
.field-icon { right: 14px; width: 20px; height: 20px; }
.field-icon svg,
.reveal svg { width: 20px; height: 20px; }
.reveal { left: 5px; min-width: 42px; min-height: 42px; }
.submit { min-height: 54px; margin-top: 20px; border-radius: 12px; font-size: 14px; }
.submit-icon { width: 20px; height: 20px; }
html[dir="ltr"] .field-icon { right: auto; left: 14px; }
html[dir="ltr"] .reveal { right: 5px; left: auto; }

@media (max-width: 520px) {
  .login-card { padding: 20px 16px 18px; border-radius: 16px; }
  .logo-plate { width: 42px; height: 42px; }
  .login-brand strong { font-size: 14px; }
  header { margin-top: 20px; }
  header h1 { font-size: 23px; }
  form { margin-top: 20px; }
  .field { min-height: 52px; }
  .field input { height: 50px; }
  .submit { min-height: 52px; margin-top: 18px; }
}

.passkey-area { margin-top: 14px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; color: var(--muted); font-size: 10px; }
.auth-divider::before,
.auth-divider::after { flex: 1; height: 1px; background: rgba(197, 224, 241, .1); content: ""; }
.passkey-submit,
.install-app {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(94, 224, 176, .28);
  border-radius: 12px;
  color: #8eebc8;
  background: rgba(51, 185, 143, .075);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}
.passkey-submit svg,
.install-app svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.passkey-submit:hover:not(:disabled),
.install-app:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(94, 224, 176, .48); background: rgba(51, 185, 143, .12); }
.passkey-submit:disabled { cursor: wait; opacity: .65; }
.passkey-submit.loading > svg,
.passkey-submit.loading > span:not(.spinner) { opacity: 0; }
.passkey-submit.loading .spinner { display: block; }
.passkey-area > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.install-app { min-height: 42px; margin-top: 14px; border-color: rgba(123, 216, 242, .16); color: #9edcf1; background: rgba(123, 216, 242, .045); font-size: 11px; }
.install-app svg { width: 17px; height: 17px; }
.install-help { margin: 9px 8px 0; color: var(--muted); font-size: 10px; line-height: 1.8; text-align: center; }
.passkey-submit:focus-visible,
.install-app:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.light-theme .passkey-submit { color: #177654; background: rgba(26, 157, 111, .08); }
body.light-theme .install-app { color: #23657f; background: rgba(38, 139, 181, .06); }

@media (max-width: 520px) {
  .passkey-submit { min-height: 48px; }
  .install-app { margin-top: 11px; }
}
