.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side {
  position: relative; overflow: hidden; background: var(--red); color: var(--cream);
  padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-side::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 14px; background: var(--red-d); }
.login-side::after {
  content: ''; position: absolute; left: -40px; bottom: -120px; width: 420px; aspect-ratio: 695 / 1136; background: var(--red-d); opacity: .6;
  -webkit-mask: url('../img/mark.svg') center / contain no-repeat; mask: url('../img/mark.svg') center / contain no-repeat;
}
.login-side > * { position: relative; z-index: 1; }
.login-side .logo-text small { color: rgba(245, 238, 222, .8); }
.login-side h2 { font-weight: 900; font-size: clamp(34px, 4vw, 54px); line-height: 1.35; margin-bottom: 18px; }
.login-side p { max-width: 420px; color: rgba(245, 238, 222, .88); font-size: 17px; }
.login-side small { color: rgba(245, 238, 222, .7); }

.login-form-wrap { display: grid; place-items: center; padding: 32px 20px; }
.forms { width: min(430px, 100%); }
.login-card { width: 100%; display: grid; gap: 18px; }
.login-card[hidden] { display: none; }
.login-card .back { font-weight: 700; font-size: 14px; color: var(--muted); width: max-content; }
.login-card .back:hover { color: var(--red); }
.login-card h1 { font-weight: 900; font-size: 34px; line-height: 1.3; }
.login-card .sub { color: var(--muted); margin-top: -8px; }
.login-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* فیلد رمز: متن از راست، دکمهٔ «نمایش» سمت چپ و بدون تداخل */
.pw { position: relative; }
.pw .input { padding-left: 88px; padding-right: 14px; }
.pw button {
  position: absolute; left: 8px; right: auto; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--red); padding: 6px 10px; border-radius: 8px;
}
.pw button:hover { background: rgba(154, 19, 34, .1); }

.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-links button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--red); font-weight: 700; font-size: 14px; }
.login-links button:hover { text-decoration: underline; }
.login-card .form-msg { min-height: 0; }
.login-card .form-msg.ok { background: rgba(47, 107, 63, .1); border-radius: 12px; padding: 10px 14px; }
.login-card .form-msg.err { background: rgba(154, 19, 34, .08); border-radius: 12px; padding: 10px 14px; }
.login-card .form-msg:empty { padding: 0; background: none; }
.hp { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; border: 0; overflow: hidden; pointer-events: none; }

/* پنل مدیریت: ظاهر جدا (مشکی و قرمز) */
.area-admin .login-side { background: var(--ink); }
.area-admin .login-side::before { background: var(--red); }
.area-admin .login-side::after { background: var(--red); opacity: .35; }
.area-admin .login-side h2 span { color: #ff7d8c; }
.badge-admin { display: inline-flex; width: max-content; background: var(--ink); color: var(--cream); font-size: 12.5px; font-weight: 800; padding: 2px 14px; border-radius: 99px; }

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 26px 24px 30px; gap: 26px; }
  .login-side::after { width: 240px; bottom: -80px; }
  .login-side small { display: none; }
  .login-side h2 { font-size: 30px; }
  .login-card .row2 { grid-template-columns: 1fr; }
}
