:root {
  color-scheme: light;
  --maroon: #790909;
  --maroon-dark: #4a0000;
  --gold: #c98d2a;
  --gold-soft: #f7dc92;
  --cream: #fff8e9;
  --paper: #fffdf5;
  --ink: #241c16;
  --muted: #6f6255;
  --line: #8c8173;
  --border: #dcc8a0;
  --green: #126b3a;
  --display-devanagari: "Kokila", "Mangal", "Nirmala UI", Arial, sans-serif;
  --body-devanagari: "Nirmala UI", "Mangal", "Kokila", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f7f0e1, #fff9ec);
  color: var(--ink);
  font-family: var(--body-devanagari);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid rgba(121, 9, 9, 0.24);
  border-radius: 8px;
  background: #fff7e7;
  color: var(--maroon);
  cursor: pointer;
  font-weight: 900;
}

button:hover {
  background: #f5e6c6;
}

button.primary {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff9e9;
}

.is-hidden {
  display: none !important;
}

.public-site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(201, 141, 42, 0.2), transparent 24rem),
    linear-gradient(180deg, #fff9ec 0%, #f7eed9 48%, #fffdf5 100%);
}

.site-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 249, 236, 0.94);
  border-bottom: 1px solid rgba(201, 141, 42, 0.28);
  backdrop-filter: blur(14px);
  padding: 10px clamp(14px, 4vw, 56px);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--maroon);
  font-weight: 1000;
  text-decoration: none;
}

.site-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.hero-actions a {
  color: var(--maroon);
  font-weight: 900;
  text-decoration: none;
}

.site-nav nav a {
  border-radius: 8px;
  padding: 10px 12px;
}

.site-nav nav a:hover {
  background: #fff1cf;
}

.site-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(30px, 4.2vw, 58px) clamp(16px, 6vw, 86px);
  overflow: visible;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.hero-copy p,
.section-title p,
.about-band > div p {
  color: var(--gold);
  font-family: var(--display-devanagari);
  font-size: clamp(20px, 2vw, 31px);
  font-weight: 1000;
  line-height: 1.12;
  margin: 0;
}

.hero-copy p {
  width: max-content;
  max-width: 100%;
  border-bottom: 2px solid rgba(201, 141, 42, 0.48);
  padding-bottom: 4px;
}

.hero-copy h1 {
  color: var(--maroon);
  font-family: var(--display-devanagari);
  font-size: clamp(40px, 5.1vw, 68px);
  line-height: 1.2;
  letter-spacing: 0;
  margin: 2px 0 0;
  max-width: 690px;
  text-wrap: balance;
  text-shadow: 0 2px 0 #f1d187, 0 8px 18px rgba(74, 0, 0, 0.12);
}

.hero-copy strong {
  color: #4a0000;
  font-family: var(--display-devanagari);
  font-size: clamp(25px, 2.55vw, 34px);
  line-height: 1.18;
}

.hero-copy span {
  max-width: 620px;
  color: #4a3d32;
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 800;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hero-actions a,
.hero-actions button {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(121, 9, 9, 0.24);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--maroon);
  color: #fff9e9;
}

.hero-actions button {
  background: #fff7e7;
  color: var(--maroon);
}

.hero-emblem {
  display: grid;
  place-items: center;
  min-height: 360px;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 244, 192, 0.08) 0 2px, transparent 2px 18px),
    linear-gradient(145deg, #980f0a, #4a0000);
  border: 8px solid #120807;
  box-shadow: 0 28px 80px rgba(74, 0, 0, 0.28);
  padding: 32px;
}

.hero-emblem img {
  width: min(100%, 340px);
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.34));
}

.site-section {
  padding: clamp(26px, 4vw, 54px) clamp(16px, 6vw, 86px);
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.section-title h2,
.about-band h2 {
  color: var(--maroon);
  font-family: var(--display-devanagari);
  font-size: clamp(29px, 3.8vw, 48px);
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.event-card {
  position: relative;
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 10px;
  overflow: visible;
  border: 1px solid rgba(201, 141, 42, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.92), rgba(255, 253, 245, 0.96)),
    linear-gradient(145deg, #fff1cf, #fffdf5);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(74, 0, 0, 0.08);
  padding: 18px 20px;
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 141, 42, 0.32);
  pointer-events: none;
}

.event-card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(201, 141, 42, 0.18);
}

.event-grid small {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(201, 141, 42, 0.16);
  color: var(--gold);
  font-size: 13px;
  font-weight: 1000;
  padding: 4px 9px;
}

.event-grid span {
  position: relative;
  z-index: 1;
  color: var(--maroon);
  font-family: var(--display-devanagari);
  font-size: clamp(27px, 2.7vw, 38px);
  font-weight: 1000;
  line-height: 1.12;
  text-wrap: balance;
}

.event-grid p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 34ch;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
}

.gallery-band {
  background:
    linear-gradient(180deg, rgba(121, 9, 9, 0.96), rgba(74, 0, 0, 0.96)),
    var(--maroon);
}

.gallery-band .section-title h2,
.gallery-band .section-title p {
  color: #fff4d8;
}

.location-band {
  background: linear-gradient(180deg, #fffdf5, #fff8e9);
}

.location-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(201, 141, 42, 0.34);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.08);
  padding: 18px;
}

.location-panel div {
  display: grid;
  gap: 4px;
}

.location-panel strong {
  color: var(--maroon);
  font-size: 22px;
}

.location-panel span {
  color: var(--muted);
  font-weight: 900;
}

.location-panel small {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.location-panel a {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--maroon);
  color: #fff9e9;
  font-weight: 900;
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}

.location-map {
  width: 100%;
  height: min(52vw, 380px);
  min-height: 260px;
  display: block;
  border: 1px solid rgba(201, 141, 42, 0.34);
  border-radius: 8px;
  margin-top: 14px;
  background: #fff8e9;
}

.public-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.public-media-card,
.admin-media-card {
  overflow: hidden;
  border: 1px solid rgba(201, 141, 42, 0.36);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.12);
}

.public-media-card img,
.public-media-card iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border: 0;
  object-fit: cover;
  background: #220000;
}

.public-media-card div,
.admin-media-card div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.public-media-card span,
.admin-media-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.public-media-card strong,
.admin-media-card strong {
  color: var(--maroon);
  font-size: 19px;
  line-height: 1.18;
}

.public-media-card p,
.admin-media-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.media-delete-btn {
  width: max-content;
  min-height: 36px;
  border-color: rgba(121, 9, 9, 0.34);
  background: #fff1e8;
  color: var(--maroon);
  padding: 0 14px;
}

.media-delete-btn:hover {
  background: #f4d6c9;
}

.empty-gallery {
  grid-column: 1 / -1;
  border: 1px dashed rgba(247, 220, 146, 0.48);
  border-radius: 8px;
  color: #fff4d8;
  font-weight: 900;
  padding: 22px;
}

.about-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(18px, 4vw, 48px);
  align-items: start;
  background: linear-gradient(90deg, #fff8e9, #fffdf5);
}

.about-copy {
  display: grid;
  gap: 16px;
}

.about-copy p {
  margin: 0;
  color: #4a3d32;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 800;
  line-height: 1.5;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.about-points span {
  border-top: 3px solid var(--gold);
  color: var(--maroon);
  font-weight: 1000;
  padding-top: 8px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  background: #4a0000;
  color: #fff4d8;
  padding: 16px clamp(16px, 6vw, 86px);
  font-weight: 900;
}

.site-footer span {
  color: #f7dc92;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.public-site {
  background:
    linear-gradient(90deg, rgba(121, 9, 9, 0.035) 1px, transparent 1px) 0 0 / 54px 54px,
    radial-gradient(circle at 88% 8%, rgba(201, 141, 42, 0.24), transparent 24rem),
    linear-gradient(180deg, #fffaf0 0%, #f6edda 46%, #fffdf5 100%);
}

.site-nav {
  background: rgba(255, 250, 240, 0.96);
}

.site-nav nav {
  flex-wrap: wrap;
}

.site-hero {
  position: relative;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: calc(100vh - 76px);
  padding-top: clamp(34px, 6vw, 84px);
  padding-bottom: clamp(34px, 5vw, 72px);
}

.site-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(34vw, 420px);
  height: 7px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--maroon));
}

.hero-copy {
  gap: 10px;
}

.hero-copy h1 {
  max-width: 830px;
  font-size: clamp(42px, 6.2vw, 92px);
  line-height: 1.02;
}

.hero-copy span {
  max-width: 700px;
}

.hero-actions {
  margin-top: 18px;
}

.hero-emblem {
  position: relative;
  min-height: min(46vw, 520px);
  border-width: 10px;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 244, 192, 0.08) 0 2px, transparent 2px 18px),
    linear-gradient(145deg, #a5120e, #4a0000);
}

.hero-emblem img {
  width: min(100%, 430px);
}

.hero-stamp {
  position: absolute;
  left: -24px;
  bottom: 26px;
  display: grid;
  gap: 2px;
  max-width: 280px;
  background: #fff8df;
  border: 1px solid rgba(201, 141, 42, 0.72);
  border-left: 6px solid var(--gold);
  color: var(--maroon);
  box-shadow: 0 18px 45px rgba(35, 0, 0, 0.22);
  padding: 12px 14px;
}

.hero-stamp span {
  color: var(--gold);
  font-weight: 1000;
}

.hero-stamp strong {
  font-size: 17px;
  line-height: 1.22;
}

.notice-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid rgba(201, 141, 42, 0.32);
  border-bottom: 1px solid rgba(201, 141, 42, 0.32);
  background: #4a0000;
  color: #fff4d8;
  padding: 0 clamp(16px, 6vw, 86px);
}

.notice-band span {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(247, 220, 146, 0.18);
  font-weight: 1000;
  text-align: center;
}

.notice-band span:last-child {
  border-right: 0;
}

.section-title-row {
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.62fr);
  align-items: end;
}

.section-title-row > span {
  color: #4a3d32;
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 800;
  line-height: 1.42;
}

.event-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-card {
  min-height: 220px;
  align-content: space-between;
  padding: 20px 22px;
}

.event-card::after {
  width: 118px;
  height: 118px;
}

.event-grid span {
  font-size: clamp(28px, 3.1vw, 46px);
}

.event-grid p {
  max-width: 38ch;
}

.jyot-band {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(320px, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: stretch;
  background:
    linear-gradient(180deg, rgba(74, 0, 0, 0.95), rgba(121, 9, 9, 0.96)),
    var(--maroon);
  color: #fff4d8;
}

.jyot-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.jyot-copy p {
  color: #f7dc92;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 1000;
  margin: 0;
}

.jyot-copy h2 {
  color: #fff8df;
  font-family: var(--display-devanagari);
  font-size: clamp(34px, 4.6vw, 66px);
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

.jyot-copy span {
  max-width: 62ch;
  color: #f8e7bf;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 800;
  line-height: 1.48;
}

.jyot-route {
  position: relative;
  display: grid;
  gap: 12px;
  counter-reset: route;
}

.jyot-route::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 3px;
  background: linear-gradient(180deg, #f7dc92, rgba(247, 220, 146, 0.25));
}

.jyot-route article {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 118px;
  border: 1px solid rgba(247, 220, 146, 0.38);
  border-radius: 8px;
  background: rgba(255, 248, 223, 0.08);
  padding: 18px 20px 18px 72px;
}

.jyot-route article::before {
  counter-increment: route;
  content: counter(route);
  position: absolute;
  left: 10px;
  top: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f7dc92;
  color: var(--maroon);
  font-family: Arial, sans-serif;
  font-weight: 1000;
}

.jyot-route small {
  color: #f7dc92;
  font-weight: 1000;
}

.jyot-route strong {
  color: #fff;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.1;
}

.jyot-route span {
  color: #f8e7bf;
  font-weight: 800;
  line-height: 1.38;
}

.donation-band {
  background: linear-gradient(180deg, #fffdf5, #fff5df);
}

.donation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.donation-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 172px;
  border: 1px solid rgba(201, 141, 42, 0.34);
  border-top: 5px solid var(--gold);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.08);
  padding: 18px;
}

.donation-qr-card {
  grid-row: span 2;
}

.donation-qr {
  width: min(100%, 260px);
  aspect-ratio: 1;
  display: block;
  border: 1px solid rgba(201, 141, 42, 0.34);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 8px;
}

.donation-grid small {
  color: var(--gold);
  font-weight: 1000;
}

.donation-grid strong {
  color: var(--maroon);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.18;
}

.donation-grid span {
  color: #4a3d32;
  font-weight: 800;
  line-height: 1.42;
}

.committee-band {
  background:
    linear-gradient(135deg, rgba(255, 248, 223, 0.94), rgba(255, 253, 245, 0.98)),
    #fff8e9;
}

.committee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.committee-grid article {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid rgba(201, 141, 42, 0.34);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.07);
  padding: 16px;
}

.committee-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(201, 141, 42, 0.14);
}

.committee-grid small,
.committee-grid strong {
  position: relative;
  z-index: 1;
}

.committee-grid small {
  color: var(--gold);
  font-weight: 1000;
}

.committee-grid strong {
  color: var(--maroon);
  font-family: var(--display-devanagari);
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.12;
}

.gallery-band {
  background:
    linear-gradient(180deg, rgba(74, 0, 0, 0.97), rgba(121, 9, 9, 0.96)),
    var(--maroon);
}

.gallery-band .section-title-row > span {
  color: #f8e7bf;
}

.media-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.media-filters button {
  min-height: 38px;
  border-color: rgba(247, 220, 146, 0.35);
  background: rgba(255, 248, 223, 0.09);
  color: #fff4d8;
  padding: 0 13px;
}

.media-filters button.active {
  background: #f7dc92;
  color: var(--maroon);
}

.about-band {
  background:
    linear-gradient(90deg, #fff8e9, rgba(255, 253, 245, 0.94)),
    #fffdf5;
}

.site-footer {
  align-items: center;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(201, 141, 42, 0.22), transparent 26rem),
    linear-gradient(145deg, #600000, #980f0a 52%, #fff5df 52%);
}

.login-card {
  position: relative;
  width: min(100%, 390px);
  display: grid;
  gap: 14px;
  background: var(--paper);
  border: 1px solid rgba(201, 141, 42, 0.45);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(55, 0, 0, 0.26);
  padding: 24px;
}

.back-link {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 34px;
  padding: 4px 10px;
}

.login-card img {
  width: 112px;
  justify-self: center;
}

.login-card p,
.topbar p,
.panel-header p {
  color: var(--gold);
  font-weight: 900;
  margin: 0 0 4px;
}

.login-card h1,
.topbar h1,
.panel-header h2 {
  color: var(--maroon);
  line-height: 1.08;
  margin: 0;
}

.login-card small {
  color: var(--muted);
  font-weight: 800;
}

.machine-preview {
  display: grid;
  gap: 4px;
  border: 1px solid #ead9b7;
  border-radius: 8px;
  background: #fffaf0;
  padding: 10px;
}

.machine-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.machine-preview strong {
  color: var(--maroon);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  max-width: 1420px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title img,
.dashboard-hero img,
.report-head img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand-title span {
  color: var(--muted);
  font-weight: 900;
}

.topbar h1 {
  font-size: 34px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fffdf5, #fff1cf);
  border: 1px solid rgba(201, 141, 42, 0.36);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.08);
  margin-bottom: 14px;
  padding: 14px 16px;
}

.dashboard-hero p,
.dashboard-hero h2 {
  margin: 0;
}

.dashboard-hero p {
  color: var(--gold);
  font-weight: 900;
}

.dashboard-hero h2 {
  color: var(--maroon);
  font-size: 30px;
  line-height: 1.05;
}

.dashboard-hero span {
  color: var(--muted);
  font-weight: 900;
}

.tabs {
  max-width: 1420px;
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.tab.active {
  background: var(--maroon);
  color: #fff9e9;
}

.view {
  display: none;
  max-width: 1420px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-grid article,
.panel,
.entry-panel {
  background: var(--paper);
  border: 1px solid rgba(121, 9, 9, 0.15);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.09);
}

.summary-grid article {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.summary-grid span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.summary-grid strong {
  color: var(--maroon);
  font-size: 28px;
}

.dashboard-grid,
.records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  padding: 16px;
}

.panel h2 {
  color: var(--maroon);
  font-size: 22px;
  margin: 0 0 14px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, 380px) minmax(700px, 1fr);
  gap: 18px;
  align-items: start;
}

.entry-panel {
  padding: 18px;
  position: sticky;
  top: 14px;
}

.panel-header {
  border-bottom: 1px solid rgba(201, 141, 42, 0.34);
  margin-bottom: 15px;
  padding-bottom: 12px;
}

.data-form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 6px;
  color: #4a3d32;
  font-size: 14px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  min-height: 44px;
  padding: 9px 11px;
  outline: none;
}

input[readonly] {
  background: #f8edd5;
  color: #4a3a2e;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 141, 42, 0.18);
}

.two-col {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.preview-panel {
  min-width: 0;
  overflow: auto;
  padding-bottom: 14px;
}

.receipt {
  width: min(100%, 1260px);
  min-width: 980px;
  aspect-ratio: 2.15 / 1;
  display: grid;
  grid-template-columns: 265px 1fr;
  background: var(--cream);
  border: 5px solid #120807;
  box-shadow: 0 18px 55px rgba(74, 0, 0, 0.16);
}

.receipt-side {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  justify-items: center;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  background:
    repeating-radial-gradient(circle at 50% 33%, rgba(255, 244, 192, 0.08) 0 2px, transparent 2px 17px),
    linear-gradient(180deg, #9b130e, #5a0000);
  border-right: 5px solid var(--gold);
  color: #ffe7a3;
  padding: 22px 18px;
  text-align: center;
}

.deity-line {
  color: #fff7e5;
  font-size: 22px;
  font-weight: 1000;
}

.mandal-logo {
  width: 215px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.28));
}

.place-pill {
  max-width: 190px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe98e, #d8942b);
  color: var(--maroon);
  font-size: 17px;
  font-weight: 1000;
  padding: 6px 16px;
}

.festival {
  display: grid;
  color: #fff0b8;
  font-weight: 1000;
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.festival span {
  font-size: 34px;
}

.festival strong {
  font-size: 44px;
}

.thanks-badge {
  align-self: end;
  width: 148px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #fff8df;
  border: 5px double var(--gold);
  color: var(--maroon);
  font-size: 18px;
  font-weight: 1000;
  line-height: 1.15;
}

.receipt-main {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background:
    radial-gradient(circle at 16% 0%, rgba(247, 220, 146, 0.36), transparent 25rem),
    linear-gradient(180deg, #fffaf0, #fff7e6);
  overflow: hidden;
  padding: 24px 32px 0;
}

.border-line {
  position: absolute;
  inset: 20px 22px 28px;
  border: 2px solid rgba(201, 141, 42, 0.8);
  pointer-events: none;
}

.receipt-header {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--maroon);
  padding-right: 230px;
}

.receipt-header h2 {
  font-size: 60px;
  line-height: 0.98;
  margin: 8px 0 0;
  font-weight: 1000;
  letter-spacing: 0;
}

.receipt-header p {
  margin: 9px 0 20px;
  font-size: 27px;
  font-weight: 1000;
}

.receipt-title {
  display: inline-grid;
  place-items: center;
  min-width: 300px;
  min-height: 82px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, #930d0a, #6b0000);
  border: 4px solid #b37c18;
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px #410000;
  color: #fff;
  font-size: 62px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

.receipt-meta {
  position: absolute;
  z-index: 2;
  top: 150px;
  right: 44px;
  display: grid;
  gap: 22px;
  min-width: 285px;
  font-size: 22px;
  font-weight: 1000;
}

.receipt-meta div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.receipt-meta strong {
  color: #d01812;
  font-size: 30px;
}

.receipt-meta div:nth-child(2) strong {
  color: #111;
  border-bottom: 1px solid var(--line);
  font-size: 24px;
}

.receipt-lines {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 36px 8px 20px;
  font-size: 22px;
  font-weight: 1000;
}

.line-row {
  display: grid;
  align-items: end;
  min-height: 36px;
  column-gap: 16px;
}

.line-row span {
  white-space: nowrap;
}

.line-row strong {
  min-height: 33px;
  border-bottom: 2px dotted var(--line);
  color: #111;
  padding: 0 12px 3px;
}

.name-row {
  grid-template-columns: auto 1fr;
}

.amount-row {
  grid-template-columns: auto minmax(220px, 0.5fr) auto minmax(390px, 1fr);
}

.amount-row em {
  font-style: normal;
}

.remarks-row {
  grid-template-columns: auto 1fr;
}

.signature-row {
  display: grid;
  grid-template-columns: minmax(360px, 0.58fr);
  gap: 0;
  margin-top: 2px;
}

.signature-row div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: end;
}

.signature-row i {
  display: grid;
  align-items: end;
  min-height: 30px;
  border-bottom: 2px dotted var(--line);
  overflow: hidden;
}

.signature-image {
  width: 180px;
  height: 42px;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: screen;
  opacity: 0.95;
  transform: translateY(5px);
}

.receipt-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  border-top: 1px solid rgba(201, 141, 42, 0.86);
  margin: 0 8px;
  text-align: center;
}

.receipt-footer p {
  color: var(--maroon);
  font-size: 22px;
  font-weight: 1000;
  margin: 17px 0 0;
}

.receipt-footer strong {
  background: linear-gradient(180deg, #7f0a08, #550000);
  color: var(--gold-soft);
  font-size: 30px;
  margin: 0 -40px;
  padding: 9px 0 12px;
}

.creator-credit,
.report-credit {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.creator-credit {
  background: #fff8df;
  margin: -9px -40px 0;
  padding: 5px 8px;
}

.mini-list,
.record-list {
  display: grid;
  gap: 8px;
}

.record-item {
  display: grid;
  gap: 3px;
  border: 1px solid #ead9b7;
  border-radius: 8px;
  background: #fffaf0;
  padding: 10px;
}

.record-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.small-btn {
  min-height: 32px;
  padding: 4px 10px;
}

.record-item strong {
  color: var(--maroon);
}

.record-item span,
.record-item small {
  color: var(--muted);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(290px, 520px);
}

.report-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.report-sheet {
  background: var(--paper);
  border: 1px solid rgba(121, 9, 9, 0.15);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(74, 0, 0, 0.09);
  padding: 18px;
}

.report-head {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid rgba(201, 141, 42, 0.36);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.report-head p,
.report-head h2,
.report-head span,
.report-sheet h3 {
  margin: 0;
}

.report-head p {
  color: var(--gold);
  font-weight: 900;
}

.report-head h2,
.report-sheet h3 {
  color: var(--maroon);
}

.report-head h2 {
  font-size: 30px;
  line-height: 1.05;
}

.report-sheet h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.report-credit {
  border-top: 1px solid #ead9b7;
  margin-top: 16px;
  padding-top: 10px;
  text-align: center;
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.report-cards article,
.balance-report {
  border: 1px solid #ead9b7;
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px;
}

.report-cards span {
  color: var(--muted);
  display: block;
  font-weight: 900;
}

.report-cards strong,
.balance-report strong {
  color: var(--maroon);
  font-size: 24px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

.report-table th,
.report-table td {
  border: 1px solid #ead9b7;
  padding: 8px;
  text-align: left;
}

.report-table th {
  background: #fff1cf;
  color: var(--maroon);
}

.empty-report {
  color: var(--muted);
  font-weight: 900;
}

.ledger-report {
  display: grid;
  gap: 14px;
}

.ledger-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ledger-columns section {
  min-width: 0;
  border: 1px solid #ead9b7;
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px;
}

.ledger-columns h4 {
  color: var(--maroon);
  font-size: 20px;
  margin: 0 0 10px;
}

.ledger-total {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.ledger-total strong {
  color: var(--maroon);
  font-size: 20px;
}

.ledger-balance {
  border-radius: 8px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  font-weight: 1000;
}

.ledger-balance.plus {
  background: #116b3a;
}

.ledger-balance.minus {
  background: #9a1410;
}

.ledger-balance strong {
  font-size: 26px;
}

.media-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 430px) 1fr;
  gap: 14px;
  align-items: start;
}

.admin-media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-media-card img,
.admin-media-card iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border: 0;
  object-fit: cover;
  background: #220000;
}

@media (max-width: 980px) {
  .workspace,
  .dashboard-grid,
  .records-grid,
  .media-workspace,
  .about-band {
    grid-template-columns: 1fr;
  }

  .site-hero {
    grid-template-columns: 1fr;
  }

  .section-title-row,
  .jyot-band,
  .donation-grid {
    grid-template-columns: 1fr;
  }

  .committee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-emblem {
    min-height: auto;
  }

  .event-grid,
  .public-media-grid,
  .admin-media-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-panel {
    position: static;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .preview-panel {
    margin: 0 -18px;
    padding: 0 18px 14px;
  }
}

@media (max-width: 620px) {
  .site-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-nav nav a,
  .site-nav nav button {
    flex: 1 1 42%;
  }

  .site-hero {
    min-height: auto;
    padding-top: 30px;
  }

  .hero-emblem {
    border-width: 5px;
    padding: 18px;
  }

  .hero-stamp {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 14px;
  }

  .notice-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-grid,
  .public-media-grid,
  .admin-media-list {
    grid-template-columns: 1fr;
  }

  .event-card,
  .event-ganpati,
  .event-navratri,
  .event-shivjayanti,
  .event-sankranti,
  .event-kojagiri,
  .event-dahihandi {
    grid-column: auto;
    grid-row: auto;
    min-height: 168px;
  }

  .jyot-route article {
    padding-left: 62px;
  }

  .donation-grid article {
    min-height: auto;
  }

  .donation-qr-card {
    grid-row: auto;
  }

  .donation-qr {
    width: min(100%, 220px);
  }

  .committee-grid {
    grid-template-columns: 1fr;
  }

  .committee-grid article {
    min-height: 96px;
  }

  .about-points {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .location-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    padding: 12px;
  }

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

  .tabs {
    grid-template-columns: 1fr 1fr;
  }

  .summary-grid,
  .two-col,
  .actions,
  .report-controls,
  .report-cards,
  .ledger-columns {
    grid-template-columns: 1fr;
  }

  .brand-title,
  .dashboard-hero,
  .report-head {
    align-items: flex-start;
  }

  .brand-title h1,
  .dashboard-hero h2,
  .report-head h2 {
    font-size: 24px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .panel,
  .entry-panel {
    padding: 14px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 7mm;
  }

  body {
    background: #fff;
  }

  .no-print,
  .topbar,
  .tabs,
  #loginScreen {
    display: none !important;
  }

  body.print-report .view:not(#reportsView),
  body.print-report .report-controls,
  body:not(.print-report) .view:not(#receiptView) {
    display: none !important;
  }

  .app-shell,
  .view,
  .workspace,
  .preview-panel {
    display: block !important;
    margin: 0;
    padding: 0;
    max-width: none;
    overflow: visible;
  }

  .receipt {
    width: 100%;
    min-width: 0;
    box-shadow: none;
    page-break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
