:root {
  --purple-900: #261535;
  --purple-800: #4e2f78;
  --purple-700: #6f47ab;
  --purple-600: #824fc1;
  --gold-500: #f0c557;
  --cyan-500: #1ec8ff;
  --teal-500: #22b573;
  --blue-500: #2d7ff9;
  --amber-500: #ffbf1f;
  --red-500: #f14d63;
  --white: #ffffff;
  --panel: rgba(255,255,255,.94);
  --shadow: 0 12px 36px rgba(0,0,0,.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2430;
}

.bg-temple {
  min-height: 100vh;
  background: url('images/06.png') center center / cover no-repeat fixed;
  position: relative;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 12, 7, .52);
  backdrop-filter: blur(1px);
}

.login-shell,
.success-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card,
.success-card,
.admin-card,
.dash-card,
.kiosk-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.split-card {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  overflow: hidden;
}

.login-left,
.login-right {
  padding: 40px 44px;
}

.login-left {
  background: rgba(255,255,255,.96);
}

.login-right {
  background: linear-gradient(180deg, rgba(247,247,252,.96), rgba(237,237,246,.96));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-logo {
  display: block;
  margin: 0 auto 18px;
  object-fit: contain;
}

.top-logo {
  width: 108px;
  height: 108px;
}

.side-logo {
  width: 112px;
  height: 112px;
}

.login-left h1,
.login-left h2,
.login-right h3,
.kiosk-card h2,
.success-card h1 {
  margin: 0 0 10px;
  text-align: center;
}

.login-left h1 {
  font-size: 41px;
  line-height: 1.05;
}

.login-left h2 {
  font-weight: 600;
  color: #3a3d47;
  margin-bottom: 28px;
}

.login-right h3 {
  font-size: 26px;
  color: #34214e;
}

.login-right p {
  text-align: center;
  color: #666b77;
  line-height: 1.5;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
}

.check-list li {
  margin: 8px 0;
  color: #4f5562;
}

.check-list li::before {
  content: '☑ ';
  color: #2dbf73;
}

label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
  color: #2f3440;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8dbe3;
  border-radius: 10px;
  background: #f7f8fb;
  font-size: 15px;
}

textarea {
  resize: vertical;
}

.full {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-purple {
  background: linear-gradient(90deg, #7a2db4, #a85cf5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid #79a8da;
  color: #2b66c4;
}

.btn-green {
  background: #1f9958;
  color: #fff;
}

.btn-light {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.small-btn {
  margin-top: 8px;
}

.tiny-btn {
  padding: 8px 10px;
  font-size: 12px;
}

.alert {
  background: #ffe5e8;
  color: #912638;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 10, 10, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  width: min(920px, 100%);
  background: #f4f4f7;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.34);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #ddd;
  font-weight: 700;
  color: #1d6be0;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #777;
}

.modal-body {
  padding: 24px;
}

.modal-kiosk-layout {
  display: flex;
  justify-content: center;
}

.kiosk-modal-form {
  width: min(540px, 100%);
  padding: 28px 26px 20px;
  text-align: center;
}

.kiosk-top-logo {
  width: 108px;
  height: 108px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.kiosk-bottom-logo {
  width: 110px;
  height: 110px;
  margin: 16px auto 0;
  object-fit: contain;
}

.subheading {
  margin-top: 0;
  color: #5b5f67;
  font-weight: 700;
}

.mode-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 10px;
  text-align: left;
}

.mode-row label {
  font-weight: 600;
  font-size: 14px;
}

.two-col,
.three-col,
.group-member-row {
  display: grid;
  gap: 14px;
}

.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.group-member-row {
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 10px;
}

.hidden-block {
  display: none;
}

.conditional-block {
  margin-top: 10px;
}

.success-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: 34px;
  text-align: center;
}

.admin-body {
  min-height: 100vh;
}

.site-bg {
  background: url('images/heavenlybackground.png') center center / cover no-repeat fixed;
  position: relative;
}

.site-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(19, 12, 7, .52);
  backdrop-filter: blur(1px);
  z-index: 0;
}

.site-bg > * {
  position: relative;
  z-index: 1;
}

/* enlarged top navigation */
.topnav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  background: linear-gradient(90deg, #171d2b 0%, #1f2637 100%);
  color: #fff;
  padding: 14px 24px;
  min-height: 104px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.brand-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.right-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
}

.brand-text span,
.welcome-text {
  font-size: 16px;
  color: rgba(255,255,255,.88);
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-pill {
  padding: 14px 22px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.nav-cyan {
  background: var(--cyan-500);
}

.nav-teal {
  background: var(--teal-500);
}

.nav-blue {
  background: var(--blue-500);
}

.nav-gold {
  background: var(--gold-500);
  color: #2b230c;
}

.nav-amber {
  background: var(--amber-500);
  color: #332400;
}

.nav-purple {
  background: var(--purple-700);
}

.nav-logout {
  background: var(--red-500);
}

.nav-pill.active {
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: 2px;
}

.admin-wrap {
  width: min(1150px, calc(100% - 30px));
  margin: 18px auto 40px;
  position: relative;
  z-index: 1;
}

.admin-wrap h1 {
  color: #fff;
  font-size: 50px;
  margin: 10px 0 18px;
}

.card-title {
  margin-top: 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.dash-card,
.admin-card {
  padding: 22px;
}

.dash-card {
  text-align: center;
  min-height: 136px;
}

.muted-text {
  color: rgba(255,255,255,.85);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.98);
  border-radius: 14px;
  overflow: hidden;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #ececec;
  text-align: left;
  vertical-align: top;
}

code {
  font-size: 12px;
  word-break: break-all;
}

.form-card {
  margin-bottom: 20px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.inline-submit {
  display: flex;
  align-items: end;
}

.inline-role-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.self-checkin-card {
  margin-top: 22px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.9);
}

.self-checkin-card h4 {
  margin: 0 0 10px;
  text-align: center;
  color: #34214e;
}

.lookup-results {
  margin: 16px 0;
  text-align: left;
}

.lookup-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.lookup-empty {
  background: #fff5d9;
  padding: 12px;
  border-radius: 10px;
}

.status-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-in {
  background: #dff7e8;
  color: #187848;
}

@media (max-width: 1100px) {
  .topnav {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .nav-center {
    justify-content: flex-start;
  }

  .nav-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .brand-text strong {
    font-size: 21px;
  }

  .brand-text span,
  .welcome-text {
    font-size: 14px;
  }

  .nav-pill {
    font-size: 16px;
    padding: 12px 18px;
  }
}

@media (max-width: 980px) {
  .split-card {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .right-logo {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 720px) {
  .login-shell,
  .success-wrap {
    padding: 16px;
  }

  .login-left,
  .login-right {
    padding: 24px;
  }

  .two-col,
  .three-col,
  .group-member-row {
    grid-template-columns: 1fr;
  }

  .mode-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-wrap h1 {
    font-size: 34px;
  }

  .inline-role-form {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    padding: 14px;
    min-height: auto;
  }

  .brand-left,
  .nav-right {
    gap: 12px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .right-logo {
    width: 48px;
    height: 48px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text span,
  .welcome-text {
    font-size: 13px;
  }

  .nav-pill {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 12px;
  }
}