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

:root {
  --bg:      #0f1117;
  --card:    #171923;
  --accent:  #7c6af7;
  --accent-d:#5b4de0;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --border:  rgba(255,255,255,0.08);
  --red:     #ef4444;
  --green:   #22c55e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-wrap { width: 100%; max-width: 400px; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 38px 34px;
}

.auth-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 20px;
  box-shadow: 0 6px 24px rgba(124,106,247,0.3);
}

h1 { font-size: 21px; font-weight: 700; color: #fff; text-align: center; margin-bottom: 5px; }
.sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 26px; }

.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.alert-error   { background:rgba(239,68,68,.1);  border:1px solid rgba(239,68,68,.25); color:#fca5a5; }
.alert-success { background:rgba(34,197,94,.1);  border:1px solid rgba(34,197,94,.25); color:#86efac; }

.field { margin-bottom: 16px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e5e7eb);
}

label {
  display: flex;
  justify-content: space-between;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
label a { color: var(--accent); font-size: 13px; text-decoration: none; }
label a:hover { text-decoration: underline; }

.input-wrap { position: relative; }

input[type=email],
input[type=password],
input[type=text] {
  width: 100%;
  padding: 11px 14px;
  background: #0d111c;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.input-wrap input { padding-right: 42px; }
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

.eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center;
  padding: 2px; opacity: .55;
  transition: opacity .2s;
}
.eye:hover { opacity: 1; }

.pwd-meter { height: 3px; border-radius: 2px; margin-top: 6px; background: var(--border); overflow: hidden; }
.pwd-meter-bar { height: 100%; border-radius: 2px; width: 0; transition: width .3s, background .3s; }

.btn {
  width: 100%; padding: 13px;
  background: var(--accent);
  border: none; border-radius: 10px;
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 6px;
  transition: background .2s, transform .1s;
}
.btn:hover  { background: var(--accent-d); }
.btn:active { transform: scale(.98); }

.footer-link { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.footer-link a { color: var(--accent); text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }

@media(max-width:440px) { .auth-card { padding: 28px 20px; } }
