@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --border:   #334155;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --blue:     #2563eb;
  --blue-h:   #1d4ed8;
  --red:      #ef4444;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
}

/* ── Back link ── */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 28px;
  transition: color 0.15s;
}
.auth-back:hover {
  color: var(--text);
}

/* ── Logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 28px;
}
.auth-logo svg {
  color: var(--blue);
}

/* ── Title & subtitle ── */
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Form fields ── */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.925rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  color: #475569;
}

.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ── Primary button ── */
.auth-btn {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, opacity 0.15s;
  letter-spacing: -0.2px;
}

.auth-btn:hover {
  background: var(--blue-h);
}

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

/* ── Links ── */
.auth-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.auth-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--text);
}

.auth-link.primary {
  color: var(--blue);
  font-weight: 600;
}

.auth-link.primary:hover {
  color: #93c5fd;
}

/* ── Error box ── */
.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 0.875rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ── Success box ── */
.auth-success {
  display: none;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #86efac;
  font-size: 0.875rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

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

/* ── Footer link row ── */
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

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