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

:root {
  --bg:          #0d0d0d;
  --surface:     #111111;
  --surface2:    #161616;
  --border:      #1f1f1f;
  --border2:     #2a2a2a;
  --text:        #d4d4d4;
  --muted:       #666666;
  --white:       #f0f0f0;
  --purple:      #7c3aed;
  --purple-l:    #9d5ff5;
  --purple-dim:  rgba(124,58,237,0.12);
  --green:       #22c55e;
  --red:         #ef4444;
  --radius:      8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 999;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  animation: cardIn 0.4s ease-out;
}

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

.auth-logo {
  display: block;
  margin: 0 auto 28px;
  height: 28px;
  cursor: pointer;
}

.auth-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  margin-bottom: 4px;
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 28px;
}

.alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.alert.show { display: flex; }
.alert.success { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.2);  color: var(--green); }
.alert.error   { background: rgba(239,68,68,0.08);   border: 1px solid rgba(239,68,68,0.2);   color: var(--red); }
.alert.info    { background: rgba(124,58,237,0.08);  border: 1px solid rgba(124,58,237,0.2);  color: var(--purple-l); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}

.form-input::placeholder { color: var(--muted); }

.forgot {
  text-align: right;
  font-size: 12.5px;
  margin-top: -8px;
  margin-bottom: 14px;
}

.forgot a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.forgot a:hover { color: var(--white); }

.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover:not(:disabled) { background: var(--purple-l); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-footer a { color: var(--purple-l); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .form-row  { grid-template-columns: 1fr; }
}
