:root {
  /* Bodindecha (Sing Singhaseni) 2 — Royal/Sky Blue & Rose Pink Theme */
  --bd-navy: #0b2559;
  --bd-blue: #1652b8;
  --bd-blue-mid: #1e88e5;
  --bd-sky: #38bdf8;
  --bd-blue-soft: #e8f2ff;
  --bd-blue-tint: #f4f8ff;

  --bd-pink: #db2777;
  --bd-pink-mid: #ec4899;
  --bd-pink-soft: #fdf2f8;
  --bd-pink-border: #fbcfe8;
  --bd-pink-dark: #9d174d;

  --bd-gold: #db2777;
  --bd-gold-soft: #fdf2f8;

  --surface: #ffffff;
  --bg-page: #f2f6fc;
  --text-main: #162033;
  --text-muted: #5a6782;
  --border: #d7e3f4;
  --border-dashed: #94b4e4;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 3px 12px rgba(11, 37, 89, 0.06);
  --shadow-md: 0 12px 30px -6px rgba(11, 37, 89, 0.12);
  --max-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans Thai", "Leelawadee UI", "Sarabun", "Tahoma", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.12), transparent 36%),
    radial-gradient(circle at 92% 6%, rgba(236, 72, 153, 0.10), transparent 34%),
    var(--bg-page);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Utility Bar */
.topbar {
  background: var(--bd-navy);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  padding: 7px 0;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--bd-blue-mid) 0%, var(--bd-sky) 50%, var(--bd-pink-mid) 100%) 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.topbar-badge {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(236, 72, 153, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.topbar-link {
  color: #dbeafe;
  transition: color 0.2s;
}

.topbar-link:hover {
  color: #fbcfe8;
  text-decoration: underline;
}

/* Header Brand */
.site-header {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo-wrap {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 50%, #fce7f3 100%);
  border: 2px solid #bfdbfe;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(22, 82, 184, 0.14);
}

.site-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-placeholder {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px dashed var(--border-dashed);
  border-radius: 50%;
  background: var(--bd-blue-tint);
  color: var(--bd-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.brand-text .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--bd-pink-dark);
  background: linear-gradient(90deg, var(--bd-blue-soft) 0%, var(--bd-pink-soft) 100%);
  border: 1px solid var(--bd-pink-border);
  padding: 2px 11px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--bd-navy);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.header-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--bd-blue) 0%, var(--bd-blue-mid) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 82, 184, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--bd-navy) 0%, var(--bd-blue) 100%);
  box-shadow: 0 6px 16px rgba(11, 37, 89, 0.28);
}

.btn-outline {
  background: #ffffff;
  color: var(--bd-blue);
  border-color: #b6cef2;
}

.btn-outline:hover {
  background: var(--bd-blue-soft);
  border-color: var(--bd-blue);
}

.btn-rose,
.btn-gold {
  background: var(--bd-pink-soft);
  color: var(--bd-pink-dark);
  border-color: var(--bd-pink-border);
}

.btn-rose:hover,
.btn-gold:hover {
  background: #fce7f3;
  border-color: var(--bd-pink-mid);
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.14);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* Navigation Bar */
.main-nav {
  background: linear-gradient(90deg, var(--bd-navy) 0%, var(--bd-blue) 60%, var(--bd-blue-mid) 100%);
  border-bottom: 3px solid var(--bd-pink-mid);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(11, 37, 89, 0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin: 8px 0;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-link.active {
  box-shadow: inset 0 -2px 0 #fbcfe8;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--bd-pink-mid);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 120;
}

.nav-item:hover > .dropdown-menu,
.nav-item.dropdown-open > .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 9px 16px;
  color: var(--text-main);
  font-size: 13.5px;
}

.dropdown-menu a:hover {
  background: linear-gradient(90deg, var(--bd-blue-soft) 0%, var(--bd-pink-soft) 100%);
  color: var(--bd-blue);
}

/* Hero Banner Placeholder */
.hero-section {
  padding: 22px 0 10px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 56%, #fdf2f8 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 26px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bd-pink-dark);
  background: var(--bd-pink-soft);
  border: 1px solid var(--bd-pink-border);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.6vw, 29px);
  color: var(--bd-navy);
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.hero-copy p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(22, 82, 184, 0.12);
}

.hero-metric {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.hero-metric .metric-num {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--bd-blue);
  line-height: 1.2;
}

.hero-metric:nth-child(even) .metric-num {
  color: var(--bd-pink);
}

.hero-metric .metric-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

.placeholder-box {
  border: 2px dashed var(--border-dashed);
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(
    -45deg,
    #f7faff,
    #f7faff 10px,
    #eef5ff 10px,
    #eef5ff 20px
  );
  color: var(--bd-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  gap: 6px;
}

.placeholder-box svg {
  opacity: 0.78;
}

.placeholder-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--bd-navy);
}

.placeholder-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-banner-slot {
  min-height: 225px;
  border-color: #9bc0f0;
  background: linear-gradient(135deg, rgba(232, 242, 255, 0.75) 0%, rgba(253, 242, 248, 0.75) 100%);
}

/* Main 2-Column Portal Layout */
.portal-layout {
  padding: 18px 0 28px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar-stack,
.main-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #f3f7ff 0%, #fdf6fa 100%);
  border-bottom: 1px solid var(--border);
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--bd-navy);
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-title-bar {
  width: 5px;
  height: 20px;
  background: linear-gradient(180deg, var(--bd-blue-mid) 0%, var(--bd-pink-mid) 100%);
  border-radius: 999px;
  display: inline-block;
}

.card-body {
  padding: 20px;
}

/* Thai Calendar Widget */
.calendar-widget {
  overflow: hidden;
}

.calendar-header {
  background: linear-gradient(135deg, var(--bd-navy) 0%, var(--bd-blue) 62%, var(--bd-pink) 100%);
  color: #ffffff;
  padding: 16px 14px;
  text-align: center;
  position: relative;
}

.calendar-month-year {
  font-size: 17px;
  font-weight: 700;
}

.calendar-today {
  font-size: 12px;
  opacity: 0.92;
  margin-top: 4px;
}

.cal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.cal-prev { left: 12px; }
.cal-next { right: 12px; }

.calendar-grid {
  padding: 12px;
}

.weekdays,
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.weekdays {
  margin-bottom: 6px;
}

.weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bd-blue-tint);
  padding: 5px 2px;
  border-radius: 6px;
}

.weekday:first-child {
  color: var(--bd-pink);
  background: var(--bd-pink-soft);
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  background: #ffffff;
  transition: all 0.15s ease;
}

.day:hover {
  background: var(--bd-blue-soft);
  border-color: var(--border-dashed);
}

.day.other-month {
  color: #b4c0d4;
}

.day.today {
  background: linear-gradient(135deg, var(--bd-blue) 0%, var(--bd-blue-mid) 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(22, 82, 184, 0.25);
}

.day.selected {
  border-color: var(--bd-pink);
  background: var(--bd-pink-soft);
  color: var(--bd-pink-dark);
  font-weight: 700;
}

.calendar-event-note {
  margin: 0 12px 12px;
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--bd-pink-soft) 0%, var(--bd-blue-tint) 100%);
  border-left: 3px solid var(--bd-pink-mid);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Sidebar Executive Cards */
.exec-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exec-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.15s ease;
}

.exec-mini-card:hover {
  border-color: #9bc0f0;
}

.avatar-placeholder {
  width: 58px;
  height: 72px;
  flex-shrink: 0;
  border: 1.5px dashed var(--border-dashed);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bd-blue-tint) 0%, var(--bd-pink-soft) 100%);
  color: var(--bd-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-align: center;
}

.exec-info .exec-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--bd-navy);
}

.exec-info .exec-role {
  font-size: 12px;
  color: var(--bd-pink-dark);
  font-weight: 500;
}

/* Direct Line Sidebar Banner */
.directline-banner {
  background: linear-gradient(135deg, var(--bd-navy) 0%, var(--bd-blue) 56%, var(--bd-pink) 100%);
  color: #ffffff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(22, 82, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.directline-banner h3 {
  margin: 0;
  font-size: 16px;
}

.directline-banner p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* Web Links */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li + li {
  border-top: 1px dashed var(--border);
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 2px;
  font-size: 13.5px;
  color: var(--text-main);
}

.link-list a:hover {
  color: var(--bd-blue);
}

/* President Message */
.president-msg-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.portrait-slot {
  min-height: 250px;
}

.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.skeleton-line {
  height: 12px;
  background: var(--bd-blue-soft);
  border-radius: 999px;
}

/* News Card Scaffold */
.news-empty-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #ffffff;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.like-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bd-blue-tint);
  border: 1px solid var(--border);
  color: var(--bd-navy);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
}

/* Downloads Table */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: linear-gradient(90deg, var(--bd-navy) 0%, var(--bd-blue) 100%);
  color: #ffffff;
  padding: 11px 12px;
  text-align: left;
  font-weight: 600;
}

.data-table tbody tr:hover td {
  background: var(--bd-blue-tint);
}

.data-table th:first-child,
.data-table td:first-child {
  width: 60px;
  text-align: center;
}

.data-table th:last-child,
.data-table td:last-child {
  width: 120px;
  text-align: center;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

/* Gallery & Video Slots */
.gallery-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-slot {
  min-height: 140px;
  width: 100%;
  min-width: 0;
  padding: 10px;
}

.video-slot {
  aspect-ratio: 16 / 9;
  max-height: 360px;
  width: 100%;
  min-width: 0;
}

/* Lower Full-Width Landing Sections */
.landing-section {
  padding: 14px 0 26px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tab-btn:hover {
  border-color: var(--bd-blue);
  color: var(--bd-blue);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--bd-blue) 0%, var(--bd-blue-mid) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(22, 82, 184, 0.22);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Board Wireframe Pyramid */
.board-pyramid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.board-row {
  display: grid;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.board-row-1 { grid-template-columns: minmax(160px, 200px); }
.board-row-2 { grid-template-columns: repeat(2, minmax(150px, 190px)); }
.board-row-4 { grid-template-columns: repeat(4, minmax(130px, 1fr)); }

.board-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.board-card .avatar-placeholder {
  width: 74px;
  height: 92px;
}

.board-card strong {
  font-size: 13px;
  color: var(--bd-navy);
}

.board-card span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Membership & Direct Line Grids */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.split-grid > *,
.form-grid > * {
  min-width: 0;
}

.tier-list {
  display: grid;
  gap: 10px;
}

.tier-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--bd-blue-mid);
  border-radius: 10px;
  padding: 13px 15px;
  background: linear-gradient(135deg, var(--bd-blue-tint) 0%, #ffffff 70%, var(--bd-pink-soft) 100%);
}

.tier-item h4 {
  margin: 0 0 4px;
  color: var(--bd-navy);
  font-size: 14.5px;
}

.tier-item p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bd-navy);
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-main);
}

.form-control:focus {
  outline: 2px solid rgba(29, 95, 214, 0.25);
  border-color: var(--bd-blue);
}

/* Bylaws list */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}

.chapter-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #ffffff;
}

.chapter-box strong {
  display: block;
  color: var(--bd-blue);
  font-size: 13.5px;
  margin-bottom: 4px;
}

.chapter-box span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Google Map Embed */
.map-embed-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bd-blue-tint);
}

.map-embed-frame {
  display: block;
  width: 100%;
  height: 240px;
  border: 0;
}

.map-embed-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.map-embed-footer a {
  color: var(--bd-blue);
  font-weight: 600;
}

.map-embed-footer a:hover {
  text-decoration: underline;
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #e6f6ec;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: var(--bd-blue-soft);
  color: var(--bd-blue);
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Filter Bar & Member Directory */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.filter-bar .form-control {
  flex: 1 1 180px;
}

.member-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 14px;
}

.member-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.member-code {
  font-family: monospace;
  font-size: 12.5px;
  color: var(--bd-blue);
  font-weight: 700;
}

/* KPI Grid & Bar Chart */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--bd-blue-mid);
  border-radius: 10px;
  padding: 13px 15px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.kpi-card:nth-child(even) {
  border-top-color: var(--bd-pink-mid);
  background: linear-gradient(180deg, #ffffff 0%, #fef8fb 100%);
}

.kpi-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--bd-navy);
  margin-top: 2px;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background: var(--bd-blue-soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bd-blue) 0%, var(--bd-sky) 60%, var(--bd-pink-mid) 100%);
  border-radius: 999px;
}

/* News Card Actions */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Gallery Card clickable */
.gallery-slot-btn {
  width: 100%;
  min-width: 0;
  min-height: 145px;
  border: 2px dashed var(--border-dashed);
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(
    -45deg,
    #f7faff,
    #f7faff 10px,
    #eef4ff 10px,
    #eef4ff 20px
  );
  color: var(--bd-navy);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.gallery-slot-btn:hover {
  transform: translateY(-2px);
  border-color: var(--bd-blue);
}

/* Modal System */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 88, 0.68);
  backdrop-filter: blur(3px);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(10, 37, 88, 0.3);
  overflow: hidden;
  margin: auto;
}

.modal-dialog.modal-lg {
  max-width: 820px;
}

.modal-dialog.modal-xl {
  max-width: 1080px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--bd-navy) 0%, var(--bd-blue) 68%, var(--bd-pink) 100%);
  border-bottom: 2px solid var(--bd-pink-mid);
  color: #ffffff;
}

.modal-header h3 {
  margin: 0;
  font-size: 16.5px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 20px;
}

.admin-split {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 18px;
  align-items: start;
}

/* Auto PR Poster Generator */
.poster-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.poster-canvas {
  border: 2px solid var(--bd-navy);
  border-radius: var(--radius-md);
  padding: 26px;
  background: #ffffff;
  color: var(--text-main);
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.poster-canvas.poster-urgent {
  border-color: var(--bd-pink);
  background: linear-gradient(180deg, var(--bd-pink-soft) 0%, #ffffff 32%);
}

.poster-canvas.poster-urgent .poster-header-bar {
  background: linear-gradient(135deg, var(--bd-pink-dark) 0%, var(--bd-pink) 65%, var(--bd-blue) 100%);
}

.poster-canvas.poster-square {
  max-width: 540px;
  border-width: 4px;
}

.poster-header-bar {
  background: linear-gradient(135deg, var(--bd-navy) 0%, var(--bd-blue) 64%, var(--bd-pink) 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 3px solid var(--bd-pink-mid);
}

.poster-crest-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  padding: 4px;
  flex-shrink: 0;
  display: block;
}

.receipt-crest-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.poster-crest {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-align: center;
  flex-shrink: 0;
}

.poster-title-main {
  font-size: 22px;
  font-weight: 700;
  color: var(--bd-navy);
  margin: 8px 0 10px;
  line-height: 1.35;
}

.poster-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 2px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.poster-qr-box {
  width: 136px;
  max-width: 100%;
  min-height: 78px;
  padding: 8px 10px;
  border: 1.5px dashed var(--border-dashed);
  border-radius: 8px;
  background: var(--bd-blue-tint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--bd-blue);
  flex-shrink: 0;
}

/* Printable Receipt */
.receipt-card {
  border: 1.5px solid var(--bd-navy);
  border-radius: var(--radius-sm);
  padding: 20px;
  background: #ffffff;
}

/* Gallery Lightbox */
.lightbox-stage {
  min-height: 280px;
  padding: 24px;
}

.lightbox-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Toast Notification */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}

.toast {
  background: var(--bd-navy);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--bd-gold);
  box-shadow: 0 10px 24px rgba(10, 37, 88, 0.25);
  font-size: 13.5px;
}

.btn-danger-outline {
  background: #ffffff;
  color: #b91c1c;
  border-color: #fca5a5;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--bd-navy) 0%, #07193d 100%);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--bd-blue-mid) 0%, var(--bd-sky) 50%, var(--bd-pink-mid) 100%) 1;
  color: rgba(255, 255, 255, 0.92);
  padding: 32px 0;
  margin-top: 16px;
  text-align: center;
  font-size: 13.5px;
}

.visitor-counter {
  display: inline-flex;
  gap: 4px;
  margin: 10px 0 14px;
}

.counter-digit {
  background: #13387f;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 15px;
}

.footer-muted {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
}

/* Responsive */
@media (max-width: 1080px) {
  .portal-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 16px;
  }

  .hero-card {
    padding: 22px;
    gap: 20px;
  }

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

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

@media (max-width: 960px) {
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card,
  .split-grid,
  .president-msg-grid,
  .admin-split {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .board-row-1 {
    grid-template-columns: minmax(0, 220px);
  }

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

  .nav-link {
    padding: 9px 10px;
    font-size: 13.5px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 10px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    font-size: 14.5px;
  }

  .dropdown-menu {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
    border-radius: 8px;
    border-top: none;
    margin: 2px 0 6px 12px;
    background: rgba(255, 255, 255, 0.96);
  }

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

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

@media (max-width: 520px) {
  .container {
    padding: 0 12px;
  }

  .header-brand {
    padding: 14px 0;
    gap: 14px;
  }

  .brand-left {
    gap: 12px;
  }

  .site-logo-wrap {
    width: 58px;
    height: 58px;
  }

  .hero-card {
    padding: 18px 14px;
    gap: 16px;
  }

  .card-header {
    padding: 12px 14px;
  }

  .card-body {
    padding: 14px;
  }

  .gallery-placeholder-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-slot-btn {
    min-height: 112px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-header {
    padding: 12px 14px;
  }

  .modal-body {
    padding: 14px;
  }

  .poster-canvas {
    padding: 14px;
  }

  .poster-header-bar {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .poster-title-main {
    font-size: 18px;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 360px) {
  .board-row-2,
  .board-row-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Print only active printable modal (Poster / Receipt) */
@media print {
  body {
    background: #ffffff;
  }

  body > *:not(.modal-overlay.print-active) {
    display: none !important;
  }

  .modal-overlay.print-active {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }

  .modal-overlay.print-active .modal-dialog {
    box-shadow: none !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  .modal-overlay.print-active .no-print {
    display: none !important;
  }
}
