:root {
  --bg: #0f1117; --card: #1a1d27; --border: #2a2d3a;
  --text: #e1e4ea; --muted: #8b8fa3; --accent: #4f8cff;
  --accent-hover: #6ba0ff; --green: #4caf88; --red: #f04a6e;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; padding: 24px 0;
}
.auth-wrapper { width: 380px; max-width: 92vw; display: flex; flex-direction: column; align-items: center; }
.auth-container { width: 100%; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { font-size: 1.4rem; font-weight: 700; }
.auth-header p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 0; }
.auth-tab {
  flex: 1; padding: 10px; text-align: center; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); border-bottom: none;
  background: transparent; color: var(--muted); transition: all 0.2s;
  border-radius: var(--radius) var(--radius) 0 0;
}
.auth-tab.active { background: var(--card); color: var(--accent); border-color: var(--border); }
.auth-tab:hover:not(.active) { color: var(--text); }

.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius); padding: 24px;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px; color: var(--text); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.field input:focus { border-color: var(--accent); }
.field .hint { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

.btn-submit {
  width: 100%; padding: 11px; border-radius: 7px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; background: var(--accent); color: #fff;
  transition: background 0.2s; margin-top: 4px;
}
.btn-submit:hover { background: var(--accent-hover); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 20px; font-size: 0.85rem; z-index: 1000;
  animation: slideUp 0.3s ease;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.panel { display: none; }
.panel.active { display: block; }

.back-link { display: block; text-align: center; margin-top: 16px; color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.back-link:hover { color: var(--accent); }
