/* ---------- Tokens ---------- */
:root {
  --auth-bg: #f7f9fc;
  --auth-card: #ffffff;
  --auth-border: #e6eaf0;
  --auth-input-border: #dde2ea;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-placeholder: #94a3b8;
  --auth-primary: #4a89f3;
  --auth-primary-hover: #3b7be6;
  --auth-danger: #c0392b;
  --auth-danger-bg: #fdecea;
}

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

body.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
}

/* ---------- Card ---------- */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
  text-align: center;
}

/* Logo */
.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf1ff;
  border-radius: 14px;
}

.auth-logo-inner {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(180deg, #5b9bf8, #3f84ec);
  border-radius: 8px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 6px 0 28px;
  color: var(--auth-muted);
}

/* ---------- Form ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

.auth-input {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-muted);
  font-size: 15px;
  pointer-events: none;
}

.auth-input input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 44px;
  font: inherit;
  color: var(--auth-text);
  background: #fff;
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

.auth-input input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.18);
}

/* Show / hide password */
.auth-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-muted);
  font-size: 15px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.auth-toggle:hover { color: var(--auth-text); background: #f1f4f9; }
.auth-toggle:focus-visible { outline: 2px solid var(--auth-primary); }

/* Submit */
.auth-submit {
  height: 48px;
  margin-top: 6px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--auth-primary);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-submit:hover { background: var(--auth-primary-hover); }
.auth-submit:focus-visible { outline: 3px solid rgba(74, 137, 243, 0.4); outline-offset: 2px; }

/* Error */
.auth-error {
  margin-bottom: 18px;
  padding: 11px 14px;
  font-size: 14px;
  text-align: left;
  color: var(--auth-danger);
  background: var(--auth-danger-bg);
  border: 1px solid #f5c6c0;
  border-radius: 10px;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  body.auth-body { padding: 16px; }
  .auth-card { padding: 32px 22px 28px; }
}
