/* ============================================================
   GDPS School System — Main Stylesheet
   Theme: Floaty Glass / Deep Navy + Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ─── CSS VARIABLES ─────────────────────────────────────── */
:root {
  --navy:        #0a0f2c;
  --navy-mid:    #0e1640;
  --navy-light:  #162050;
  --gold:        #c8972a;
  --gold-light:  #e8b84b;
  --gold-pale:   #f5d88a;
  --cream:       #fdf6e3;
  --white:       #ffffff;
  --glass-bg:    rgba(255, 255, 255, 0.07);
  --glass-border:rgba(255, 255, 255, 0.18);
  --glass-shadow:0 8px 32px rgba(0, 0, 0, 0.35);
  --blur:        blur(14px);
  --radius-sm:   10px;
  --radius-md:   18px;
  --radius-lg:   28px;
  --font-display:'Cinzel', serif;
  --font-body:   'Nunito', sans-serif;
  --transition:  all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(200, 151, 42, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(22, 32, 80, 0.8) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(10, 15, 44, 1) 0%, transparent 100%);
  z-index: -1;
  animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  from { opacity: 1; }
  to   { opacity: 0.85; }
}

/* ─── GLASS CARD ─────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
}

.glass-dark {
  background: rgba(10, 15, 44, 0.6);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(200, 151, 42, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, .display-font {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 600; }

.gold-text { color: var(--gold-light); }
.muted     { color: rgba(253, 246, 227, 0.55); font-size: 0.875rem; }

a { color: var(--gold-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-pale); }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(200, 151, 42, 0.4);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 151, 42, 0.6);
  color: var(--navy);
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--cream);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
}
.btn-glass:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: rgba(200,151,42,0.12);
  transform: translateY(-2px);
}

.btn-sm { padding: 6px 16px; font-size: 0.8rem; }
.btn-danger { background: rgba(220,50,50,0.2); color: #ff7070; border: 1px solid rgba(220,50,50,0.3); }
.btn-danger:hover { background: rgba(220,50,50,0.35); }

/* ─── FORM INPUTS ─────────────────────────────────────────── */
.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-input::placeholder { color: rgba(253,246,227,0.35); }
.form-input:focus, .form-select:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(200,151,42,0.15);
}
.form-select option { background: var(--navy-mid); color: var(--cream); }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── TOP NAV / SITE HEADER ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 5%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 44, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,151,42,0.2);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.school-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(200,151,42,0.3);
}

.school-logo-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(200,151,42,0.3);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  color: var(--cream);
  line-height: 1.2;
}
.brand-text .motto {
  font-size: 0.72rem;
  color: var(--gold-light);
  font-family: var(--font-body);
  font-style: italic;
  opacity: 0.85;
}

/* ─── HERO SLIDESHOW ─────────────────────────────────────── */
.slideshow {
  position: relative;
  width: 100%;
  height: clamp(280px, 50vw, 520px);
  overflow: hidden;
}

.slideshow__track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 40px;
  background: linear-gradient(transparent, rgba(10,15,44,0.85));
  font-size: 1.05rem;
  color: var(--cream);
  font-style: italic;
}

.slide__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 50%, rgba(200,151,42,0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(253,246,227,0.3);
}

.slideshow__dots {
  position: absolute;
  bottom: 18px;
  right: 30px;
  display: flex;
  gap: 8px;
}
.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.dot.active { background: var(--gold); transform: scale(1.3); }

.slideshow__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.slideshow__btn:hover { background: rgba(200,151,42,0.5); }
.slideshow__btn--prev { left: 16px; }
.slideshow__btn--next { right: 16px; }

/* ─── HOMEPAGE SECTIONS ──────────────────────────────────── */
.section {
  padding: 60px 5%;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--gold-light);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(200,151,42,0.4), transparent);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Profile Card */
.profile-card {
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}
.profile-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }

.profile-card__avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(200,151,42,0.25);
}
.profile-card__avatar-placeholder {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--navy-light), var(--gold));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: var(--font-display);
  font-size: 2rem;
  color: white;
}
.profile-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 6px;
}
.profile-card__role {
  font-size: 0.78rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Notice Card */
.notice-card { padding: 22px 26px; margin-bottom: 16px; }
.notice-card__heading { font-weight: 700; color: var(--gold-light); margin-bottom: 8px; }
.notice-card__dates { font-size: 0.78rem; color: rgba(253,246,227,0.5); margin-top: 8px; }

/* Post Card */
.post-card { padding: 22px; }
.post-card__poster { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-card__poster-img {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  object-fit: cover;
}
.post-card__poster-name { font-weight: 600; font-size: 0.9rem; }
.post-card__date { font-size: 0.75rem; color: rgba(253,246,227,0.5); }
.post-card__body { font-size: 0.9rem; line-height: 1.65; }

/* Message from Head */
.head-message { padding: 32px 36px; position: relative; overflow: hidden; }
.head-message::before {
  content: '"';
  position: absolute;
  top: -20px; left: 16px;
  font-size: 10rem;
  font-family: var(--font-display);
  color: rgba(200,151,42,0.08);
  line-height: 1;
  pointer-events: none;
}
.head-message__body { font-size: 1rem; line-height: 1.8; font-style: italic; }
.head-message__by { margin-top: 16px; font-weight: 700; color: var(--gold-light); font-size: 0.9rem; }

/* Holiday List */
.holiday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.holiday-item:hover { background: rgba(200,151,42,0.1); border-color: rgba(200,151,42,0.2); }
.holiday-item__name { font-weight: 600; }
.holiday-item__date {
  font-size: 0.8rem;
  background: rgba(200,151,42,0.15);
  color: var(--gold-light);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Birthday List */
.birthday-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,151,42,0.12);
  border: 1px solid rgba(200,151,42,0.25);
  border-radius: 30px;
  padding: 6px 14px;
  margin: 4px;
  font-size: 0.85rem;
  color: var(--gold-pale);
}
.birthday-pill .cake { font-size: 1rem; }

/* Video Section */
.school-video {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.school-video video { width: 100%; display: block; }
.school-video__desc { padding: 14px 18px; font-size: 0.9rem; color: rgba(253,246,227,0.7); }

/* Project */
.project-card { padding: 24px; }
.project-card img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 16px; }
.project-card__details { font-size: 0.9rem; line-height: 1.7; }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 24, 0.78);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal {
  width: min(440px, 94vw);
  padding: 40px 36px;
  position: relative;
  animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.modal__close {
  position: absolute;
  top: 16px; right: 18px;
  background: none;
  border: none;
  color: rgba(253,246,227,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.modal__close:hover { color: var(--cream); transform: rotate(90deg); }

.modal__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.modal__logo .school-logo-placeholder { width: 42px; height: 42px; font-size: 1rem; }
.modal__logo-name { font-family: var(--font-display); font-size: 0.95rem; color: var(--cream); }

.modal__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.modal__subtitle { font-size: 0.82rem; color: rgba(253,246,227,0.5); margin-bottom: 28px; }

.modal__error {
  background: rgba(220,50,50,0.15);
  border: 1px solid rgba(220,50,50,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #ff8080;
  margin-bottom: 16px;
  display: none;
}
.modal__error.show { display: block; }

/* ─── DASHBOARD LAYOUT ───────────────────────────────────── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(10, 15, 44, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(200,151,42,0.15);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__brand {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(200,151,42,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar__nav { flex: 1; padding: 16px 0; }

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,246,227,0.3);
  padding: 14px 24px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: rgba(253,246,227,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-link:hover {
  color: var(--cream);
  background: rgba(255,255,255,0.05);
  border-left-color: rgba(200,151,42,0.4);
}
.nav-link.active {
  color: var(--gold-light);
  background: rgba(200,151,42,0.1);
  border-left-color: var(--gold);
}
.nav-link .icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar__footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(200,151,42,0.15);
}

/* ─── DASHBOARD MAIN ─────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px 36px;
  overflow-y: auto;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-greeting {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  color: var(--cream);
}
.dash-greeting span { color: var(--gold-light); }

.dash-meta { font-size: 0.82rem; color: rgba(253,246,227,0.45); margin-top: 4px; }

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); }

.stat-card__value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(253,246,227,0.5);
}
.stat-card__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.7;
}

/* ─── TABLE ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data-table thead th {
  background: rgba(200,151,42,0.1);
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(200,151,42,0.2);
  white-space: nowrap;
}

table.data-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}
table.data-table tbody tr:hover { background: rgba(255,255,255,0.04); }
table.data-table tbody td { padding: 12px 16px; color: rgba(253,246,227,0.85); }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gold    { background: rgba(200,151,42,0.15); color: var(--gold-light); border: 1px solid rgba(200,151,42,0.3); }
.badge-green   { background: rgba(50,180,100,0.15); color: #6de68a; border: 1px solid rgba(50,180,100,0.3); }
.badge-red     { background: rgba(220,50,50,0.15);  color: #ff8080; border: 1px solid rgba(220,50,50,0.3); }
.badge-blue    { background: rgba(60,130,220,0.15); color: #7db8f7; border: 1px solid rgba(60,130,220,0.3); }
.badge-purple  { background: rgba(140,80,220,0.15); color: #c4a0f5; border: 1px solid rgba(140,80,220,0.3); }

/* ─── ATTENDANCE ─────────────────────────────────────────── */
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.att-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.att-item:hover { background: rgba(255,255,255,0.07); }
.att-item__name { font-weight: 600; font-size: 0.92rem; }
.att-item__class { font-size: 0.75rem; color: rgba(253,246,227,0.45); }

.toggle-switch {
  position: relative;
  width: 46px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
input:checked + .toggle-slider { background: var(--gold); }
input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ─── REPORT CARD ────────────────────────────────────────── */
.report-header {
  text-align: center;
  padding: 32px;
  border-bottom: 1px solid rgba(200,151,42,0.2);
  margin-bottom: 28px;
}
.report-header .school-logo-placeholder { width: 70px; height: 70px; font-size: 1.6rem; margin: 0 auto 12px; }
.report-header h2 { font-size: 1.5rem; color: var(--gold-light); }
.report-header p { font-size: 0.85rem; color: rgba(253,246,227,0.6); }

.student-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.info-chip {
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
}
.info-chip__label { font-size: 0.7rem; text-transform: uppercase; color: var(--gold-light); font-weight: 700; margin-bottom: 3px; }
.info-chip__value { font-size: 0.92rem; font-weight: 600; }

.grade-A { color: #6de68a; }
.grade-B { color: #7db8f7; }
.grade-C { color: var(--gold-light); }
.grade-D { color: #ffb347; }
.grade-F { color: #ff7070; }

/* ─── FINANCE CARDS ──────────────────────────────────────── */
.finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.fin-card {
  padding: 26px;
  text-align: center;
}
.fin-card__amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.fin-card__amount.income  { color: #6de68a; }
.fin-card__amount.expense { color: #ff8080; }
.fin-card__amount.balance { color: var(--gold-light); }
.fin-card__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(253,246,227,0.5); }

/* ─── ALERTS / MESSAGES ──────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(50,180,100,0.12); border: 1px solid rgba(50,180,100,0.3); color: #6de68a; }
.alert-error   { background: rgba(220,50,50,0.12);  border: 1px solid rgba(220,50,50,0.3);  color: #ff8080; }
.alert-info    { background: rgba(60,130,220,0.12); border: 1px solid rgba(60,130,220,0.3); color: #7db8f7; }

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 36px 5%;
  border-top: 1px solid rgba(200,151,42,0.15);
  font-size: 0.82rem;
  color: rgba(253,246,227,0.4);
}
.site-footer a { color: var(--gold-light); }

/* ─── CONTACT SECTION ────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(200,151,42,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,151,42,0.6); }

/* ─── UTILITIES ──────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
  .sidebar, .site-header, .btn, .no-print { display: none !important; }
  body { background: white; color: black; }
  .glass, .glass-dark { background: white; border: 1px solid #ddd; box-shadow: none; backdrop-filter: none; }
  .main-content { padding: 0; }
  .gold-text, .fin-card__amount { color: #8a6200 !important; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Off-canvas drawer sidebar on mobile/tablet */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }

  /* Let the page (not the inner box) scroll, so the bar can sit at the top */
  .dashboard-layout { display: block; }
  .main-content {
    overflow-y: visible;          /* don't trap the sticky bar in a scroll box */
    padding: 0;                   /* remove top/side padding from the wrapper */
  }
  /* Re-apply padding to the actual content, but NOT the top bar */
  .main-content > *:not(.mobile-topbar) {
    padding-left: 16px;
    padding-right: 16px;
  }
  .main-content > .dash-header { padding-top: 18px; }

  .mobile-topbar {
    display: flex;                /* show hamburger bar */
    position: sticky;
    top: 0;
  }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 600px) {
  .site-header { padding: 0 4%; height: 68px; }
  .section { padding: 40px 4%; }
  .modal { padding: 28px 22px; }
  .dash-header { flex-direction: column; }
}


/* ══════════════════════════════════════════════════════════
   EXPAND / COLLAPSE  — for posts & notices
══════════════════════════════════════════════════════════ */
.expandable-body {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.expandable-body.collapsed {
  max-height: 120px;
}
.expandable-body.expanded {
  max-height: 9999px;   /* large enough for any content */
}
.expandable-body.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--navy-mid));
  pointer-events: none;
}
/* When inside a glass card the fade should match the card bg */
.glass .expandable-body.collapsed::after {
  background: linear-gradient(to bottom, transparent, rgba(14,22,64,0.85));
}

.read-more-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none;
  color: var(--gold-light); font-size: .8rem; font-weight: 700;
  cursor: pointer; padding: 4px 0; margin-top: 6px;
  transition: color .2s; font-family: var(--font-body);
  letter-spacing: .03em;
}
.read-more-btn:hover { color: var(--gold-pale); }
.read-more-btn .arrow { transition: transform .3s; display: inline-block; }
.read-more-btn.open .arrow { transform: rotate(180deg); }

/* ── Full-width Post Card (index) ─────────────────────── */
.post-full-card {
  padding: 22px 24px;
  margin-bottom: 18px;
  border-left: 3px solid rgba(200,151,42,.3);
}
.post-full-card__top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.post-full-card__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg,#c8972a,#0e1640);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 1rem;
}
.post-full-card__name { font-weight: 700; font-size: .95rem; }
.post-full-card__meta { font-size: .74rem; color: rgba(253,246,227,.45); margin-top: 2px; }
.post-full-card__body { font-size: .9rem; line-height: 1.75; color: rgba(253,246,227,.88); }
.post-full-card__img  { width: 100%; border-radius: 10px; margin-top: 12px;
                         max-height: 280px; object-fit: cover; display: block; }

/* ── Notice full card ─────────────────────────────────── */
.notice-full-card {
  padding: 16px 20px; margin-bottom: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.notice-full-card:hover { background: rgba(255,255,255,.06); border-color: rgba(200,151,42,.2); }
.notice-full-card__title { font-weight: 700; color: var(--gold-light); margin-bottom: 6px; font-size: .95rem; }
.notice-full-card__dates { font-size: .72rem; color: rgba(253,246,227,.38); margin-top: 8px; }
.notice-full-card__body  { font-size: .88rem; line-height: 1.7; color: rgba(253,246,227,.8); }

/* ── Dashboard greeting profile image ────────────────── */
.dash-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2.5px solid var(--gold); object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 18px rgba(200,151,42,.28);
}
.dash-avatar-ph {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2.5px solid var(--gold); flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.3rem; color: white;
  box-shadow: 0 0 18px rgba(200,151,42,.2);
}


/* ══════════════════════════════════════════════════════════
   NOTICEBOARD — bullet style with underlined heading
══════════════════════════════════════════════════════════ */
.notice-bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notice-bullet {
  position: relative;
  padding: 10px 0 12px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.notice-bullet:last-child { border-bottom: none; }

/* gold bullet marker */
.notice-bullet::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(200,151,42,0.5);
}

.notice-bullet__title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--gold-light);
  margin-bottom: 5px;
  text-decoration: underline;
  text-decoration-color: rgba(200,151,42,0.5);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.notice-bullet__body {
  font-size: .85rem;
  line-height: 1.6;
  color: rgba(253,246,227,0.78);
}
.notice-bullet__dates {
  font-size: .7rem;
  color: rgba(253,246,227,0.38);
  margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════
   POST CARD — small gold-bordered rounded avatar left of name
══════════════════════════════════════════════════════════ */
.post-full-card__avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;                  /* never shrink below this */
  border-radius: 50%;               /* fully rounded */
  border: 2px solid var(--gold);    /* small gold border */
  object-fit: cover;                /* fills the circle without distortion */
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(200,151,42,0.3);
}
.post-full-card__avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c8972a, #0e1640);
  color: white;
  font-weight: 700;
  font-size: .95rem;
}
/* keep post content inside its grid cell */
.post-full-card { overflow: hidden; max-width: 100%; }
.post-full-card__body { word-wrap: break-word; overflow-wrap: break-word; }


/* ══════════════════════════════════════════════════════════
   COLLAPSIBLE GROUPED SIDEBAR
══════════════════════════════════════════════════════════ */
.nav-top {
  margin-bottom: 6px;
}
.nav-group { margin-bottom: 2px; }

.nav-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(253,246,227,0.82);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  text-align: left;
}
.nav-group__head:hover { background: rgba(200,151,42,0.1); color: var(--gold-light); }
.nav-group__head .icon { width: 20px; text-align: center; }

.nav-group__arrow {
  margin-left: auto;
  font-size: .75rem;
  transition: transform .25s ease;
  color: rgba(253,246,227,0.5);
}
.nav-group.open .nav-group__head { color: var(--gold-light); background: rgba(200,151,42,0.08); }
.nav-group.open .nav-group__arrow { transform: rotate(180deg); }

.nav-group__items {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  padding-left: 8px;
}
.nav-group.open .nav-group__items { max-height: 600px; }

.nav-group__items .nav-link {
  font-size: .84rem;
  padding: 9px 14px 9px 22px;
  opacity: .92;
}
.nav-group__items .nav-link .icon { font-size: .9rem; }

.nav-badge {
  margin-left: 8px;
  background: rgba(220,50,50,.25);
  color: #ff8080;
  border: 1px solid rgba(220,50,50,.3);
  border-radius: 20px;
  font-size: .65rem;
  padding: 1px 7px;
  font-weight: 700;
}


/* ══════════════════════════════════════════════════════════
   MOBILE NAV — hamburger top bar + overlay (hidden on desktop)
══════════════════════════════════════════════════════════ */
.mobile-topbar {
  display: none;                 /* shown only under 900px via media query */
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 900;
  min-height: 58px;
  width: 100%;
  padding: 12px 16px;
  background: #0a0f2c;
  border-bottom: 1px solid rgba(200,151,42,0.35);
}
.mobile-topbar__title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 0.95rem;
  color: var(--cream, #fdf6e3);
  font-weight: 700;
}
.hamburger {
  width: 46px; height: 40px;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  background: #c8972a;                /* solid gold — high contrast */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 24px; height: 3px;
  background: #0a0f2c;                /* dark navy bars on gold */
  border-radius: 2px;
  transition: 0.3s;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
/* Close (X) button inside the drawer, visible only on mobile */
.sidebar__close {
  display: none;
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--cream, #fdf6e3);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
@media (max-width: 900px) {
  .sidebar__close { display: block; }
}