@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink-900: #0f0f10;
  --ink-700: #1f2327;
  --ink-500: #5c6168;
  --sand-50: #f7f3ec;
  --sand-100: #ebe2d4;
  --gold-500: #f3ba3a;
  --gold-600: #d6971c;
  --panel: #ffffff;
  --border: #e5ded1;
  --hero-grad-top: #1a140c;
  --hero-grad-bottom: #050403;
  --radius-lg: 32px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 35px 70px rgba(15, 15, 16, 0.22);
  --shadow-panel: 0 45px 90px rgba(15, 15, 16, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: var(--sand-50);
  color: var(--ink-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  min-height: 100vh;
  background: radial-gradient(circle at 15% 20%, rgba(243, 186, 58, 0.25), transparent 40%),
    radial-gradient(circle at 70% 0%, rgba(12, 8, 4, 0.5), transparent 45%),
    var(--sand-50);
}

.auth-hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px);
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(243, 186, 58, 0.2), transparent 45%),
    linear-gradient(140deg, var(--hero-grad-top), var(--hero-grad-bottom) 70%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.back-link {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  left: clamp(24px, 4vw, 48px);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
}

.back-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
}

.back-link span {
  line-height: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: clamp(48px, 8vw, 96px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.brand-mark img {
  display: block;
  height: 100px;
  width: auto;
  object-fit: contain;
}

.hero-label {
  margin: 0;
  letter-spacing: 0.5em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1.1;
}

.hero-description {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
}

.advantages-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 28px;
  background: rgba(8, 6, 4, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.25);
}

.card-label {
  margin: 0 0 16px;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.advantages-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advantages-card li {
  display: flex;
  gap: 14px;
}

.advantages-card span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(243, 186, 58, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gold-500);
}

.advantages-card span svg circle {
  display: none;
}

.advantages-card strong {
  display: block;
  font-size: 1.05rem;
}

.advantages-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.hero-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.hero-foot p {
  margin: 0;
}

.hero-foot a {
  color: #fff;
  font-weight: 600;
}

.auth-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(247, 243, 236, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 6vw, 80px);
}

.panel-card {
  width: min(440px, 100%);
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 48px);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border);
}

.panel-label {
  margin: 0;
  letter-spacing: 0.35em;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--ink-500);
}

#panel-title {
  margin: 12px 0 8px;
  font-size: 2rem;
}

.panel-description {
  margin: 0 0 28px;
  color: var(--ink-500);
}

.form-banner {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.form-banner.show {
  display: block;
}

.form-banner.error {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
}

.form-banner.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-banner.info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
}

.field-error {
  display: none;
  font-size: 0.82rem;
  color: #c62828;
  font-weight: 500;
  margin-top: -2px;
}

.field-error.show {
  display: block;
}

.input-shell.input-error {
  border-color: #c62828;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: var(--ink-700);
}

.input-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.input-shell input {
  width: 100%;
  border: none;
  font: inherit;
  color: var(--ink-900);
}

.input-shell input:focus {
  outline: none;
}

.input-shell input:focus::placeholder {
  color: transparent;
}

.password-shell {
  padding-right: 12px;
}

.password-toggle {
  border: none;
  background: none;
  color: var(--ink-500);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: color 0.2s ease;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
}

.password-toggle::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 18px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.password-toggle.is-revealed::after {
  opacity: 0;
}

.password-toggle:hover,
.password-toggle.is-revealed {
  color: var(--gold-600);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(243, 186, 58, 0.45);
  outline-offset: 2px;
}

.password-hints {
  list-style: none;
  margin: -4px 0 4px;
  padding: 0;
  color: var(--ink-500);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.password-hints li {
  display: flex;
  align-items: flex-start;
}

.password-hints li::before {
  content: '•';
  color: var(--gold-600);
  margin-right: 6px;
}

.cta-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1b1308;
  background: linear-gradient(120deg, var(--gold-500), var(--gold-600));
  box-shadow: 0 25px 45px rgba(243, 186, 58, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-btn:focus-visible {
  outline: 3px solid rgba(243, 186, 58, 0.45);
  outline-offset: 3px;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 55px rgba(243, 186, 58, 0.45);
  filter: brightness(1.05);
}

.cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.form-meta {
  text-align: right;
}

.link-inline {
  color: var(--gold-600);
  font-weight: 600;
  text-decoration: none;
  background: rgba(243, 186, 58, 0.15);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1.1rem;
  transition: background 0.2s ease;
}

.link-inline:hover {
  background: rgba(243, 186, 58, 0.28);
}

.register-hint {
  margin: 0;
  text-align: center;
  color: var(--ink-500);
}

.register-hint a {
  color: var(--ink-700);
  font-weight: 600;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    order: -1;
  }

  .auth-hero {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

@media (max-width: 600px) {
  .auth-hero {
    padding: 32px 20px 48px;
  }

  .panel-card {
    padding: 28px 24px;
  }
}



