/* RESIP Portal auth — https://resip.net/portal/sign-in */
:root {
  --rp-bg: #09090b;
  --rp-card: rgba(255, 255, 255, 0.02);
  --rp-border: rgba(255, 255, 255, 0.06);
  --rp-border-2: rgba(255, 255, 255, 0.08);
  --rp-text: rgba(255, 255, 255, 0.9);
  --rp-muted: rgba(255, 255, 255, 0.35);
  --rp-faint: rgba(255, 255, 255, 0.25);
  --rp-input: rgba(255, 255, 255, 0.03);
  --rp-radius: 16px;
  --rp-font: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body.rp-auth {
  margin: 0;
  min-height: 100vh;
  background: var(--rp-bg);
  color: var(--rp-text);
  font-family: var(--rp-font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.rp-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.rp-glow {
  position: absolute;
  inset: -10% 0 auto;
  height: 420px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.16), transparent 55%),
    radial-gradient(ellipse at 20% 30%, rgba(45, 212, 191, 0.08), transparent 40%);
  pointer-events: none;
}

.rp-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.rp-top a.back {
  font-size: 13px;
  color: var(--rp-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rp-top a.back:hover { color: rgba(255,255,255,.7); }
.rp-badge {
  font-size: 11px;
  color: var(--rp-faint);
  border: 1px solid var(--rp-border);
  border-radius: 999px;
  padding: 4px 10px;
}

.rp-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 20px 48px;
}

.rp-wrap {
  width: 100%;
  max-width: 420px;
}

.rp-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.rp-brand img {
  height: 24px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.85;
}

.rp-tabs {
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--rp-border);
  background: var(--rp-card);
  margin-bottom: 16px;
}
.rp-tabs a,
.rp-tabs button {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.35);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .15s ease;
}
.rp-tabs a:hover,
.rp-tabs button:hover { color: rgba(255,255,255,.55); }
.rp-tabs .is-on {
  background: #fff;
  color: #09090b;
  box-shadow: 0 4px 16px rgba(255,255,255,.1);
}

.rp-card {
  border-radius: 16px;
  border: 1px solid var(--rp-border);
  background: var(--rp-card);
  padding: 28px 24px;
}

.rp-title {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.rp-sub {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--rp-muted);
}

.rp-form { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }

.rp-field label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-muted);
}
.rp-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rp-field-head label { margin: 0; }
.rp-field-head a {
  font-size: 11px;
  color: var(--rp-faint);
}
.rp-field-head a:hover { color: rgba(255,255,255,.5); }

.rp-input {
  position: relative;
}
.rp-input svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,.25);
  pointer-events: none;
}
.rp-input input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--rp-border-2);
  background: var(--rp-input);
  color: rgba(255,255,255,.8);
  padding: 0 14px 0 40px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: .15s ease;
}
.rp-input input::placeholder { color: rgba(255,255,255,.2); }
.rp-input input:focus {
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
}
.rp-input.is-plain input { padding-left: 14px; }

.rp-captcha {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: center;
}
.rp-captcha img {
  height: 44px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--rp-border-2);
  object-fit: cover;
  cursor: pointer;
  background: rgba(255,255,255,.03);
}

.rp-submit {
  margin-top: 8px;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #09090b;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: .15s ease;
}
.rp-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,.12);
}
.rp-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.rp-foot {
  margin-top: 28px;
  text-align: center;
  color: var(--rp-faint);
  font-size: 12px;
}

.rp-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.rp-code-row button {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--rp-border-2);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.rp-code-row button:hover { background: rgba(255,255,255,.07); }

@media (min-width: 640px) {
  .rp-main { padding-top: 48px; }
  .rp-card { padding: 32px 28px; }
  .rp-title { font-size: 22px; }
}
