/* ============================================================
   style.css  –  ISKCON Jaipur Sunday School 2026
   Light, spiritual, summer pastel theme
   ============================================================ */

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary: #e07b39;
  /* warm saffron-orange */
  --primary-dark: #c0601e;
  --secondary: #7c4daa;
  /* spiritual purple  */
  --accent: #f9c74f;
  /* golden yellow     */
  --bg: #fff9f2;
  /* warm cream        */
  --surface: #ffffff;
  --border: #f0d9c4;
  --text: #3a2a1a;
  --text-muted: #8b7355;
  --success: #4caf7d;
  --danger: #e05252;
  --shadow: 0 4px 20px rgba(0, 0, 0, .08);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  margin: 0;
}

/* ---------- BACKGROUND CANVAS ---------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  background: url('SundaySchool-Background-1.png') center / cover no-repeat;
}

.bg-canvas svg {
  display: none;
}

/* ---------- LOGIN SCREEN ---------- */
.login-screen {
  background: rgba(255, 249, 240, 0.18);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background-image:
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 22px,
      rgba(124, 77, 170, 0.18) 22px,
      rgba(124, 77, 170, 0.18) 24px),
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 10px,
      rgba(224, 123, 57, 0.22) 10px,
      rgba(224, 123, 57, 0.22) 12px);
  pointer-events: none;
}

.login-card {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(224, 123, 57, .15);
  max-width: 400px;
  width: 100%;
  border: 1.5px solid var(--border);
}

.camp-logo {
  line-height: 1;
}

.camp-logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.camp-info-line {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #2d2d2d;
}

.camp-info-sep {
  height: .6rem;
}

.camp-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.camp-subtitle {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.1;
}

.camp-info-badge {
  background: linear-gradient(135deg, #fff3e0, #fce9f6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.btn-google {
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 50px;
  font-weight: 600;
  padding: .65rem 1.2rem;
  font-size: .95rem;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-google:hover {
  background: #1b5e20;
  color: #fff;
  border-color: #1b5e20;
  box-shadow: 0 4px 14px rgba(27, 94, 32, .35);
  transform: translateY(-1px);
}

.btn-guest {
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 50px;
  font-weight: 600;
  padding: .65rem 1.2rem;
  font-size: .95rem;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.btn-guest:hover {
  background: #1b5e20;
  color: #fff;
  border-color: #1b5e20;
  box-shadow: 0 4px 14px rgba(27, 94, 32, .35);
  transform: translateY(-1px);
}

/* ---------- APP HEADER ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}

/* ── Identity Row ── */
.header-identity {
  background: #ffffff;
  display: flex;
  align-items: center;
  padding: .55rem .85rem;
  gap: .6rem;
  border-bottom: 3px solid #11226b;
}

.header-col-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 72px;
  width: auto;
  object-fit: contain;
}

.header-col-center {
  flex: 1 1 0;
  text-align: center;
  padding: 0 .5rem;
}

.header-iskcon-name {
  font-family: var(--font);
  font-size: clamp(.7rem, 2vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #11226b;
  line-height: 1.25;
  text-transform: uppercase;
}

.header-founder-sep {
  width: 70%;
  margin: .35rem auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #11226b 20%, #c0601e 50%, #11226b 80%, transparent);
  border-radius: 2px;
}

.header-founder-line {
  font-size: clamp(.6rem, 1.6vw, .82rem);
  font-weight: 500;
  color: #8b6914;
  font-style: italic;
  line-height: 1.35;
}

.header-col-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-prabhupada-img {
  height: 72px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

/* ── Camp Bar (Row 2) ── */
.header-camp-bar {
  background: linear-gradient(135deg, var(--primary) 0%, #c0601e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .85rem;
  gap: .5rem;
  flex-wrap: wrap;
}

.header-camp-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-camp-title {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.header-camp-details {
  font-size: .73rem;
  opacity: .92;
}

/* ---------- MAIN ---------- */
.app-main {
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- SECTION CARD ---------- */
.section-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  padding: 1.25rem;
}

/* ---------- FORM SECTION CLIPART BANNER ---------- */
.form-banner {
  text-align: center;
  border-bottom: 2px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin: -.5rem -0.5rem 1.2rem;
  overflow: hidden;
  padding: 0;
}

.form-banner-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.form-banner .form-banner-title {
  padding: .8rem .5rem .3rem;
}

.form-banner .form-banner-divider {
  margin-bottom: .8rem;
}

.form-banner-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
  line-height: 1.35;
  margin: .45rem 0 .4rem;
  color: var(--secondary);
}

.form-banner-divider {
  height: 3px;
  width: 60px;
  margin: .6rem auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}

.section-header {
  margin-bottom: .85rem;
}

.section-icon {
  font-size: 1.4rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- STUDENT LIST ---------- */
.student-list {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.student-card {
  background: linear-gradient(135deg, #fff8f0 0%, #fef5fb 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
}

.student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 123, 57, .13);
}

.student-card-avatar {
  width: 50px;
  height: 62px;
  border-radius: 7px;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.55);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
}

.student-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.student-dummy-boy {
  background: linear-gradient(160deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-size: 2.1rem;
  line-height: 1;
}

.student-dummy-girl {
  background: linear-gradient(160deg, #fce7f3, #fbcfe8);
  color: #be185d;
  font-size: 2.1rem;
  line-height: 1;
}

/* Detail modal photo frame */
.student-detail-photo-frame {
  width: 96px;
  height: 116px;
  border-radius: 10px;
  border: 4px solid var(--primary);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px var(--border),
    0 6px 20px rgba(0,0,0,.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.student-detail-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.student-detail-dummy-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.student-card-info {
  flex: 1;
  min-width: 0;
}

.student-card-name {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.student-card-meta {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.student-card-arrow {
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: .5rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: .9rem;
  margin: 0;
}

/* ---------- FORM STYLES ---------- */
.form-section-label {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 2px solid var(--border);
  padding-bottom: .4rem;
  margin-bottom: 1rem;
}

.req {
  color: var(--danger);
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: var(--font);
  font-size: .9rem;
  padding: .55rem .85rem;
  background: #fffaf5;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 123, 57, .15);
  background: #fff;
  outline: none;
}

textarea.form-control {
  resize: none;
}

.form-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .35rem;
}

.form-text {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ---------- PAYMENT PREVIEW ---------- */
.payment-preview {
  background: #f9f5ff;
  border: 1.5px dashed #c9aee8;
  border-radius: var(--radius-sm);
  padding: .75rem;
  text-align: center;
}

/* ---------- QR PAYMENT PANEL ---------- */
.qr-payment-panel {
  background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 100%);
  border: 2px solid var(--primary, #e07b39);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  box-shadow: 0 4px 16px rgba(224, 123, 57, 0.12);
}

.qr-payment-amount {
  font-size: 1.05rem;
  color: #5a3e1b;
}

.qr-payment-frame {
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.qr-payment-img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.qr-payment-hint {
  font-size: 0.9rem;
  color: #6b4c2a;
  line-height: 1.5;
}

/* ---------- SUBMIT BUTTON ---------- */
.btn-submit {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .3px;
  padding: .75rem;
  box-shadow: 0 4px 15px rgba(224, 123, 57, .35);
  transition: transform .15s, box-shadow .15s;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(224, 123, 57, .4);
  color: #fff;
}

.btn-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* ---------- MODAL DETAIL ---------- */
.detail-row {
  display: flex;
  gap: .5rem;
  padding: .5rem 0;
  border-bottom: 1px solid #f3e8da;
  font-size: .9rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 120px;
  flex-shrink: 0;
}

.detail-value {
  color: var(--text);
  word-break: break-word;
}

/* ---------- ADMIN BADGE / LINK ---------- */
.btn-outline-warning {
  border-color: #ffc107;
  color: #ffc107;
}

.btn-outline-warning:hover {
  background: #ffc107;
  color: #000;
}

/* ---------- FOOTER ---------- */
.app-footer {
  background: linear-gradient(135deg, #1a1060 0%, #11226b 60%, #1a3a1a 100%);
  border-top: 3px solid #c0601e;
  color: #e8d9b0;
  font-size: .78rem;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.footer-line {
  line-height: 1.7;
}

.app-footer a {
  color: #f9c74f;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
  color: #fff;
}

/* ---------- ALERTS ---------- */
.alert {
  border-radius: var(--radius-sm);
  font-size: .88rem;
}

/* ---------- ADMIN PAGE ---------- */
.admin-header {
  background: linear-gradient(135deg, #2c1654 0%, #4a2080 100%);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.admin-header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.admin-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: .4rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}

.theme-btn {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: .5rem .4rem;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  transition: border-color .2s, transform .15s;
}

.theme-btn:hover {
  transform: scale(1.03);
}

.theme-btn.active {
  border-color: var(--primary);
}

/* ---------- ADMIN TABS ---------- */
.admin-tabs {
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.admin-tabs .nav-link {
  font-size: .85rem;
  font-weight: 600;
  color: #6b7280;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: .45rem .9rem;
}

.admin-tabs .nav-link.active {
  color: var(--primary, #e07b39);
  border-bottom-color: var(--surface);
}

.admin-tab-content>.tab-pane {
  padding-top: .1rem;
}

/* ---------- ADMIN MANAGE GRID (desktop: side-by-side) ---------- */
.admin-manage-grid {
  display: flex;
  flex-direction: column;
}

/* ---------- DESKTOP LAYOUT ---------- */
#adminContainer {
  max-width: 740px;
  margin: 0 auto;
}

.layout-desktop #adminContainer {
  max-width: none;
}

.layout-desktop .admin-manage-grid {
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
}

.layout-desktop .admin-manage-grid>.admin-card {
  flex: 1;
  min-width: 0;
}

.layout-desktop #tabRegistrations .admin-card {
  /* Let the table breathe on wide screens */
  padding: 1.5rem;
}

.layout-desktop .admin-tabs .nav-link {
  font-size: .9rem;
  padding: .55rem 1.2rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 520px) {

  .header-logo-img,
  .header-prabhupada-img {
    height: 52px;
  }

  .header-iskcon-name {
    font-size: .65rem;
    letter-spacing: .4px;
  }

  .header-founder-line {
    font-size: .58rem;
  }

  .header-camp-title {
    font-size: .8rem;
  }

  .header-camp-details {
    font-size: .66rem;
  }
}

/* ========== ORIENTAL RECEIPT FRAME ========== */

/*
  The ornamental frame is drawn purely with CSS:
  – A layered border using outline + box-shadow + border-image trick
  – Corner ornaments via ::before and ::after pseudo-elements
  – Lotus-petal pattern on the border using repeating-linear-gradient
*/

.oriental-receipt-frame {
  position: relative;
  display: inline-block;
  padding: 14px;
  background: #fffdf7;
  border-radius: 6px;

  /* Triple-layer ornamental border */
  border: 3px solid #c0601e;
  outline: 2px solid #f9c74f;
  outline-offset: 3px;
  box-shadow:
    0 0 0 6px #7c4daa,
    0 0 0 8px #c0601e,
    0 0 0 11px #f9c74f,
    0 6px 28px rgba(192, 96, 30, 0.25);
}

/* Decorative top ornament band */
.oriental-receipt-frame::before {
  content: "🪷  ✦  ॐ  ✦  🪷";
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf7;
  padding: 0 .5rem;
  font-size: .78rem;
  color: #c0601e;
  white-space: nowrap;
  letter-spacing: 4px;
  pointer-events: none;
}

/* Decorative bottom ornament band */
.oriental-receipt-frame::after {
  content: "🌸  ✦  🙏  ✦  🌸";
  position: absolute;
  bottom: -1.05rem;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf7;
  padding: 0 .5rem;
  font-size: .78rem;
  color: #7c4daa;
  white-space: nowrap;
  letter-spacing: 4px;
  pointer-events: none;
}

/* Receipt image inside the frame */
.receipt-img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 4px;
  margin: 0 auto;
}

/* Wrapper that holds the frame with some breathing room for the pseudo-elements */
.oriental-receipt-frame-wrap {
  padding: 1.2rem 0 1rem;
  text-align: center;
}