:root {
  --bg:            #0A0A0B;
  --surface:       #111113;
  --surface-2:     #16161A;
  --border:        #1E1E22;
  --border-light:  #2A2A30;
  --text:          #F4F4F5;
  --text-2:        #A1A1AA;
  --text-3:        #71717A;
  --indigo:        #6366F1;
  --indigo-light:  #818CF8;
  --indigo-soft:   rgba(99,102,241,0.1);
  --indigo-border: rgba(99,102,241,0.2);
  --red-soft:      rgba(239,68,68,0.1);
  --red-border:    rgba(239,68,68,0.3);
  --red-text:      #FCA5A5;
  --green-soft:    rgba(34,197,94,0.1);
  --green-border:  rgba(34,197,94,0.3);
  --green-text:    #86EFAC;
  --font:          'Inter', -apple-system, sans-serif;
  --ease:          cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  min-height:  100vh;
  display:     flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.auth-card-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.auth-card-sub {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 28px;
}

.auth-message {
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  display: none;
  line-height: 1.5;
}

.auth-message.error {
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: var(--red-text);
  display: block;
}

.auth-message.success {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green-text);
  display: block;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label a {
  font-size: 12px;
  font-weight: 500;
  color: var(--indigo-light);
  text-decoration: none;
}

.form-label a:hover {
  text-decoration: underline;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s var(--ease);
  width: 100%;
}

input:focus {
  border-color: var(--indigo);
}

input::placeholder {
  color: var(--text-3);
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  transition: all 0.2s var(--ease);
  margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--indigo-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.btn-oauth {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-2);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: all 0.2s var(--ease);
}

.btn-oauth:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--surface);
}

.oauth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-3);
}

.auth-switch a {
  color: var(--indigo-light);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-terms {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.6;
}

.auth-terms a {
  color: var(--text-3);
  text-decoration: underline;
}