/* ================= Nimbus Theme ================= */
:root {
  --bg: #F3F1FA;
  --card: #FFFFFF;
  --primary: #7C3AED;
  --primary-soft: #EDE4FB;
  --secondary: #DB2777;
  --secondary-soft: #FBE0EF;
  --accent: #C026D3;
  --accent-soft: #F5E4FB;
  --success: #8FD694;
  --success-soft: #EEFAEE;
  --warning: #FFD166;
  --warning-soft: #FFF8E8;
  --danger: #FF9AA2;
  --danger-soft: #FFEFF0;
  --text: #374151;
  --text-soft: #8A93A3;
  --gray: #E5E7EB;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.font-display {
  font-family: 'Poppins', sans-serif;
}

/* ---------- Alert ---------- */
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 320px;
  display: none;
}

/* ---------- Profile ---------- */
.profile-initial {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
}

.profile-initial-large {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

/* ---------- Floating Button ---------- */
.floating-add-btn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
  z-index: 9999;
  transition: .3s;
}

.floating-add-btn:hover {
  background: var(--secondary);
  color: #fff;
  transform: scale(1.1);
}

.floating-add-btn i {
  font-size: 26px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background: #1C1633;
  border-right: 1px solid #2A2247;
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  margin-bottom: 34px;
  padding-left: 6px;
}

.brand-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(120deg, #7C3AED, #C026D3 60%, #DB2777);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-section-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B6488;
  font-weight: 600;
  margin: 8px 0 8px 14px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #B4AECB;
  font-weight: 500;
  font-size: 14px;
  margin: 0 4px 3px;
  text-decoration: none;
  transition: all .18s ease;
}

.nav-link-item i {
  font-size: 16px;
  width: 18px;
  text-align: center;
}

.nav-link-item.active i {
  background: rgba(255, 255, 255, 0.25);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-link-item.active {
  background: linear-gradient(90deg, #7C3AED, #DB2777);
  color: #fff;
  box-shadow: none;
}

.sidebar-footer {
  margin-top: auto;
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.sidebar-footer p {
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 8px 0 12px;
}

/* ---------- Layout ---------- */
.main-content {
  margin-left: 250px;
  padding: 26px 32px 50px;
}

.pagetitle {
  margin-bottom: 12px;
}

.section {
  padding-top: 0;
}

#sidebar.sidebar {
  top: 80px !important;
  overflow-y: auto !important;
  width: 250px !important;
  left: 0 !important;
}

body.toggle-sidebar #sidebar.sidebar {
  left: -250px !important;
}

body.toggle-sidebar #main,
body.toggle-sidebar #footer {
  margin-left: 0 !important;
}

@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: 280px !important;
  }
}

/* ---------- Header & Logo ---------- */
.header {
  height: 80px;
}

.header .logo img {
  max-height: 62px;
}

#main {
  margin-top: 80px;
}

.footer .copyright img,
.header .logo img {
  mix-blend-mode: multiply;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--gray);
  background: var(--card);
  border-radius: 14px;
  padding: 11px 16px 11px 42px;
  font-size: 13.5px;
  transition: all .2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  position: relative;
  transition: all .2s ease;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-2px);
}

.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--card);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--gray);
  border-radius: 14px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  transition: all .2s ease;
}

.profile-chip:hover {
  border-color: var(--primary-soft);
  background: var(--primary-soft);
}

.profile-chip img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.profile-chip .name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.1;
}

.profile-chip .role {
  font-size: 11.5px;
  color: var(--text-soft);
}

/* ---------- Cards ---------- */
.card-soft {
  background: var(--card);
  border: 1px solid var(--gray);
  border-radius: 16px;
  padding: 16px 22px;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 1px 2px rgba(23, 31, 46, .04);
  margin-top: 0;
}

.card-soft:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -14px rgba(55, 65, 81, .18);
}

.stat-card .icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 16px;
}

.stat-card .stat-value {
  font-size: 25px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 2px;
}

.stat-card .stat-label {
  color: var(--text-soft);
  font-size: 13px;
}

.card-soft.stat-card .section-title {
  color: var(--primary);
}

.trend-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.trend-up {
  background: var(--success-soft);
  color: #4c9a55;
}

.trend-down {
  background: var(--danger-soft);
  color: #d1636c;
}

.section-title {
  font-size: 16.5px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.section-sub {
  color: var(--text-soft);
  font-size: 12.5px;
}

.link-more {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.link-more:hover {
  text-decoration: underline;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.badge-soft {
  border-radius: 8px;
  font-weight: 600;
  font-size: 11.5px;
  padding: 5px 10px;
}

.badge-success {
  background: var(--success-soft);
  color: #4c9a55;
}

.badge-warning {
  background: var(--warning-soft);
  color: #b3860f;
}

.badge-danger {
  background: var(--danger-soft);
  color: #d1636c;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.progress-thin {
  height: 7px;
  border-radius: 20px;
  background: var(--gray);
}

.progress-thin .progress-bar {
  border-radius: 20px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gray);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.table-soft thead th {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: none;
  padding-bottom: 12px;
}

.table-soft tbody td {
  border: none;
  border-top: 1px solid var(--gray);
  padding: 14px 8px;
  vertical-align: middle;
  font-size: 13.5px;
}

/* ---------- Buttons & Forms ---------- */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background: var(--secondary) !important;
  border-color: var(--secondary) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.form-check-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25) !important;
}

/* ---------- Nav & Profile ---------- */
.nav-profile .dropdown-toggle {
  color: var(--text) !important;
}

.header-nav .nav-icon,
.header-nav a i {
  color: var(--text) !important;
}

.nav-tabs-bordered .nav-link.active {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  border-bottom-color: #fff !important;
}

/* ---------- Colors override ---------- */
.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--primary) !important;
}

.bg-primary,
.badge.bg-primary {
  background-color: var(--primary-soft) !important;
  color: var(--primary) !important;
}

/* ---------- Pagination ---------- */
.paginate_button.current,
.paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.dataTables_wrapper .pagination .page-link {
  border: none !important;
  background: transparent !important;
  color: var(--text-soft);
}

.dataTables_wrapper .pagination .page-item.active .page-link {
  color: var(--primary) !important;
  font-weight: 600;
  background: transparent !important;
}

/* ---------- DataTables ---------- */
.dataTables_processing {
  display: none !important;
}

.dataTables_wrapper table.dataTable {
  border-collapse: separate;
  border-spacing: 0;
}

.dataTables_wrapper table.dataTable thead th,
table.dataTable thead th,
.dataTable thead th,
#societyTable thead th {
  background: var(--primary-soft) !important;
  border: none !important;
  color: var(--primary) !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 12px;
}

table.dataTable thead tr,
.dataTable thead tr,
#societyTable thead tr {
  background: var(--primary-soft) !important;
}

.dataTables_wrapper table.dataTable thead th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.dataTables_wrapper table.dataTable thead th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dataTables_wrapper table.dataTable tbody td {
  border: none !important;
  border-bottom: 1px solid var(--gray) !important;
  padding: 10px 12px;
  vertical-align: middle;
  font-size: 13px;
}

.dataTables_wrapper table.dataTable tbody td:first-child {
  font-weight: 500;
  color: var(--text);
}

.dataTables_wrapper table.dataTable .badge {
  background: transparent !important;
  color: var(--primary) !important;
  font-weight: 600;
  padding: 0 !important;
}

.dataTables_wrapper table.dataTable .badge.bg-success,
.dataTables_wrapper table.dataTable .badge.badge-success {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  font-size: 12px;
  color: var(--text-soft);
}

/* ---------- Excel/PDF Buttons ---------- */
.dt-button.buttons-excel,
.buttons-excel {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.badge-active,
td:has(.active) {
  color: var(--primary) !important;
}

/* ---------- Welcome Banner ---------- */
.welcome-banner {
  background: linear-gradient(120deg, #7C3AED, #C026D3 60%, #DB2777) !important;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.welcome-banner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.welcome-banner p {
  font-size: 13.5px;
  opacity: 0.9;
  margin-bottom: 0;
}

.welcome-banner .stat-pill {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
}

.welcome-banner .stat-pill .num {
  font-size: 20px;
  font-weight: 700;
}

.welcome-banner .stat-pill .label {
  font-size: 11px;
  opacity: 0.85;
}

.header-page-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.welcome-banner .stat-pill .num {
  font-size: 20px;
  font-weight: 700;
}

.welcome-banner .stat-pill .label {
  font-size: 11px;
  opacity: 0.85;
}

/* ---- Bubble / Pill row (Good Morning banner) ---- */
.bubble-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bubble {
  display: inline-block;
  height: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.20);
  width: 48px;
}

.bubble.active {
  width: 72px;
  background: rgba(255, 255, 255, 0.75);
}

/* Remove green - change to purple */
.dt-button.buttons-excel,
.buttons-excel {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

table.dataTable thead th {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

.badge-active,
td:has(.active) {
  color: var(--primary) !important;
}

.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Remove green table header */
table.dataTable thead tr {
  background: var(--primary-soft) !important;
}

table.dataTable thead th {
  color: var(--primary) !important;
}

/* Remove green Active text */
.text-success {
  color: var(--primary) !important;
}

/* Green table header fix */
#societyTable thead tr,
.dataTable thead tr {
  background: var(--primary-soft) !important;
}

#societyTable thead th,
.dataTable thead th {
  color: var(--primary) !important;
  border-color: var(--primary-soft) !important;
}

/* Fix green table header */
table.dataTable thead tr {
  background-color: var(--primary-soft) !important;
}

table.dataTable thead th {
  color: var(--primary) !important;
}

/* Fix green Active text */
.text-success {
  color: var(--primary) !important;
}

.header-page-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary, #063638);
  flex: 1;
  text-align: center;
}

.floating-export-wrapper {
  position: fixed;
  right: 100px;
  bottom: 25px;
  /* width: 60px;
  height: 200px; */
  z-index: 99999;
}

/* =========================
  MAIN DOWNLOAD BUTTON
========================= */

.floating-excel-btn {
  position: absolute;
  right: 0;
  bottom: 0;

  width: 60px;
  height: 60px;

  border: none;
  background: var(--primary);
  color: #fff;

  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 26px;

  box-shadow: 0 5px 15px rgba(0, 0, 0, .3);

  cursor: pointer;

  transition: .3s;
}

.floating-excel-btn:hover {
  color: #fff;
  transform: scale(1.1);
}


/* =========================
   EXCEL / PDF BUTTONS
========================= */

.floating-export-option {
  position: absolute;

  right: 5px;

  width: 50px;
  height: 50px;

  border: none;
  border-radius: 50%;

  color: #fff;

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);

  /* Hidden */
  opacity: 0;
  visibility: hidden;

  transform: translateY(20px) scale(.5);

  transition: all .25s ease;
}


/* Excel */
.excel-btn {
  bottom: 75px;
  background: #198754;
}


/* PDF */
.pdf-btn {
  bottom: 135px;
  background: #dc3545;
}

/* SHOW BUTTONS */
.floating-export-wrapper.active .floating-export-option {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}


/*  ICON  */
.floating-export-option i {
  font-size: 22px;
}

#exportMainIcon {
  transition: transform .3s ease;
}

/* Download -> rotate */
.floating-export-wrapper.active #exportMainIcon {
  transform: rotate(45deg);
}

.dataTables_wrapper .dt-buttons {
  display: none !important;
}

/* ---------- Dropdown Arrow & Smooth Rotate ---------- */
.setting-arrow-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.setting-arrow {
  font-size: 12px;
  transition: transform 0.25s ease;
}

.todos-setting-toggle[aria-expanded="true"] .setting-arrow {
  transform: rotate(180deg);
}

/* ---------- Submenu List & Items ---------- */
.sidebar .nav-content {
  list-style: none !important;
  padding: 4px 0 6px 18px !important;
  margin: 0 !important;
}

.sidebar .nav-content li {
  list-style: none !important;
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #B4AECB !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.18s ease;
}

.nav-sub-item i {
  font-size: 14px;
  color: #8A93A3;
  transition: color 0.18s ease;
}

.nav-sub-item:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(3px);
}

.nav-sub-item:hover i {
  color: var(--secondary);
}

.nav-sub-item.active {
  color: #FFFFFF !important;
  background: rgba(124, 58, 237, 0.2);
  font-weight: 600;
}

.nav-sub-item.active i {
  color: var(--accent);
}

.nav-sub-item i.bi-circle-fill {
  font-size: 6px !important;
  margin-right: 4px;
}