@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --ivory: #FBF3E3;
  --maroon: #6E1423;
  --maroon-dark: #4E0E19;
  --gold: #BF9B30;
  --gold-light: #E4C976;
  --teal: #1F4B43;
  --ink: #2B1B14;
  --line: #E4D2A6;
  --card: #FFFDF7;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  background-image:
    radial-gradient(circle at 8% 12%, rgba(191,155,48,0.06) 0%, transparent 35%),
    radial-gradient(circle at 92% 8%, rgba(191,155,48,0.06) 0%, transparent 35%),
    radial-gradient(circle at 50% 95%, rgba(110,20,35,0.04) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  min-height: 100vh;
}

h1, h2, h3, .brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--maroon);
  margin: 0;
}

/* ---- Brand lockup: "Diya Natyalaya" ---- */
.logo-lockup { text-align: center; }
.logo-lockup .diya-word {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 2.1rem;
  color: var(--maroon);
  position: relative;
}
.logo-lockup .diya-word .flame { color: var(--gold); font-style: normal; }
.logo-lockup .natyalaya-word {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  font-weight: 600;
  margin-top: 8px;
}
.logo-lockup .tagline {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 6px;
}
header.topbar .logo-lockup .diya-word { font-size: 1.3rem; color: var(--gold-light); }
header.topbar .logo-lockup .natyalaya-word { color: var(--ivory); letter-spacing: 0.28em; font-size: 0.66rem; }
header.topbar .logo-lockup { text-align: left; }

/* ---- Ornate frame: double gold rule with corner marks, echoes the admission-form border ---- */
.ornate-frame {
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  position: relative;
}

/* Scalloped temple-arch divider — the signature motif, used once per page */
.arch-divider {
  height: 18px;
  width: 100%;
  background-image: radial-gradient(circle at 9px -3px, transparent 9px, var(--maroon) 9.5px, var(--maroon) 10px, transparent 10.5px);
  background-size: 24px 18px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

header.topbar {
  background: var(--maroon);
  color: var(--ivory);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
header.topbar .header-lamp {
  position: absolute;
  top: -18px;
  width: 46px;
  opacity: 0.5;
  filter: brightness(1.4);
}
header.topbar .header-lamp.left { left: 16px; }
header.topbar .header-lamp.right { right: 16px; transform: scaleX(-1); }
@media (max-width: 600px) { header.topbar .header-lamp { width: 30px; } }
@media (max-width: 480px) {
  header.topbar .logo-lockup .diya-word { font-size: 1.05rem; }
  header.topbar .logo-lockup .natyalaya-word { font-size: 0.56rem; letter-spacing: 0.16em; margin-top: 4px; }
}

header.topbar .brand { color: var(--gold); font-size: 1.3rem; letter-spacing: 0.02em; }
header.topbar .who { font-size: 0.85rem; color: var(--ivory); opacity: 0.85; }
header.topbar button {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.85rem;
}
header.topbar button:hover { background: var(--gold); color: var(--maroon-dark); }

.container { max-width: 1000px; margin: 0 auto; padding: 32px 24px 64px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.card h2 { font-size: 1.15rem; margin-bottom: 14px; }
.card h2 .eyebrow { display:block; font-family:'Work Sans'; font-size:0.7rem; letter-spacing:0.12em; text-transform:uppercase; color: var(--teal); font-weight:600; margin-bottom:4px;}

.tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
}
.tab-btn.active { background: var(--maroon); color: var(--ivory); border-color: var(--maroon); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

form.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
form.grid label { grid-column: span 1; display: flex; flex-direction: column; font-size: 0.82rem; gap: 5px; color: var(--teal); font-weight: 500; }
form.grid .full { grid-column: 1 / -1; }

input, select, textarea {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.98rem;
  background: var(--ivory);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  accent-color: var(--maroon);
  color-scheme: light;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

button.primary {
  background: var(--maroon);
  color: var(--ivory);
  border: none;
  padding: 13px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 0.96rem;
  margin-top: 6px;
}
button.primary:hover { background: var(--maroon-dark); }
button.secondary {
  background: transparent;
  color: var(--maroon);
  border: 1px solid var(--maroon);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
}

table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 480px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
th { color: var(--teal); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Attendance dot — the recurring status marker (bindi-inspired) */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.present { background: var(--teal); }
.dot.absent { background: var(--maroon); }
.status-text { font-size: 0.85rem; font-weight: 500; }

.att-btns { display: flex; gap: 6px; }
.att-btn {
  border: 1px solid var(--line);
  background: var(--ivory);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
}
.att-btn.present.on { background: var(--teal); color: var(--ivory); border-color: var(--teal); }
.att-btn.absent.on { background: var(--maroon); color: var(--ivory); border-color: var(--maroon); }

.event-item { border-left: 3px solid var(--gold); padding: 8px 14px; margin-bottom: 10px; }
.event-photo { width: 100%; max-width: 320px; border-radius: 6px; margin-bottom: 8px; display: block; }

/* ---- Messages: announcements + private chat ---- */
.chat-thread {
  max-height: 340px;
  min-height: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}
.chat-thread:empty::before {
  content: "No messages yet — say hello below.";
  color: #a0917f;
  font-style: italic;
  font-size: 0.85rem;
}
.chat-bubble {
  max-width: 75%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-bubble.mine { align-self: flex-end; background: var(--maroon); color: var(--ivory); border-bottom-right-radius: 3px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 3px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }
.chat-input-row button { white-space: nowrap; }

.unread-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--maroon-dark);
  font-family: 'Work Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.tab-btn .unread-badge { background: var(--gold); color: var(--maroon-dark); margin-left: 6px; }
.event-item .date { font-size: 0.75rem; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; }
.event-item h3 { font-size: 1rem; margin: 2px 0 4px; }
.event-item p { margin: 0; font-size: 0.88rem; color: #55453c; }

.empty { color: #8a7a6c; font-style: italic; font-size: 0.9rem; padding: 10px 0; }
.msg { font-size: 0.85rem; margin-top: 10px; padding: 8px 12px; border-radius: 6px; }
.msg.error { background: #FBE6E6; color: var(--maroon-dark); }
.msg.ok { background: #E4F0EC; color: var(--teal); }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  padding: 40px 20px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 34px;
  width: 100%;
  max-width: 380px;
  margin-top: 26px;
}
.login-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 2px; }
.login-card .sub { text-align: center; color: var(--teal); font-size: 0.82rem; margin-bottom: 26px; letter-spacing: 0.04em; text-transform: uppercase; }
.login-full-logo { width: 220px; max-width: 70vw; display: block; margin: 0 auto 4px; border-radius: 14px; box-shadow: 0 8px 24px rgba(78,14,25,0.18); }
.login-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 6px; }
.login-divider .line { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.login-divider .line:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.login-divider .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(191,155,48,0.18); }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 44px; }
.eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: #8a7a6c;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.eye-toggle:hover { color: var(--maroon); }
.role-toggle { display: flex; gap: 8px; margin-bottom: 6px; }
.role-toggle button { flex: 1; padding: 10px 14px; }
.switch-mode { text-align: center; font-size: 0.85rem; margin-top: 16px; color: #6b5a4e; }
.switch-mode a { color: var(--maroon); cursor: pointer; font-weight: 500; }

.section-heading {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 22px 0 12px;
}
.section-heading:first-child { margin-top: 0; }
.radio-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.radio-row label { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 400 !important; color: var(--ink) !important; }
.radio-row input[type="radio"], .radio-row input[type="checkbox"] { width: auto; }
.req-star { color: var(--maroon); font-weight: 700; }
.required-note { font-size: 0.8rem; color: var(--teal); margin: -6px 0 16px; }
.required-note .req-star { margin-right: 2px; }
.dob-row { display: flex; gap: 8px; max-width: 420px; }
.dob-row select { flex: 1; min-width: 0; }
select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }

footer.site-footer {
  background: var(--maroon-dark);
  color: var(--ivory);
  margin-top: 40px;
  padding: 26px 24px;
}
footer.site-footer .foot-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--gold-light);
}
footer.site-footer .foot-inner div { line-height: 1.6; }
footer.site-footer .foot-inner strong { color: var(--ivory); font-family: 'Cormorant Garamond', serif; font-size: 1rem; }

@media (max-width: 600px) {
  form.grid { grid-template-columns: 1fr; }
}

/* ---------------- Front page (home.html) ---------------- */
nav.homenav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 14px;
}
nav.homenav .navlinks { display: flex; gap: 10px; }
.nav-textlink {
  color: var(--maroon);
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
}
.nav-textlink:hover { color: var(--maroon-dark); }
.brand-icon { display: block; border-radius: 50%; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.btn-outline {
  border: 1px solid var(--maroon);
  color: var(--maroon);
  background: transparent;
  padding: 9px 20px;
  border-radius: 6px;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-outline:hover { background: var(--maroon); color: var(--ivory); }
.btn-solid {
  background: var(--maroon);
  color: var(--ivory);
  border: 1px solid var(--maroon);
  padding: 9px 20px;
  border-radius: 6px;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-solid:hover { background: var(--maroon-dark); }

.hero {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 24px 56px;
  position: relative;
}
.hero-glow {
  display: inline-block;
  background: radial-gradient(circle, rgba(191,155,48,0.22) 0%, rgba(191,155,48,0.08) 45%, rgba(251,243,227,0) 72%);
  padding: 18px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.hero-logo { width: 220px; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(78,14,25,0.18)); }
.hero-flourish {
  position: absolute;
  top: 0px;
  width: 70px;
  height: auto;
  opacity: 0.92;
}
.hero-flourish.left { left: 6%; }
.hero-flourish.right { right: 6%; transform: scaleX(-1); }
@media (max-width: 760px) {
  .hero-flourish { width: 40px; top: -6px; }
  .hero-flourish.left { left: 2%; }
  .hero-flourish.right { right: 2%; }
}
.hero .eyebrow-line {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero p.lede {
  font-family: 'Work Sans', sans-serif;
  font-size: 1.02rem;
  color: #5c4a3d;
  line-height: 1.65;
  margin-bottom: 28px;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .cta-row a { padding: 12px 26px; font-size: 0.95rem; }

section.home-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 24px;
}
section.home-section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; }
section.home-section.alt > .inner { max-width: 900px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 8px; font-size: 1.8rem; }
.section-sub { text-align: center; color: var(--teal); font-family:'Work Sans'; font-size:0.78rem; letter-spacing:0.15em; text-transform:uppercase; margin-bottom: 32px; }

.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 20px; }
.mission-item { text-align: center; }
.mission-item .badge {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 1.4rem; color: var(--maroon);
}
.mission-item p { font-family:'Work Sans'; font-size: 0.9rem; color: #5c4a3d; line-height: 1.55; }
.mission-item h4 { font-size: 1.05rem; margin-bottom: 6px; }

.teacher-card {
  display: flex;
  gap: 32px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.teacher-card .portrait {
  width: 140px; height: 140px; min-width: 140px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon-dark); font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 700;
  border: 3px solid var(--maroon);
}
.teacher-card h3 { font-size: 1.5rem; margin-bottom: 2px; }
.teacher-card .role { color: var(--gold); font-family:'Work Sans'; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.teacher-card .creds { color: var(--teal); font-size: 0.85rem; margin-bottom: 12px; }
.teacher-card p.bio { font-family:'Work Sans'; font-size: 0.92rem; color: #5c4a3d; line-height: 1.6; }

.quote-block {
  text-align: center;
  max-width: 640px;
  margin: 10px auto 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--maroon);
  line-height: 1.5;
}
.quote-block .attribution { display:block; margin-top: 10px; font-family:'Work Sans'; font-style: normal; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }

@media (max-width: 700px) {
  .mission-grid { grid-template-columns: 1fr 1fr; }
  .teacher-card { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 1.7rem; }
  nav.homenav { padding: 14px 18px; justify-content: center; text-align: center; }
  nav.homenav .navlinks { width: 100%; justify-content: center; }
  .hero { padding: 34px 18px 40px; }
  .container { padding: 22px 14px 48px; }
  header.topbar { padding: 14px 16px; }
  .card { padding: 18px 16px; }
  form.grid { gap: 10px; }
  .tabs { gap: 4px; }
  .tab-btn { padding: 7px 12px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .mission-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.45rem; }
  .login-card { padding: 28px 20px; }
  .logo-lockup .diya-word { font-size: 1.6rem; }
}

/* ---- Additional home-page content blocks ---- */
.arch-divider.small { height: 12px; background-size: 18px 12px; opacity: 0.55; }

.body-copy {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #5c4a3d;
  max-width: 700px;
  margin: 0 auto 14px;
  text-align: center;
}
.body-copy.left { text-align: left; margin: 0 0 14px; max-width: none; }

.mission-grid.five { grid-template-columns: repeat(5, 1fr); }
.mission-grid.three { grid-template-columns: repeat(3, 1fr); }
.mission-grid .mission-item p { font-size: 0.86rem; }
@media (max-width: 900px) {
  .mission-grid.five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .mission-grid.five, .mission-grid.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .mission-grid.five, .mission-grid.three { grid-template-columns: 1fr; }
}

.resp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  max-width: 820px;
  margin: 24px auto 0;
}
.resp-item { display: flex; gap: 14px; align-items: flex-start; }
.resp-icon {
  font-size: 1.3rem;
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 50%;
  background: var(--maroon);
  display: flex; align-items: center; justify-content: center;
}
.resp-item h4 { font-size: 1rem; margin-bottom: 3px; color: var(--maroon); }
.resp-item p { font-family: 'Work Sans'; font-size: 0.86rem; color: #5c4a3d; line-height: 1.5; margin: 0; }
@media (max-width: 620px) { .resp-grid { grid-template-columns: 1fr; } }

.guru-card {
  display: flex;
  gap: 34px;
  align-items: flex-start;
  margin-top: 16px;
}
.guru-photo {
  width: 260px;
  min-width: 260px;
  aspect-ratio: 435 / 740;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(78,14,25,0.18);
}
.guru-content h3 { font-size: 1.8rem; margin-bottom: 4px; }
.guru-content .creds { color: var(--teal); font-family:'Work Sans'; font-size: 0.85rem; margin-bottom: 16px; }
@media (max-width: 700px) {
  .guru-card { flex-direction: column; align-items: center; text-align: left; }
  .guru-photo { width: 100%; max-width: 280px; min-width: 0; }
}

/* ---------------- Mobile fixes: login logo + messages/chat ---------------- */
@media (max-width: 480px) {
  .login-full-logo { width: 150px; max-width: 60vw; }
  .login-divider { margin: 6px 0 4px; }
  .login-divider .line { width: 30px; }
  .logo-lockup .diya-word { font-size: 1.4rem; }
  .logo-lockup .natyalaya-word { font-size: 0.72rem; letter-spacing: 0.22em; }
}

@media (max-width: 600px) {
  .chat-thread { max-height: 240px; padding: 10px; gap: 6px; }
  .chat-bubble { max-width: 88%; font-size: 0.85rem; padding: 8px 11px; }
  .chat-input-row { flex-wrap: nowrap; gap: 6px; }
  .chat-input-row input { min-width: 0; font-size: 0.9rem; padding: 10px 12px; }
  .chat-input-row button { padding: 10px 14px; font-size: 0.85rem; }
  #msg_parentSelect { font-size: 0.88rem; }
}

