.portal-body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 8%, rgb(218 105 157 / 14%), transparent 34rem),
    radial-gradient(ellipse at 50% 100%, rgb(218 105 157 / 6%), transparent 30rem),
    #120e13;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --pink: #da699d;
  --pink-soft: #f09fc1;
  --muted: #c6bbc4;
  --surface: #211820;
  --surface-highlight: #2a1c27;
  --line: rgb(218 105 157 / 24%);
}

.portal-body *,
.member-view *,
.admin-page * {
  box-sizing: border-box;
}

.portal {
  width: min(1040px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.portal-header {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 28px 0 14px;
}

.logo-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  animation: logo-spin 18s linear infinite;
  transform-style: preserve-3d;
}

.logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgb(218 105 157 / 34%));
}

.logo-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / 18%) 46%, rgb(255 255 255 / 88%) 50%, rgb(255 255 255 / 18%) 54%, transparent 60%);
  background-size: 300% 100%;
  content: "";
  mask: url("/assets/starix-logo.png") center / contain no-repeat;
  opacity: 0.75;
  animation: logo-shine 10s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes logo-spin {
  to { transform: perspective(500px) rotateY(360deg); }
}

@keyframes logo-shine {
  0% { background-position: 150% 0; }
  45%, 100% { background-position: -150% 0; }
}

.destinations {
  display: grid;
  gap: 18px;
}

.featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--surface-highlight), var(--surface) 72%);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card:hover {
  transform: scale(1.025);
  border-color: rgb(240 159 193 / 58%);
  box-shadow: 0 14px 34px rgb(0 0 0 / 30%), 0 0 24px rgb(218 105 157 / 12%);
}

.featured-card {
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  padding: 24px 28px;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
}

.featured-card::before,
.featured-card::after {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 0;
}

.featured-card::before {
  background: var(--card-image) center 28% / cover no-repeat;
  opacity: 0.82;
  transition: transform 240ms ease;
}

.multi-pov-card {
  --card-image: url("/assets/multi-pov-new.jpg");
}

.starix-card {
  --card-image: url("/assets/starix-fivem.jpg");
}

.featured-card::after {
  background:
    linear-gradient(90deg, rgb(18 14 19 / 20%), transparent 65%),
    linear-gradient(180deg, rgb(18 14 19 / 8%) 8%, rgb(18 14 19 / 95%) 100%);
}

.featured-card:hover::before {
  transform: scale(1.04);
}

.featured-card h2,
.featured-card p {
  margin: 0;
}

.featured-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 750;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.featured-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 20px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.hidden {
  display: none !important;
}

.portal-choice-heading {
  max-width: 700px;
  margin: 0 auto 10px;
  text-align: center;
}

.portal-eyebrow,
.portal-choice-label {
  color: #f09fc1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.portal-eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e879ad;
  box-shadow: 0 0 12px rgb(232 121 173 / 75%);
}

.portal-choice-heading h1 {
  margin: 12px 0 8px;
  font-size: clamp(42px, 7vw, 66px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.portal-choice-heading h1 span {
  color: #e879ad;
}

.portal-choice-heading p {
  margin: 0;
  color: #c6bbc4;
  font-size: 14px;
}

.portal-choice-card {
  min-height: 235px;
  padding: 28px;
}

.portal-choice-card h2 {
  margin: 9px 0 0;
}

.portal-choice-card p {
  max-width: 340px;
  color: rgb(255 255 255 / 78%);
  line-height: 1.65;
}

.portal-choice-arrow {
  position: absolute;
  right: 25px;
  bottom: 23px;
  font-size: 24px;
}

.portal .site-footer {
  margin-top: auto;
}

.portal-body.admin-body {
  min-height: 100vh;
  color-scheme: light;
  color: #211a23;
  background:
    radial-gradient(ellipse at 50% 0, rgb(218 105 157 / 22%), transparent 36rem),
    linear-gradient(140deg, #fff4f9, #f8eaf1 52%, #fff8fb);
}

.member-view {
  width: min(1050px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.member-view-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 34px;
  padding: 12px 20px;
  border: 1px solid #e8e1e8;
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 36px rgb(52 31 52 / 5%);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: #201922;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}

.admin-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.admin-brand span,
.admin-brand small {
  display: grid;
}

.admin-brand small {
  margin-top: 5px;
  color: #827481;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.admin-back-link {
  color: #756875;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-back-link:hover {
  color: #c94f88;
}

.member-view-main {
  width: min(760px, 100%);
  margin: 0 auto 50px;
}

.member-page-heading {
  margin-bottom: 27px;
}

.member-page-heading h1 {
  margin: 7px 0 5px;
  font-size: clamp(27px, 4vw, 37px);
  letter-spacing: -0.045em;
}

.admin-eyebrow {
  color: #c94f88;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.admin-description {
  margin: 0;
  color: #837984;
  font-size: 13px;
}

.appeal-public,
.admin-login-card,
.panel {
  overflow: hidden;
  border: 1px solid #e8e1e8;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 14px 40px rgb(52 31 52 / 6%);
}

.appeal-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #eee8ee;
}

.appeal-heading h2,
.panel-heading h2 {
  margin: 6px 0 0;
  color: #29212c;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.appeal-content {
  padding: 20px 22px 24px;
}

.member-login-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #f0d7e2;
  border-radius: 12px;
  background: #fff9fc;
}

.member-login-state p {
  margin: 0;
  color: #756875;
  font-size: 12px;
  line-height: 1.6;
}

.member-login-state .discord-login-button {
  width: auto;
  min-width: 240px;
  padding: 0 18px;
}

.member-account {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #514652;
  font-size: 12px;
  font-weight: 700;
}

.member-appeals-panel {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #eee8ee;
}

.member-appeals-heading,
.member-appeal-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-appeals-heading h3 {
  margin: 5px 0 0;
  color: #29212c;
  font-size: 16px;
}

.member-appeals-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.member-appeal-card {
  padding: 14px;
  border: 1px solid #eee2ea;
  border-radius: 11px;
  background: #fffafd;
}

.member-appeal-card-heading strong {
  color: #392d38;
  font-size: 12px;
}

.member-appeal-card > p {
  margin: 8px 0;
  color: #756875;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.member-appeal-card > small {
  color: #8b7e89;
  font-size: 10px;
}

.appeal-status {
  padding: 5px 8px;
  border-radius: 99px;
  background: #fff2d6;
  color: #825a12;
  font-size: 10px;
  font-weight: 800;
}

.appeal-status.status-in_review {
  background: #edf3ff;
  color: #3e5b9b;
}

.appeal-status.status-accepted {
  background: #e8f8ef;
  color: #276344;
}

.appeal-status.status-rejected {
  background: #fff0f1;
  color: #9c3d4c;
}

.member-staff-reply {
  display: grid;
  gap: 4px;
  margin-top: 12px !important;
  padding: 10px;
  border-left: 3px solid #d65b94;
  border-radius: 4px;
  background: #fff2f8;
}

.member-staff-reply strong {
  color: #9c426c;
}

.member-waiting-reply {
  color: #9c426c !important;
  font-style: italic;
}

.reference-hint {
  margin: 18px 0 0;
  color: #756875;
  font-size: 12px;
  line-height: 1.65;
}

.reference-hint code,
.appeal-type code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff2f8;
  color: #9c426c;
  font-size: 11px;
}

.appeal-details {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #eee8ee;
}

.appeal-type {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #f0d7e2;
  border-radius: 12px;
  background: #fff7fb;
}

.appeal-type h3 {
  margin: 5px 0;
  color: #392d38;
  font-size: 17px;
}

.appeal-type p {
  margin: 0;
  color: #756875;
  font-size: 11px;
  line-height: 1.6;
}

.text-button {
  margin-top: 13px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #a64c78;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.reference-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #f0d7e2;
  border-radius: 99px;
  background: #fff2f8;
  color: #a64c78;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #f0d7e2;
  border-radius: 12px;
  background: #fff7fb;
}

.notice > span {
  color: #c94f88;
  font-size: 19px;
  font-weight: 800;
}

.notice strong {
  color: #392d38;
  font-size: 12px;
}

.notice p {
  margin: 5px 0 0;
  color: #756875;
  font-size: 11px;
  line-height: 1.6;
}

.appeal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.appeal-form label {
  display: grid;
  gap: 7px;
  color: #514652;
  font-size: 12px;
  font-weight: 700;
}

.appeal-form input,
.appeal-form select,
.appeal-form textarea,
.filters input,
.filters select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e5dce5;
  border-radius: 9px;
  background: #fff;
  color: #29212c;
  font: inherit;
  outline: none;
}

.appeal-form textarea {
  resize: vertical;
}

.appeal-form input:focus,
.appeal-form select:focus,
.appeal-form textarea:focus,
.filters input:focus,
.filters select:focus {
  border-color: #d65b94;
  box-shadow: 0 0 0 3px rgb(214 91 148 / 12%);
}

.search-button {
  min-height: 39px;
  padding: 9px 14px;
  border: 1px solid #c94f88;
  border-radius: 9px;
  background: #c94f88;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.search-button:hover {
  background: #ae3f73;
}

.appeal-form .search-button {
  justify-self: start;
  min-height: 44px;
  padding-inline: 18px;
}

.success-message,
.error {
  padding: 12px 15px;
  border-radius: 9px;
  font-size: 12px;
}

.success-message {
  border: 1px solid #bfe7d3;
  background: #f0fbf5;
  color: #276344;
}

.error {
  border: 1px solid #f0c7d1;
  background: #fff3f5;
  color: #a1324b;
}

.admin-page {
  width: min(1440px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  color: #29212c;
}

.admin-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 0 16px;
  padding: 12px 20px;
  border: 1px solid #e8e1e8;
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 36px rgb(52 31 52 / 5%);
}

.staff-header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-header-actions {
  flex-wrap: wrap;
}

.staff-quick-nav {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  margin-right: 8px;
}

.staff-quick-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #c94f88;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.staff-quick-nav a:hover {
  background: #fff2f8;
  color: #c94f88;
  text-decoration: none;
}

.appeal-staff-status,
.appeal-staff-reply {
  width: 100%;
  min-width: 150px;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid #e5dce5;
  border-radius: 8px;
  background: #fff;
  color: #392d38;
  font: inherit;
  font-size: 11px;
}

.appeal-staff-reply {
  resize: vertical;
}

.admin-page.authenticated .staff-quick-nav {
  display: flex;
}

.admin-login-card {
  position: relative;
  width: min(480px, 100%);
  min-height: 440px;
  display: grid;
  justify-items: center;
  align-content: center;
  margin: auto;
  padding: 42px 38px 34px;
  text-align: center;
}

.admin-login-card > .admin-back-link {
  position: absolute;
  top: 20px;
  left: 22px;
}

.login-card {
  display: grid;
  justify-items: center;
}

.admin-login-logo {
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  object-fit: contain;
}

.admin-login-card h1 {
  margin: 10px 0 0;
  color: #29212c;
  font-size: 28px;
}

.admin-login-card p {
  max-width: 340px;
  margin: 10px 0 22px;
  color: #827781;
  font-size: 13px;
  line-height: 1.6;
}

.discord-login-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: #5865f2;
  box-shadow: 0 8px 18px rgb(88 101 242 / 18%);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.discord-login-button:hover,
.discord-login-button:focus-visible {
  color: #fff;
  text-decoration: none;
}

.discord-login-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.secure-note {
  margin-top: 13px;
  color: #827781;
  font-size: 10px;
}

.dashboard {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 36px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 24px;
}

.page-heading h1 {
  margin: 7px 0 5px;
  color: #29212c;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.045em;
}

.page-heading p {
  margin: 0;
  color: #837984;
  font-size: 13px;
}

.eyebrow {
  color: #c94f88;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.system-pill,
.stat-card,
.panel {
  border: 1px solid #e8e1e8;
  background: #fff;
  box-shadow: 0 12px 34px rgb(52 31 52 / 5%);
}

.system-pill {
  padding: 9px 12px;
  border-radius: 99px;
  color: #397853;
  font-size: 9px;
  font-weight: 800;
}

.live-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: #42b77b;
}

.notice.warning {
  margin: 8px 0 18px;
  border-color: #f0d7e2;
  background: #fff7fb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 17px 19px;
  border-radius: 14px;
}

.stat-icon {
  margin-bottom: 10px;
  color: #c94f88;
}

.stat-label {
  color: #827781;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.stat-card strong {
  margin-top: 5px;
  color: #29212c;
  font-size: 24px;
}

.stat-card small {
  margin-top: 2px;
  color: #827781;
  font-size: 10px;
}

.panel {
  margin-bottom: 16px;
  border-radius: 15px;
}

.panel-heading {
  align-items: flex-end;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters input,
.filters select {
  width: auto;
  min-width: 150px;
  min-height: 38px;
  font-size: 11px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee8ee;
  text-align: left;
  font-size: 11px;
}

th {
  background: #fff9fc;
  color: #827781;
  font-size: 9px;
  letter-spacing: 0.08em;
}

td {
  color: #514652;
}

td.muted,
.muted {
  color: #827781;
}

.empty {
  padding: 28px;
  color: #827781;
  text-align: center;
}

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  color: #827781;
  font-size: 10px;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #514652;
  font-size: 11px;
  font-weight: 700;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.logout {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: #fff2f8;
  color: #a64c78;
  font: inherit;
  cursor: pointer;
}

.dashboard > footer {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #eadfe8;
  color: #827781;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-align: right;
}

.dashboard > footer span {
  padding: 0 5px;
  color: #c94f88;
}

.member-actions,
.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-actions button,
.profile-chip {
  padding: 6px 8px;
  border: 1px solid #efd6e2;
  border-radius: 7px;
  background: #fff7fb;
  color: #8f4669;
  font-size: 10px;
}

.staff-profile {
  padding: 17px;
  border-top: 1px solid #eee8ee;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.profile-timeline {
  margin-top: 16px;
  border-top: 1px solid #eee8ee;
}

.application-result {
  padding: 18px 22px;
  font-size: 12px;
}

.portal-footer {
  margin-top: auto;
}

@media (max-width: 760px) {
  .portal-header {
    min-height: 170px;
  }

  .logo-wrap {
    width: 120px;
    height: 120px;
  }

  .portal {
    width: calc(100% - 30px);
  }

  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-choice-card {
    min-height: 190px;
  }

  .member-view {
    width: calc(100% - 28px);
  }

  .member-view-header {
    margin: 12px 0 24px;
    padding: 11px 13px;
  }

  .member-view-header .admin-brand {
    font-size: 13px;
  }

  .member-view-header .admin-back-link {
    font-size: 10px;
  }

  .member-account {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }

  .admin-brand img {
    width: 38px;
    height: 38px;
  }

  .appeal-heading,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .appeal-content {
    padding: 15px;
  }

  .reference-badge {
    white-space: normal;
  }

  .admin-page {
    width: calc(100% - 28px);
  }

  .admin-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
  }

  .staff-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .staff-quick-nav {
    width: 100%;
    margin: 0;
  }

  .dashboard {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-foot {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .portal-choice-heading h1 {
    font-size: 42px;
  }

  @media (prefers-reduced-motion: reduce) {
    .logo-wrap,
    .logo-wrap::after {
      animation: none;
    }

    .card,
    .featured-card::before {
      transition: none;
    }
  }
}

body.portal-body[data-theme="rose"] {
  color-scheme: light;
  color: #2b2330;
  background:
    radial-gradient(ellipse at 50% 8%, rgb(218 105 157 / 10%), transparent 34rem),
    #fffafd;
  --pink: #c94f87;
  --pink-soft: #a93670;
  --muted: #736776;
  --surface: #fff;
  --surface-highlight: #fff7fb;
  --line: rgb(201 79 135 / 22%);
}

body.portal-body[data-theme="rose"] .portal-choice-heading p {
  color: #736776;
}

body.portal-body[data-theme="rose"] .site-footer {
  color: #736776;
}

body.portal-body[data-theme="rose"] .member-view,
body.portal-body[data-theme="rose"] .admin-page {
  color: #2b2330;
}

body.portal-body[data-theme="night"] {
  color-scheme: dark;
  color: #f7eef5;
  background:
    radial-gradient(ellipse at 50% 8%, rgb(218 105 157 / 12%), transparent 34rem),
    radial-gradient(ellipse at 50% 100%, rgb(218 105 157 / 5%), transparent 30rem),
    #120e13;
  --pink: #e879ad;
  --pink-soft: #f09fc1;
  --muted: #c6bbc4;
  --surface: #211820;
  --surface-highlight: #2a1c27;
  --line: rgb(218 105 157 / 24%);
}

body.portal-body[data-season="christmas"] {
  background-image:
    radial-gradient(ellipse at 50% 8%, rgb(218 105 157 / 18%), transparent 34rem),
    radial-gradient(ellipse at 50% 100%, rgb(218 105 157 / 8%), transparent 30rem);
}

body.portal-body[data-theme="night"][data-season="christmas"] {
  background-color: #120e13;
}

body.portal-body[data-theme="night"] .portal-choice-heading p,
body.portal-body[data-theme="night"] .site-footer {
  color: #c6bbc4;
}

body.portal-body[data-theme="night"] .member-view,
body.portal-body[data-theme="night"] .admin-page {
  color: #f3eaf1;
}

body.portal-body[data-theme="night"] .member-view-header,
body.portal-body[data-theme="night"] .appeal-public,
body.portal-body[data-theme="night"] .admin-login-card,
body.portal-body[data-theme="night"] .admin-header,
body.portal-body[data-theme="night"] .panel,
body.portal-body[data-theme="night"] .stat-card,
body.portal-body[data-theme="night"] .system-pill {
  border-color: rgb(218 105 157 / 25%);
  background: #211820;
  box-shadow: 0 12px 36px rgb(0 0 0 / 22%);
}

body.portal-body[data-theme="night"] .appeal-heading,
body.portal-body[data-theme="night"] .panel-heading,
body.portal-body[data-theme="night"] .member-appeals-panel,
body.portal-body[data-theme="night"] .staff-profile,
body.portal-body[data-theme="night"] .profile-timeline,
body.portal-body[data-theme="night"] .dashboard > footer {
  border-color: rgb(218 105 157 / 20%);
}

body.portal-body[data-theme="night"] .admin-brand,
body.portal-body[data-theme="night"] .member-account,
body.portal-body[data-theme="night"] .appeal-heading h2,
body.portal-body[data-theme="night"] .panel-heading h2,
body.portal-body[data-theme="night"] .member-appeals-heading h3,
body.portal-body[data-theme="night"] .member-appeal-card-heading strong,
body.portal-body[data-theme="night"] .appeal-type h3,
body.portal-body[data-theme="night"] .notice strong,
body.portal-body[data-theme="night"] .admin-login-card h1,
body.portal-body[data-theme="night"] .page-heading h1,
body.portal-body[data-theme="night"] .stat-card strong,
body.portal-body[data-theme="night"] .account {
  color: #f7eef5;
}

body.portal-body[data-theme="night"] .admin-brand small,
body.portal-body[data-theme="night"] .admin-back-link,
body.portal-body[data-theme="night"] .admin-description,
body.portal-body[data-theme="night"] .member-login-state p,
body.portal-body[data-theme="night"] .member-appeal-card > p,
body.portal-body[data-theme="night"] .member-appeal-card > small,
body.portal-body[data-theme="night"] .reference-hint,
body.portal-body[data-theme="night"] .appeal-type p,
body.portal-body[data-theme="night"] .notice p,
body.portal-body[data-theme="night"] .admin-login-card p,
body.portal-body[data-theme="night"] .secure-note,
body.portal-body[data-theme="night"] .page-heading p,
body.portal-body[data-theme="night"] .stat-label,
body.portal-body[data-theme="night"] .stat-card small,
body.portal-body[data-theme="night"] .panel-foot {
  color: #c6bbc4;
}

body.portal-body[data-theme="night"] .admin-back-link:hover,
body.portal-body[data-theme="night"] .staff-quick-nav a:hover {
  background: #30232e;
  color: #f09fc1;
}

body.portal-body[data-theme="night"] .member-login-state,
body.portal-body[data-theme="night"] .member-appeal-card,
body.portal-body[data-theme="night"] .appeal-type,
body.portal-body[data-theme="night"] .notice,
body.portal-body[data-theme="night"] .member-staff-reply,
body.portal-body[data-theme="night"] .reference-hint code,
body.portal-body[data-theme="night"] .appeal-type code,
body.portal-body[data-theme="night"] .reference-badge {
  border-color: rgb(218 105 157 / 24%);
  background: #2a1c27;
  color: #f0c2d6;
}

body.portal-body[data-theme="night"] .appeal-form label,
body.portal-body[data-theme="night"] .member-waiting-reply,
body.portal-body[data-theme="night"] .member-staff-reply strong {
  color: #f0c2d6;
}

body.portal-body[data-theme="night"] .appeal-form input,
body.portal-body[data-theme="night"] .appeal-form select,
body.portal-body[data-theme="night"] .appeal-form textarea,
body.portal-body[data-theme="night"] .filters input,
body.portal-body[data-theme="night"] .filters select,
body.portal-body[data-theme="night"] .appeal-staff-status,
body.portal-body[data-theme="night"] .appeal-staff-reply {
  border-color: #51404e;
  background: #171218;
  color: #f7eef5;
}

body.portal-body[data-theme="night"] .logout,
body.portal-body[data-theme="night"] .member-actions button,
body.portal-body[data-theme="night"] .profile-chip {
  border-color: rgb(218 105 157 / 28%);
  background: #30232e;
  color: #f0c2d6;
}

body.portal-body[data-theme="night"] th,
body.portal-body[data-theme="night"] td {
  border-color: rgb(218 105 157 / 18%);
}

body.portal-body[data-theme="night"] th {
  background: #2a1c27;
  color: #d3c3cf;
}

body.portal-body[data-theme="night"] td,
body.portal-body[data-theme="night"] td.muted,
body.portal-body[data-theme="night"] .muted,
body.portal-body[data-theme="night"] .empty {
  color: #d8cbd5;
}

.protection-theme-switch {
  position: fixed;
  z-index: 80;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgb(240 159 193 / 42%);
  border-radius: 999px;
  background: #211820;
  box-shadow: 0 8px 26px rgb(0 0 0 / 30%);
  color: #f7eef5;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.protection-theme-switch:hover {
  border-color: #f09fc1;
  background: #30232e;
}

  .protection-snowfall {
    position: fixed;
    z-index: 60;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .protection-snowfall span {
    position: absolute;
    top: -12px;
    width: var(--flake-size);
    height: var(--flake-size);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgb(255 255 255 / 70%);
    animation: protection-snowfall-drop linear infinite;
  }

  .protection-garland {
    position: fixed;
    z-index: 70;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    border-bottom: 1px solid rgb(218 105 157 / 15%);
    background:
      radial-gradient(ellipse at 50% -80%, transparent 64%, rgb(48 75 52 / 75%) 65%, transparent 67%) top center / 100% 48px no-repeat;
    pointer-events: none;
  }

  .protection-garland span {
    position: absolute;
    top: 18px;
    width: 8px;
    height: 11px;
    border-radius: 50%;
    animation: protection-garland-glow var(--light-duration, 1.8s) ease-in-out infinite alternate;
    animation-delay: var(--light-delay, 0s);
  }

  .protection-garland .is-red {
    background: #f05b6e;
    box-shadow: 0 0 12px #f05b6e;
  }

  .protection-garland .is-gold {
    background: #ffd166;
    box-shadow: 0 0 12px #ffd166;
  }

  .protection-garland .is-green {
    background: #57d69a;
    box-shadow: 0 0 12px #57d69a;
  }

  @keyframes protection-snowfall-drop {
    to { transform: translate3d(35px, 110vh, 0); }
  }

  @keyframes protection-garland-glow {
    from { opacity: 0.48; }
    to { opacity: 1; }
  }

  @media (prefers-reduced-motion: reduce) {
    .protection-snowfall span,
    .protection-garland span {
      animation: none;
    }
  }

@media (max-width: 480px) {
  .portal {
    width: calc(100% - 30px);
  }

  .admin-login-card {
    min-height: 410px;
    padding: 42px 22px 28px;
  }
}
