:root {
  --brand-700: #2f3394;
  --brand-600: #2f3394;
  --brand-500: #2f3394;
  --brand-400: #7c8ac7;
  --gold-500: #faa732;
  --gold-100: #fceeda;
  --ink-900: #1e2340;
  --ink-600: #8891a8;
  --line: #e2e5ee;
  --paper: #f5f6fa;
  --white: #ffffff;
  --danger: #d64545;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

span .invalid-feedback {
  color: var(--danger);
  font-size: 0.76rem;
  margin-block-start: 6px;
}

h1,
h2,
h3,
.brand-name,
.btn {
  font-family: "Cairo", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--gold-100);
  color: var(--brand-700);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.panel {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(700px 500px at 85% 10%,
      rgba(232, 163, 61, 0.18),
      transparent 60%),
    linear-gradient(210deg,
      var(--brand-700) 0%,
      var(--brand-600) 55%,
      var(--brand-500) 100%);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 20%, black, transparent 75%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
}

.blob-a {
  inline-size: 280px;
  block-size: 280px;
  background: radial-gradient(circle, var(--gold-500), transparent 70%);
  inset-inline-end: -90px;
  inset-block-start: -90px;
}

.blob-b {
  inline-size: 340px;
  block-size: 340px;
  background: radial-gradient(circle, var(--brand-400), transparent 70%);
  inset-inline-start: -120px;
  inset-block-end: -140px;
}

.panel-top {
  position: relative;
}

.brand-mark-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block-end: 56px;
}

.brand-emblem {
  inline-size: 52px;
  block-size: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.4;
}

.brand-name small {
  display: block;
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.65);
  font-family: "Inter", sans-serif;
}

.panel-top h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.35;
  margin-block-end: 18px;
  max-width: 420px;
}

.panel-top h1 span {
  color: var(--gold-500);
}

.panel-top p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.96rem;
  max-width: 400px;
  margin-block-end: 36px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.feature-list .ic {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.92rem;
  color: var(--gold-500);
  font-weight: 800;
}

.panel-bottom {
  position: relative;
  display: flex;
  gap: 34px;
  padding-block-start: 30px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-bottom div b {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
}

.panel-bottom div span {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
}

.form-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--white);
}

.lang-toggle {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 24px;
  display: flex;
  gap: 6px;
}

.lang-toggle a {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-600);
  border: 1.5px solid var(--line);
  transition: all 0.2s;
}

.lang-toggle a:hover {
  border-color: var(--brand-500);
  color: var(--brand-600);
}

.lang-toggle a.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--white);
}

.form-box {
  inline-size: 100%;
  max-width: 400px;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block-end: 36px;
}

.logo-mark {
  inline-size: 50px;
  block-size: 50px;
  border-radius: 50%;
  border: 2px solid var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  font-weight: 900;
  font-size: 1.25rem;
  background: var(--gold-100);
}

.logo-text {
  text-align: start;
}

.logo-text b {
  display: block;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink-900);
}

.logo-text span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 1px;
  color: var(--ink-600);
}

.form-head {
  text-align: center;
  margin-block-end: 32px;
}

.form-head h2 {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--ink-900);
  margin-block-end: 8px;
}

.form-head p {
  font-size: 0.88rem;
  color: var(--ink-600);
}

.field {
  margin-block-end: 20px;
}

.field-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 8px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-900);
}

.field label .req {
  color: var(--danger);
  margin-inline-start: 2px;
}

.field-top a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-600);
}

.field-top a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  inline-size: 100%;
  padding: 13px 15px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: var(--ink-900);
  background: var(--paper);
  transition:
    border-color 0.2s,
    background 0.2s;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(74, 86, 151, 0.12);
}

.input-wrap input.err {
  border-color: var(--danger);
}

.toggle-eye {
  position: absolute;
  inset-inline-end: 13px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-600);
  font-size: 0.85rem;
  padding: 4px;
}

.toggle-eye:hover {
  color: var(--brand-600);
}

.err-msg {
  font-size: 0.76rem;
  color: var(--danger);
  margin-block-start: 6px;
  display: block;
}

.err-msg.show {
  display: block;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 26px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--ink-900);
  cursor: pointer;
}

.remember input {
  inline-size: 17px;
  block-size: 17px;
  accent-color: var(--brand-600);
  cursor: pointer;
}

.btn-submit {
  inline-size: 100%;
  padding: 14px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  background: var(--brand-600);
  color: var(--white);
  font-weight: 700;
  font-size: 0.96rem;
  font-family: "Cairo", sans-serif;
  transition:
    background 0.2s,
    transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  inline-size: 16px;
  block-size: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-submit.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.demo-note {
  margin-block-start: 16px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--gold-100);
  border: 1px solid rgba(232, 163, 61, 0.4);
  font-size: 0.76rem;
  color: #8a5a12;
  text-align: center;
  display: none;
}

.demo-note.show {
  display: block;
}

.register-note {
  text-align: center;
  font-size: 0.87rem;
  color: var(--ink-600);
  margin-block-start: 28px;
}

.register-note a {
  color: var(--brand-600);
  font-weight: 700;
  text-decoration: underline;
}

.logo-row img {
  max-width: 250px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .panel {
    display: none;
  }

  .form-panel {
    padding-block-start: 64px;
  }
}