:root {
  --background: #07110d;
  --surface: #0d1b15;
  --surface-light: #13251d;
  --border: #274538;
  --text-primary: #f4f8f5;
  --text-secondary: #a8bbb0;
  --accent: #36d782;
  --accent-dark: #123c28;
  --error: #ff7b7b;
  --warning: #f6c760;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.auth-brand-panel,
.auth-form-panel {
  padding: clamp(32px, 6vw, 80px);
}

.auth-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(
      circle at top left,
      rgba(54, 215, 130, 0.15),
      transparent 38%
    ),
    var(--background);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text-primary);
  font-weight: 750;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent-dark);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

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

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-content h1 {
  margin: 20px 0 24px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.brand-content p {
  max-width: 600px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.7;
}

.security-message {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.security-message p {
  margin: 0;
}

.security-indicator {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(54, 215, 130, 0.12);
}

.auth-form-panel {
  display: grid;
  place-items: center;
  background: var(--surface);
}

.auth-card {
  width: min(100%, 470px);
}

.auth-card-header {
  margin-bottom: 36px;
}

.environment-badge {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 11px;
  border: 1px solid rgba(246, 199, 96, 0.35);
  border-radius: 999px;
  background: rgba(246, 199, 96, 0.08);
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.auth-card-header p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.form-group label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-group input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--background);
  color: var(--text-primary);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

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

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(54, 215, 130, 0.12);
}

#login-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

#login-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #04120b;
}

#login-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
}

.auth-message {
  min-height: 24px;
  margin-top: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-message.success {
  color: var(--accent);
}

.auth-message.error {
  color: var(--error);
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

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

  .auth-brand-panel {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .auth-form-panel {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .auth-brand-panel,
  .auth-form-panel {
    padding: 28px 20px;
  }

  .auth-brand-panel {
    min-height: 480px;
  }

  .brand-content h1 {
    font-size: 2.7rem;
  }
}
