/* Modest Path–inspired auth screens */

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans Arabic", "Segoe UI", sans-serif;
  color: #f5f8ff;
  background: #0f1724;
  overflow-x: hidden;
}

.auth-scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(160, 196, 255, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 55% at 85% 15%, rgba(255, 214, 165, 0.35), transparent 50%),
    radial-gradient(ellipse 60% 50% at 70% 80%, rgba(189, 178, 255, 0.3), transparent 55%),
    linear-gradient(145deg, #0b1220 0%, #162033 45%, #1a2740 100%);
}

.auth-bg::before,
.auth-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(1px);
}

.auth-bg::before {
  width: 420px;
  height: 420px;
  top: 8%;
  left: 6%;
  background: radial-gradient(circle, rgba(160, 196, 255, 0.5), transparent 70%);
}

.auth-bg::after {
  width: 360px;
  height: 360px;
  bottom: 10%;
  right: 8%;
  background: radial-gradient(circle, rgba(255, 214, 165, 0.45), transparent 70%);
}

.auth-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-hero-icon {
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}

.auth-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  color: #d4af37;
}

.cloud-transfer-icon {
  display: block;
}

.cloud-transfer-icon--hero {
  width: 88px;
  height: 88px;
  color: #f5f8ff;
}

.auth-brand-text {
  font-family: "Noto Serif Arabic", Georgia, serif;
  font-size: 1.15rem;
}

.auth-nav-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  opacity: 0.85;
}

.auth-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1rem 1.25rem 2.5rem;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(12, 18, 30, 0.72);
  border: 1px solid rgba(120, 200, 220, 0.25);
  border-radius: 18px;
  padding: 1.75rem 1.6rem 1.5rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.auth-hero-icon {
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}

.auth-hero-icon svg {
  width: 88px;
  height: 88px;
}

.auth-card h1 {
  text-align: center;
  font-family: "Noto Serif Arabic", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: rgba(245, 248, 255, 0.65);
  font-size: 0.88rem;
  margin: 0 0 1.25rem;
}

.auth-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.65rem 0 0.35rem;
  color: rgba(245, 248, 255, 0.9);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .input-icon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
}

.auth-input-wrap.has-password-toggle input {
  padding-left: 2.5rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  left: 0.55rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: rgba(245, 248, 255, 0.75);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}

.password-toggle-btn:hover {
  color: #5eead4;
}

.auth-email-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(245, 248, 255, 0.65);
}

.auth-oauth-block {
  margin-top: 1rem;
}

.auth-oauth-label {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(245, 248, 255, 0.6);
  margin: 0 0 0.65rem;
}

.auth-oauth-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.auth-oauth-btn {
  border: 1px solid rgba(64, 196, 196, 0.35);
  background: rgba(8, 14, 24, 0.85);
  color: #f5f8ff;
  border-radius: 10px;
  padding: 0.55rem 0.35rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-oauth-btn:hover {
  border-color: #2dd4bf;
  color: #5eead4;
}

.auth-oauth-btn.hidden {
  display: none;
}

.github-device-code-wrap {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"] {
  width: 100%;
  padding: 0.7rem 2.25rem 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(64, 196, 196, 0.35);
  background: rgba(8, 14, 24, 0.85);
  color: #f5f8ff;
  font: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.auth-form input::placeholder {
  color: rgba(245, 248, 255, 0.35);
}

.auth-btn {
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}

.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgba(245, 248, 255, 0.7);
}

.auth-footer a,
.auth-link {
  color: #5eead4;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover,
.auth-link:hover {
  text-decoration: underline;
}

.auth-forgot-row {
  margin: 0.35rem 0 0.75rem;
  text-align: left;
  font-size: 0.86rem;
}

.auth-error,
.auth-success,
.auth-action-banner {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.88rem;
  text-align: center;
}

.auth-error,
.auth-action-banner.auth-error {
  background: rgba(155, 44, 44, 0.2);
  border: 1px solid rgba(240, 120, 120, 0.35);
  color: #fecaca;
}

.auth-success,
.auth-action-banner.auth-success {
  background: rgba(15, 110, 86, 0.25);
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #ccfbf1;
}

.auth-action-banner {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.captcha-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.captcha-row input {
  flex: 1;
}

.captcha-refresh {
  border: 1px solid rgba(64, 196, 196, 0.35);
  background: rgba(8, 14, 24, 0.85);
  color: #5eead4;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(245, 248, 255, 0.75);
}

.terms-row input {
  margin-top: 0.2rem;
}

.admin-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #b9dfd2;
  border-radius: 12px;
  background: #f3fbf8;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-inline-start: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.pending-users-list {
  margin-top: 0.75rem;
  max-height: 50vh;
  overflow-y: auto;
}

.pending-dialog-card {
  width: min(560px, 100%);
}

.members-dialog-card {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
}

.members-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.members-dialog-header h2 {
  margin-bottom: 0.15rem;
}

.members-list {
  margin-top: 0.75rem;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
}

.member-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #d7ece5;
}

.member-row:last-child {
  border-bottom: none;
}

.member-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.member-meta {
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

.member-chip {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.member-chip.role-admin {
  background: #e8f4ef;
  color: #0f6e56;
}

.member-chip.role-member {
  background: #eef2f7;
  color: #4a5568;
}

.member-chip.status-active {
  background: #e7f6ed;
  color: #1f7a45;
}

.member-chip.status-suspended {
  background: #fdecec;
  color: #9b2c2c;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.member-protected {
  font-size: 0.82rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .member-row {
    flex-direction: column;
  }

  .member-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.admin-panel h2 {
  margin-top: 0;
  color: #0f6e56;
}

.pending-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #d7ece5;
}

.pending-user-row:last-child {
  border-bottom: none;
}

.pending-user-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.user-greeting {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

  .auth-body .view.hidden,
  .auth-body #app-view.hidden {
    display: none !important;
  }

@media (max-width: 700px) {
  .auth-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .auth-nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
