/* Portal guest auth — redesigned form + atmospheric background */
.portal-guest {
  --pg-accent: #1A5C38;
  --pg-accent-dk: #0F3322;
  --pg-accent-mid: #226645;
  --pg-gold: #C9A84C;
  --pg-gold-lt: #E2C46E;
  --pg-cream: #F4F9F5;
  --pg-cream-dk: #E6F0EA;
  --pg-muted: #4A7060;
  --pg-text: #0D2B1E;
  --pg-line: rgba(26, 92, 56, 0.14);
  --pg-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L36 24 L60 30 L36 36 L30 60 L24 36 L0 30 L24 24Z' fill='none' stroke='rgba(201,168,76,0.22)' stroke-width='0.8'/%3E%3Ccircle cx='30' cy='30' r='4' fill='none' stroke='rgba(26,92,56,0.1)' stroke-width='0.6'/%3E%3C/svg%3E");
  --pg-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80' viewBox='0 0 120 80' fill='none'%3E%3Cpath d='M10 78 V42 Q10 10 60 10 Q110 10 110 42 V78' stroke='rgba(201,168,76,0.16)' stroke-width='1.4'/%3E%3Cpath d='M22 78 V44 Q22 22 60 22 Q98 22 98 44 V78' stroke='rgba(26,92,56,0.1)' stroke-width='1'/%3E%3C/svg%3E");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--pg-text);
  background: #E8F2EC;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

.portal-guest *,
.portal-guest *::before,
.portal-guest *::after {
  box-sizing: border-box;
}

body.portal-guest > .masthead,
body.portal-guest > .main-nav {
  flex-shrink: 0;
}

.portal-guest__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1rem 3rem;
  position: relative;
  overflow: hidden;
}

.portal-guest__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: #E8F2EC;
  background-image:
    radial-gradient(ellipse 55% 42% at 50% 0%, rgba(26, 92, 56, 0.14), transparent 62%),
    radial-gradient(ellipse 40% 35% at 0% 70%, rgba(201, 168, 76, 0.14), transparent 55%),
    radial-gradient(ellipse 42% 38% at 100% 75%, rgba(26, 92, 56, 0.12), transparent 55%),
    var(--pg-arch),
    var(--pg-arch),
    var(--pg-pattern),
    linear-gradient(180deg, #DCECE3 0%, #EEF6F1 45%, #F7FBF8 100%);
  background-size:
    auto,
    auto,
    auto,
    180px 120px,
    180px 120px,
    60px 60px,
    auto;
  background-position:
    center top,
    left bottom,
    right bottom,
    6% 72%,
    94% 72%,
    center,
    center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
}

.portal-guest__bg::before,
.portal-guest__bg::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 50%;
  opacity: 0.55;
}

.portal-guest__bg::before {
  top: 8%;
  left: -70px;
  box-shadow: inset 0 0 0 14px rgba(26, 92, 56, 0.04);
}

.portal-guest__bg::after {
  bottom: 6%;
  right: -80px;
  box-shadow: inset 0 0 0 18px rgba(201, 168, 76, 0.05);
}

.portal-guest__stage {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: portal-guest-rise 0.55s ease-out both;
}

.portal-guest__stage--wide {
  max-width: 560px;
}

@keyframes portal-guest-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-guest__card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(26, 92, 56, 0.16);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px rgba(15, 51, 34, 0.1),
    0 2px 8px rgba(15, 51, 34, 0.05);
  padding: 1.9rem 1.7rem 1.65rem;
  overflow: hidden;
}

.portal-guest__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--pg-accent-dk), var(--pg-accent), var(--pg-gold), var(--pg-accent), var(--pg-accent-dk));
  pointer-events: none;
}

.portal-guest__card::after {
  display: none;
}

.portal-guest__card h1 {
  margin: 0.35rem 0 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0F3322;
  text-align: center;
}

.portal-guest__lead {
  margin: 0 0 1.35rem;
  text-align: center;
  font-size: 0.92rem;
  color: #3D5C4E;
  line-height: 1.55;
  font-weight: 500;
}

.portal-guest__roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.45rem;
  padding: 0.4rem;
  background: #EEF5F0;
  border: 1px solid rgba(26, 92, 56, 0.14);
  border-radius: 12px;
}

.portal-guest__role {
  display: block;
  text-align: center;
  text-decoration: none !important;
  padding: 0.78rem 0.55rem;
  border: 1px solid rgba(26, 92, 56, 0.14);
  border-radius: 9px;
  background: #fff;
  color: #1A5C38 !important;
  -webkit-text-fill-color: #1A5C38;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-guest__role:hover {
  color: #0F3322 !important;
  -webkit-text-fill-color: #0F3322;
  background: #F7FBF8;
  border-color: rgba(201, 168, 76, 0.55);
}

.portal-guest__role.is-active {
  background: linear-gradient(145deg, #1A5C38 0%, #1E6B42 50%, #0F3322 100%);
  border-color: #0F3322;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 8px 16px rgba(15, 51, 34, 0.24);
}

.portal-guest__alert {
  padding: 0.8rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  line-height: 1.4;
  border: 1px solid rgba(26, 92, 56, 0.18);
  border-radius: 10px;
  background: rgba(26, 92, 56, 0.07);
  color: var(--pg-accent-dk);
}

.portal-guest__alert--error {
  background: rgba(140, 40, 40, 0.07);
  border-color: rgba(140, 40, 40, 0.22);
  color: #7a2a2a;
}

.portal-guest__alert div + div {
  margin-top: 0.25rem;
}

.portal-guest__field {
  margin-bottom: 1.15rem;
}

.portal-guest__field label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0F3322;
}

.portal-guest__field input {
  width: 100%;
  border: 1.5px solid #B7CFC1;
  border-radius: 10px;
  background: #F3F8F5;
  color: #0D2B1E;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  padding: 0.92rem 1.05rem;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 51, 34, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.portal-guest__field input::placeholder {
  color: #7A9488;
  font-weight: 400;
}

.portal-guest__field input:hover {
  border-color: #C9A84C;
  background: #fff;
}

.portal-guest__field input:focus {
  border-color: #1A5C38;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(26, 92, 56, 0.15),
    inset 0 1px 2px rgba(15, 51, 34, 0.03);
}

.portal-guest__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.portal-guest__check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.1rem 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3D5C4E;
}

.portal-guest__check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #1A5C38;
  border-radius: 4px;
}

.portal-guest__submit {
  display: block;
  width: 100%;
  border: 2px solid #C9A84C;
  border-radius: 10px;
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(180deg, #24804F 0%, #1A5C38 55%, #0F3322 100%);
  box-shadow: 0 10px 22px rgba(15, 51, 34, 0.25);
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-guest__submit:hover {
  filter: none;
  background: linear-gradient(180deg, #2A915A 0%, #1E6B42 55%, #12402A 100%);
  box-shadow: 0 12px 26px rgba(15, 51, 34, 0.3);
}

.portal-guest__submit:active {
  transform: translateY(1px);
}

.portal-guest__links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3D5C4E;
  line-height: 1.55;
}

.portal-guest__links a {
  color: #1A5C38 !important;
  -webkit-text-fill-color: #1A5C38;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: 2px solid #C9A84C;
  padding-bottom: 1px;
}

.portal-guest__links a:hover {
  color: #0F3322 !important;
  -webkit-text-fill-color: #0F3322;
  border-bottom-color: #A88630;
}

.portal-guest__foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem 1.4rem;
  font-size: 0.72rem;
  color: var(--pg-muted);
}

.portal-guest[dir="rtl"] .portal-guest__lead,
.portal-guest[dir="rtl"] .portal-guest__links,
.portal-guest[dir="rtl"] .portal-guest__foot,
.portal-guest[dir="rtl"] .portal-guest__card h1 {
  text-align: center;
}

@media (max-width: 560px) {
  .portal-guest__grid {
    grid-template-columns: 1fr;
  }

  .portal-guest__card {
    padding: 1.45rem 1.15rem 1.3rem;
  }

  .portal-guest__main {
    padding-top: 1.75rem;
  }

  .portal-guest__bg::before,
  .portal-guest__bg::after {
    width: 140px;
    height: 140px;
  }
}
