:root {
  --auth-primary: #2563eb;
  --auth-primary-hover: #1d4ed8;
  --auth-bg: #f8fafc;
  --auth-card: #ffffff;
  --auth-border: #e5e7eb;
  --auth-text: #0f172a;
  --auth-secondary: #64748b;
  --auth-success: #10b981;
  --auth-error: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, .14), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(16, 185, 129, .13), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 100%);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-container {
  width: min(1180px, calc(100vw - 40px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}

.auth-brand-panel {
  position: relative;
  padding: 28px 8px;
}

.auth-brand-mark,
.auth-card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary), #14b8a6);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .24);
}

.auth-brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  margin-bottom: 28px;
}

.auth-card-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.auth-brand-mark svg,
.auth-card-mark svg {
  width: 28px;
  height: 28px;
}

.auth-brand-title {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand-subtitle {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: #1e293b;
}

.auth-brand-copy {
  max-width: 610px;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--auth-secondary);
}

.auth-features {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
}

.auth-feature-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  padding: 38px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .13);
  backdrop-filter: blur(14px);
}

.auth-card-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-card-subtitle {
  margin: 0 0 28px;
  color: var(--auth-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

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

.auth-password-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  color: var(--auth-text);
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-password-field .auth-password-input {
  width: 100%;
  padding-left: 44px;
  padding-right: 92px;
  box-sizing: border-box;
}

.auth-password-field .auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 2;
  pointer-events: none;
}

.auth-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}

.input-validation-error {
  border-color: var(--auth-error);
}

.field-validation-error {
  display: block;
  margin-top: 7px;
  color: var(--auth-error);
  font-size: 13px;
  font-weight: 650;
}

.auth-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #2563EB;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
}

.auth-password-toggle:hover {
  color: #1D4ED8;
  text-decoration: none;
}

.auth-password-toggle:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  border-radius: 6px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 22px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #475569;
  font-size: 14px;
  font-weight: 650;
}

.auth-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--auth-primary);
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(37, 99, 235, .25);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.auth-submit:hover,
.auth-submit:focus {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(37, 99, 235, .3);
  outline: none;
}

.auth-alert.validation-summary-valid {
  display: none;
}

.auth-alert.validation-summary-errors {
  display: block;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 650;
}

.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-secondary-links {
  margin-top: 22px;
  text-align: center;
  color: var(--auth-secondary);
  font-size: 13px;
}

.auth-secondary-links a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 700;
}

.auth-secondary-links a:hover,
.auth-secondary-links a:focus {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 0;
  }

  .auth-brand-panel {
    padding: 10px 0 0;
  }

  .auth-brand-title {
    font-size: 36px;
  }

  .auth-brand-subtitle {
    font-size: 18px;
  }

  .auth-card {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .auth-container {
    width: min(100vw - 28px, 460px);
    padding: 24px 0;
  }

  .auth-brand-copy,
  .auth-features {
    display: none;
  }

  .auth-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .auth-brand-title {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .auth-brand-subtitle {
    font-size: 16px;
    margin-bottom: 0;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .auth-card-title {
    font-size: 26px;
  }
}
