/* ============ AUTH PAGE - Polished B/W theme ============ */
:root {
  --bg:        #fafafa;
  --surface:   #ffffff;
  --text:      #0a0a0a;
  --text-soft: #4b4b4b;
  --text-mute: #9a9a9a;
  --border:    #0a0a0a;
  --border-soft: #ececec;
  --border-mid:   #d9d9d9;
  --hover:     #f3f3f3;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
  --bg:        #0a0a0a;
  --surface:   #141414;
  --text:      #f5f5f5;
  --text-soft: #b8b8b8;
  --text-mute: #707070;
  --border:    #f5f5f5;
  --border-soft: #2a2a2a;
  --border-mid:   #3d3d3d;
  --hover:     #1c1c1c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4);
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: stretch;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* ---------- Hero (left) ---------- */
.auth-hero {
  position: relative;
  padding: 64px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
}

.auth-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}

.auth-hero h1 {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-soft);
  margin: 0 0 36px;
  line-height: 1.5;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-features li {
  padding: 14px 0;
  color: var(--text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.hero-features li:last-child { border-bottom: none; }
.hero-features li span {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.hero-glow { display: none; }

.hero-foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-foot a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-soft); }
.hero-foot a:hover { border-color: var(--text); }

/* ---------- Panel (right) ---------- */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: var(--bg);
  position: relative;
}
.theme-toggle-auth {
  position: absolute;
  top: 24px;
  right: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 30px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-tab:hover { color: var(--text); background: var(--hover); }
.auth-tab.active {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: none;
  animation: fadeIn 0.3s ease;
}
.auth-form.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form h2 {
  font-size: 26px;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-sub {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 26px;
}

.field {
  display: block;
  margin-bottom: 18px;
}
.field > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
[data-theme="dark"] .field input:focus {
  box-shadow: 0 0 0 3px rgba(245,245,245,0.08);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: var(--text);
  border-style: dashed;
}
.field-hint, .match-hint {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}
.match-hint.match-ok  { color: var(--text); font-weight: 700; }
.match-hint.match-bad { color: var(--text); font-weight: 700; opacity: 0.5; }

.pwd-wrap {
  position: relative;
}
.pwd-wrap input { padding-right: 44px; }
.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  color: var(--text-soft);
  border-radius: 6px;
  transition: color 0.15s;
}
.pwd-toggle:hover { color: var(--text); background: var(--hover); }

.pwd-strength {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}
.pwd-strength .bar {
  flex: 1;
  height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  transition: background 0.18s;
}
.pwd-strength .lvl {
  font-size: 11px;
  color: var(--text-mute);
  margin-left: 6px;
  min-width: 64px;
  font-weight: 700;
}
.pwd-strength.s1 .bar:nth-child(1) { background: var(--text); }
.pwd-strength.s2 .bar:nth-child(-n+2) { background: var(--text); }
.pwd-strength.s3 .bar:nth-child(-n+3) { background: var(--text); }
.pwd-strength.s4 .bar              { background: var(--text); }

.auth-submit {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}
.auth-submit:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text);
  box-shadow: var(--shadow-md);
}

.auth-foot {
  margin: 26px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}
.auth-foot a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--text);
}
.auth-foot a:hover { opacity: 0.6; }

/* ---------- Toast ---------- */
.auth-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
  max-width: 360px;
}
.auth-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.auth-toast.success { border-left: 4px solid var(--bg); }
.auth-toast.error   { border-left: 4px solid var(--bg); border-style: solid; }
.auth-toast.info    { border-left: 4px solid var(--bg); border-style: solid; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { padding: 36px 20px; }
}