/* =========================================================
   TRIFOLD CHURCH DATABASE
   BACKEND / ADMIN THEME
   Primary Brand: #287BBB
   ========================================================= */


   @import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&display=swap');

:root {

    /* =========================================================
       BRAND / PRIMARY
       ========================================================= */

    --primary:              #287BBB;
    --primary-dark:         #07617D;
    --primary-deep:         #174A73;
    --primary-mid:          #176F9E;
    --primary-light:        #4A95C8;
    --primary-lighter:      #75B1D8;
    --primary-soft:         #EAF5FB;
    --primary-pale:         #F4FAFD;
    --primary-hover:        #216CA8;


    /* =========================================================
       SUPPORTING BLUES
       ========================================================= */

    --blue-50:              #F4FAFE;
    --blue-100:             #E8F3FA;
    --blue-200:             #D3E8F5;
    --blue-300:             #BBD9EC;
    --blue-400:             #72B0D8;
    --blue-500:             #287BBB;
    --blue-600:             #216CA8;
    --blue-700:             #1F6398;
    --blue-800:             #174A73;
    --blue-900:             #103752;

    --accent:               #0B8DB8;
    --accent-light:         #5BB6D5;
    --accent-cyan:          #1FA4C9;
    --accent-soft:          #DDF3FA;
    --accent-dark:          #086A8C;
    --accent-deep:          #07546D;
    --product-primary: #287BBB;
    --product-primary-dark: #07617d;

    --product-text: #17212b;
    --product-muted: #718096;

    --product-bg: #f7f9fc;

    --product-border: #e7ebf0;



    /* =========================================================
       DARK / NAVY
       ========================================================= */

    --dark:                 #092B3A;
    --dark-mid:             #0D3A4D;
    --dark-alt:             #12465B;
    --dark-blue:            #103B50;


    /* =========================================================
       TEXT
       ========================================================= */

    --body:                 #516171;
    --text-dark:            #334155;
    --text-muted:           #64748B;
    --text-light:           #94A3B8;
    --text-soft:            #8A94A6;
    --text-lighter:         #94A3B8;
    --text-slate:           #475569;
    --text-heading:         #17384A;

    --white:                #FFFFFF;


    /* =========================================================
       BACKGROUNDS / SURFACES
       ========================================================= */

    --bg-body:              #F4F8FB;
    --bg-soft:              #F6FAFC;
    --bg-soft-alt:          #F7FAFC;
    --bg-soft-blue:         #F4FAFD;
    --bg-soft-fam:          #F5F9FC;

    --bg-card:              #FFFFFF;

    --bg-hover:             #F5F9FC;
    --bg-hover-blue:        #F1F8FC;
    --bg-hover-soft:        #FAFCFD;

    --bg-input:             #F7FAFC;

    --bg-table-header:      #F3F8FB;
    --bg-table-header-alt:  #F8FAFC;


    /* =========================================================
       STATUS BACKGROUNDS
       ========================================================= */

    --bg-danger-soft:       #FEF2F2;
    --bg-success-soft:      #ECFDF5;
    --bg-warning-soft:      #FFF8E7;
    --bg-info-soft:         #EAF7FC;


    /* =========================================================
       BORDERS
       ========================================================= */

    --border:               rgba(7, 97, 125, 0.10);

    --border-soft:          #E5EDF2;
    --border-mid:           #DDE7ED;
    --border-slate:         #E2E8F0;

    --border-blue:          #D7E9F2;
    --border-blue-light:    #E8F3F8;

    --border-table:         #EAF1F5;
    --border-table-alt:     #EDF2F6;
    --border-table-soft:    #EEF3F6;


    /* =========================================================
       SHADOWS
       ========================================================= */

    --shadow-sm:
        0 4px 20px rgba(7, 61, 82, 0.04);

    --shadow:
        0 6px 30px rgba(7, 61, 82, 0.08);

    --shadow-md:
        0 8px 24px rgba(7, 61, 82, 0.07);

    --shadow-lg:
        0 20px 40px -12px rgba(7, 61, 82, 0.14);

    --shadow-card:
        0 10px 25px -5px rgba(7, 61, 82, 0.07),
        0 8px 10px -6px rgba(7, 61, 82, 0.04);

    --shadow-card-lg:
        0 20px 40px -12px rgba(7, 61, 82, 0.16);

    --shadow-primary:
        0 10px 25px rgba(40, 123, 187, 0.20);

    --shadow-primary-lg:
        0 20px 45px rgba(40, 123, 187, 0.22);


    /* =========================================================
       STATUS / SEMANTIC
       ========================================================= */

    --success:              #059669;
    --success-dark:         #047857;
    --success-soft:         #D1FAE5;
    --success-text:         #065F46;

    --danger:               #DC2626;
    --danger-dark:          #B91C1C;
    --danger-soft:          #FEE2E2;
    --danger-text:          #991B1B;

    --warning:              #D99A25;
    --warning-soft:         #FFF3D6;
    --warning-text:         #8A5A08;

    --info:                 #287BBB;
    --info-dark:            #07617D;
    --info-text:            #075B78;
    --info-soft:            #EAF5FB;


    /* =========================================================
       VIOLET
       ========================================================= */

    --violet:               #526FAF;
    --violet-dark:          #405B94;
    --violet-soft:          #EEF2FA;


    /* =========================================================
       MAIN GRADIENTS
       ========================================================= */

    --brand-gradient:
        linear-gradient(
            135deg,
            #287BBB 0%,
            #176F9E 50%,
            #07617D 100%
        );

    --brand-gradient-soft:
        linear-gradient(
            135deg,
            #EAF5FB 0%,
            #F4FAFD 100%
        );

    --brand-gradient-dark:
        linear-gradient(
            135deg,
            #07617D 0%,
            #092B3A 100%
        );


    /* =========================================================
       LEGACY GRADIENT ALIASES
       ========================================================= */

    --cfi-grad-1:           #287BBB;
    --cfi-grad-2:           #176F9E;
    --cfi-grad-3:           #0B8DB8;


    /* =========================================================
       PRAYER / ACTIVITY STATUS
       ========================================================= */

    --pr-open:              #D99A25;
    --pr-answered:          #287BBB;
    --pr-closed:            #6B7C8A;


    /* =========================================================
       LEGACY / MISC ALIASES
       ========================================================= */

    --peach:                #287BBB;
    --brand:                #287BBB;

    --brand-dark:           #07617D;
    --brand-mid:            #176F9E;
    --brand-light:          #4A95C8;
    --brand-soft:           #EAF5FB;


    /* =========================================================
       RADIUS
       ========================================================= */

    --cfi-radius:           18px;

    --radius-sm:            10px;
    --radius-md:            14px;
    --radius-lg:            18px;
    --radius-xl:            22px;
}

/* =========================================================
   BASE
   ========================================================= */
.bg-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


section {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* =========================================================
   GLOBAL
   ========================================================= */

body {
    font-family: "Barlow", sans-serif;
    color: var(--body);
    background: var(--bg-body);
    line-height: 1.6;
}

a {
    color: var(--primary);
    transition: all .25s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark);
    font-weight: 700;
}

img {
    max-width: 100%;
}


/* =========================================================
   PAGE / MAIN WRAPPER
   ========================================================= */

.body-wrapper {
    background: var(--bg-body);
    min-height: 100vh;
}

.container-fluid {
    position: relative;
}


/* =========================================================
   SUPER PREMIUM SIDEBAR + HEADER (Church DMS)
   Matches brand: #287BBB / dark navy / soft blues
   ========================================================= */

/* ---------- Layout shell ---------- */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--bg-body);
}

.page-wrapper .body-wrapper,
.page-wrapper > .body-wrapper,
#main-wrapper > .body-wrapper {
  margin-left: 270px;
  transition: margin-left .28s cubic-bezier(.4, 0, .2, 1);
  min-height: 100vh;
  width: calc(100% - 270px);
}

/* ---------- Left Sidebar ---------- */
.left-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 270px;
  height: 100vh;
  z-index: 1040;
  background: linear-gradient(180deg, #0A2F3E 0%, #092B3A 40%, #0D3A4D 100%);
  box-shadow:
    8px 0 32px rgba(7, 61, 82, 0.18),
    inset -1px 0 0 rgba(255, 255, 255, 0.04);
  transition: width .28s cubic-bezier(.4, 0, .2, 1), transform .28s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.left-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(40, 123, 187, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(11, 141, 184, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.left-sidebar > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Brand logo area */
.brand-logo {
  padding: 1.15rem 1.25rem 1rem;
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.brand-logo .logo-img {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo .small_logo {
  width: auto !important;
  max-width: 130px;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  filter: brightness(1.05) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  transition: transform .25s ease, filter .25s ease;
}

.brand-logo .logo-img:hover .small_logo {
  transform: scale(1.03);
  filter: brightness(1.12) drop-shadow(0 4px 12px rgba(40, 123, 187, 0.35));
}

.brand-logo .close-btn,
.brand-logo .sidebartoggler {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all .2s ease;
}

.brand-logo .close-btn:hover,
.brand-logo .sidebartoggler:hover {
  background: rgba(40, 123, 187, 0.35);
  color: #fff;
  border-color: rgba(40, 123, 187, 0.4);
}
.float-right {
    float: right;
}

.pull-right {
    float: right;
}
  .blog-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border-left: 4px solid #0d6efd;
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .blog-summary blockquote {
    font-size: 1.15rem;
    font-style: italic;
    color: #495057;
    line-height: 1.6;
    margin: 0;
    quotes: "“" "”" "‘" "’";
  }
  .blog-summary blockquote::before {
    content: open-quote;
    font-size: 1.8rem;
    color: #0d6efd;
    margin-right: 0.25rem;
    vertical-align: -0.15em;
    opacity: 0.7;
  }
  .blog-summary blockquote::after {
    content: close-quote;
    font-size: 1.8rem;
    color: #0d6efd;
    margin-left: 0.15rem;
    vertical-align: -0.15em;
    opacity: 0.7;
  }
/* Sidebar navigation scroll area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.85rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-nav .main-navbar {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Section captions */
.nav-small-cap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.85rem 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.nav-small-cap:first-child {
  margin-top: 0;
  padding-top: 0.35rem;
}

.nav-small-cap .nav-small-cap-icon {
  font-size: 0.55rem !important;
  opacity: 0.6;
}

.nav-small-cap.text-muted {
  color: rgba(255, 255, 255, 0.38) !important;
}

/* Sidebar items */
.sidebar-item {
  position: relative;
  margin-bottom: 2px;
  list-style: none;
}

.sidebar-item.py-2 {
  padding-top: 0.15rem !important;
  padding-bottom: 0.15rem !important;
}

/* Main links */
.sidebar-link {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.9rem !important;
  margin: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
  transition: transform 0.22s ease;
  opacity: 0;
}

.sidebar-link span:first-child,
.sidebar-link > span:first-of-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.22s ease;
}

.sidebar-link i {
  font-size: 0.95rem;
  line-height: 1;
}

.sidebar-link .hide-menu {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.sidebar-link:hover {
  background: rgba(40, 123, 187, 0.18) !important;
  color: #fff !important;
  border-color: rgba(40, 123, 187, 0.2);
  transform: translateX(2px);
}

.sidebar-link:hover::before {
  transform: translateY(-50%) scaleY(1);
  opacity: 1;
}

.sidebar-link:hover span:first-child,
.sidebar-link:hover > span:first-of-type {
  background: rgba(40, 123, 187, 0.35);
  color: #fff;
  box-shadow: 0 4px 12px rgba(40, 123, 187, 0.25);
}

/* Active state */
.sidebar-item.active > .sidebar-link,
.sidebar-link.active,
a.sidebar-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(40, 123, 187, 0.35) 0%, rgba(23, 111, 158, 0.28) 100%) !important;
  color: #fff !important;
  border-color: rgba(40, 123, 187, 0.35);
  box-shadow: 0 4px 16px rgba(40, 123, 187, 0.2);
  font-weight: 600;
}

.sidebar-item.active > .sidebar-link::before,
.sidebar-link.active::before {
  transform: translateY(-50%) scaleY(1);
  opacity: 1;
}

.sidebar-item.active > .sidebar-link span:first-child,
.sidebar-link.active span:first-child {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(40, 123, 187, 0.4);
}

/* Dropdown toggles (Membership, Services, Finance, etc.) */
.sidebar-item > .btn.dropdown-toggle.more-horizontal,
.sidebar-item > a.btn.dropdown-toggle {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.72rem 0.9rem !important;
  margin: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidebar-item > .btn.dropdown-toggle.more-horizontal::after,
.sidebar-item > a.btn.dropdown-toggle::after {
  margin-left: auto;
  border: none !important;
  content: "\f107" !important;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
  font-weight: 900 !important;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  transition: transform 0.25s ease, color 0.2s ease;
  vertical-align: middle;
}

.sidebar-item > .btn.dropdown-toggle.more-horizontal.show::after,
.sidebar-item > a.btn.dropdown-toggle.show::after,
.sidebar-item.show > .btn.dropdown-toggle::after {
  transform: rotate(180deg);
  color: var(--primary-light);
}

.sidebar-item > .btn.dropdown-toggle.more-horizontal:hover,
.sidebar-item > a.btn.dropdown-toggle:hover,
.sidebar-item > .btn.dropdown-toggle.more-horizontal:focus,
.sidebar-item > a.btn.dropdown-toggle:focus {
  background: rgba(40, 123, 187, 0.18) !important;
  color: #fff !important;
  border-color: rgba(40, 123, 187, 0.2) !important;
}

.sidebar-item > .btn.dropdown-toggle.more-horizontal i,
.sidebar-item > a.btn.dropdown-toggle i {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.22s ease;
}

.sidebar-item > .btn.dropdown-toggle.more-horizontal:hover i,
.sidebar-item > a.btn.dropdown-toggle:hover i {
  background: rgba(40, 123, 187, 0.35);
  color: #fff;
  box-shadow: 0 4px 12px rgba(40, 123, 187, 0.25);
}

/* Dropdown menus (sub-items) */
.sidebar-item .dropdown-menu.drp-content,
.sidebar-item ul.dropdown-menu {
  position: static !important;
  float: none !important;
  width: 100% !important;
  margin: 0.25rem 0 0.4rem !important;
  padding: 0.35rem !important;
  background: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  transform: none !important;
  inset: auto !important;
  display: none;
}

.sidebar-item .dropdown-menu.drp-content.show,
.sidebar-item.show > .dropdown-menu,
.sidebar-item .dropdown-menu.show {
  display: block !important;
  animation: sidebarDropIn 0.25s ease;
}

@keyframes sidebarDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-item .dropdown-menu .sidebar-link,
.sidebar-item .dropdown-menu a.sidebar-link {
  padding: 0.55rem 0.75rem 0.55rem 0.85rem !important;
  font-size: 0.84rem;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72) !important;
  gap: 0.65rem;
}

.sidebar-item .dropdown-menu .sidebar-link i {
  width: auto;
  min-width: 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  background: none !important;
  box-shadow: none !important;
}

.sidebar-item .dropdown-menu .sidebar-link:hover {
  background: rgba(40, 123, 187, 0.25) !important;
  color: #fff !important;
  transform: none;
}

.sidebar-item .dropdown-menu .sidebar-link:hover i {
  color: var(--primary-light);
}

.sidebar-item .dropdown-menu .sidebar-link.pl-3 {
  padding-left: 0.85rem !important;
}

/* Footer promo block */
.unlimited-access {
  margin: 1.25rem 0.5rem 0.5rem !important;
  padding: 1.1rem 0.9rem !important;
  background: linear-gradient(145deg, rgba(40, 123, 187, 0.2) 0%, rgba(7, 97, 125, 0.25) 100%);
  border: 1px solid rgba(40, 123, 187, 0.25);
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.unlimited-access-title small {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.unlimited-access .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  box-shadow: 0 6px 16px rgba(40, 123, 187, 0.35);
  transition: all 0.2s ease;
}

.unlimited-access .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(40, 123, 187, 0.45);
  filter: brightness(1.06);
}

/* ---------- App Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(7, 97, 125, 0.08);
  box-shadow: 0 4px 24px rgba(7, 61, 82, 0.04);
  padding: 0;
  min-height: 70px;
  margin-left: 270px;
  width: calc(100% - 270px) !important;
  transition: margin-left .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1);
}

.app-header .navbar {
  padding: 0.65rem 1.5rem;
  min-height: 70px;
}

/* Hamburger / sidebartoggler only */
.app-header .nav-link.sidebartoggler {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--dark);
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  transition: all 0.2s ease;
}

.app-header .nav-link.sidebartoggler:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-blue);
  box-shadow: 0 4px 12px rgba(40, 123, 187, 0.12);
}

/* ---------- Profile avatar dropdown trigger ---------- */
.app-header .nav-link.nav-icon-hover {
  width: auto;
  height: auto;
  padding: 0 !important;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 50%;
  position: relative;
  line-height: 0;
  box-shadow: none !important;
  transition: transform 0.25s ease;
}

.app-header .nav-link.nav-icon-hover::after {
  /* remove any bootstrap caret if present */
  display: none !important;
}

.app-header .nav-link.nav-icon-hover img.rounded-circle,
.app-header .navbar-nav .nav-item .nav-link img.rounded-circle {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover;
  border-radius: 50% !important;
  border: 2.5px solid #fff;
  box-shadow:
    0 0 0 2px rgba(40, 123, 187, 0.28),
    0 4px 14px rgba(7, 61, 82, 0.14);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  background: var(--bg-hover);
}

/* Online / presence dot */
.app-header .nav-link.nav-icon-hover::before {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.25);
}

.app-header .nav-link.nav-icon-hover:hover {
  background: transparent !important;
  border: none !important;
  transform: none;
}

.app-header .nav-link.nav-icon-hover:hover img.rounded-circle,
.app-header .navbar-nav .nav-item .nav-link:hover img.rounded-circle {
  box-shadow:
    0 0 0 2.5px var(--primary),
    0 6px 18px rgba(40, 123, 187, 0.28);
  transform: scale(1.06);
}

.app-header .nav-link.nav-icon-hover:focus,
.app-header .nav-link.nav-icon-hover:focus-visible,
.app-header .nav-link.nav-icon-hover[aria-expanded="true"] {
  outline: none;
  background: transparent !important;
}

.app-header .nav-link.nav-icon-hover[aria-expanded="true"] img.rounded-circle {
  box-shadow:
    0 0 0 2.5px var(--primary),
    0 6px 18px rgba(40, 123, 187, 0.3);
}

/* Profile dropdown panel */
.app-header .dropdown-menu {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0.5rem !important;
  min-width: 230px;
  margin-top: 0.65rem !important;
  background: #fff;
  overflow: hidden;
  border: 1px solid var(--border-soft) !important;
}

.app-header .dropdown-menu .message-body {
  padding: 0.25rem;
}

.app-header .dropdown-item {
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.18s ease;
}

.app-header .dropdown-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.app-header .dropdown-item i {
  color: var(--primary);
  opacity: 0.85;
}

.app-header .dropdown-menu .btn-outline-primary {
  border-radius: 10px !important;
  font-weight: 600;
  border-width: 1.5px;
  transition: all 0.2s ease;
}

.app-header .dropdown-menu .btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(40, 123, 187, 0.3);
}

/* ---------- Mini / collapsed sidebar (optional support) ---------- */
[data-sidebartype="mini-sidebar"] .left-sidebar,
.left-sidebar.mini-sidebar {
  width: 80px;
}

[data-sidebartype="mini-sidebar"] .page-wrapper .body-wrapper,
[data-sidebartype="mini-sidebar"] #main-wrapper > .body-wrapper,
body.mini-sidebar .page-wrapper .body-wrapper {
  margin-left: 80px;
  width: calc(100% - 80px);
}

[data-sidebartype="mini-sidebar"] .app-header,
body.mini-sidebar .app-header {
  margin-left: 80px;
  width: calc(100% - 80px) !important;
}

[data-sidebartype="mini-sidebar"] .hide-menu,
[data-sidebartype="mini-sidebar"] .nav-small-cap span,
[data-sidebartype="mini-sidebar"] .unlimited-access,
body.mini-sidebar .hide-menu,
body.mini-sidebar .nav-small-cap span,
body.mini-sidebar .unlimited-access {
  display: none !important;
}

[data-sidebartype="mini-sidebar"] .sidebar-link,
[data-sidebartype="mini-sidebar"] .sidebar-item > .btn.dropdown-toggle,
body.mini-sidebar .sidebar-link,
body.mini-sidebar .sidebar-item > .btn.dropdown-toggle {
  justify-content: center;
  padding: 0.75rem !important;
}

[data-sidebartype="mini-sidebar"] .sidebar-link span:first-child,
body.mini-sidebar .sidebar-link span:first-child {
  margin: 0;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 1199.98px) {
  .left-sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .left-sidebar.show-sidebar,
  body.show-sidebar .left-sidebar,
  #main-wrapper.show-sidebar .left-sidebar {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(7, 61, 82, 0.35);
  }

  .page-wrapper .body-wrapper,
  #main-wrapper > .body-wrapper,
  .app-header {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.show-sidebar::after,
  #main-wrapper.show-sidebar::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(9, 43, 58, 0.45);
    backdrop-filter: blur(3px);
    z-index: 1035;
    animation: fadeBackdrop 0.25s ease;
  }

  @keyframes fadeBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 575.98px) {
  .app-header .navbar {
    padding: 0.5rem 0.85rem;
  }

  .brand-logo {
    padding: 1rem;
  }
}

/* ---------- Smooth simplebar / scroll polish ---------- */
.sidebar-nav .simplebar-scrollbar::before {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px;
}

.sidebar-nav .simplebar-track.simplebar-vertical {
  width: 6px !important;
  right: 2px;
}

/* ---------- Focus & accessibility ---------- */
.sidebar-link:focus-visible,
.sidebar-item > .btn.dropdown-toggle:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ---------- Icon consistency for mixed FA / TI ---------- */
.sidebar-link .ti,
.sidebar-item .ti {
  font-size: 1.05rem;
}

/* Ensure dropdowns don't break layout */
.sidebar-item .dropdown-menu {
  max-height: none;
}

/* Fix for Bootstrap btn inside sidebar looking like link */
.left-sidebar .btn.dropdown-toggle {
  line-height: 1.4;
}

.left-sidebar .btn.dropdown-toggle:active,
.left-sidebar .btn.dropdown-toggle:focus {
  box-shadow: none !important;
}



/* =========================================================
   ADD GALLERY
   ========================================================= */
/* =====================================================
   Upload / drag-drop (matches template style)
   Works with: #upload-container, #upload-files, #files-list-container
   ===================================================== */

.my-form-file > input {
  visibility: hidden;
  width: 0;
  height: 0;
}

.add_next_of_kin {
  display: none;
}

/* --- Drop zone (multi or single) --- */
#upload-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

#upload-container input[type="file"] {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

#upload-container .upload-field {
  display: block;
  background: #F4FAFE;
  padding: 12px;
  border-radius: 11px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#upload-container.active .upload-field,
#upload-container.dragover .upload-field {
  background: #fff8f3;
}

#upload-container .upload-field .file-thumbnail {
  cursor: pointer;
  border: 1px dashed #BBD9EC;
  border-radius: 11px;
  text-align: center;
  padding: 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#upload-container.active .upload-field .file-thumbnail,
#upload-container.dragover .upload-field .file-thumbnail {
  border-color: var(--peach, #e8a87c);
  background: #fff8f3;
}

#upload-container .upload-field .file-thumbnail img {
  width: 50px;
  margin-bottom: 6px;
}

#upload-container .upload-field .file-thumbnail h3 {
  font-size: 12px;
  color: #000000;
  font-weight: 600;
  margin-bottom: 4px;
}

#upload-container .upload-field .file-thumbnail p {
  font-size: 12px;
  color: #9ABCD1;
  margin-bottom: 0;
}

/* --- Multi-file thumbnail list --- */
#files-list-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.form__image-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid #BBD9EC;
  background: #F4FAFE;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.form__image-container:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form__image-container:hover::after {
  content: '×';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.form__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Optional: non-image file chip (video/audio/pdf) */
.sm-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #F4FAFE;
  border: 1px solid #BBD9EC;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: #000;
}

.sm-file-chip .remove-chip {
  cursor: pointer;
  color: #c0392b;
  font-weight: 700;
  line-height: 1;
}

/* --- Single-image upload (legacy / other forms) --- */
.image-upload {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  overflow: hidden;
}

.image-upload input {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-field {
  display: block;
  background: #F4FAFE;
  padding: 12px;
  border-radius: 11px;
}

.upload-field .file-thumbnail {
  cursor: pointer;
  border: 1px dashed #BBD9EC;
  border-radius: 11px;
  text-align: center;
  padding: 20px;
}

.upload-field .file-thumbnail img {
  width: 50px;
}

.upload-field .file-thumbnail h3 {
  font-size: 12px;
  color: #000000;
  font-weight: 600;
  margin-bottom: 4px;
}

.upload-field .file-thumbnail p {
  font-size: 12px;
  color: #9ABCD1;
  margin-bottom: 0;
}

/* =========================================================
   SHARED / RE-USED COMPONENTS
   ========================================================= */
.premium-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}
.stat-card {
  border: none;
  border-radius: 16px;
  transition: all .25s ease;
  background: var(--bg-card);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,.07) !important;
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.filter-bar {
  background: var(--bg-hover);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.action-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.empty-state {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 2.2rem;
  opacity: .35;
  margin-bottom: .6rem;
}


/* =========================================================
   ADD MEMBER
   ========================================================= */
.photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f3f5;
  border: 2px dashed #ced4da;
}
.section-title {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border-soft);
}
.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ecef;
}
.badge-status {
  font-weight: 500;
  padding: .35em .7em;
  border-radius: 50px;
}
.role-badge {
  font-size: .7rem;
  font-weight: 500;
  padding: .25em .55em;
  border-radius: 6px;
  margin: 1px;
  display: inline-block;
}
.role-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}


/* =========================================================
   ASSEMBLIES
   ========================================================= */
.assemblies-hero {
  background: linear-gradient(135deg, var(--cfi-grad-1) 0%, var(--cfi-grad-2) 55%, var(--cfi-grad-3) 100%);
  border-radius: 24px;
  padding: 2rem 2rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -12px rgba(79,70,229,.35);
}
.assemblies-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 55%);
}
.assemblies-hero h4 {
  font-weight: 700;
  letter-spacing: -.02em;
}
.assemblies-hero p {
  color: rgba(255,255,255,.85);
}

/* Assemblies stat cards (more elevated) */
.assemblies-hero ~ .row .stat-card,
.stat-card.assemblies {
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.stat-card.assemblies:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(17,24,39,.10);
}
.stat-card.assemblies::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(6,182,212,.06));
}
.stat-icon.assemblies {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.stat-value {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -.02em;
}
.stat-label {
  font-size: .78rem;
  color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.premium-card.assemblies {
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(17,24,39,.06);
}
.table thead th.assemblies {
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--text-soft);
  font-weight: 700;
  border-bottom: 2px solid var(--border-table-soft);
  padding-top: .9rem;
  padding-bottom: .9rem;
}
.table td {
  vertical-align: middle;
  border-color: var(--border-table-alt);
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.table-hover tbody tr:hover {
  background: var(--bg-hover-blue);
}

.assembly-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: .9rem;
  background: linear-gradient(135deg, var(--cfi-grad-1), var(--cfi-grad-3));
  box-shadow: 0 6px 14px rgba(79,70,229,.28);
}

.address-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-slate);
  max-width: 220px;
}
.address-pill i {
  color: var(--cfi-grad-2);
}
.address-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-map {
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
  color: var(--cfi-grad-1);
  padding: .32rem .65rem;
  transition: all .2s;
}
.btn-map:hover {
  background: var(--cfi-grad-1);
  color: #fff;
  border-color: var(--cfi-grad-1);
}

.badge-member {
  background: rgba(79,70,229,.1);
  color: var(--cfi-grad-1);
  border: 1px solid rgba(79,70,229,.2);
  font-weight: 700;
  border-radius: 20px;
  padding: .35rem .7rem;
}

.btn-cfi {
  background: linear-gradient(135deg, var(--cfi-grad-1), var(--cfi-grad-2));
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(79,70,229,.3);
}
.btn-cfi:hover {
  color: #fff;
  opacity: .92;
  transform: translateY(-1px);
}

/* Modals (shared) */
.modal-content {
  border-radius: 20px;
}
.modal-header,
.modal-footer {
  border: none;
}
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
}
.form-control,
.form-select {
  border-radius: 12px;
  padding: .6rem .85rem;
  border: 1px solid var(--border-mid);
}
.form-control:focus {
  border-color: var(--cfi-grad-2);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

#mapPreviewFrame {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 14px;
}
.map-address-caption {
  font-size: .85rem;
  color: var(--text-slate);
  background: var(--bg-hover-blue);
  border-radius: 10px;
  padding: .6rem .9rem;
  margin-top: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}


/* =========================================================
   ASSETS
   ========================================================= */
.premium-header {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 35%, var(--accent) 100%);
  border-radius: 1.25rem;
  padding: 2rem 2.25rem;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card-lg);
  overflow: hidden;
}
.premium-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgb(255 255 255 / 0.12) 0%, transparent 45%),
                     radial-gradient(circle at 10% 90%, rgb(255 255 255 / 0.08) 0%, transparent 40%);
  pointer-events: none;
}
.premium-header .header-eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
  opacity: .75;
}

.stat-card.assets {
  border-radius: 1.1rem;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.stat-card.assets:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-lg);
}
.stat-card.assets::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .2s ease;
}
.stat-card.assets:hover::after {
  opacity: 1;
}
.stat-icon.assets {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.3rem;
}
.stat-progress {
  height: 5px;
  border-radius: 999px;
  background: #eef1ed;
  overflow: hidden;
  margin-top: .6rem;
}
.stat-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.nav-pills-premium {
  background: #f1f3f5;
  padding: .35rem;
  border-radius: 9999px;
  display: inline-flex;
}
.nav-pills-premium .nav-link {
  border-radius: 9999px;
  padding: .55rem 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s ease;
}
.nav-pills-premium .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  box-shadow: 0 4px 14px 0 rgb(64 75 61 / .35);
}

.premium-table thead th {
  background: var(--bg-table-header-alt);
  border-bottom: 2px solid var(--border-slate);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: .9rem 1rem;
  white-space: nowrap;
}
.premium-table tbody td {
  padding: .95rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.premium-table tbody tr {
  transition: background .15s ease;
}
.premium-table tbody tr:hover {
  background: var(--bg-table-header-alt);
}
.premium-table .table-danger {
  background: var(--bg-danger-soft) !important;
}

.badge-soft-success {
  background: var(--success-soft);
  color: var(--success-text);
  font-weight: 600;
}
.badge-soft-danger {
  background: var(--danger-soft);
  color: var(--danger-text);
  font-weight: 600;
}
.badge-soft-warning {
  background: var(--warning-soft);
  color: var(--warning-text);
  font-weight: 600;
}
.book-value {
  font-weight: 700;
  color: var(--success);
}
.dep-value {
  font-size: .82rem;
  color: var(--text-muted);
}
.dep-mini-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border-slate);
  width: 70px;
  overflow: hidden;
  margin-top: 3px;
}
.dep-mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.btn-premium {
  border-radius: .65rem;
  font-weight: 600;
}
.asset-search input {
  border-radius: .65rem 0 0 .65rem;
}
.calc-card {
  border: none;
  border-radius: 1.1rem;
  box-shadow: var(--shadow-card);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.calc-result {
  background: #f0fdf4;
  border-radius: .85rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid #bbf7d0;
}
.calc-method-toggle .btn {
  border-radius: .6rem;
  font-weight: 600;
  font-size: .82rem;
}
.asset-number-chip {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: #eef1ed;
  color: var(--primary);
  padding: .2rem .5rem;
  border-radius: .4rem;
  font-size: .78rem;
}


/* =========================================================
   ATTENDANCE
   ========================================================= */
.stat-mini {
  border-radius: 14px;
  padding: 1rem 1.25rem;
  min-width: 90px;
}
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: 50px;
  padding: 4px 12px 4px 4px;
  margin: 3px;
  font-size: .85rem;
}
.member-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all .15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.check-item:hover {
  background: var(--bg-hover);
}
.check-item.selected {
  background: #e8f0fe;
  border-color: #2a3492;
}
.check-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.service-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  transition: all .2s;
}
.service-card:hover,
.service-card.active {
  border-color: #2a3492;
  background: var(--bg-hover-blue);
  box-shadow: 0 4px 12px rgba(42,52,146,.1);
}
.badge-count {
  font-size: .75rem;
  padding: .3em .6em;
  border-radius: 50px;
}
.section-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: .5rem;
}


/* =========================================================
   CELL GROUPS
   ========================================================= */
.cg-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-light) 45%, var(--primary) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.5rem;
}
.family-row {
  border: 1px solid rgba(43,108,176,0.08);
  border-radius: 12px;
  padding: .85rem;
  margin-bottom: .6rem;
  background: var(--bg-card);
}
.family-row.active {
  border-color: #2b6cb0;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.avatar-sm {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
}
.tree-board {
  background: var(--bg-soft-blue);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px dashed rgba(43,108,176,.12);
}
.tree-node {
  background: var(--bg-card);
  border-radius: 12px;
  padding: .8rem;
  text-align: center;
  min-width: 150px;
  border: 1px solid rgba(43,108,176,0.08);
}
.tree-node.leader {
  border-color: rgba(201,162,39,.25);
  box-shadow: 0 8px 20px rgba(201,162,39,0.06);
}
.tree-branch {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: .75rem;
}
.rel-badge {
  font-size: .72rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-weight: 600;
}
.table-members td,
.table-members th {
  vertical-align: middle;
}


/* =========================================================
   CHURCH INCOME
   ========================================================= */
.inc-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 38%, var(--accent) 100%);
  border-radius: 1.35rem;
  padding: 2rem 2.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.inc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 15%, rgb(255 255 255 / 0.12) 0%, transparent 42%),
    radial-gradient(circle at 10% 90%, rgb(255 255 255 / 0.07) 0%, transparent 38%);
  pointer-events: none;
}
.inc-hero .eyebrow {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .7rem;
  font-weight: 700;
  opacity: .72;
}

.filter-shell {
  background: var(--bg-card);
  border-radius: 1.1rem;
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.35rem;
  border: 1px solid rgba(64,75,61,.08);
}

.metric-card {
  border: none;
  border-radius: 1.2rem;
  box-shadow: var(--shadow-card);
  height: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  transition: transform .22s ease, box-shadow .22s ease;
}
.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.metric-card .accent-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
}
.metric-card .card-body {
  padding: 1.25rem 1.35rem 1.25rem 1.5rem;
}
.metric-card .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.metric-card .value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.metric-card .sub {
  font-size: .78rem;
  color: var(--text-lighter);
  margin-top: .25rem;
}
.metric-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Metric themes */
.metric-card.theme-primary .accent-bar { background: linear-gradient(180deg, var(--primary), var(--primary-light)); }
.metric-card.theme-primary .icon-wrap { background: rgba(64,75,61,.1); color: var(--primary); }
.metric-card.theme-primary .value { color: var(--primary-dark); }

.metric-card.theme-info .accent-bar { background: linear-gradient(180deg, var(--info), #38bdf8); }
.metric-card.theme-info .icon-wrap { background: rgba(14,165,233,.12); color: var(--info-dark); }
.metric-card.theme-info .value { color: var(--info-text); }

.metric-card.theme-warning .accent-bar { background: linear-gradient(180deg, var(--accent), var(--accent-soft)); }
.metric-card.theme-warning .icon-wrap { background: rgba(164,117,73,.12); color: var(--accent); }
.metric-card.theme-warning .value { color: var(--accent-brown); }

.metric-card.theme-danger .accent-bar { background: linear-gradient(180deg, var(--danger), #f87171); }
.metric-card.theme-danger .icon-wrap { background: rgba(220,38,38,.1); color: var(--danger); }
.metric-card.theme-danger .value { color: var(--danger-dark); }

.metric-card.theme-success .accent-bar { background: linear-gradient(180deg, var(--success), #34d399); }
.metric-card.theme-success .icon-wrap { background: rgba(5,150,105,.12); color: var(--success); }
.metric-card.theme-success .value { color: var(--success-dark); }

.metric-card.theme-violet .accent-bar { background: linear-gradient(180deg, var(--violet), #a78bfa); }
.metric-card.theme-violet .icon-wrap { background: rgba(124,58,237,.1); color: var(--violet); }
.metric-card.theme-violet .value { color: var(--violet-dark); }

.net-card {
  border: none;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.net-card.positive {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
}
.net-card.negative {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 50%, #fca5a5 100%);
}
.net-card .net-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}
.net-card .net-value {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.net-card .net-meta {
  font-size: .85rem;
  opacity: .8;
}

.type-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .35em .7em;
  border-radius: 50px;
}
.type-creche { background: #dbeafe; color: #1e40af; }
.type-rental { background: var(--success-soft); color: var(--success-text); }
.type-other  { background: var(--warning-soft); color: var(--warning-text); }

.amount-pos {
  font-weight: 700;
  color: var(--success-dark);
  font-variant-numeric: tabular-nums;
}
.method-pill {
  font-size: .72rem;
  font-weight: 600;
  padding: .28em .65em;
  border-radius: 50px;
  background: #f1f5f9;
  color: var(--text-slate);
  border: 1px solid var(--border-slate);
}
.section-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .15rem;
}
.section-sub {
  font-size: .82rem;
  color: var(--text-lighter);
}


/* =========================================================
   EDIT MEMBER
   ========================================================= */
.profile-hero {
  position: relative;
  border-radius: var(--cfi-radius);
  padding: 2.25rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark-alt) 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(255,77,41,.22), transparent 55%);
}
.profile-hero .avatar-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 4px;
  background: rgba(255,255,255,.18);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.profile-hero .avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--brand);
}
.profile-hero h4 {
  font-weight: 700;
  margin-bottom: .15rem;
}
.profile-hero .member-since-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.28);
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  backdrop-filter: blur(2px);
}
.profile-hero .quick-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: .6rem 1rem;
  text-align: center;
}
.profile-hero .quick-stat .num {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
}
.profile-hero .quick-stat .lbl {
  font-size: .7rem;
  opacity: .85;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card-premium {
  border: none;
  border-radius: var(--cfi-radius);
  box-shadow: var(--shadow);
}

.nav-pills-premium {
  gap: .4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .9rem;
}
.nav-pills-premium .nav-link {
  border-radius: 999px;
  font-weight: 600;
  font-size: .85rem;
  padding: .55rem 1.15rem;
  color: var(--body) !important;
  background: #f4f5f6;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.nav-pills-premium .nav-link:hover {
  background: #ececec;
}
.nav-pills-premium .nav-link.active {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -6px rgba(255,77,41,.55);
}

.info-block {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--border);
}
.info-row:last-child {
  border-bottom: none;
}
.info-row .info-label {
  color: var(--body);
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.info-row .info-value {
  font-weight: 600;
  color: var(--dark);
  text-align: right;
}

.pill-tag {
  display: inline-block;
  background: rgba(255,77,41,.08);
  color: var(--brand);
  border: 1px solid rgba(255,77,41,.25);
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  margin: .15rem .25rem .15rem 0;
}

.about-box {
  background: rgba(164,117,73,.08);
  border: 1px solid rgba(164,117,73,.25);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-style: italic;
  color: var(--peach);
}

/* Premium tables */
.table-premium-wrap {
  width: 100%;
}
table.table-premium {
  width: 100% !important;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.table-premium thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border: none;
  padding: .9rem 1rem;
}
table.table-premium tbody td {
  padding: .85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--body);
}
table.table-premium tbody tr:last-child td {
  border-bottom: none;
}
table.table-premium tbody tr:hover {
  background: #faf5f3;
}
.amount-pill {
  background: rgba(64,75,61,.1);
  color: var(--primary);
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 8px;
  font-size: .85rem;
}

/* Edit form */
.form-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dark);
  margin: 1.5rem 0 .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.form-section-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.form-control,
select.form-control {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: .55rem .8rem;
  color: var(--dark);
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,77,41,.12);
}
.next_kin {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
}
.add_next_of_kin {
  border-radius: 12px;
  background: #fafafa;
  border: 1px dashed var(--border) !important;
}
.btn-cfi {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 8px 18px -8px rgba(255,77,41,.6);
}
.btn-cfi:hover {
  color: #fff;
  filter: brightness(1.05);
}


/* =========================================================
   EXPENSES
   ========================================================= */
.exp-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--accent) 100%);
  border-radius: 1.35rem;
  padding: 2rem 2.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.exp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 18%, rgb(255 255 255 / 0.12) 0%, transparent 42%),
    radial-gradient(circle at 8% 92%, rgb(255 255 255 / 0.07) 0%, transparent 38%);
  pointer-events: none;
}
.exp-hero .eyebrow {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .7rem;
  font-weight: 700;
  opacity: .72;
}

.stat-card.expenses {
  border-radius: 1.15rem;
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.stat-card.expenses:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-card.expenses::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .2s ease;
}
.stat-card.expenses:hover::after {
  opacity: 1;
}
.stat-icon.expenses {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.amount-chip {
  font-weight: 700;
  color: var(--danger-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.date-chip {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dark);
}
.ref-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  background: #eef1ed;
  color: var(--primary);
  padding: .15rem .45rem;
  border-radius: .35rem;
}

.alloc-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 600;
  padding: .28em .6em;
  border-radius: 50px;
  margin: 2px 2px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  color: #3730a3;
  border: 1px solid #c7d2fe;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alloc-badge .alloc-amt {
  color: #4338ca;
  font-weight: 700;
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.peak-pill {
  font-size: .78rem;
  font-weight: 600;
  background: var(--bg-danger-soft);
  color: var(--danger-text);
  border: 1px solid #fecaca;
  border-radius: 50px;
  padding: .35rem .85rem;
}

/* DataTables polish */
.dataTables_wrapper .dataTables_filter input {
  border-radius: .65rem;
  border: 1px solid var(--border-slate);
  padding: .4rem .75rem;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: .55rem;
}

/* =========================================================
   RESPONSIVE SIDEBAR
   ========================================================= */

@media (max-width: 1199px) {
    .left-sidebar {
        box-shadow: 8px 0 30px rgba(24,59,86,.12);
    }

    .brand-logo {
        padding: 0 18px;
    }

    .app-header .navbar {
        padding: 0 16px;
    }
}

@media (max-width: 767px) {
    .fam-hero {
        padding: 24px;
        border-radius: 15px;
    }

    .sidebar-nav {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* =========================================================
   FAMILIES
   ========================================================= */
   .fam-hero h3 {
    color: #fff;
}

.fam-hero .btn-light {
    color: var(--primary-dark);
    font-weight: 600;
}

.fam-hero .btn-outline-light {
    color: #fff;
    border-color: rgba(255,255,255,.5);
}

.fam-hero .btn-outline-light:hover {
    color: var(--primary-dark);
    background: #fff;
}

.fam-hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(255,255,255,.15),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-deep)
        );
    box-shadow: var(--shadow-md);
}


.fam-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid rgba(42,52,146,.08);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(20,30,80,.04);
  transition: .25s ease;
}
.stat-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(20,30,80,.08);
}
.stat-pill .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.family-row {
  border: 1px solid rgba(42,52,146,.08);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: .75rem;
  transition: .2s ease;
  background: var(--bg-card);
}
.family-row:hover {
  border-color: rgba(42,52,146,.18);
  box-shadow: 0 10px 24px rgba(20,30,80,.06);
}
.family-row.active-family {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}
.avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ecef;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ecef;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.tree-board {
  background: var(--bg-soft-fam);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px dashed rgba(42,52,146,.12);
}
.tree-node {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(42,52,146,.08);
  text-align: center;
  min-width: 140px;
  box-shadow: 0 6px 16px rgba(20,30,80,.04);
}
.tree-node.head {
  border-color: rgba(201,162,39,.45);
  box-shadow: 0 8px 20px rgba(201,162,39,.12);
}
.tree-connector {
  width: 2px;
  height: 24px;
  background: rgba(42,52,146,.2);
  margin: 0 auto;
}
.tree-branch {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  position: relative;
  padding-top: 1rem;
}


/* =========================================================
   OFFERINGS / TITHES / VISITORS (shared light styles)
   ========================================================= */
.perc-up { color: #198754; }
.perc-down { color: #dc3545; }
.badge-follow {
  font-size: .7rem;
  padding: .25em .5em;
  border-radius: 6px;
}


/* =========================================================
   PRAYER REQUEST
   ========================================================= */
.pr-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.pr-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 55%, var(--primary) 100%);
  border-radius: var(--cfi-radius);
  padding: 2rem 2.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.pr-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(164,117,73,.28) 0%, transparent 70%);
  pointer-events: none;
}
.pr-hero::after {
  content: '✝';
  position: absolute;
  right: 1.75rem;
  bottom: -0.4rem;
  font-size: 5.5rem;
  opacity: .07;
  font-weight: 300;
  line-height: 1;
}
.pr-hero h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}
.pr-hero p {
  margin: 0;
  opacity: .78;
  font-size: .92rem;
  color: #c5d0d8;
}

.pr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 768px) {
  .pr-stats { grid-template-columns: repeat(2, 1fr); }
}
.pr-stat {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.pr-stat:hover { transform: translateY(-2px); }
.pr-stat .label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--body);
  margin-bottom: .3rem;
}
.pr-stat .value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--dark);
}
.pr-stat.open .value { color: var(--pr-open); }
.pr-stat.answered .value { color: var(--pr-answered); }
.pr-stat.closed .value { color: var(--pr-closed); }
.pr-stat .bar {
  height: 3px;
  border-radius: 2px;
  margin-top: .6rem;
  background: #e8eef2;
  overflow: hidden;
}
.pr-stat .bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.pr-toolbar {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.pr-search { position: relative; }
.pr-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--body);
  font-size: .85rem;
}
.pr-search input {
  padding-left: 2.35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--dark);
}
.pr-search input:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(164,117,73,.15);
  background: #fff;
  outline: none;
}

.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.15rem;
}
.pr-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: prFadeIn .4s ease both;
}
.pr-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,0,0,.1);
  border-color: rgba(164,117,73,.3);
}
@keyframes prFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pr-card-top { padding: 1.2rem 1.3rem .8rem; flex: 1; }
.pr-card-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .28rem .65rem;
  border-radius: 999px;
}
.pr-card-status.open { background: rgba(196,160,53,.15); color: #8a7020; }
.pr-card-status.answered { background: rgba(61,107,79,.15); color: var(--pr-answered); }
.pr-card-status.closed { background: rgba(81,97,113,.12); color: var(--body); }
.pr-card-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pr-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: .7rem 0 .35rem;
  color: var(--dark);
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-card .excerpt {
  font-size: .86rem;
  color: var(--body);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .8rem;
}
.pr-card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .76rem;
  color: var(--body);
}
.pr-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--accent-dark));
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pr-card-foot {
  padding: .7rem 1.1rem;
  background: var(--bg-soft-alt);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.pr-actions { display: flex; gap: .3rem; }
.pr-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--body);
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
  font-size: .82rem;
}
.pr-btn:hover {
  border-color: var(--peach);
  color: var(--peach);
  background: rgba(164,117,73,.08);
}
.pr-btn.danger:hover {
  border-color: #c45c5c;
  color: #c45c5c;
  background: #fdf2f2;
}
.pr-status-select {
  font-size: .7rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: .22rem .45rem;
  background: #fff;
  color: var(--dark);
  cursor: pointer;
}
.pr-status-select:focus {
  outline: none;
  border-color: var(--peach);
}

.pr-empty {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border-radius: var(--cfi-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.pr-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(164,117,73,.12);
  color: var(--peach);
  display: grid;
  place-items: center;
  margin: 0 auto 1.15rem;
  font-size: 1.6rem;
}

.pr-modal .modal-content {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(9,32,50,.2);
}
.pr-modal .modal-header {
  background: linear-gradient(135deg, var(--dark), var(--primary));
  color: #fff;
  border: none;
  padding: 1.25rem 1.4rem;
}
.pr-modal .modal-header .btn-close {
  filter: invert(1);
  opacity: .7;
}
.pr-modal .modal-body {
  padding: 1.4rem;
  color: var(--body);
}
.pr-modal .modal-footer {
  border-top: 1px solid var(--border);
  padding: .9rem 1.4rem;
}
.pr-modal .form-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--body);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pr-modal .form-control,
.pr-modal .form-select {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: .6rem .85rem;
  color: var(--dark);
}
.pr-modal .form-control:focus,
.pr-modal .form-select:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(164,117,73,.15);
}
.pr-modal-view-body {
  font-size: .98rem;
  line-height: 1.7;
  color: var(--body);
  white-space: pre-wrap;
}

.pr-cta,
.btn-new-prayer {
  background: var(--peach);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 10px;
  padding: .55rem 1.2rem;
  box-shadow: 0 4px 14px rgba(164,117,73,.35);
  transition: all .15s;
}
.pr-cta:hover,
.btn-new-prayer:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 18px rgba(164,117,73,.45);
}

.pr-alert {
  border: none;
  border-radius: 12px;
  padding: .9rem 1.15rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  animation: prFadeIn .35s ease;
}
.pr-alert.success { background: #edf7f0; color: var(--pr-answered); }
.pr-alert.danger  { background: #fdf2f2; color: #9b3b3b; }

.btn-filter {
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
}
.btn-filter:hover {
  background: var(--primary);
  color: #fff;
}


/* =========================================================
   RECORD EXPENSE / OFFERINGS / TITHES
   ========================================================= */
.allocation-row {
  background: var(--bg-hover);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.offering-row {
  background: var(--bg-hover);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
  border: 1px solid var(--border-soft);
}
.tithe-row {
  background: var(--bg-hover);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}
.remove-row {
  position: absolute;
  top: 12px;
  right: 14px;
}


/* =========================================================
   SERVICE ATTENDANCE
   ========================================================= */
.attendee-list {
  align-content: flex-start;
  min-height: 120px;
}
.attendee-pagination {
  display: none;
}
.attendee-pagination.d-flex {
  display: flex !important;
}
.attendee-pagination .btn:disabled {
  opacity: .4;
  pointer-events: none;
}


/* =========================================================
   SERVICE MEDIA
   ========================================================= */
.sm-wrap {
  max-width: 1140px;
  margin: 0 auto;
}
.sm-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 55%, var(--primary) 100%);
  border-radius: 18px;
  padding: 1.85rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.sm-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -8%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(164,117,73,.25) 0%, transparent 70%);
  pointer-events: none;
}
.sm-hero h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 .3rem;
}
.sm-hero p {
  margin: 0;
  opacity: .78;
  font-size: .9rem;
  color: #c5d0d8;
}
.btn-peach {
  background: var(--peach);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 10px;
  padding: .5rem 1.15rem;
  box-shadow: 0 4px 12px rgba(164,117,73,.3);
}
.btn-peach:hover {
  filter: brightness(1.08);
  color: #fff;
}
.sm-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .85rem;
  margin-bottom: 1.35rem;
}
@media (max-width: 768px) {
  .sm-stats { grid-template-columns: repeat(2, 1fr); }
}
.sm-stat {
  background: var(--bg-card);
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.sm-stat .val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
}
.sm-stat .lbl {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--body);
}
.sm-toolbar {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.35rem;
}
.sm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}
.sm-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  animation: smIn .35s ease both;
}
.sm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.1);
}
@keyframes smIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.sm-thumb {
  height: 150px;
  background: #f0f3f5;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.sm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sm-thumb .icon-lg {
  font-size: 2.5rem;
  opacity: .35;
}
.sm-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2rem .55rem;
  border-radius: 999px;
  color: #fff;
}
.sm-card-body {
  padding: .9rem 1rem;
}
.sm-card-body h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 .25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sm-card-body .meta {
  font-size: .75rem;
  color: var(--body);
}
.sm-card-foot {
  padding: .55rem .9rem;
  background: var(--bg-soft-alt);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: .3rem;
}
.sm-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--body);
  font-size: .8rem;
  text-decoration: none;
  transition: all .15s;
}
.sm-btn:hover {
  border-color: var(--peach);
  color: var(--peach);
}
.sm-btn.danger:hover {
  border-color: #c45c5c;
  color: #c45c5c;
}
.sm-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--body);
}
.sm-modal .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(9,32,50,.18);
}
.sm-modal .modal-header {
  background: linear-gradient(135deg, var(--dark), var(--primary));
  color: #fff;
  border: none;
  padding: 1.15rem 1.35rem;
}
.sm-modal .modal-header .btn-close {
  filter: invert(1);
  opacity: .7;
}
.sm-modal .form-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--body);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sm-modal .form-control,
.sm-modal .form-select {
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--dark);
}
.sm-modal .form-control:focus,
.sm-modal .form-select:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(164,117,73,.15);
}
.sm-alert {
  border: none;
  border-radius: 12px;
  padding: .85rem 1.1rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  box-shadow: var(--shadow);
}
.sm-alert.success { background: #edf7f0; color: #3d6b4f; }
.sm-alert.danger  { background: #fdf2f2; color: #9b3b3b; }
.sm-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background: var(--bg-soft-alt);
  transition: border-color .15s;
}
.sm-drop:hover {
  border-color: var(--peach);
}


/* =========================================================
   SERVICE TEAM
   ========================================================= */
.st-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.st-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 55%, var(--primary) 100%);
  border-radius: 18px;
  padding: 1.85rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.st-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -8%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(164,117,73,.25) 0%, transparent 70%);
  pointer-events: none;
}
.st-hero h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 .3rem;
}
.st-hero p {
  margin: 0;
  opacity: .78;
  font-size: .9rem;
  color: #c5d0d8;
}
.btn-peach.btn-sm {
  padding: .4rem .85rem;
  font-size: .82rem;
}
.st-toolbar {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.35rem;
}

.st-service-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}
.st-service-row {
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.st-service-row h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}
.st-service-row .meta {
  font-size: .8rem;
  color: var(--body);
  margin-top: .15rem;
}
.st-service-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.st-avatar-stack {
  display: flex;
  align-items: center;
}
.st-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--accent-dark));
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid #fff;
  margin-left: -10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.st-avatar-sm:first-child {
  margin-left: 0;
}
.st-avatar-sm.more {
  background: var(--dark);
  font-size: .62rem;
}

.st-count-badge {
  font-weight: 700;
  font-size: .78rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(164,117,73,.15);
  color: var(--peach);
  white-space: nowrap;
}

.st-member-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.st-member-row:last-child {
  border-bottom: none;
}
.st-member-row:hover {
  background: var(--bg-hover-soft);
}
.st-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--accent-dark));
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.st-role-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .22rem .55rem;
  border-radius: 999px;
  background: rgba(64,75,61,.1);
  color: var(--primary);
}
.st-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--body);
  font-size: .8rem;
  text-decoration: none;
  transition: all .15s;
}
.st-btn:hover {
  border-color: var(--peach);
  color: var(--peach);
}
.st-btn.danger:hover {
  border-color: #c45c5c;
  color: #c45c5c;
}

.st-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--body);
}
.st-modal .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(9,32,50,.18);
}
.st-modal .modal-header {
  background: linear-gradient(135deg, var(--dark), var(--primary));
  color: #fff;
  border: none;
  padding: 1.15rem 1.35rem;
}
.st-modal .modal-header .btn-close {
  filter: invert(1);
  opacity: .7;
}
.st-modal .form-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--body);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.st-modal .form-control,
.st-modal .form-select {
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--dark);
}
.st-modal .form-control:focus,
.st-modal .form-select:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(164,117,73,.15);
}
.st-view-modal .modal-dialog {
  max-width: 560px;
}
.st-view-modal .modal-body {
  padding: 0;
  max-height: 65vh;
  overflow-y: auto;
}
.st-view-modal .modal-footer {
  border-top: 1px solid var(--border);
}

.st-alert {
  border: none;
  border-radius: 12px;
  padding: .85rem 1.1rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  box-shadow: var(--shadow);
}
.st-alert.success { background: #edf7f0; color: #3d6b4f; }
.st-alert.danger  { background: #fdf2f2; color: #9b3b3b; }

/* Pagination */
.st-pagination .page-link {
  border: 1px solid var(--border);
  color: var(--dark);
  font-weight: 600;
  margin: 0 3px;
  border-radius: 8px !important;
  min-width: 38px;
  text-align: center;
  box-shadow: none;
}
.st-pagination .page-link:hover {
  background: #f7f0ea;
  color: var(--peach);
  border-color: var(--peach);
}
.st-pagination .page-item.active .page-link {
  background: var(--peach);
  border-color: var(--peach);
  color: #fff;
}
.st-pagination .page-item.disabled .page-link {
  color: #b6c0c9;
  background: #fff;
  border-color: var(--border);
}


/* ===== Printable Order of Service ===== */
@media print {
  body * { visibility: hidden; }
  .print-order-of-service, .print-order-of-service * {
    visibility: visible;
  }
  .print-order-of-service {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .no-print { display: none !important; }
}
.print-order-of-service {
  display: none;
  font-family: Georgia, 'Times New Roman', serif;
  color: #222;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}
.print-order-of-service.show {
  display: block;
}
.print-header {
  text-align: center;
  border-bottom: 2px solid #333;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.print-header h1 {
  font-size: 1.6rem;
  margin: 0 0 .35rem;
  font-weight: 700;
}
.print-header .meta {
  font-size: .95rem;
  color: #555;
}
.print-section {
  margin-bottom: 1.75rem;
}
.print-section h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: .35rem;
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.print-sermon-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.print-scripture {
  font-style: italic;
  color: #444;
  margin-bottom: .75rem;
}
.print-notes {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: .95rem;
}
.print-team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.print-team-table th,
.print-team-table td {
  text-align: left;
  padding: .45rem .6rem;
  border-bottom: 1px solid #e0e0e0;
}
.print-team-table th {
  background: #f5f5f5;
  font-weight: 600;
}
.print-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: .8rem;
  color: #777;
  border-top: 1px solid #ddd;
  padding-top: .75rem;
}


/* =========================================================
   SELECT2
   ========================================================= */

.select2-container {
    display: block;
}

.select2-container *:focus {
    outline: 0;
}

.select2-container--bootstrap4 .select2-selection {
    background: #fff;
    border: 1px solid var(--border-mid);
    border-radius: 9px;
    min-height: 44px;
    width: 100%;
    transition: all .2s ease;
}

.select2-container--bootstrap4.select2-container--focus
.select2-selection {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(40,123,187,.10);
}

.select2-container--bootstrap4 .select2-selection--single {
    height: 44px !important;
}

.select2-container--bootstrap4
.select2-selection--single
.select2-selection__rendered {
    line-height: 42px;
    color: var(--text-dark);
}

.select2-container--bootstrap4
.select2-selection--single
.select2-selection__placeholder {
    color: var(--text-muted);
    line-height: 42px;
}

.select2-container--bootstrap4
.select2-selection--single
.select2-selection__arrow {
    position: absolute;
    top: 50%;
    right: 3px;
    width: 20px;
}

.select2-container--bootstrap4
.select2-selection--multiple {
    min-height: 44px !important;
    padding-bottom: 5px;
}

.select2-container--bootstrap4
.select2-selection--multiple
.select2-selection__choice {
    color: var(--primary-dark);
    background: var(--primary-light);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 2px 6px;
}

.select2-container--bootstrap4
.select2-selection--multiple
.select2-selection__choice__remove {
    color: var(--primary-dark);
    background: transparent;
    border: 0;
}

.select2-container--bootstrap4 .select2-dropdown {
    border-color: var(--border-mid);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.select2-container--bootstrap4
.select2-results__option--highlighted,
.select2-container--bootstrap4
.select2-results__option--highlighted.select2-results__option[aria-selected=true] {
    background-color: var(--primary);
    color: #fff;
}

.select2-container--bootstrap4
.select2-results__option[aria-selected=true] {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}


/* =========================================================
   TABLES
   ========================================================= */

.table {
    color: var(--text-dark);
}

.table thead th {
    background: #F7FAFC;
    color: #526779;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.table tbody tr {
    transition: background .15s ease;
}

.table tbody tr:hover {
    background: var(--primary-soft);
}


/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    border-radius: 10px;
    border: 1px solid transparent;
}

.alert-primary {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-color: var(--border-blue);
}

.alert-success {
    background: var(--success-soft);
}

.alert-danger {
    background: var(--danger-soft);
}

.alert-warning {
    background: var(--warning-soft);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border-radius: 9px;
    font-weight: 600;
    transition: all .2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(40,123,187,.20);
    transform: translateY(-1px);
}

.btn-cfi {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-cfi:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary);
}

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

.btn-outline-secondary {
    color: var(--primary-dark) !important;
    border-color: var(--border-blue);
}

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

.btn-light {
    border-color: #E6EDF2;
}

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

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

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

.bg-secondary {
    background-color: var(--primary-dark) !important;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    border-bottom: 1px solid var(--border-soft);
}


/* =========================================================
   FORMS
   ========================================================= */

.form-control,
.form-select {
    min-height: 44px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: 9px;
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(40,123,187,.10);
}

input.form-control {
    height: 44px;
}


/* Password eye */

.field-icon {
    float: right;
    margin-left: -30px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    color: var(--text-muted);
}

.field-icon:hover {
    color: var(--primary);
}



/* =========================================================
   SUPER PREMIUM PAGE HEADER + BREADCRUMB
   ========================================================= */

.page-header {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 0;
  background: transparent;
}

.page-header .page-block {
   background: linear-gradient(135deg, var(--primary) 0%, var(--accent-light) 45%, var(--primary) 100%);
  border-radius: 18px;
  padding: 1.15rem 1.5rem 1.15rem 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}

.page-header .page-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 18px 0 0 18px;
}

.page-header .page-block::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(40, 123, 187, 0.12), transparent);
  pointer-events: none;
}

.page-header .row {
  margin: 0;
  align-items: center !important;
}

.page-header .row.mt-5 {
  margin-top: 5rem !important;
}

.page-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.page-header-title h5,
.page-header-title .fw-semibold {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--dark);
  line-height: 1.3;
}

.page-header-title .title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--accent-soft) 100%);
  color: var(--primary);
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(40, 123, 187, 0.12);
}

.breadcrumb-title {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
}

.breadcrumb-title .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.breadcrumb-title .breadcrumb-item + .breadcrumb-item {
  padding-left: 0.55rem;
}

.breadcrumb-title .breadcrumb-item + .breadcrumb-item::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
  font-weight: 900;
  font-size: 0.55rem;
  color: var(--text-lighter);
  margin-right: 0.55rem;
  opacity: 0.7;
}

.breadcrumb-title .breadcrumb-item a {
  color: var(--text-slate);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-title .breadcrumb-item a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.breadcrumb-title .breadcrumb-item a i {
  font-size: 0.85rem;
  color: var(--primary);
  opacity: 0.85;
}

.breadcrumb-title .breadcrumb-item:last-child a,
.breadcrumb-title .breadcrumb-item.active,
.breadcrumb-title .breadcrumb-item:last-child {
  color: var(--primary);
  font-weight: 600;
}

.breadcrumb-title .breadcrumb-item:last-child a {
  background: var(--primary-soft);
  color: var(--primary);
  pointer-events: none;
}

.page-header.compact .page-block {
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
}

.page-header.hero .page-block::before {
  display: none;
}

.page-header.hero .page-header-title h5,
.page-header.hero .page-header-title .fw-semibold {
  color: #fff;
}
.page-header .page-block p {
  color: #fff;
}

.page-header.hero .breadcrumb-title .breadcrumb-item,
.page-header.hero .breadcrumb-title .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.75);
}

.page-header.hero .breadcrumb-title .breadcrumb-item a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.page-header.hero .breadcrumb-title .breadcrumb-item:last-child a {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 767.98px) {
  .page-header .page-block {
    padding: 1rem 1.15rem;
    border-radius: 14px;
  }

  .page-header .col-md-8,
  .page-header .col-md-4 {
    width: 100%;
    max-width: 100%;
  }

  .page-header-title {
    margin-bottom: 0.65rem;
  }

  .breadcrumb-title {
    justify-content: flex-start;
  }
}
