
/* ── Card ── */
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  margin-top: 50px;
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  animation: cardIn .5s ease forwards;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.025em;
  margin-bottom: 4px;
  text-align: center;
}

.login-card .subtitle {
  font-size: 0.9rem;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 28px;
}

.social-row {
  display: grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.social-row form {
  display: contents;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: all .2s;
}

.social-btn:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Form ── */
.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--gray-800);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}


.form-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
  border-radius: 4px;
  cursor: pointer;
}

.forgot-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-500);
  text-decoration: none;
  transition: color .2s;
}

.forgot-link:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--blue-500);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login svg {
  width: 18px;
  height: 18px;
}

/* ── Invite code banner ── */
.invite-banner {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: background .2s;
}

.invite-banner:hover {
  background: var(--amber-100);
}

.invite-banner-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--amber-100);
  color: var(--amber-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.invite-banner-icon svg {
  width: 16px;
  height: 16px;
}

.invite-banner-text {
  flex: 1;
}

.invite-banner-text strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  margin-bottom: 1px;
}

.invite-banner-text span {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.invite-banner-arrow {
  color: var(--amber-500);
  margin-top: 4px;
  flex-shrink: 0;
  transition: transform .2s;
}

.invite-banner:hover .invite-banner-arrow {
  transform: translateX(3px);
}

.invite-banner-arrow svg {
  width: 16px;
  height: 16px;
}

/* ── Invite code modal ── */
.invite-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 35, 0.45);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.invite-overlay.open {
  display: flex;
}

.invite-modal {
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-xl);
  animation: modalIn .3s ease forwards;
  position: relative;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.invite-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gray-50);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all .2s;
}

.invite-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.invite-modal-close svg {
  width: 16px;
  height: 16px;
}

.invite-modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--amber-50);
  color: var(--amber-500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--amber-100);
}

.invite-modal-icon svg {
  width: 24px;
  height: 24px;
}

.invite-modal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.invite-modal p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 24px;
  line-height: 1.6;
}

.invite-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.invite-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--gray-900);
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.invite-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.invite-input::placeholder {
  color: var(--gray-300);
  letter-spacing: 0.15em;
  text-transform: none;
}

.btn-invite {
  flex-grow: 1;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--amber-500);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all .2s;
  white-space: nowrap;
}

.btn-invite:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.invite-success {
  display: none;
  text-align: center;
  padding: 12px 0 4px;
}

.invite-success.show {
  display: block;
}

.invite-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 2px solid var(--green-100);
}

.invite-success-icon svg {
  width: 22px;
  height: 22px;
}

.invite-success h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.invite-success p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ── Footer ── */
.login-footer {
  margin-top: 48px;
  margin-bottom: 48px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-footer p {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.login-footer a {
  font-weight: 600;
  color: var(--blue-500);
  text-decoration: none;
  transition: color .2s;
}

.login-footer a:hover {
  color: var(--blue-700);
  text-decoration: underline;
}


/* ── Responsive ── */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px 28px;
  }

  .social-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .social-btn {
    justify-content: center;
  }
}