html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background:
    radial-gradient(circle at top left, rgba(124, 108, 245, 0.14), transparent 26%),
    radial-gradient(circle at bottom right, rgba(124, 108, 245, 0.10), transparent 24%),
    linear-gradient(135deg, #f8f7ff 0%, #fefefe 48%, #f7f6ff 100%);
}

.page-shell {
  width: 100%;
}

body.login-page main.pb-3 {
  padding-bottom: 0 !important;
}

.identity-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.identity-login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(124, 108, 245, 0.08) 0, rgba(124, 108, 245, 0.02) 24%, transparent 40%),
    linear-gradient(115deg, transparent 0%, transparent 47%, rgba(124, 108, 245, 0.05) 48%, transparent 49%, transparent 100%);
  pointer-events: none;
}

.identity-login-card {
  width: min(1280px, 100%);
  height: min(880px, calc(100vh - 36px));
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.identity-login-panel {
  position: relative;
}

.identity-login-panel--brand {
  padding: 34px 36px 28px;
  background:
    radial-gradient(circle at top left, rgba(124, 108, 245, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 247, 255, 0.9));
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.identity-login-panel--brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, transparent 58%, rgba(124, 108, 245, 0.08) 78%, transparent 100%);
  pointer-events: none;
}

.identity-login-panel--form {
  padding: 34px 40px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
}

.identity-brand,
.identity-brand-copy,
.identity-feature-list,
.identity-worldmap,
.identity-form-wrap {
  position: relative;
  z-index: 1;
}

.identity-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 38px;
}

.identity-brand__mark {
  width: 52px;
  height: 52px;
  color: #1f2937;
  flex: 0 0 auto;
}

.identity-brand__mark svg,
.identity-feature__icon svg,
.identity-input-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.identity-brand__name {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.22rem;
  line-height: 1;
  color: #111827;
}

.identity-brand__sub {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.22rem;
  color: #5a3ee8;
}

.identity-brand-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 2.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.identity-brand-copy p {
  max-width: 460px;
  margin: 0 0 28px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #475569;
}

.identity-feature-list {
  display: grid;
  gap: 18px;
  max-width: 500px;
}

.identity-feature {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.identity-feature__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #6b52ee;
  background: linear-gradient(180deg, rgba(124, 108, 245, 0.18), rgba(124, 108, 245, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: 11px;
}

.identity-feature h2 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
}

.identity-feature p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #475569;
}

.identity-worldmap {
  margin-top: 18px;
  height: 82px;
  opacity: 0.32;
  background-image:
    radial-gradient(circle, rgba(124, 108, 245, 0.4) 0 1.6px, transparent 1.7px),
    radial-gradient(circle at 25% 62%, rgba(124, 108, 245, 0.5) 0 2px, transparent 2.2px),
    radial-gradient(circle at 52% 50%, rgba(124, 108, 245, 0.45) 0 2px, transparent 2.2px),
    radial-gradient(circle at 76% 42%, rgba(124, 108, 245, 0.5) 0 2px, transparent 2.2px);
  background-size: 9px 9px, auto, auto, auto;
  mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
}

.identity-form-wrap {
  width: min(100%, 420px);
}

.identity-language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.identity-language-select-wrap {
  position: relative;
  min-width: 92px;
}

.identity-language-select {
  width: 100%;
  min-height: 36px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #5a3ee8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 10px 18px rgba(90, 62, 232, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.identity-language-select:hover {
  border-color: rgba(124, 108, 245, 0.55);
}

.identity-language-select:focus {
  outline: none;
  border-color: rgba(124, 108, 245, 0.75);
  box-shadow: 0 0 0 0.2rem rgba(124, 108, 245, 0.14), 0 10px 18px rgba(90, 62, 232, 0.14);
}

.identity-language-select-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  color: #5a3ee8;
  transform: translateY(-50%);
  pointer-events: none;
}

.identity-language-select-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.identity-form-header {
  margin-bottom: 20px;
}

.identity-form-header h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 2.1vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.identity-form-header p {
  margin: 0;
  font-size: 0.96rem;
  color: #64748b;
}

.identity-form {
  display: grid;
  gap: 16px;
}

.identity-validation {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  background: rgba(254, 242, 242, 0.95);
  color: #b91c1c;
  font-size: 0.95rem;
}

.validation-summary-valid {
  display: none;
}

.identity-field {
  display: grid;
  gap: 10px;
}

.identity-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
}

.identity-input-wrap {
  position: relative;
}

.identity-input-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 22px;
  height: 22px;
  color: #64748b;
  transform: translateY(-50%);
  pointer-events: none;
}

[dir="rtl"] .identity-input-icon {
  left: auto;
  right: 18px;
}

[dir="rtl"] .identity-language-select {
  padding: 0 14px 0 38px;
}

[dir="rtl"] .identity-language-select-icon {
  right: auto;
  left: 12px;
}

.identity-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 50px;
  border: 1px solid #d8dee9;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

[dir="rtl"] .identity-input {
  padding: 12px 50px 12px 16px;
  text-align: right;
}

.identity-input::placeholder {
  color: #94a3b8;
}

.identity-input:focus {
  outline: none;
  border-color: #7c6cf5;
  box-shadow: 0 0 0 0.25rem rgba(124, 108, 245, 0.16);
  background: #ffffff;
}

.identity-field-validation {
  color: #dc2626;
  font-size: 0.92rem;
}

.identity-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
}

.identity-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #334155;
  cursor: pointer;
}

.identity-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #6b52ee;
}

.identity-submit {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #6e54f6, #5a3ee8);
  box-shadow: 0 18px 30px rgba(90, 62, 232, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.identity-submit:hover {
  filter: brightness(1.03);
  box-shadow: 0 20px 34px rgba(90, 62, 232, 0.3);
}

.identity-submit:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(124, 108, 245, 0.16), 0 20px 34px rgba(90, 62, 232, 0.3);
}

.identity-submit:active {
  transform: translateY(1px);
}

.identity-link {
  color: #5a3ee8;
  text-decoration: none;
  font-weight: 500;
}

.identity-link:hover {
  color: #4d35cf;
  text-decoration: underline;
}

.identity-help {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: #64748b;
}

@media (max-width: 1199.98px) {
  .identity-login-card {
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }

  .identity-login-panel--brand {
    padding-bottom: 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  }

  .identity-brand {
    margin-bottom: 28px;
  }

  .identity-worldmap {
    height: 72px;
  }
}

@media (max-width: 767.98px) {
  body.login-page {
    overflow: auto;
  }

  .identity-login-shell {
    padding: 16px;
  }

  .identity-login-card {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
    max-height: none;
  }

  .identity-login-panel--brand,
  .identity-login-panel--form {
    padding: 28px 22px;
  }

  .identity-brand {
    gap: 14px;
  }

  .identity-brand__name {
    font-size: 1.45rem;
    letter-spacing: 0.18rem;
  }

  .identity-brand__sub {
    font-size: 0.82rem;
    letter-spacing: 0.18rem;
  }

  .identity-feature {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .identity-feature__icon {
    width: 48px;
    height: 48px;
    padding: 12px;
  }

  .identity-feature h2 {
    font-size: 1.05rem;
  }

  .identity-feature p,
  .identity-brand-copy p,
  .identity-form-header p,
  .identity-help,
  .identity-label,
  .identity-remember {
    font-size: 0.96rem;
  }

  .identity-form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .identity-language-switcher {
    justify-content: flex-end;
  }
}
