html,
body {
  min-height: 100%;
}

/* =========================
   GLOBAL RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY / TYPOGRAPHY
========================= */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

body.has-global-footer:not(.dashboard-body):not(.dashboard-shell-body) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   SHARED FORM ELEMENTS
========================= */
input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d5dde8;
  background: #ffffff;
  color: #1f2937;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0f3b82;
  box-shadow: 0 0 0 3px rgba(15, 59, 130, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #374151;
}

/* =========================
   SHARED BUTTONS
========================= */
button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.message {
  margin-top: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.form-message {
  margin-top: 14px;
  font-weight: 600;
}

.muted-text {
  color: #6b7280;
}

/* =========================
   SHARED EMPTY / ALERT
========================= */
.empty-state {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.notification-card {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff5f5;
  border: 1px solid #f3caca;
}

.notification-card.success {
  background: #f0fff4;
  border: 1px solid #b7e4c7;
}

/* =========================
   SHARED DASHBOARD LAYOUT BASE
========================= */
.dashboard-body {
  display: flex;
  min-height: 100vh;
}

.dashboard-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f4f8fc 0%, #eef4fa 100%);
}

.dashboard-main-shell,
.site-main,
.signup-shell,
.admin-login-main {
  flex: 1 0 auto;
}

.dashboard-main-shell {
  display: flex;
  flex-direction: column;
}

.dashboard-page-header {
  margin-bottom: 22px;
}

.dashboard-eyebrow {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #5b6474;
  text-transform: uppercase;
}

.dashboard-page-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #14213d;
}

.dashboard-page-subtitle {
  margin: 0;
  color: #5b6474;
  line-height: 1.6;
  max-width: 72ch;
}

.dashboard-panel,
.dashboard-note-panel,
.dashboard-chart-card,
.summary-card,
.info-card,
.quick-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.dashboard-panel,
.dashboard-note-panel {
  background: #ffffff;
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 22px;
  border: 1px solid #dce7f5;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.07);
}

.dashboard-panel::before,
.dashboard-note-panel::before,
.dashboard-chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #0f4c81, #1f7a8c, #f0b429);
  opacity: 0.95;
}

.dashboard-alert,
.dashboard-message,
.dashboard-banner {
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 76, 129, 0.08);
}

.dashboard-content-grid,
.dashboard-charts-grid {
  align-items: stretch;
}

.dashboard-content {
  gap: 22px;
}

/* =========================
   SHARED SUMMARY CARDS
========================= */
.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-summary-card,
.summary-card,
.info-card,
.quick-card,
.dashboard-chart-card {
  position: relative;
  overflow: hidden;
}

.dashboard-summary-card,
.summary-card,
.info-card,
.quick-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #dce7f5;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.05);
}

.summary-card::after,
.info-card::after,
.quick-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(15, 76, 129, 0.07), transparent 70%);
  pointer-events: none;
}

.dashboard-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #e7eefc;
  color: #0f3b82;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.summary-label,
.summary-card-label,
.summary-card small {
  color: #5b6474;
  font-size: 0.95rem;
}

.summary-value {
  font-size: 2rem;
  font-weight: 800;
  color: #14213d;
  margin-top: 6px;
}

/* =========================
   SHARED SIDEBAR BASE
========================= */
.dashboard-sidebar {
  width: 250px;
  min-width: 250px;
  background: linear-gradient(180deg, #0f3b82 0%, #102f67 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 8px 0 24px rgba(15, 52, 112, 0.12);
  position: relative;
}

.dashboard-sidebar.collapsed {
  width: 92px;
  min-width: 92px;
}

.dashboard-sidebar.collapsed .dashboard-sidebar-brandtext,
.dashboard-sidebar.collapsed .dashboard-side-link span {
  display: none;
}

.dashboard-sidebar.collapsed .dashboard-side-link {
  justify-content: center;
}

.dashboard-sidebar.collapsed .dashboard-sidebar-brand {
  justify-content: center;
}

.dashboard-sidebar-header {
  padding: 18px 14px 10px;
}

.dashboard-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.dashboard-logo {
  width: 110px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.dashboard-sidebar-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.dashboard-brand-text h2,
.dashboard-sidebar-brandtext h2 {
  margin: 0;
}

.dashboard-brand-text p,
.dashboard-sidebar-brandtext p {
  margin: 4px 0 0;
}

.dashboard-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 14px 18px;
  padding-bottom: 140px;
}

.dashboard-side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  transition: all 0.2s ease;
}

.dashboard-side-link i {
  width: 20px;
  text-align: center;
}

.dashboard-side-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(3px);
}

.dashboard-side-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.dashboard-side-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 60%;
  background: #f0b429;
  border-radius: 0 4px 4px 0;
}

.dashboard-sidebar-footer {
  position: fixed;
  left: 12px;
  bottom: 16px;
  width: auto;
  padding: 8px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
  background: rgba(10, 34, 78, 0.96);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(6, 18, 43, 0.28);
}

.dashboard-sidebar-footer .dashboard-side-link {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

.dashboard-sidebar-footer .dashboard-side-link span {
  display: none;
}

.dashboard-sidebar-footer .dashboard-side-link i {
  width: auto;
  font-size: 1rem;
}

/* =========================
   MOBILE DASHBOARD BASE
========================= */
.dashboard-mobile-topbar {
  display: none;
}

.mobile-menu-btn,
.sidebar-close-btn {
  background: transparent;
  color: inherit;
  padding: 8px 10px;
}

.dashboard-sidebar-overlay {
  display: none;
}

/* =========================
   GENERIC RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-body {
    flex-direction: column;
  }

  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
  }

  .dashboard-sidebar-nav {
    padding-bottom: 18px;
  }

  .dashboard-sidebar-footer {
    position: static;
    width: fit-content;
    padding: 14px;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
  }

  .dashboard-main {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .dashboard-note-panel {
    padding: 18px;
  }
}

/* =========================
   SERVICES PAGE
========================= */
.services-section {
  margin-bottom: 28px;
}

.services-intro {
  color: #5b6474;
  margin-bottom: 18px;
  line-height: 1.6;
  max-width: 720px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #dce7f5;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(15, 76, 129, 0.12);
}

.service-card h3 {
  margin-bottom: 6px;
  color: #14213d;
}

.service-card p {
  color: #5b6474;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.service-card a {
  display: inline-block;
  font-weight: 700;
  color: #0f3b82;
}

.service-card a:hover {
  text-decoration: underline;
}

/* =========================
   ABOUT / UPDATES PAGE
========================= */
.updates-main {
  min-height: calc(100vh - 84px);
  background:
    linear-gradient(180deg, #f4f8fc 0%, #eef4fa 45%, #f7f9fc 100%);
  padding: 34px 20px 64px;
}

.updates-hero,
.updates-content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.updates-hero {
  margin-bottom: 28px;
}

.updates-hero-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 59, 130, 0.96), rgba(30, 76, 152, 0.92));
  color: #ffffff;
  border-radius: 28px;
  padding: 34px 34px 30px;
  box-shadow: 0 18px 40px rgba(15, 59, 130, 0.18);
}

.updates-hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
  pointer-events: none;
}

.updates-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
}

.updates-hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
}

.updates-hero-card p {
  max-width: 820px;
  font-size: 1.04rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.94);
}

.updates-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.18fr);
  gap: 24px;
  align-items: start;
}

.updates-about-card,
.updates-feed-panel {
  background: #ffffff;
  border: 1px solid #dce7f5;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.08);
}

.updates-about-card {
  padding: 28px;
}

.updates-about-card h2 {
  margin-bottom: 14px;
  font-size: 2rem;
  line-height: 1.15;
  color: #14213d;
}

.updates-about-card p {
  margin-bottom: 14px;
  color: #4b5563;
  line-height: 1.8;
  font-size: 1rem;
}

.updates-about-mission {
  margin-top: 22px;
}

.updates-about-mission h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0f3b82;
}

.updates-about-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.updates-highlight-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dce7f5;
  color: #334155;
  font-weight: 700;
}

.updates-highlight-pill i {
  width: 20px;
  text-align: center;
  color: #0f3b82;
  font-size: 1rem;
}

.updates-feed-panel {
  padding: 26px;
}

.updates-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.updates-feed-header h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.15;
  color: #14213d;
}

.updates-feed-header p {
  margin: 0;
  color: #5b6474;
  line-height: 1.6;
}

.updates-filter-box {
  width: 100%;
  max-width: 280px;
  flex-shrink: 0;
}

.updates-filter-box label {
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.update-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  border: 1px solid #dce7f5;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.06);
}

.update-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.update-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #14213d;
  flex: 1;
}

.update-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.announcement-category,
.announcement-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.announcement-status.published {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #b7e4c7;
}

.category-general {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.category-financial {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.category-remittances {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.category-ofswu {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.category-advisory {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde68a;
}

.category-events {
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #a5f3fc;
}

.update-summary {
  margin-bottom: 12px;
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.98rem;
}

.update-content {
  color: #334155;
  line-height: 1.8;
  font-size: 0.98rem;
}

.update-content:empty {
  display: none;
}

.update-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5edf7;
  font-size: 0.88rem;
  color: #6b7280;
}

.empty-state {
  padding: 18px 4px;
  color: #6b7280;
  line-height: 1.7;
}

/* =========================
   LEGACY ABOUT / UPDATES
   (kept for old pages if needed)
========================= */
.about-section {
  margin-bottom: 28px;
}

.about-description {
  color: #5b6474;
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 18px;
}

.about-highlights {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 600;
}

.about-highlight-item i {
  color: #0f3b82;
}

.updates-section {
  margin-top: 24px;
}

/* =========================
   CATEGORY FILTER (SHARED)
========================= */
.category-filter {
  margin-top: 14px;
  margin-bottom: 18px;
}

.category-filter select {
  max-width: 320px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .updates-grid {
    grid-template-columns: 1fr;
  }

  .updates-feed-header {
    flex-direction: column;
    align-items: stretch;
  }

  .updates-filter-box {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .updates-main {
    padding: 22px 14px 48px;
  }

  .updates-hero-card,
  .updates-about-card,
  .updates-feed-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .updates-about-card h2,
  .updates-feed-header h2 {
    font-size: 1.55rem;
  }

  .update-card {
    padding: 18px;
  }

  .update-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .update-badges {
    justify-content: flex-start;
  }
}

/* Prevent conflict with admin layout */
.topbar {
  flex-shrink: 0;
}

#site-topbar {
  width: 100%;
}

html,
body {
  min-height: 100%;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

iframe,
table {
  max-width: 100%;
}

table {
  border-collapse: collapse;
}

.table-wrap,
.employee-table-wrap,
.treasurer-table-wrap,
.ofswu-table-scroll,
.remit-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.employee-table-wrap table,
.treasurer-table-wrap table,
.ofswu-table-scroll table,
.remit-table-scroll table {
  min-width: 100%;
}

body.site-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

#site-footer {
  width: 100%;
  margin-top: auto;
  padding-top: 20px;
}

.site-footer {
  background: #223f79;
  color: #ffffff;
  width: 100%;
}

.site-footer-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 18px 10px;
}

.site-footer-contact-panel {
  padding: 0;
  background: transparent;
}

.site-footer-title {
  margin: 0 0 10px;
  padding: 0;
  color: #f2bc2b;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.site-footer-contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px 28px;
}

.site-footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 320px;
  transition: color 0.2s ease;
}

.site-footer-contact-item i {
  color: #f2bc2b;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.site-footer-contact-item:hover {
  color: #ffffff;
}

.site-footer-contact-item.no-link {
  cursor: default;
}

.site-footer-bottom {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.site-footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .site-footer-contact-list {
    gap: 10px 18px;
  }

  .site-footer-contact-item {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .button-row {
    flex-direction: column;
  }

  .button-row > * {
    width: 100%;
  }

  .site-footer-inner {
    padding: 14px 12px 10px;
  }

  .site-footer-contact-panel {
    padding: 0;
  }

  .site-footer-title {
    margin-bottom: 10px;
    font-size: 0.86rem;
  }

  .site-footer-contact-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-footer-contact-item {
    font-size: 0.88rem;
    align-items: flex-start;
  }
}
