.btn.btn-primary {
  background: rgb(146, 56, 81);
  border-color: rgb(146, 56, 81);
}

.btn.btn-primary:active:not(.btn-active),
.btn.btn-primary:focus:not(.btn-active),
.btn.btn-primary:hover:not(.btn-active) {
  background-color: rgb(146, 56, 81) !important;
  border-color: rgb(146, 56, 81) !important;
  color: #fff !important;
}

.btn.btn-success:active:not(.btn-active),
.btn.btn-success:focus:not(.btn-active),
.btn.btn-success:hover:not(.btn-active) {
  background-color: rgb(146, 56, 81) !important;
  border-color: rgb(146, 56, 81) !important;
  color: #fff !important;
}



.btn.btn-success {
  background: rgb(146, 56, 81);
  border-color: rgb(146, 56, 81);
  --bs-btn-hover-bg: rgb(146, 56, 81) !important;
}

.form-check-input:checked {
  background-color: rgb(146, 56, 81);
  border-color: rgb(146, 56, 81);
}

.text-hover-primary {
  transition: color .2s ease !important;
}

.text-hover-primary:hover {
  color: rgb(146, 56, 81) !important;
}

.text-hover-primary:hover i {
  color: rgb(146, 56, 81) !important;
}




/* Sidebar Styles */
.app-sidebar-menu {
  background: #f9f3f4;
}

.app-sidebar .app-sidebar-logo {
  background: rgb(253, 253, 253);
}

.app-sidebar .menu .menu-item .menu-link.active .menu-arrow:after {
  background: rgb(146, 56, 81) !important;
}

.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--highlighted {
  background-color: rgb(238, 224, 228);
  color: rgb(146, 56, 81);
  transition: color .2s ease;
}

.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected {
  background-color: rgb(238, 224, 228);
  color: rgb(146, 56, 81);
  transition: color .2s ease;
}

.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected:after {
  background-color: rgb(146, 56, 81);
}

.btn.btn-active-color-primary:hover:not(.btn-active) .svg-icon {
  color: rgb(146, 56, 81);
}

.btn.btn-active-color-primary.active .svg-icon {
  color: rgb(146, 56, 81);
}

.btn.btn-light-primary i {
  color: rgb(146, 56, 81);
}

.btn.btn-light-primary {
  color: rgb(146, 56, 81);
  background-color: rgb(238, 224, 228);
}

.btn.btn-active-primary:hover:not(.btn-active) {
  background-color: rgb(146, 56, 81) !important
}


/* Default state for menu title */
.menu-title {
  color: rgb(0, 0, 0) !important;
}

.btn.btn-active-color-primary:hover:not(.btn-active) i {
  color: rgb(146, 56, 81) !important
}

.app-sidebar .menu .menu-item .menu-link.active {
  transition: color .2s ease !important;
  background-color: #E2001D !important;
  color: white !important;
}

/* Active state for menu link and title */
.menu-link.active .menu-title {
  transition: color .2s ease, background-color .2s ease !important;
  background-color: #E2001D !important;
  color: white !important;
}

/* Additional styling for demonstration */
.menu-link {
  display: inline-block;
  padding: 10px;
  margin: 5px;
}

.active>.page-link {
  color: #fff;
  background-color: rgb(146, 56, 81) !important;
}

.page-link:hover {
  z-index: 2;
  color: rgb(146, 56, 81) !important;
  background-color: rgb(238, 224, 228) !important;
  border-color: var(--bs-pagination-hover-border-color);
}

.page-item.active .page-link:hover {
  color: white !important;
  background-color: rgb(146, 56, 81) !important;
  border-color: var(--bs-pagination-active-border-color) !important;
}

.menu-state-color .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) {
  color: rgb(146, 56, 81) !important;
}

.menu-state-bg .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) {
  background-color: rgb(238, 224, 228) !important;
  color: rgb(146, 56, 81) !important;
}

.menu-state-bg .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) {
  background-color: var(--kt-menu-link-bg-color-hover);
  color: var(--kt-menu-link-color-hover);
}

.custom_icon {
  font-size: 20px !important;
  padding: 1px !important;
  margin-right: 5px !important;
}

.card_arrow {
  justify-content: flex-start !important;
  align-items: baseline !important;
  gap: 10px !important;
}




html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* ✅ prevents horizontal scroll */
  background-color: #c8cccf;
  /* optional */
}

.top {
  align-items: center;
}



.forget {
  background-color: whitesmoke !important;
  height: 60%;
  margin-top: 8%;
}

.log {
  border: #bdbdbd 1px solid;
}

.logo {
  margin-bottom: 10%;
  width: 80px;
  max-height: 50px;
  margin-left: -20%;
}

/* Container for the progress bar */
.indeterminate-progress-bar {
  width: 100%;
  height: 4px;
  background-color: #e0e0e0;
  /* Background color of the bar */
  position: relative;
  overflow: hidden;
}

/* Add this to your CSS stylesheet */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* Semi-transparent black background */
  display: none;
  z-index: 9999;
  /* Make sure it's above other elements */
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #f3f3f3;
  border-top: 4px solid rgb(146, 56, 81);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}



/* The animated progress bar */
.progress {
  width: 100%;
  height: 100%;
  background-color: rgb(146, 56, 81) !important;
  /* Progress bar color */
  position: absolute;
  left: -100%;
  /* Start position outside of the container */
  animation: indeterminateAnimation 1s infinite ease-in-out;
}

/* Animation keyframes */
@keyframes indeterminateAnimation {
  0% {
    left: -100%;
    width: 100%;
  }

  50% {
    left: 0;
    width: 100%;
  }

  100% {
    left: 100%;
    width: 10%;
  }
}


@media screen and (max-width: 320px) {
  .logo {
    margin-left: -5%;
    width: 60px;
  }
}

@media screen and (max-width: 320px) {
  .forget {
    height: 50% !important;
  }
}

.common-header {
  padding-left: 0px !important;
}

.justify-content-center {
  margin-top: 20px;
  margin-bottom: 20px;
}

.app-header {
  z-index: 100;
  position: fixed;
  left: 0;
  right: 0;
  top: 0
}

#kt_app_toolbar_container {
  margin-top: 50px;
}

.field-icon {
  float: right;
  margin-right: 15px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
}

.ql-container {
  height: 4% !important;
}

.draft {
  background-color: orange !important;
  color: white;
}

.close {
  background-color: green !important;
  color: white;
}

.next,
.preview {
  background-color: blue !important;
  color: white;
}

.timeline-label .timeline-item {
  margin-bottom: 4rem !important;
}

.truncate {
  width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.description {
  height: 100% !important;
  max-height: 200px !important;
}

.toast-notification {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 14px 20px;
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 999999 !important;
  /* IMPORTANT */
  animation: slideInUp 0.3s ease;
}

.sort-icon {
  color: white !important;
  font-size: 14px;
  margin-left: 6px !important;
}

.table-header {
  padding: 16px !important;
  font-weight: 600 !important;
  text-align: left !important;
  border: none !important;
  white-space: nowrap !important;
  background: transparent !important;
  color: white !important;
  min-width: 150px !important;
}

.forum-btn {
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(90deg, #E2001D, #B1040E);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.forum-btn:hover {
  background: linear-gradient(90deg, #B1040E, #E2001D);
}

.main-title {
  font-size: 32px;
}

.sub-title {
  font-size: 15px;
}

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

.forum-header-actions {
  display: flex;
  gap: 12px;
}

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


@keyframes slideInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(40px);
    opacity: 0;
  }
}


@media (max-width: 1024px) and (min-width: 769px) {
  .forum-btn {
    white-space: nowrap;
  }
}




@media screen and (max-width: 768px) {
  .toast-notification {
    font-size: 10px;
    padding: 10px 15px;
    top: 76px;
    right: 10px
  }

  .modal-popup {
    width: 70% !important;
    height: 85dvh !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    border-radius: 10px !important;
  }

  .sort-icon {
    font-size: 12px;
  }

  .forum-btn {
    font-size: 12px;
    width: 100%;
    justify-content: center;
  }

  .main-title {
    font-size: 22px;
  }

  .sub-title {
    font-size: 12px;
    margin-bottom: 0;
  }

  .forum-header {
    flex-direction: column;
    align-items: stretch;
  }

  .forum-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .post-footer-actions {
    gap: 0px !important;
  }

  #filterToggleBtn,
  #clearFiltersBtn {
    font-size: 13px;
    padding: 8px 14px;
  }

  .search-filter-container {
    gap: 8px;
  }

  .form-row {
    display: block;
  }
}

@media screen and (max-width: 480px) {
  .toast-notification {
    font-size: 10px;
    padding: 10px 15px;
    top: 6px;
    right: 10px
  }

  .modal-popup {
    width: 90% !important;
    height: 76dvh !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    border-radius: 10px !important;
  }

  #filterToggleBtn,
  #clearFiltersBtn {
    width: 100% !important;
    justify-content: center;
    padding: 6px !important;
  }

  #filterToggleBtn .bi-funnel {
    font-size: 16px !important;
  }

  .search-filter-container {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
}

.stat-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.stat-icon {
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 0;
}

.post-footer {
  padding: 10px 0 0 0;
  margin-bottom: 16px;
  border-top: 1px solid #e5e7eb;
}

.post-footer-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.post-footer-left,
.post-footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-footer-row-2 {
  display: none;
}

@media (max-width: 480px) {
  .post-footer-row-1 {
    justify-content: space-between;
  }

  .post-footer-row-2 {
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }


  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-title {
    font-size: 12px;
  }

  .stat-desc {
    font-size: 10px;
  }

  .stat-icon {
    padding: 8px;
  }

  #searchInput {
    padding: 10px 16px 10px 40px;
    font-size: 14px;
  }

  .multi-select-display {
    font-size: 13px !important;
    padding: 8px 10px !important;
  }

}

.desktop-tablet-only {
  display: inline-flex;
}

.mobile-only {
  display: none;
}

@media (max-width: 492px) {
  .desktop-tablet-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex;
  }

  .post-footer-row-2 {
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }
}

#searchInput {
  width: 100%;
  padding: 8px 16px 8px 45px;
  border: 1px solid #d1d5db;
  border-radius: 30px;
  font-size: 14px;
  outline: none;
}

#searchInput:focus {
  border-color: #dc2626;
}

#filterToggleBtn {
  background: #fbf9fa;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 4px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

#filterToggleBtn .bi-funnel {
  font-size: 20px;
}

#clearFiltersBtn {
  background: white;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: none;
  white-space: nowrap;
}

#filterToggleBtn:hover {
  background: #eebc4a;
}

#clearFiltersBtn:hover {
  background: #fef2f2;
}

.search-filter-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#filterSection {
  display: none;
  background: #fbf9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.multi-select-container {
  position: relative;
  cursor: pointer !important;
}

.multi-select-display span {
  background: none;
}

.multi-select-display:hover {
  border-color: #9ca3af;
  background-color: #eebc4a;
}

.multi-select-display .placeholder {
  color: #000000ff;
  opacity: 1;
  flex: 1;
  font-size: 14px;
  font-weight: 400;
}

.multi-select-display * {
  cursor: pointer !important;
}

.multi-select-display {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  transition: all 0.2s;
  background: white;
}

#selectedFiltersDisplay {
  display: none;
  margin-bottom: 20px;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px;
}

.multi-select-dropdown.active {
  display: block;
}

#labelsDropdown {
  top: auto !important;
  bottom: 50px !important;
}

.filter-label {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  display: block;
  margin-bottom: 8px;
}

.placeholder.fa-chevron-down {
  color: #151616ff;
  font-size: 11px;
}

.like-toggle-btn {
  border: none;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #756b80;
  transition: all 0.2s ease;
}

.like-toggle-btn:hover {
  background: #eebc4a;
  color: #000000 !important;
}

.like-toggle-btn.liked {
  color: #dc2626;
}

.like-toggle-btn.liked i {
  color: #dc2626;
}

.view-thread-btn {
  background: linear-gradient(90deg, #E2001D, #B1040E);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-toggle-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.post-footer-left div {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 14px;
}

.post-author-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.post-author-image {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(90deg, #E2001D, #B1040E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.post-author-info {
  display: flex;
  gap: 8px;
}

.post-author-info p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.post-author-info span {
  color: #6b7280;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags span {
  background: #F7C744;
  color: #000000ff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}

.post-description {
  color: #6b7280;
  font-size: 18px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.forum-post-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  scale: 0.99;
  position: relative;
}

.forum-post-card:hover {
  scale: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #F7C744;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-title {
  font-size: 20px;
  font-weight: 700;
  color: #dc2626;
  margin: 0;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.post-title:hover {
  text-decoration: underline;
  color: #B1040E;
}

.pin-button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 6px 8px;
}

.pin-button:hover {
  background: #ffe7e7;
  border-radius: 20%;
}

.pin-button .pin-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #1b1b1b;
}

.pin-button.pinned .pin-icon {
  fill: #E2001D;
  stroke: #E2001D;
}

.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pinned-tag {
  position: relative;
  top: 2px;
  background: #F7C744;
  color: #000;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pinned-tag .pin-icon {
  width: 14px;
  height: 14px;
  fill: #000000;
  stroke: #000000;
  top: 2px;
  position: relative;
}

.flag-icon {
  color: #ff0000;
}

.flag-button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 8px;
}

.flag-button:hover {
  background: #ffe7e7;
  border-radius: 20%;
}

@media (max-width: 768px) {
  #settingModal {
    padding: 15px !important;
  }

  .settings-modal-content {
    padding: 18px !important;
    border-radius: 8px !important;
  }

  .settings-header h2 {
    font-size: 18px !important;
  }

  .settings-header p {
    font-size: 11px !important;
  }

  .setting-row {
    padding: 15px 0 !important;
    gap: 12px !important;
  }

  .setting-row h4 {
    font-size: 12px !important;
  }

  .setting-row p {
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  #settingModal {
    padding: 10px !important;
  }

  .settings-modal-content {
    padding: 15px !important;
    border-radius: 6px !important;
  }

  .settings-header {
    margin-bottom: 8px !important;
  }

  .settings-header h2 {
    font-size: 16px !important;
  }

  .settings-header p {
    font-size: 10px !important;
    margin: 2px 0 !important;
  }

  .setting-row {
    padding: 12px 0 !important;
    gap: 10px !important;
  }

  .setting-row h4 {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .setting-row p {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin: 2px 0 !important;
  }

  /* Smaller toggle switches on very small screens */
  #adminSlider,
  #commentSlider {
    width: 40px !important;
    height: 20px !important;
  }

  #adminCircle,
  #commentCircle {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 360px) {
  .settings-modal-content {
    padding: 12px !important;
  }

  .setting-row {
    padding: 10px 0 !important;
  }

  .setting-row h4 {
    font-size: 10px !important;
  }

  .setting-row p {
    font-size: 9px !important;
  }
}

.error-message {
  --error-message-color: #dc2626;
  /* display: none; */
  color: var(--error-message-color);
  font-size: 12px;
}

.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.custom-select {
  position: relative;
}

.custom-select .form-input {
  width: 100%;
  padding-right: 36px;
}

/* arrow */
.arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
  pointer-events: none;
}

/* rotate when open */
.custom-select.open .arrow {
  transform: translateY(-50%) rotate(-135deg);
}