:root {
  --navy-950: #07162c;
  --navy-900: #0b2344;
  --navy-800: #10345e;
  --blue-600: #1766d6;
  --blue-500: #2684ef;
  --cyan-400: #22b4e6;
  --text-main: #101b30;
  --text-muted: #66748b;
  --border: #d9e2f0;
  --surface: #ffffff;
  --surface-soft: #f6f9fd;
  --danger-bg: #fff1f2;
  --danger-text: #b42335;
  --danger-border: #ffd0d5;
  --focus: rgba(38, 132, 239, 0.17);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: #edf3fb;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.04fr) minmax(400px, 0.96fr);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(48px, 7vw, 84px);
  color: #fff;
  background:
    radial-gradient(circle at 78% 16%, rgba(34, 180, 230, 0.24), transparent 29%),
    radial-gradient(circle at 5% 85%, rgba(38, 132, 239, 0.24), transparent 35%),
    linear-gradient(145deg, var(--navy-950), var(--navy-800));
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.brand-panel::before {
  width: 520px;
  height: 520px;
  top: -210px;
  right: -200px;
}

.brand-panel::after {
  width: 390px;
  height: 390px;
  left: -190px;
  bottom: -140px;
}

.brand-content {
  max-width: 540px;
}

.eyebrow {
  margin: 0 0 17px;
  color: #8bdbfa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-content h1 {
  max-width: 520px;
  margin: 0 0 18px;
  font-size: clamp(39px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.brand-copy {
  max-width: 460px;
  margin: 0;
  color: rgba(226, 237, 251, 0.8);
  font-size: 16px;
  line-height: 1.75;
}

.brand-highlights {
  display: flex;
  gap: 12px;
}

.highlight {
  min-width: 112px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(8px);
}

.highlight strong,
.highlight span {
  display: block;
}

.highlight strong {
  color: #fff;
  font-size: 14px;
  margin-bottom: 5px;
}

.highlight span {
  color: rgba(210, 229, 250, 0.72);
  font-size: 12px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    radial-gradient(circle at 92% 6%, rgba(38, 132, 239, 0.09), transparent 30%),
    var(--surface-soft);
}

.login-card {
  width: min(100%, 430px);
  padding: 45px 44px 36px;
  border: 1px solid rgba(217, 226, 240, 0.75);
  border-radius: 28px;
  background: var(--surface);
  box-shadow:
    0 32px 64px rgba(13, 39, 76, 0.08),
    0 4px 14px rgba(13, 39, 76, 0.04);
}

.login-header {
  margin-bottom: 34px;
}

.login-header h2 {
  margin: 0 0 10px;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.login-header > p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.login-error {
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  color: var(--danger-text);
  background: var(--danger-bg);
  font-size: 13px;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 21px;
}

.form-group label {
  display: block;
  margin-bottom: 9px;
  color: #33425b;
  font-size: 13px;
  font-weight: 600;
}

.password-label {
  display: block;
}

.password-label label {
  margin-bottom: 9px;
}

.password-input-wrap {
  position: relative;
}

.form-group .password-input-wrap input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #61708a;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.toggle-password:hover,
.toggle-password:focus-visible,
.toggle-password.is-visible {
  color: var(--blue-600);
  background: rgba(37, 99, 235, 0.1);
}

.toggle-password:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.password-eye-icon {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c5 0 8.5 4.4 9.7 7c-1.2 2.6-4.7 7-9.7 7s-8.5-4.4-9.7-7C3.5 9.4 7 5 12 5m0 2c-3.4 0-6.1 2.7-7.4 5c1.3 2.3 4 5 7.4 5s6.1-2.7 7.4-5C18.1 9.7 15.4 7 12 7m0 2a3 3 0 1 1 0 6a3 3 0 0 1 0-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c5 0 8.5 4.4 9.7 7c-1.2 2.6-4.7 7-9.7 7s-8.5-4.4-9.7-7C3.5 9.4 7 5 12 5m0 2c-3.4 0-6.1 2.7-7.4 5c1.3 2.3 4 5 7.4 5s6.1-2.7 7.4-5C18.1 9.7 15.4 7 12 7m0 2a3 3 0 1 1 0 6a3 3 0 0 1 0-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.form-group input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text-main);
  background: #fff;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-group input::placeholder {
  color: #97a5ba;
}

.form-group input:hover {
  border-color: #bbc9dc;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px var(--focus);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 53px;
  margin-top: 10px;
  border: none;
  border-radius: 13px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  box-shadow: 0 13px 24px rgba(23, 102, 214, 0.22);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 27px rgba(23, 102, 214, 0.3);
}

.btn.primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.btn.full {
  width: 100%;
}

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

.btn.loading .spinner {
  display: block;
}

.login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 38px;
  color: var(--text-muted);
  font-size: 12px;
}

.login-footer small {
  color: #9aa8bc;
  font-size: 11px;
  letter-spacing: 0.12em;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 940px) {
  .auth-shell {
    display: block;
    min-height: 100vh;
  }

  .brand-panel {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 26px 18px;
  }

  .login-card {
    padding: 30px 25px 28px;
    border-radius: 24px;
  }

}

@media (max-width: 430px) {
  .auth-panel {
    padding: 14px;
  }

  .login-card {
    padding: 27px 21px 25px;
  }

  .login-header h2 {
    font-size: 28px;
  }
}
