/* Admin panel styles */

/* ─── Admin login gate ─── */
.admin-gate {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(231, 197, 138, 0.09), transparent 60%),
    var(--bg);
}
.admin-gate-card {
  width: 100%; max-width: 24rem; text-align: center;
  padding: 2.2rem 1.8rem;
  background: rgba(25, 18, 31, 0.50);
  border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(8px);
}
.admin-gate-title {
  font-family: "Fraunces", serif; font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin: 0 0 0.5rem;
}
.admin-gate-sub {
  color: var(--muted); font-size: 0.95rem; margin: 0 0 1.6rem; line-height: 1.55;
}
.admin-gate-back {
  display: inline-block; margin-top: 1.4rem;
  color: var(--muted); text-decoration: none; font-size: 0.88rem;
  transition: color 0.2s ease;
}
.admin-gate-back:hover { color: var(--gold); }

/* Password input for admin gate — less shout than the code input */
.admin-gate-card .code-input {
  text-transform: none;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

/* ─── Admin panel layout ─── */
.admin-main {
  max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 6rem;
}
.admin-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.admin-title {
  font-family: "Fraunces", serif; font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.4rem;
}
.admin-sub { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 36rem; line-height: 1.55; }

/* ─── Guest cards ─── */
.guest-list { display: flex; flex-direction: column; gap: 0.75rem; }
.guest-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.1rem 1.3rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.guest-avatar {
  width: 2.8rem; height: 2.8rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  display: grid; place-items: center;
  font-family: "Fraunces", serif; font-size: 1.1rem; color: #2a1d12; font-weight: 600;
  flex-shrink: 0;
}
.guest-info { flex: 1; min-width: 0; }
.guest-name { font-weight: 500; font-size: 1rem; margin: 0 0 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-code { font-family: "Caveat", cursive; font-size: 1.1rem; color: var(--gold); margin: 0; letter-spacing: 0.04em; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.guest-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ─── Role badges ─── */
.role-badge {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
}
.role-guest {
  background: rgba(231, 197, 138, 0.15);
  color: var(--gold);
  border: 1px solid rgba(231, 197, 138, 0.3);
}
.role-viewer {
  background: rgba(178, 157, 181, 0.15);
  color: var(--muted);
  border: 1px solid rgba(178, 157, 181, 0.3);
}
.role-bride {
  background: rgba(255, 182, 193, 0.18);
  color: #f4a7b9;
  border: 1px solid rgba(255, 182, 193, 0.35);
}
.role-groom {
  background: rgba(180, 200, 240, 0.18);
  color: #9bb8e8;
  border: 1px solid rgba(180, 200, 240, 0.35);
}
.role-relationship {
  background: rgba(231, 154, 140, 0.15);
  color: var(--rose);
  border: 1px solid rgba(231, 154, 140, 0.3);
}
.avatar-priority {
  background: linear-gradient(135deg, #e79a8c, #c0685e) !important;
}

/* ─── Pending section ─── */
.guest-section-header {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.65rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pending-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); display: inline-block;
  box-shadow: 0 0 6px rgba(231,197,138,0.7);
}
.pending-count {
  background: rgba(231,197,138,0.15);
  color: var(--gold); border: 1px solid rgba(231,197,138,0.3);
  border-radius: 999px; font-size: 0.7rem; padding: 0 0.45rem; line-height: 1.6;
}
.guest-card-pending {
  border-color: rgba(231,197,138,0.28);
  background: rgba(231,197,138,0.04);
}
.guest-email {
  font-size: 0.8rem; color: var(--muted); margin: 0.2rem 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-approve {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #2a1d12; border-color: transparent;
  box-shadow: 0 4px 14px -6px rgba(231,197,138,0.5);
}
.btn-approve:hover { background: var(--gold-2); }

.pending-fields { flex: 1; min-width: 0; }
.pending-selects {
  display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.pending-selects .role-select {
  font-size: 0.8rem; padding: 0.35rem 0.6rem;
  height: auto; min-width: 0; flex: 1;
}

/* ─── Empty state ─── */
.empty-guests { text-align: center; padding: 5rem 1rem; }
.empty-guests .empty-title { font-family: "Fraunces", serif; font-size: 1.7rem; margin: 0; }
.empty-guests .empty-sub { color: var(--muted); margin: 0.5rem 0 0; line-height: 1.5; }
.danger-zone {
  margin-top: 2.5rem; border: 1px solid rgba(220, 60, 60, 0.28);
  border-radius: 12px; overflow: hidden;
}
.danger-zone-header {
  padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid rgba(220, 60, 60, 0.18);
  background: rgba(220, 60, 60, 0.05);
}
.danger-zone-title { margin: 0 0 2px; font-size: 0.85rem; font-weight: 600; color: #e06060; letter-spacing: 0.04em; text-transform: uppercase; }
.danger-zone-sub { margin: 0; font-size: 0.78rem; color: #9b7e7e; }
.danger-zone-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; flex-wrap: wrap;
}
.danger-zone-label { margin: 0 0 2px; font-size: 0.9rem; font-weight: 500; color: var(--text, #f3e9df); }
.danger-zone-desc { margin: 0; font-size: 0.8rem; color: #9b8a8a; line-height: 1.5; }

/* ─── Add guest modal ─── */
.modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 14, 0.75); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; z-index: 1;
  width: min(28rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.6rem;
  animation: fadeUp 0.25s ease both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.modal-head h2 { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.45rem; margin: 0; }

/* Role select inside modal */
.role-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b29db5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  -webkit-appearance: none; appearance: none;
  padding-right: 2.4rem;
}
.role-select option { background: var(--bg-2); color: var(--ink); }

/* ─── QR sheet ─── */
.qr-panel { text-align: center; }
.qr-guest-name { font-family: "Fraunces", serif; font-size: 1.4rem; margin: 0 0 0.5rem; color: var(--gold); }
.qr-canvas { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.qr-canvas canvas, .qr-canvas img { border-radius: 12px; background: #fff; padding: 12px; }
.access-code-block {
  background: rgba(231, 197, 138, 0.07); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem; margin-bottom: 1.4rem;
}
.access-code-label { font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.4rem; }
.access-code-value { font-family: "Fraunces", serif; font-size: 2rem; letter-spacing: 0.14em; color: var(--gold); margin: 0 0 0.5rem; font-weight: 500; }
.access-code-hint { color: var(--muted); font-size: 0.82rem; margin: 0; line-height: 1.5; }
.qr-actions { display: flex; flex-direction: column; }
