/* ═══════════════════════════════════════════════════════
   design/login.css — فقط استایل صفحه ورود
   رنگ اصلی: #14474B
   ═══════════════════════════════════════════════════════ */

* {
  font-family: var(--nexo-font, "Vazirmatn"), Tahoma, sans-serif;
  box-sizing: border-box;
}

.login-body {
  margin: 0;
  min-height: 100vh;
  background: #eef4f4;
  color: #0b2a2c;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  display: grid;
  width: 100%;
  max-width: 896px;
  background: #fff;
  overflow: hidden;
}

/* ── ستون فرم ── */
.login-form-col {
  display: flex;
  align-items: center;
  padding: 40px 24px;
}
.login-form-box {
  width: 100%;
}

.login-brand-mobile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.login-brand-mobile img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
}
.login-brand-mobile span {
  font-size: 1.5rem;
  font-weight: 800;
  color: #14474b;
}

.login-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}
.login-sub {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: #5f7c7e;
}

.login-alert {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}

#loginForm {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* فیلد: نوشته کوچک داخل خود جعبه */
.field {
  padding: 10px 16px 6px;
  background: #fff;
  border: 1px solid #c5dadb;
  border-radius: 12px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.field:focus-within {
  border-color: #14474b;
  box-shadow: 0 0 0 3px rgba(20, 71, 75, 0.2);
}
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #14474b;
}
.field input {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
  color: inherit;
  text-align: right;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-btn {
  padding: 0 4px;
  border: 0;
  background: none;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #14474b;
  cursor: pointer;
}
.link-btn:hover {
  text-decoration: underline;
}
.link-btn:focus-visible {
  outline: 2px solid rgba(20, 71, 75, 0.4);
}

/* کلید روشن/خاموش */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.875rem;
  cursor: pointer;
}
.switch-row small {
  font-size: 0.75rem;
  color: #5f7c7e;
}
.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c5dadb;
  transition: background 0.15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.switch-row input:checked + .switch {
  background: #14474b;
}
.switch-row input:checked + .switch::after {
  transform: translateX(-20px);
}
.switch-row input:focus-visible + .switch {
  outline: 2px solid rgba(20, 71, 75, 0.4);
  outline-offset: 2px;
}

.login-btn {
  height: 48px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #FAAB2D;
  color: #14474B;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.login-btn:hover {
  background: #ee9b1c;
}
.login-btn:focus-visible {
  outline: 2px solid #14474b;
  outline-offset: 2px;
}
.login-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.login-note {
  margin: 24px 0 0;
  font-size: 0.75rem;
  line-height: 1.9;
  color: #5f7c7e;
}

/* ── ستون رنگی: فقط کمپیوتر ── */
.login-panel {
  display: none;
}

@media (min-width: 640px) {
  .login-wrap {
    padding: 24px;
  }
  .login-card {
    border: 1px solid #d5e3e4;
    border-radius: 16px;
    box-shadow: 0 24px 60px -28px rgba(20, 71, 75, 0.45);
  }
  .login-form-col {
    padding: 40px 48px;
  }
}

@media (min-width: 768px) {
  .login-card {
    grid-template-columns: 1fr 1.05fr;
    min-height: 540px;
  }
  .login-brand-mobile {
    display: none;
  }

  .login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 48px 40px;
    background: #14474b;
    color: #fff;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 89% 100%, 0 100%); /* لبه مورب */
  }
  .login-panel h2 {
    position: relative;
    max-width: 320px;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.5;
  }
  .login-panel-name {
    position: relative;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #a9d4d6;
  }

  .login-logo-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 192px;
    height: 192px;
    margin: 32px 0;
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 40px -16px rgba(0, 0, 0, 0.5);
    animation: float-y 5s ease-in-out infinite;
  }
  .login-logo-box img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: contain;
  }

  /* حلقه‌های هم‌مرکز در گوشه */
  .ring {
    position: absolute;
    left: 0;
    bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
  }
  .ring.r1 {
    width: 288px;
    height: 288px;
    left: -144px;
    bottom: -144px;
  }
  .ring.r2 {
    width: 208px;
    height: 208px;
    left: -104px;
    bottom: -104px;
  }
  .ring.r3 {
    width: 128px;
    height: 128px;
    left: -64px;
    bottom: -64px;
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-logo-box {
    animation: none;
  }
}
.login-ok {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid #abefc6;
  border-radius: 8px;
  background: #ecfdf3;
  color: #067647;
  font-size: 0.875rem;
  line-height: 1.9;
}
.login-link {
  color: #14474b;
  font-weight: 700;
  text-decoration: none;
}
.login-link:hover {
  text-decoration: underline;
}
.login-card.login-card-sm {
  max-width: 460px;
  min-height: 0;
  grid-template-columns: 1fr;
}
.login-card-sm .login-brand-show {
  display: flex;
}


/* NEXO — geometric login, scoped to the login page only. */
.login-redesign {
  --brand: #14474B;
  --accent: #FAAB2D;
  background: #f3f5f5;
  color: var(--brand);
  isolation: isolate;
}
.login-redesign .login-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}
.login-redesign .login-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1040px;
  min-height: 0;
  border: 1px solid rgba(20,71,75,.08);
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(20,71,75,.13);
  background: #fff;
  grid-template-columns: minmax(0,1fr);
}
.login-redesign .login-form-col { padding: 36px 24px; justify-content: center; }
.login-redesign .login-form-box { max-width: 350px; }
.login-redesign .login-brand-mobile { display: flex; gap: 12px; margin-bottom: 36px; }
.login-redesign .login-brand-mobile img { width: 44px; height: 44px; border-radius: 8px; }
.login-redesign .login-brand-mobile span { font-size: 1rem; letter-spacing: .025em; }
.login-redesign .login-title { font-size: 1.65rem; font-weight: 800; }
.login-redesign .login-sub { line-height: 1.9; }
.login-redesign #loginForm { gap: 15px; margin-top: 25px; }
.login-redesign .field { border-radius: 7px; padding: 9px 13px 5px; }
.login-redesign .field input { height: 31px; }
.login-redesign .field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: #14474B; }
.login-redesign .login-btn { border-radius: 7px; background: var(--accent); color: var(--brand); box-shadow: 0 6px 16px rgba(250,171,45,.22); }
.login-redesign .login-btn:hover:not(:disabled) { background: #ee9b1c; }
.login-redesign .login-note { text-align: center; margin-top: 20px; }
.login-redesign .login-panel { display: none; }
@media (min-width: 768px) {
  /* Large diagonal layers continue outside the white card, as in the reference. */
  .login-redesign .login-wrap::before,
  .login-redesign .login-wrap::after {
    content: ''; position: absolute; pointer-events: none; z-index: -1;
    width: 105vmax; height: 105vmax; right: -75vmax; top: 50%;
    transform: translateY(-50%) rotate(45deg); border-radius: 75px;
  }
  .login-redesign .login-wrap::before { background: #dce8e8; right: -71vmax; }
  .login-redesign .login-wrap::after { background: linear-gradient(135deg,#286267 0%,#14474B 55%,#103b3e 100%); }
  .login-redesign .login-card { direction: ltr; grid-template-columns: 1fr 1fr; min-height: 570px; }
  .login-redesign .login-form-col { direction: rtl; padding: 46px 42px; z-index: 1; }
  .login-redesign .login-panel { display: flex; direction: rtl; position: relative; justify-content: center; align-items: center; padding: 40px 28px; overflow: visible; background: transparent; clip-path: none; color: var(--brand); }
  .login-redesign .login-panel::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    width: 790px; height: 790px; left: 24px; top: 50%;
    transform: translateY(-50%) rotate(45deg); border-radius: 56px;
    background: linear-gradient(145deg,#347278 0%,#14474B 55%,#103b3e 100%);
  }
  .login-redesign .login-feature { position: relative; width: min(100%,290px); min-height: 340px; background: #fff; padding: 36px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 22px 45px rgba(7,39,42,.25); border-radius: 4px; }
  .login-redesign .login-logo-box { width: 150px; height: 150px; padding: 13px; margin: 0 0 28px; border-radius: 50%; background: #eaf2f2; box-shadow: none; animation: none; }
  .login-redesign .login-logo-box img { border-radius: 12px; }
  .login-redesign .login-panel h2 { color: var(--brand); font-size: 1.3rem; line-height: 1.75; }
  .login-redesign .login-panel-name { color: #54777a; margin-top: 19px; font-size: .75rem; letter-spacing: .1em; }
}
@media (max-width: 420px) {
  .login-redesign .login-wrap { padding: 14px; }
  .login-redesign .login-form-col { padding: 30px 20px; }
}
