:root {
  --bg-a: #eef6ff;
  --bg-b: #f7fbf5;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text-main: #0f1729;
  --text-muted: #5a6b8a;
  --line: #dfe6f2;
  --primary: #0f5fff;
  --primary-strong: #0a47c2;
  --accent: #14b8a6;
  --success: #027a48;
  --danger: #b42318;
  --shadow: 0 28px 70px rgba(15, 32, 68, 0.16);
  --shadow-sm: 0 4px 12px rgba(15, 32, 68, 0.08);
  --radius-xl: 28px;
  --radius-lg: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 14% 12%, rgba(15, 95, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(20, 184, 166, 0.2), transparent 30%),
    linear-gradient(140deg, var(--bg-a), var(--bg-b));
}

.page-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-panel {
  padding: 52px clamp(28px, 4vw, 56px);
  background:
    linear-gradient(168deg, rgba(15, 95, 255, 0.98), rgba(9, 53, 146, 0.96)),
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.07) 0,
      rgba(255, 255, 255, 0.07) 14px,
      transparent 14px,
      transparent 28px
    );
  color: #f9fbff;
  position: relative;
}

.logo-container {
  margin-bottom: 32px;
  animation: fadeSlideDown 0.6s ease-out;
}

.brand-logo {
  height: 102px;
  width: auto;
  max-width: 100%;
  display: block;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.brand-kicker {
  margin: 0;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.88;
  animation: fadeSlideDown 0.7s ease-out;
}

.brand-panel h1 {
  margin: 12px 0 16px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  animation: fadeSlideDown 0.8s ease-out;
}

.brand-copy {
  margin: 0;
  max-width: 36ch;
  color: rgba(248, 251, 255, 0.92);
  line-height: 1.65;
  font-size: 1.02rem;
  animation: fadeSlideDown 0.9s ease-out;
}

.trust-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  animation: fadeSlideDown 1s ease-out;
}

.trust-list li {
  position: relative;
  padding-left: 24px;
  color: rgba(248, 251, 255, 0.96);
  font-size: 0.97rem;
}

.trust-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.6);
  position: absolute;
  left: 0;
  top: 0.45em;
}

.form-panel {
  padding: 50px clamp(26px, 4vw, 52px);
  animation: fadeSlideUp 0.7s ease-out;
}

.form-logo-mark {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.form-logo {
  height: 60px;
  width: auto;
  max-width: 100%;
  display: block;
  opacity: 0.92;
}

.form-head h2 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  text-align: center;
}

.form-head p {
  margin: 8px 0 0;
  color: var(--text-muted);
  text-align: center;
}

.form-tabs {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  background: var(--surface-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.tab-btn {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 200ms ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 32, 68, 0.1);
}

.forms-container {
  position: relative;
  margin-top: 26px;
}

.auth-form {
  display: none;
  animation: fadeIn 0.3s ease-out;
  gap: 18px;
  grid-template-columns: 1fr;
}

.auth-form.active {
  display: grid;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 15px 16px;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 200ms ease;
  box-shadow: 0 1px 3px rgba(15, 32, 68, 0.04);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238692aa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}

input::placeholder {
  color: #8692aa;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 95, 255, 0.12), 0 4px 12px rgba(15, 95, 255, 0.08);
  transform: translateY(-1px);
}

select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  box-shadow: 0 0 0 4px rgba(15, 95, 255, 0.12), 0 4px 12px rgba(15, 95, 255, 0.08);
  transform: translateY(-1px);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 74px;
}

.toggle-password {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 150ms ease;
}

.toggle-password:hover {
  background: rgba(15, 95, 255, 0.08);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remember-me {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.remember-me input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.form-message {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.form-message.is-success {
  color: var(--success);
}

.form-message.is-error {
  color: var(--danger);
}

.submit-btn {
  border: 0;
  border-radius: 12px;
  padding: 16px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(160deg, var(--primary), var(--primary-strong));
  cursor: pointer;
  transition: all 180ms ease;
  box-shadow: 0 4px 14px rgba(14, 80, 219, 0.25);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(14, 80, 219, 0.28);
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(14, 80, 219, 0.24);
}



@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    padding-bottom: 38px;
  }
  
  .brand-logo {
    height: 96px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 12px;
  }

  .login-card {
    border-radius: 20px;
  }

  .form-panel,
  .brand-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .label-row {
    flex-wrap: wrap;
  }
  
  .brand-logo {
    height: 96px;
  }
  
  .form-logo {
    height: 50px;
  }
}
