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

:root {
  --bg:      #0f1117;
  --surface: #1a1d27;
  --border:  #2a2d3e;
  --primary: #6c63ff;
  --text:    #e0e0e0;
  --muted:   #888;
  --error:   #ef4444;
}

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

.login-wrap {
  width: 100%;
  max-width: 380px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px 36px;
}

.login-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

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

.err-box {
  background: #ef444418;
  border: 1px solid #ef444444;
  color: var(--error);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.45;
}

.err-box.hidden { display: none; }

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s;
  outline: none;
}

.field input:focus {
  border-color: var(--primary);
}

.btn-login {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, opacity .15s;
}

.btn-login:hover:not(:disabled) { background: #5a52e0; }
.btn-login:disabled { opacity: .55; cursor: default; }
