:root {
  --bg:        #f5f5f7;
  --line:      #e5e5ea;
  --line-strong:#d2d2d7;
  --text:      #1d1d1f;
  --text-2:    #515154;
  --muted:     #86868b;
  --accent:    #1d1d1f;
  --accent-2:  #000000;
  --accent-3:  #424245;
  --accent-soft:#f0f0f2;
  --ring:      rgba(0,0,0,.16);
  --red:       #c2342b;
  --red-soft:  #fbe6e4;
  --green:     #1d8a4e;
  --green-soft:#e3f5ea;
  --radius:    14px;
  --shadow:    0 24px 60px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 32px 28px;
}
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}
.auth-brand-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px; color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin: 12px 0 4px;
  letter-spacing: -.01em;
}
.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 22px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label {
  font-size: 12.5px; color: var(--text-2); font-weight: 500;
  display: flex; flex-direction: column; gap: 4px;
}
.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.auth-form input:focus {
  border-color: var(--muted);
  box-shadow: 0 0 0 4px var(--ring);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 980px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: background .18s ease, transform .08s ease, opacity .12s;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 980px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .18s ease, background .18s ease;
}
.btn-secondary:hover { border-color: var(--muted); background: var(--surface-2, #fafafc); }

.auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 18px;
}
.auth-foot a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.error-box, .success-box {
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 9px;
  margin-top: 6px;
  display: none;
}
.error-box { background: var(--red-soft); color: var(--red); border: 1px solid #ecc4c0; }
.success-box { background: var(--green-soft); color: var(--green); border: 1px solid #bfe3cd; }
.error-box.show, .success-box.show { display: block; }

.muted { color: var(--muted); font-size: 13px; }

/* invite */
.invite-info {
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.invite-info b { color: var(--text); }
.role-pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 4px;
}
