/* =========================================================
   FrameMaker CSS
   Shared styles for public pages, admin forms, tables,
   events, ads, legal pages, login, sidebar, footer, print.
   ========================================================= */

/* =========================================================
   1. Base / Global
   ========================================================= */

body,
.fm-body {
  background: #f5f7fa;
}

.fm-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.fm-page-wrap-wide {
  max-width: 1180px;
  margin: 0 auto;
}

.fm-card-top {
  margin-top: 12px;
}

.fm-muted {
  color: #666;
  font-size: 14px;
}

.fm-subtext {
  color: #666;
  font-size: 13px;
}

/* =========================================================
   2. Ads
   ========================================================= */

.fm-ad-side {
  display: flex;
  flex-direction: column;
}

.fm-ad-box {
  border: 1px dashed #ccc;
  padding: 10px;
  background: #fafafa;
  margin-bottom: 16px;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.fm-ad-label {
  font-size: 12px;
  color: #777;
  text-align: center;
  margin-bottom: 8px;
}

.fm-ad-placeholder {
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
  border-radius: 6px;
  width: 100%;
  text-align: center;
  padding: 8px;
  margin: 1.5rem 0;
  border: 1px dashed #c9ced6;
  background: #f8f9fb;
  color: #6c757d;
  font-size: 0.95rem;
}

.fm-ad-sm {
  min-height: 250px;
}

.fm-ad-lg {
  min-height: 600px;
}

.fm-ad-hz {
  min-height: 90px;
}

.fm-ad-horizontal-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 6px;
}

.fm-ad-horizontal {
  width: 100%;
  max-width: 728px;
}

/* live ads + fallback */
.fm-live-ad-wrap {
  position: relative;
  min-height: 90px;
}

.fm-live-ad {
  position: relative;
  z-index: 2;
}

.fm-ad-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.adsbygoogle[data-adsbygoogle-status="done"] + .fm-ad-fallback {
  display: none !important;
}

.fm-ad-block {
  margin: 1.5rem 0;
  text-align: center;
  min-height: 90px;
}

.fm-ad-rail {
  position: sticky;
  top: 96px;
}

@media (max-width: 991.98px) {
  .fm-ad-side {
    display: none !important;
  }

  .fm-ad-rail {
    position: static;
    top: auto;
  }
}

/* =========================================================
   3. Common Cards / Panels / Buttons
   ========================================================= */

.fm-panel {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.fm-info-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  height: 100%;
}

.fm-btn-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .fm-btn-grid {
    justify-content: flex-start;
  }
}

.fm-btn-grid .btn {
  min-width: 220px;
}

.fm-service-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.18s ease;
}

.fm-service-card:hover {
  background: #ffffff;
  border-color: #d0d7de;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.fm-service-icon {
  line-height: 1;
}

/* =========================================================
   4. Static Content Pages
   ========================================================= */

.fm-content-frame {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.fm-content-frame h6 {
  margin-top: 16px;
  font-weight: 700;
}

.fm-content-frame p,
.fm-content-frame li {
  color: #333;
  line-height: 1.65;
  font-size: 15px;
}

.fm-contact-list {
  padding-left: 18px;
  margin-bottom: 0;
}

/* =========================================================
   5. Policy / Legal Pages
   ========================================================= */

.fm-policy-frame {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.fm-policy-frame h6 {
  margin-top: 16px;
  font-weight: 700;
}

.fm-policy-frame p,
.fm-policy-frame li {
  color: #333;
  line-height: 1.65;
  font-size: 15px;
}

/* =========================================================
   6. FAQ Page
   ========================================================= */

.fm-faq-frame {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.fm-faq-frame h6 {
  font-weight: 700;
}

.fm-faq-frame p {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
}

.fm-faq-accordion .accordion-button {
  font-weight: 600;
}

.fm-faq-accordion .accordion-body {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

/* =========================================================
   7. Forms / Admin Cards
   ========================================================= */

.fm-form-page {
  max-width: 1200px;
}

.fm-form-card {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: #fff;
}

.fm-form-card-wide {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fm-form-card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  padding: 14px 18px;
}

.fm-form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.fm-form-control,
.fm-form-select {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  min-height: 42px;
  box-shadow: none;
}

.fm-form-control:focus,
.fm-form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, 0.12);
}

.fm-form-control-lg {
  min-height: calc(1.5em + 1rem + 2px);
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  border-radius: 0.75rem;
}

.fm-form-actions {
  margin-top: 4px;
}

.fm-form-help {
  color: #6c757d;
  font-size: 0.92rem;
  margin-top: 6px;
}

.fm-help-note {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
}

/* =========================================================
   8. Flash / Utility
   ========================================================= */

.fm-flash-message {
  border-radius: 10px;
  margin-bottom: 0;
}

.fm-readout {
  color: #6c757d;
}

/* =========================================================
   9. Certificate Page
   ========================================================= */

#certificateContainer {
  display: none;
  margin-top: 22px;
}

.fm-certificate-frame {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

#certificateImage {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: none;
  cursor: zoom-in;
  transition: transform 0.18s ease;
}

#certificateImage:hover {
  transform: scale(1.01);
}

.fm-certificate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  justify-content: center;
}

.fm-certificate-note {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

/* =========================================================
   10. Event Cards / Home / Recent Events
   ========================================================= */

.fm-events-hero {
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  border: 1px solid #dbe9ff;
  border-radius: 12px;
  padding: 12px 14px;
}

.fm-events-hero h6 {
  margin: 0 0 6px 0;
  font-weight: 700;
  color: #1f2937;
}

.fm-events-hero p {
  margin: 0;
  font-size: 13px;
  color: #5f6b7a;
  line-height: 1.5;
}

.fm-events-hero-lg {
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.fm-events-hero-lg h6 {
  margin: 0 0 6px 0;
  font-weight: 700;
  color: #1f2937;
}

.fm-events-hero-lg p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 15px;
}

.fm-event-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  transition: all 0.18s ease;
  overflow: hidden;
}

.fm-event-card:hover {
  border-color: #cfd8e3;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.fm-event-card-lg {
  height: 100%;
}

.fm-event-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fm-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.fm-event-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff;
  color: #0d6efd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.fm-event-icon-lg {
  width: 44px;
  height: 44px;
  font-size: 20px;
  background: #f1f5f9;
  color: #2563eb;
}

.fm-event-code {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.fm-event-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  margin-bottom: 8px;
}

.fm-event-title-lg {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 8px;
}

.fm-event-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.fm-event-org {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.fm-event-desc {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 16px;
  flex-grow: 1;
}

.fm-event-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.fm-two-btn-grid {
  grid-template-columns: 1fr 1fr;
}

.fm-btn-event {
  border-radius: 10px;
  font-weight: 500;
  width: 100%;
}

.fm-btn-download {
  border: 1px solid #0d6efd;
  color: #0d6efd;
  background: #fff;
}

.fm-btn-download:hover {
  background: #0d6efd;
  color: #fff;
}

.fm-btn-portal {
  border: 1px solid #ced4da;
  color: #495057;
  background: #fff;
}

.fm-btn-portal:hover:not(:disabled) {
  background: #f8f9fa;
  color: #212529;
}

.fm-home-side-card {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: #fff;
}

.fm-home-side-card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
}

.fm-home-services-card {
  border: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.fm-archive-wrap {
  text-align: center;
}

.fm-archive-wrap-bordered {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.fm-empty-state {
  text-align: center;
  padding: 20px 10px;
  color: #6b7280;
}

.fm-empty-state .icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: #9ca3af;
}

.fm-empty-state h6 {
  font-weight: 700;
  margin-bottom: 6px;
}

.fm-empty-state p {
  font-size: 13px;
  margin-bottom: 0;
}

/* =========================================================
   11. Event Builder / Alignment
   ========================================================= */

.fm-event-builder-page .card-header {
  font-weight: 600;
}

.fm-align-table td,
.fm-align-table th {
  vertical-align: middle;
}

.fm-preview-wrap {
  position: relative;
  width: 100%;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  cursor: crosshair !important;
}

.fm-preview-wrap * {
  cursor: crosshair !important;
}

#preview {
  width: 100%;
  height: auto;
  display: none;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}

#previewImage {
  max-width: 100%;
  height: auto;
  display: none;
  transform-origin: top center;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}

.fm-preview-wrap-tall {
  height: 520px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px;
}

.fm-click-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.85);
  background: rgba(220, 53, 69, 0.85);
  pointer-events: none;
  display: none;
  z-index: 5;
}

.fm-align-input {
  min-width: 110px;
}

.fm-align-select {
  min-width: 170px;
}

.fm-loading-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

/* =========================================================
   12. Tables / Listings
   ========================================================= */

.fm-table-page {
  max-width: 1200px;
}

.fm-table-card {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: #fff;
}

.fm-table-card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  padding: 14px 18px;
}

.fm-table-card .card-body {
  padding: 1rem 1rem;
}

.fm-table-toolbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
}

.fm-toolbar-actions {
  gap: 8px;
}

.fm-data-table {
  margin-bottom: 0;
}

.fm-data-table td,
.fm-data-table th {
  vertical-align: middle;
}

.fm-table-index {
  width: 60px;
  text-align: center;
  font-weight: 600;
}

.fm-events-table th,
.fm-events-table td,
.fm-users-table th,
.fm-users-table td {
  vertical-align: middle;
}

.fm-participants-table th,
.fm-participants-table td {
  max-width: 150px;
  word-wrap: break-word;
  white-space: normal;
  vertical-align: middle;
}

.fm-actions-column {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-row-action-group {
  flex-wrap: nowrap;
  gap: 8px;
}

.fm-action-group .btn {
  min-width: 34px;
}

.fm-dataframe-preview {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
  padding: 12px;
}

.fm-dataframe-preview table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.fm-dataframe-preview table th,
.fm-dataframe-preview table td {
  vertical-align: middle;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.fm-dataframe-preview table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* =========================================================
   13. Archive / Page Shell
   ========================================================= */

.fm-page-shell {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.fm-page-shell-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 1.25rem;
}

.fm-page-shell-body {
  padding: 1.25rem;
}

.fm-note-strip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.fm-archive-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.fm-archive-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fm-archive-table td {
  vertical-align: middle;
  font-size: 14px;
}

.fm-btn-soft {
  border: 1px solid #dbe3ee;
  background: #f8fbff;
  color: #1d4ed8;
}

.fm-btn-soft:hover {
  background: #eef5ff;
  border-color: #c9d8ef;
  color: #1e40af;
}

/* =========================================================
   14. Error Page
   ========================================================= */

.fm-error-page {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.fm-error-card {
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.fm-error-title {
  font-weight: 600;
  margin-bottom: 15px;
}

.fm-error-message {
  color: #555;
  font-size: 15px;
}

/* =========================================================
   15. Header / Navbar
   ========================================================= */

.fm-navbar {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
}

.fm-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.fm-brand,
.fm-resolved-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #212529;
  min-width: 0;
  flex-shrink: 1;
}

.fm-brand {
  z-index: 3;
}

.fm-brand-logo {
  height: 60px;
  width: auto;
  object-fit: cover;
  display: block;
}

.fm-resolved-brand {
  gap: 0.75rem;
  max-width: 62%;
  overflow: hidden;
}

.fm-center-org-logo {
  height: 46px;
  width: auto;
  max-width: 96px;
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
}

.fm-center-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  overflow: hidden;
}

.fm-license-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 2px;
}

.fm-org-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-header-title {
  font-size: 0.82rem;
  color: #5c6773;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-navbar-links .nav-link {
  font-size: 0.95rem;
  padding: 8px 10px;
}

.fm-navbar-links .nav-link.active {
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .fm-navbar-inner {
    flex-wrap: wrap;
  }

  .fm-resolved-brand {
    max-width: calc(100% - 72px);
  }

  .fm-center-org-logo {
    height: 40px;
    max-width: 78px;
  }

  .fm-org-name {
    font-size: 0.92rem;
  }

  .fm-header-title {
    font-size: 0.78rem;
  }
}

@media (max-width: 768px) {
  .fm-brand {
    align-items: flex-start;
  }

  .fm-brand-logo {
    height: 46px;
  }

  .fm-resolved-brand {
    gap: 0.6rem;
    max-width: calc(100% - 64px);
  }

  .fm-center-org-logo {
    height: 34px;
    max-width: 64px;
  }

  .fm-license-label {
    font-size: 0.62rem;
  }

  .fm-org-name {
    font-size: 0.8rem;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .fm-header-title {
    font-size: 0.74rem;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .fm-navbar-links .nav-link {
    padding: 8px 0;
  }
}

/* =========================================================
   16. Login Page
   ========================================================= */

.fm-login-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  padding: 2rem 0;
}

.fm-login-wrap {
  display: flex;
  justify-content: center;
}

.fm-login-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-color: #ffffff;
  overflow: hidden;
  transform: perspective(2000px) rotateX(2deg) rotateY(-3deg);
  transform-origin: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fm-login-card:hover {
  transform: perspective(2000px) rotateX(0) rotateY(0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.fm-login-logo-col {
  text-align: center;
}

.fm-login-logo {
  width: 50%;
  max-width: 180px;
  height: auto;
}

.fm-login-title {
  font-weight: 600;
  color: #1f2937;
}

/* =========================================================
   17. Dashboard / Home Content
   ========================================================= */

.fm-dashboard-main {
  min-height: 70vh;
}

.fm-dashboard-content {
  max-width: 960px;
}

.fm-dashboard-content .lead {
  color: #374151;
  line-height: 1.75;
  font-size: 1.08rem;
}

/* =========================================================
   18. Sidebar Navigation
   ========================================================= */

.fm-sidebar {
  border-right: 1px solid #e5e7eb;
  background: #f8fafc;
  min-height: 100vh;
  padding: 0;
}

.fm-sidebar-inner {
  background: #f8fafc;
}

.fm-sidebar-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}

.fm-sidebar-nav {
  padding: 10px 0;
}

.fm-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  border-radius: 6px;
}

.fm-sidebar-link:hover {
  background: #eef2ff;
  color: #1e40af;
}

.fm-sidebar-submenu {
  padding-left: 12px;
}

.fm-sidebar-sublink {
  padding: 8px 16px;
  font-size: 14px;
  color: #4b5563;
}

.fm-sidebar-sublink:hover {
  background: #f1f5f9;
  border-radius: 6px;
}

.fm-sidebar-divider {
  margin: 14px 0;
  border-color: #e5e7eb;
}

.fm-sidebar-logout {
  padding: 10px 16px;
  color: #dc2626;
  font-weight: 500;
}

.fm-sidebar-logout:hover {
  background: #fef2f2;
}

.fm-toggle-symbol {
  font-size: 14px;
  opacity: 0.7;
}

.sidebar .offcanvas-md {
  min-height: 100vh;
}

.fm-side-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  padding: 0.35rem 0.75rem;
}

.fm-side-link {
  border-radius: 0.65rem;
  color: #212529;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  transition: all 0.2s ease;
}

.fm-side-link:hover {
  background-color: #f3f6fb;
  color: #0d6efd;
}

.fm-side-link.active,
.fm-side-link:focus {
  background-color: #e9f2ff;
  color: #0d6efd;
}

@media (max-width: 767.98px) {
  .sidebar .offcanvas-md {
    width: 82vw;
    max-width: 320px;
  }

  .sidebar .offcanvas-body {
    overflow-y: auto;
  }
}

/* =========================================================
   19. User Management
   ========================================================= */

.fm-icon-action,
.fm-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
}

.fm-icon-button {
  cursor: pointer;
}

.fm-icon-action-primary {
  color: #0d6efd;
}

.fm-icon-action-primary:hover {
  background: #eef4ff;
  color: #0b5ed7;
}

.fm-icon-action-secondary {
  color: #6f42c1;
}

.fm-icon-action-secondary:hover {
  background: #f3efff;
  color: #59359c;
}

.fm-icon-action-danger {
  color: #dc3545;
}

.fm-icon-action-danger:hover {
  background: #fff1f2;
  color: #bb2d3b;
}

/* =========================================================
   20. Footer
   ========================================================= */

.fm-footer-bar {
  background: #212529;
  color: #ffffff;
  padding: 14px 0;
  margin-top: 30px;
}

.fm-footer-links a {
  color: #ffffff;
  text-decoration: none;
  margin-left: 14px;
  font-size: 0.95rem;
}

.fm-footer-links a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* =========================================================
   21. Responsive
   ========================================================= */

@media (min-width: 992px) {
  .fm-login-logo-col {
    border-right: 1px solid #ddd;
    padding-right: 15px;
  }
}

@media (max-width: 768px) {
  .fm-footer-links {
    margin-top: 6px;
  }

  .fm-footer-links a {
    display: inline-block;
    margin: 4px 8px;
  }
}

@media (max-width: 767.98px) {
  .fm-login-card {
    transform: none;
  }

  .fm-login-logo {
    width: 40%;
    margin-bottom: 1rem;
  }
}

/* =========================================================
   22. Print
   ========================================================= */

@page {
  margin: 0;
}

@media print {
  header,
  footer,
  .fm-ad-side,
  .fm-ad-horizontal-wrap,
  #tokenInfo,
  #otherEventsLink,
  #loadingModal {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .fm-content-frame,
  .fm-faq-frame,
  .fm-policy-frame,
  .fm-panel,
  .fm-page-shell {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .fm-event-card {
    break-inside: avoid;
    box-shadow: none !important;
  }
}

@media print {
  body.fm-print-certificate * {
    visibility: hidden !important;
  }

  body.fm-print-certificate #certificateContainer,
  body.fm-print-certificate #certificateContainer * {
    visibility: visible !important;
  }

  body.fm-print-certificate #certificateImage {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  body.fm-print-certificate .fm-certificate-frame {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.fm-print-certificate .fm-certificate-frame h5,
  body.fm-print-certificate #certEventLabel,
  body.fm-print-certificate .fm-certificate-actions,
  body.fm-print-certificate .fm-certificate-note {
    display: none !important;
  }

  body.fm-print-certificate #certificateContainer {
    display: block !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* =========================================================
   23. Knowledge Hub
   ========================================================= */

.fm-kh-sidebar {
  position: sticky;
  top: 96px;
}

.fm-kh-panel {
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.fm-kh-panel .card-body {
  padding: 1rem;
}

.fm-kh-panel-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.01em;
}

.fm-kh-category-list {
  border-top: 1px solid #eef2f7;
}

.fm-kh-category-list .list-group-item {
  border: 0;
  border-bottom: 1px solid #eef2f7;
  padding: 0.85rem 0;
  color: #334155;
  font-weight: 500;
  background: transparent;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.fm-kh-category-list .list-group-item:last-child {
  border-bottom: 0;
}

.fm-kh-category-list .list-group-item:hover,
.fm-kh-category-list .list-group-item:focus {
  background: transparent;
  color: #0d6efd;
  padding-left: 4px;
}

.fm-kh-category-list .list-group-item.fw-semibold {
  color: #0d6efd;
}

.fm-kh-hero {
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(13, 110, 253, 0.06), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid #e7ecf3;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.fm-kh-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.fm-kh-hero-title {
  font-size: 2.15rem;
  line-height: 1.18;
  font-weight: 800;
  color: #111827;
  max-width: 900px;
}

.fm-kh-hero-text {
  font-size: 1.04rem;
  color: #4b5563;
  max-width: 760px;
  line-height: 1.75;
}

.fm-kh-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
}

.fm-kh-featured,
.fm-kh-card,
.fm-kh-cta,
.fm-kh-article {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  background: #fff;
}

.fm-kh-featured,
.fm-kh-card,
.fm-kh-cta {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.fm-kh-featured:hover,
.fm-kh-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
  border-color: #d8e2ee;
}

/* Featured image area */
.fm-kh-featured-media {
  overflow: hidden;
  background: #fff;
}

.fm-kh-featured-img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center;
  background: #fff;
}

/* Normal card image area */
.fm-kh-card-media {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid #eef2f7;
}

.fm-kh-card-img {
  display: block;
  max-width: 100%;
  max-height: 236px;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.fm-kh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  color: #6b7280;
}

.fm-kh-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  background: #eef4ff;
  color: #315b9a;
  font-weight: 700;
  line-height: 1;
}

.fm-kh-featured-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.24;
  color: #111827;
}

.fm-kh-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  color: #111827;
  min-height: 3rem;
  display: block;
}

.fm-kh-featured-link,
.fm-kh-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  font: inherit;
  line-height: inherit;
}

.fm-kh-featured-link:hover,
.fm-kh-card-link:hover {
  color: #0d6efd;
}

.fm-kh-featured-excerpt,
.fm-kh-card-excerpt,
.fm-kh-cta-text {
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.97rem;
}

.fm-kh-card-excerpt {
  margin-bottom: 0;
  min-height: 4.8rem;
  font-size: 0.96rem;
}

.fm-kh-readmore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #0d6efd;
  text-decoration: none;
}

.fm-kh-readmore:hover {
  color: #0b5ed7;
  text-decoration: underline;
}

.fm-kh-cta {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.fm-kh-cta-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
}

.fm-kh-search-input {
  border-radius: 12px 0 0 12px;
}

.fm-kh-search-btn {
  border-radius: 0 12px 12px 0;
}

.fm-kh-side-note {
  font-size: 0.92rem;
  color: #5b6573;
  line-height: 1.65;
}

.fm-kh-mini-list a {
  display: block;
  text-decoration: none;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.45;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef2f7;
}

.fm-kh-mini-list a:last-child {
  border-bottom: 0;
}

.fm-kh-mini-list a:hover {
  color: #0d6efd;
}

.fm-kh-breadcrumb {
  font-size: 0.92rem;
}

.fm-kh-breadcrumb .breadcrumb-item a {
  color: #64748b;
  text-decoration: none;
}

.fm-kh-breadcrumb .breadcrumb-item a:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.fm-kh-article-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
  letter-spacing: -0.01em;
}

.fm-kh-article-excerpt {
  font-size: 1.06rem;
  line-height: 1.75;
  color: #4b5563;
}

.fm-kh-article-hero {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.fm-kh-article-body {
  color: #334155;
  font-size: 1rem;
  line-height: 1.8;
}

.fm-kh-article-body p {
  margin-bottom: 1.15rem;
}

.fm-kh-article-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  color: #111827;
  scroll-margin-top: 110px;
}

.fm-kh-article-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
}

.fm-kh-article-body ul,
.fm-kh-article-body ol {
  padding-left: 1.3rem;
  margin-bottom: 1.2rem;
}

.fm-kh-article-body li {
  margin-bottom: 0.5rem;
}

.fm-kh-article-body a {
  color: #0d6efd;
  text-decoration: none;
}

.fm-kh-article-body a:hover {
  text-decoration: underline;
}

.fm-kh-article-body blockquote {
  border-left: 4px solid #dbeafe;
  background: #f8fbff;
  padding: 1rem 1rem 1rem 1.1rem;
  margin: 1.4rem 0;
  color: #475569;
  border-radius: 0 12px 12px 0;
}

.fm-kh-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}

@media (max-width: 1199.98px) {
  .fm-kh-hero-title {
    font-size: 1.95rem;
  }
}

@media (max-width: 991.98px) {
  .fm-kh-sidebar {
    position: static;
    top: auto;
  }

  .fm-kh-hero-title {
    font-size: 1.65rem;
  }

  .fm-kh-hero-text {
    font-size: 1rem;
  }

  .fm-kh-featured-img {
    height: 250px;
  }

  .fm-kh-card-img {
    max-height: 210px;
  }

  .fm-kh-article-title {
    font-size: 1.7rem;
  }

  .fm-kh-article-hero {
    max-height: 320px;
  }
}

@media (max-width: 767.98px) {
  .fm-kh-hero {
    border-radius: 18px;
  }

  .fm-kh-featured,
  .fm-kh-card,
  .fm-kh-cta,
  .fm-kh-panel,
  .fm-kh-article {
    border-radius: 14px;
  }

  .fm-kh-hero-title {
    font-size: 1.45rem;
  }

  .fm-kh-featured-title {
    font-size: 1.35rem;
  }

  .fm-kh-card-title,
  .fm-kh-card-excerpt {
    min-height: auto;
  }

  .fm-kh-featured-img {
    height: 220px;
  }

  .fm-kh-card-media {
    min-height: 180px;
    padding: 10px;
  }

  .fm-kh-card-img {
    max-height: 160px;
  }

  .fm-kh-article-title {
    font-size: 1.45rem;
  }

  .fm-kh-article-excerpt {
    font-size: 1rem;
  }

  .fm-kh-article-body {
    font-size: 0.98rem;
  }

  .fm-kh-article-body h2 {
    font-size: 1.25rem;
  }
}

.fm-btn-orange {
  background-color: #f97316;   /* nice modern orange */
  border-color: #f97316;
  color: #fff;
}

.fm-btn-orange:hover {
  background-color: #ea580c;
  border-color: #ea580c;
  color: #fff;
}

.fm-btn-orange:focus,
.fm-btn-orange:active {
  background-color: #c2410c;
  border-color: #c2410c;
  color: #fff;
}

.fm-ad-horizontal-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 10px;
}

.fm-ad-banner-box {
  width: 100%;
  min-height: 60px;
  border: 1px dashed #ccc;
  padding: 6px 10px;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
}
