/* ==========================================================================
   Unify Engage "Civic Teal" design system
   Loaded after the legacy template CSS in every layout. Tokens first, then
   base, shell (sidebar / header), components and template overrides.
   ========================================================================== */

:root {
  /* Brand */
  --ep-primary: #0F766E;
  --ep-primary-600: #0B6B63;
  --ep-primary-700: #115E59;
  --ep-primary-100: #CCFBF1;
  --ep-primary-50: #F0FDFA;
  --ep-secondary: #0369A1;
  --ep-secondary-500: #0EA5E9;
  --ep-secondary-100: #E0F2FE;
  --ep-accent: #F97360;
  --ep-gradient: linear-gradient(135deg, #0F766E 0%, #14B8A6 45%, #0EA5E9 100%);
  --ep-gradient-soft: linear-gradient(135deg, #F0FDFA 0%, #F0F9FF 100%);
  --ep-gradient-ink: linear-gradient(180deg, #0B2238 0%, #0E2C47 55%, #12345A 100%);

  /* Neutrals */
  --ep-ink: #0B1F33;
  --ep-text: #243B53;
  --ep-muted: #627D98;
  --ep-subtle: #9FB3C8;
  --ep-border: #E2E8F0;
  --ep-border-strong: #CBD5E1;
  --ep-bg: #F4F7FA;
  --ep-surface: #FFFFFF;
  --ep-surface-2: #F8FAFC;

  /* Status */
  --ep-success: #10B981;
  --ep-success-50: #E7F8F1;
  --ep-warning: #F59E0B;
  --ep-warning-50: #FEF5E3;
  --ep-danger: #E5484D;
  --ep-danger-50: #FDECEC;
  --ep-info: #3B82F6;
  --ep-info-50: #EAF2FE;

  /* Shape & depth */
  --ep-radius-sm: 8px;
  --ep-radius: 12px;
  --ep-radius-lg: 18px;
  --ep-radius-xl: 24px;
  --ep-shadow-xs: 0 1px 2px rgba(11, 31, 51, .05);
  --ep-shadow-sm: 0 2px 8px rgba(11, 31, 51, .06);
  --ep-shadow: 0 10px 30px -12px rgba(11, 37, 64, .18);
  --ep-shadow-lg: 0 24px 60px -20px rgba(11, 37, 64, .30);
  --ep-ring: 0 0 0 4px rgba(15, 118, 110, .16);

  --ep-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --ep-ease: cubic-bezier(.2, .8, .2, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body,
body.page-has-left-panels {
  font-family: var(--ep-font) !important;
  background: var(--ep-bg) !important;
  color: var(--ep-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.title, .author-name, .ui-block-title .title {
  font-family: var(--ep-font) !important;
  color: var(--ep-ink);
  letter-spacing: 0;
  word-spacing: .04em;
}

a { color: var(--ep-primary); transition: color .2s var(--ep-ease); }
a:hover { color: var(--ep-primary-700); }

::selection { background: var(--ep-primary-100); color: var(--ep-ink); }

::-webkit-scrollbar { width: 10px !important; height: 10px; background: transparent !important; }
::-webkit-scrollbar-track { background: transparent !important; box-shadow: none !important; -webkit-box-shadow: none !important; }
::-webkit-scrollbar-thumb {
  background: #C6D3DF !important; border-radius: 99px !important;
  border: 2px solid var(--ep-bg); box-shadow: none !important; -webkit-box-shadow: none !important;
}
::-webkit-scrollbar-thumb:hover { background: #A7BACB !important; }

:focus-visible { outline: 2px solid var(--ep-primary); outline-offset: 2px; }

/* Preloader */
#hellopreloader { background: var(--ep-gradient-ink) !important; }
#hellopreloader .preloader svg { stroke: #fff; }
#hellopreloader .text { font-family: var(--ep-font); letter-spacing: .2em; color: rgba(255,255,255,.8); }

/* --------------------------------------------------------------------------
   Shell: left sidebar
   -------------------------------------------------------------------------- */
.fixed-sidebar-left,
.fixed-sidebar-left.sidebar--small,
.fixed-sidebar-left.sidebar--large,
div#sidebar-left-1,
#sidebar-left,
.fixed-sidebar .mCustomScrollbar {
  background: var(--ep-gradient-ink) !important;
  background-color: #0B2238 !important;
}

.fixed-sidebar-left { box-shadow: 1px 0 0 rgba(255,255,255,.04), 8px 0 30px -18px rgba(11, 31, 51,.5); }

.fixed-sidebar-left .left-menu a,
.fixed-sidebar-left .left-menu-title {
  color: #C3D9E6 !important;
  font-family: var(--ep-font) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}

.fixed-sidebar-left .left-menu > li { position: relative; }

.fixed-sidebar-left .left-menu a {
  border-radius: 12px;
  margin: 2px 8px;
  transition: background .2s var(--ep-ease), color .2s var(--ep-ease), transform .2s var(--ep-ease);
}

.fixed-sidebar-left.sidebar--small .left-menu a { padding: 12px 0 12px 15px !important; }

.fixed-sidebar-left .left-menu a:hover,
.fixed-sidebar-left .left-menu li.active > a {
  background: rgba(20, 184, 166, .22) !important;
  color: #fff !important;
}

.fixed-sidebar-left .left-menu a:hover .left-menu-icon,
.fixed-sidebar-left .left-menu a:hover .left-menu-title { color: #fff !important; fill: #fff !important; }

.fixed-sidebar-left .left-menu-icon,
.fixed-sidebar-left .left-menu a i,
.fixed-sidebar-left svg {
  fill: #8FB8CC !important;
  color: #8FB8CC !important;
  transition: fill .2s, color .2s;
}

.fixed-sidebar-left .logo,
.fixed-sidebar-left .profile-completion,
.fixed-sidebar-left .sidebar-author,
.fixed-sidebar-left .ui-block-title {
  background: transparent !important;
  border-color: rgba(255,255,255,.08) !important;
}

.fixed-sidebar-left .ui-block-title .title,
.fixed-sidebar-left .author-name,
.fixed-sidebar-left .user-name { color: #fff !important; }
.fixed-sidebar-left .author-subtitle { color: #8FB8CC !important; }

/* sidebar notification counters */
.fixed-sidebar-left sup[style*="#0F766E"],
.fixed-sidebar-left sup[style*="#38a9ff"],
.fixed-sidebar-left sup[style*="#38A9FF"] {
  background: var(--ep-accent) !important;
  font-size: 11px !important;
  font-weight: 700;
  min-width: 18px;
  line-height: 18px;
  padding: 0 5px !important;
  text-align: center;
  border-radius: 99px !important;
  box-shadow: 0 0 0 2px #0B2238;
}

/* --------------------------------------------------------------------------
   Shell: top header
   -------------------------------------------------------------------------- */
#site-header,
#site-header-responsive,
.header,
.header--standard {
  background: rgba(255, 255, 255, .86) !important;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ep-border) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 8px 24px -18px rgba(11, 31, 51,.25) !important;
}

#site-header .page-title,
#site-header .page-title h6,
#site-header-responsive .page-title {
  background: transparent !important;
}

#site-header .page-title h6,
#site-header-responsive h6 {
  color: var(--ep-ink) !important;
  font-family: var(--ep-font) !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: .02em;
  text-transform: none !important;
}

#site-header .header-img,
#site-header .page-title img { filter: none; }

#site-header .search-bar,
#site-header .search-bar .form-group,
#site-header-responsive .search-bar {
  background: transparent !important;
}

#site-header .search-bar .form-control,
#site-header .search-bar input,
#site-header-responsive .search-bar input {
  background: var(--ep-bg) !important;
  border: 1px solid var(--ep-border) !important;
  border-radius: 999px !important;
  color: var(--ep-ink) !important;
  height: 44px;
  margin-top: 13px;
  padding-left: 20px !important;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
#site-header .search-bar input:focus {
  background: #fff !important;
  border-color: var(--ep-primary) !important;
  box-shadow: var(--ep-ring) !important;
}
#site-header .search-bar input::placeholder { color: var(--ep-subtle) !important; }

#site-header .control-icon,
#site-header .control-block svg,
#site-header-responsive svg {
  fill: var(--ep-muted) !important;
  color: var(--ep-muted) !important;
  transition: fill .2s, transform .2s var(--ep-ease);
}
#site-header .control-block .control-icon:hover,
#site-header .control-block a:hover svg { fill: var(--ep-primary) !important; transform: translateY(-1px); }

#site-header .author-name,
#site-header .author-title,
#site-header .author-title .author-name { color: var(--ep-ink) !important; font-weight: 700 !important; }
#site-header .author-subtitle { color: var(--ep-muted) !important; }

#site-header .label-avatar,
#site-header .control-icon .label-avatar,
.label-avatar {
  background: var(--ep-accent) !important;
  border: 2px solid #fff;
  font-weight: 700;
}

/* wallet balance pill */
#site-header input[style*="balance"],
#site-header .balance,
#site-header [class*="wallet"] {
  border-radius: 999px !important;
}

/* logo cell (aligned with the sidebar) */
#site-header .page-title > div:first-child,
#site-header #sidebar-left-responsive {
  background: var(--ep-gradient-ink) !important;
  min-width: 70px;
  height: 70px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 !important;
}
#site-header .header-img,
#site-header-responsive .header-img,
img[src*="brand-icon.png"] {
  width: 40px !important; height: 40px !important; max-width: 40px; object-fit: contain;
  transition: transform .3s var(--ep-ease);
}
#site-header .page-title .logo:hover .header-img { transform: rotate(-6deg) scale(1.05); }
#site-header .page-title h6 { margin-left: 18px !important; }

/* search submit */
#site-header .search-bar .form-group.with-button button,
#site-header .search-bar button {
  background: transparent !important;
  border: 0 !important;
  height: 44px !important;
  top: 13px !important;
  right: 6px !important;
  width: 44px !important;
  border-radius: 50% !important;
}
#site-header .search-bar button svg { fill: var(--ep-muted) !important; width: 18px; height: 18px; }
#site-header .search-bar button:hover svg { fill: var(--ep-primary) !important; }

/* wallet balance pill */
#site-header .time-header {
  border: 1px solid var(--ep-primary-100) !important;
  background: var(--ep-primary-50) !important;
  border-radius: 999px !important;
  width: auto !important;
  padding: 6px 14px 6px 12px !important;
  display: inline-flex; align-items: center; gap: 6px;
}
#site-header .time-header::before {
  content: '\f555'; font-family: 'Font Awesome 5 Pro', 'Font Awesome 5 Free'; font-weight: 900;
  color: var(--ep-primary); font-size: 13px;
}
#site-header .time-header span { color: var(--ep-primary-700) !important; font-weight: 800 !important; font-size: 14px !important; }

/* dropdowns from header */
.more-dropdown,
.dropdown-menu,
.notification-list .more-dropdown,
.more-with-triangle {
  border: 1px solid var(--ep-border) !important;
  border-radius: var(--ep-radius) !important;
  box-shadow: var(--ep-shadow-lg) !important;
  padding: 6px !important;
  overflow: hidden;
}
.more-with-triangle:before, .more-with-triangle:after { display: none !important; }
.more-dropdown li a,
.dropdown-menu .dropdown-item {
  border-radius: var(--ep-radius-sm);
  color: var(--ep-text) !important;
  font-weight: 600;
  padding: 9px 12px !important;
  transition: background .15s, color .15s;
}
.more-dropdown li a:hover,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background: var(--ep-primary-50) !important;
  color: var(--ep-primary-700) !important;
}
.dropdown-item.active, .dropdown-item:active { background: var(--ep-primary) !important; color: #fff !important; }

/* --------------------------------------------------------------------------
   Page hero (template "main-header" banner)
   -------------------------------------------------------------------------- */
.main-header {
  position: relative;
  overflow: hidden;
  background: var(--ep-gradient) !important;
  border-radius: var(--ep-radius-xl);
  margin: 24px auto 28px !important;
  padding: 56px 24px 64px !important;
  width: calc(100% - 48px) !important;
  max-width: 1320px;
  box-shadow: var(--ep-shadow);
  isolation: isolate;
}
.main-header .content-bg-wrap {
  background-image:
    radial-gradient(600px 300px at 10% 0%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(500px 260px at 95% 100%, rgba(249, 115, 96,.28), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 0) !important;
  background-size: auto, auto, 22px 22px !important;
  background-color: transparent !important;
  animation: none !important;
  opacity: 1;
  z-index: -1;
}
.main-header .img-bottom { display: none !important; }
.main-header-content { padding: 0 !important; }
.main-header-content h1,
.main-header h1 {
  color: #fff !important;
  font-weight: 800 !important;
  font-size: clamp(28px, 3.4vw, 42px) !important;
  letter-spacing: -.005em !important;
  word-spacing: .08em;
  margin-bottom: 12px !important;
}
.main-header-content p,
.main-header p {
  color: rgba(255,255,255,.86) !important;
  font-size: 15.5px !important;
  line-height: 1.65 !important;
  max-width: 720px;
  margin: 0 auto !important;
}

/* --------------------------------------------------------------------------
   Cards / blocks
   -------------------------------------------------------------------------- */
.ui-block,
.card,
.widget,
.friend-item,
.ui-block.h-100 {
  background: var(--ep-surface) !important;
  border: 1px solid var(--ep-border) !important;
  border-radius: var(--ep-radius-lg) !important;
  box-shadow: var(--ep-shadow-xs) !important;
  transition: box-shadow .25s var(--ep-ease), transform .25s var(--ep-ease), border-color .25s;
}
a:hover > .ui-block,
a:hover > .card,
.ui-block:hover,
.card.hover-shadow:hover {
  box-shadow: var(--ep-shadow) !important;
  border-color: var(--ep-border-strong) !important;
}
.card.hover-shadow:hover, a:hover > .card { transform: translateY(-3px); }

.ui-block-title,
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--ep-border) !important;
  padding: 18px 22px !important;
}
.ui-block-title .title,
.ui-block-title h6,
.card-header h5, .card-header h6 {
  color: var(--ep-ink) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}
.ui-block-title.bg-blue, .bg-blue { background: var(--ep-primary) !important; }
.ui-block-content, .card-body { padding: 22px; }
.card-footer { background: var(--ep-surface-2) !important; border-top: 1px solid var(--ep-border) !important; }

.friend-item .friend-header-thumb img { border-radius: var(--ep-radius-lg) var(--ep-radius-lg) 0 0; }
.friend-item .friend-avatar .author-thumb img,
.author-thumb img { border-radius: 50%; object-fit: cover; }
.friend-item .friend-count-item .h6 { color: var(--ep-primary) !important; font-weight: 800; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--ep-font) !important;
  font-weight: 700 !important;
  border-radius: var(--ep-radius) !important;
  letter-spacing: .01em;
  transition: transform .15s var(--ep-ease), box-shadow .2s var(--ep-ease), background .2s, filter .2s, border-color .2s !important;
}
.btn:not(.btn-link):active { transform: translateY(1px) scale(.99); }
.btn:focus, .btn.focus { box-shadow: var(--ep-ring) !important; }

.btn-primary,
.btn-blue,
.btn-purple,
.btn-breez,
.button-dash,
.bg-primary.btn,
.btn.bg-primary,
.debate-form-wrapper .btn-primary,
.debate-modal-footer .btn-primary,
.debate-modal-content .btn-primary {
  background: var(--ep-gradient) !important;
  background-size: 160% 160% !important;
  background-position: 0% 50% !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px -10px rgba(15, 118, 110, .8) !important;
}
.btn-primary:hover,
.btn-blue:hover,
.btn-purple:hover,
.btn-breez:hover,
.button-dash:hover,
.debate-form-wrapper .btn-primary:hover {
  background-position: 100% 50% !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(15, 118, 110, .85) !important;
}

.btn-secondary,
.btn-grey,
.btn-light,
.btn-border-think,
.btn-control {
  background: var(--ep-surface) !important;
  color: var(--ep-text) !important;
  border: 1px solid var(--ep-border-strong) !important;
  box-shadow: var(--ep-shadow-xs) !important;
}
.btn-secondary:hover, .btn-grey:hover, .btn-light:hover, .btn-border-think:hover {
  background: var(--ep-primary-50) !important;
  border-color: var(--ep-primary-100) !important;
  color: var(--ep-primary-700) !important;
}
.btn-control { border-radius: 50% !important; }
.btn-control svg { fill: var(--ep-muted) !important; }
.btn-control:hover svg { fill: var(--ep-primary) !important; }

.btn-success, .btn-green {
  background: var(--ep-success) !important; border-color: var(--ep-success) !important; color: #fff !important;
  box-shadow: 0 8px 18px -10px rgba(16, 185, 129, .8) !important;
}
.btn-danger {
  background: var(--ep-danger) !important; border-color: var(--ep-danger) !important; color: #fff !important;
  box-shadow: 0 8px 18px -10px rgba(229, 72, 77, .7) !important;
}
.btn-warning { background: var(--ep-warning) !important; border-color: var(--ep-warning) !important; color: #3A2500 !important; }
.btn-info { background: var(--ep-secondary) !important; border-color: var(--ep-secondary) !important; color: #fff !important; }
.btn-success:hover, .btn-danger:hover, .btn-info:hover, .btn-warning:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-outline-primary { color: var(--ep-primary) !important; border: 1.5px solid var(--ep-primary) !important; background: transparent !important; }
.btn-outline-primary:hover { background: var(--ep-primary) !important; color: #fff !important; }
.btn-outline-secondary { color: var(--ep-text) !important; border-color: var(--ep-border-strong) !important; }
.btn-outline-secondary:hover { background: var(--ep-primary-50) !important; color: var(--ep-primary-700) !important; }
.btn-outline-danger { color: var(--ep-danger) !important; border-color: var(--ep-danger) !important; }
.btn-outline-danger:hover { background: var(--ep-danger) !important; color: #fff !important; }
.btn-outline-success { color: var(--ep-success) !important; border-color: var(--ep-success) !important; }
.btn-outline-success:hover { background: var(--ep-success) !important; color: #fff !important; }
.btn-link { color: var(--ep-primary) !important; }

.btn.is-loading { pointer-events: none; opacity: .85; position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.55); border-top-color: #fff; border-radius: 50%;
  animation: ep-spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-light.is-loading::after { border-color: var(--ep-primary-100); border-top-color: var(--ep-primary); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-control,
.custom-select,
.form-select,
select.form-control,
textarea.form-control,
input[type="text"].form-control,
.selectize-input,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  font-family: var(--ep-font) !important;
  background-color: var(--ep-surface) !important;
  border: 1.5px solid var(--ep-border) !important;
  border-radius: var(--ep-radius) !important;
  color: var(--ep-ink) !important;
  box-shadow: none !important;
  transition: border-color .2s var(--ep-ease), box-shadow .2s var(--ep-ease), background .2s;
}
.form-control:hover, .form-select:hover, .custom-select:hover { border-color: var(--ep-border-strong) !important; }
.form-control:focus,
.form-select:focus,
.custom-select:focus,
.selectize-input.focus,
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
  border-color: var(--ep-primary) !important;
  box-shadow: var(--ep-ring) !important;
  outline: none !important;
}
.form-control::placeholder { color: var(--ep-subtle) !important; }
.form-control:disabled, .form-control[readonly] { background: var(--ep-surface-2) !important; color: var(--ep-muted) !important; }

.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--ep-danger) !important; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(229,72,77,.15) !important; }
.form-control.is-valid { border-color: var(--ep-success) !important; }
.invalid-feedback, .text-danger, span[role="alert"] strong { color: var(--ep-danger) !important; font-weight: 600; }

label, .form-label, .control-label, .col-form-label {
  font-family: var(--ep-font) !important;
  color: var(--ep-text) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}
.label-floating .control-label { color: var(--ep-muted) !important; font-weight: 500 !important; }
.label-floating.is-focused .control-label { color: var(--ep-primary) !important; }

.form-check-input:checked,
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--ep-primary) !important;
  border-color: var(--ep-primary) !important;
}
.form-check-input:focus { box-shadow: var(--ep-ring) !important; border-color: var(--ep-primary) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ep-primary); }
input[type="range"] { accent-color: var(--ep-primary); }

.input-group-text {
  background: var(--ep-surface-2) !important;
  border: 1.5px solid var(--ep-border) !important;
  color: var(--ep-muted) !important;
  border-radius: var(--ep-radius) !important;
}

/* Material-style template inputs */
.togglebutton label input[type=checkbox]:checked + .toggle { background-color: var(--ep-primary-100) !important; }
.togglebutton label input[type=checkbox]:checked + .toggle:after { background-color: var(--ep-primary) !important; }
.radio input[type=radio]:checked ~ .check, .checkbox input[type=checkbox]:checked + .checkbox-material .check {
  background-color: var(--ep-primary) !important; border-color: var(--ep-primary) !important;
}
.radio input[type=radio]:checked ~ .circle { border-color: var(--ep-primary) !important; }

/* Select2 */
.select2-container--default .select2-selection--single { height: 46px !important; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ep-ink) !important; line-height: 44px !important; padding-left: 14px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px !important; right: 8px !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--ep-primary-50) !important; border: 1px solid var(--ep-primary-100) !important;
  color: var(--ep-primary-700) !important; border-radius: 999px !important; font-weight: 600; padding: 2px 10px !important;
}
.select2-dropdown {
  border: 1px solid var(--ep-border) !important; border-radius: var(--ep-radius) !important;
  box-shadow: var(--ep-shadow-lg) !important; overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--ep-primary) !important; color: #fff !important;
}
.select2-search--dropdown .select2-search__field { border: 1.5px solid var(--ep-border) !important; border-radius: var(--ep-radius-sm) !important; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table {
  color: var(--ep-text) !important;
  border-collapse: separate !important;
  border-spacing: 0;
  background: var(--ep-surface);
  border-radius: var(--ep-radius);
}
.table thead th,
.table > thead > tr > th,
table.dataTable thead th {
  background: var(--ep-surface-2) !important;
  color: var(--ep-muted) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-top: 0 !important;
  border-bottom: 1px solid var(--ep-border) !important;
  padding: 14px 16px !important;
  white-space: nowrap;
}
.table thead.thead-dark th, .table-dark th { background: var(--ep-ink) !important; color: #fff !important; }
.table td, .table th { border-color: var(--ep-border) !important; padding: 14px 16px !important; vertical-align: middle !important; }
.table tbody tr { transition: background .15s; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: var(--ep-primary-50) !important; }
.table-striped tbody tr:nth-of-type(odd) { background: var(--ep-surface-2) !important; }
.table-bordered { border: 1px solid var(--ep-border) !important; border-radius: var(--ep-radius) !important; overflow: hidden; }
.table-responsive { border-radius: var(--ep-radius); }

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--ep-border) !important; border-radius: var(--ep-radius-sm) !important; padding: 6px 10px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--ep-primary) !important; color: #fff !important; border: 0 !important; border-radius: var(--ep-radius-sm) !important;
}

/* --------------------------------------------------------------------------
   Navigation: tabs, pills, pagination, accordion
   -------------------------------------------------------------------------- */
.nav-tabs { border-bottom: 1px solid var(--ep-border) !important; gap: 4px; }
.nav-tabs .nav-link {
  border: 0 !important; color: var(--ep-muted) !important; font-weight: 700;
  border-radius: 10px 10px 0 0 !important; padding: 12px 18px !important; position: relative;
  transition: color .2s, background .2s;
}
.nav-tabs .nav-link:hover { color: var(--ep-primary) !important; background: var(--ep-primary-50) !important; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
  color: var(--ep-primary) !important; background: transparent !important;
}
.nav-tabs .nav-link.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  background: var(--ep-gradient); border-radius: 3px 3px 0 0;
}
.nav-pills .nav-link { border-radius: 999px !important; color: var(--ep-muted) !important; font-weight: 700; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--ep-gradient) !important; color: #fff !important; }

.pagination .page-link {
  border: 1px solid var(--ep-border) !important; color: var(--ep-text) !important;
  margin: 0 3px; border-radius: var(--ep-radius-sm) !important; font-weight: 600;
}
.pagination .page-item.active .page-link { background: var(--ep-primary) !important; border-color: var(--ep-primary) !important; color: #fff !important; }
.pagination .page-link:hover { background: var(--ep-primary-50) !important; color: var(--ep-primary) !important; }

.accordion-item { border: 1px solid var(--ep-border) !important; border-radius: var(--ep-radius) !important; overflow: hidden; margin-bottom: 10px; }
.accordion-button { font-weight: 700 !important; color: var(--ep-ink) !important; background: var(--ep-surface) !important; }
.accordion-button:not(.collapsed) { background: var(--ep-primary-50) !important; color: var(--ep-primary-700) !important; box-shadow: none !important; }
.accordion-button:focus { box-shadow: var(--ep-ring) !important; }

/* --------------------------------------------------------------------------
   Modals & popups
   -------------------------------------------------------------------------- */
.modal-backdrop.show { background: #0B1F33; opacity: .55 !important; }
.modal-content,
.window-popup {
  border: 0 !important;
  border-radius: var(--ep-radius-xl) !important;
  box-shadow: var(--ep-shadow-lg) !important;
  overflow: hidden;
}
.modal.fade .modal-dialog { transform: translateY(16px) scale(.98); transition: transform .3s var(--ep-ease), opacity .3s; }
.modal.show .modal-dialog { transform: none; }
.modal-header {
  border-bottom: 1px solid var(--ep-border) !important;
  padding: 20px 24px !important;
  background: var(--ep-surface) !important;
}
.modal-header.bg-primary, .modal-header[style*="background"] { background: var(--ep-gradient) !important; color: #fff !important; }
.modal-header.bg-primary .modal-title, .modal-header[style*="background"] .modal-title { color: #fff !important; }
.modal-title { font-weight: 800 !important; color: var(--ep-ink) !important; font-size: 18px !important; }
.modal-body { padding: 24px !important; }
.modal-footer { border-top: 1px solid var(--ep-border) !important; padding: 16px 24px !important; background: var(--ep-surface-2) !important; }
.modal .close, .modal .btn-close, .window-popup .close {
  opacity: .6; border-radius: 50%; transition: opacity .2s, background .2s;
}
.modal .close:hover, .modal .btn-close:hover { opacity: 1; background-color: var(--ep-primary-50); }
.window-popup .icon-close, .close.icon-close { background: var(--ep-primary) !important; border-radius: 50% !important; }

/* SweetAlert2 */
.swal2-popup {
  font-family: var(--ep-font) !important;
  border-radius: var(--ep-radius-xl) !important;
  padding: 28px 24px 24px !important;
  box-shadow: var(--ep-shadow-lg) !important;
}
.swal2-title { color: var(--ep-ink) !important; font-weight: 800 !important; font-size: 22px !important; }
.swal2-html-container, .swal2-content { color: var(--ep-muted) !important; font-size: 15px !important; }
.swal2-styled.swal2-confirm {
  background: var(--ep-gradient) !important; border-radius: var(--ep-radius) !important;
  font-weight: 700 !important; padding: 11px 26px !important; box-shadow: 0 10px 20px -10px rgba(15, 118, 110,.9) !important;
}
.swal2-styled.swal2-cancel {
  background: var(--ep-surface) !important; color: var(--ep-text) !important; border: 1px solid var(--ep-border-strong) !important;
  border-radius: var(--ep-radius) !important; font-weight: 700 !important; padding: 11px 24px !important;
}
.swal2-styled.swal2-deny { background: var(--ep-danger) !important; border-radius: var(--ep-radius) !important; font-weight: 700 !important; }
.swal2-styled:focus { box-shadow: var(--ep-ring) !important; }
.swal2-icon.swal2-success { border-color: var(--ep-success) !important; color: var(--ep-success) !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: var(--ep-success) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(16,185,129,.3) !important; }
.swal2-icon.swal2-warning { border-color: var(--ep-warning) !important; color: var(--ep-warning) !important; }
.swal2-icon.swal2-question, .swal2-icon.swal2-info { border-color: var(--ep-primary) !important; color: var(--ep-primary) !important; }
.swal2-timer-progress-bar { background: var(--ep-gradient) !important; }

/* --------------------------------------------------------------------------
   Alerts, badges, progress
   -------------------------------------------------------------------------- */
.alert {
  border: 1px solid transparent !important;
  border-radius: var(--ep-radius) !important;
  font-weight: 600;
  padding: 14px 18px !important;
}
.alert-success { background: var(--ep-success-50) !important; color: #05664A !important; border-color: #BDEBD9 !important; }
.alert-danger { background: var(--ep-danger-50) !important; color: #9B1C22 !important; border-color: #F7C6C8 !important; }
.alert-warning { background: var(--ep-warning-50) !important; color: #7A4B00 !important; border-color: #FAD9A0 !important; }
.alert-info, .alert-primary { background: var(--ep-primary-50) !important; color: var(--ep-primary-700) !important; border-color: var(--ep-primary-100) !important; }

.badge { border-radius: 999px !important; font-weight: 700 !important; padding: .42em .8em !important; letter-spacing: .02em; }
.badge-primary, .bg-primary, .badge.bg-primary { background: var(--ep-primary) !important; color: #fff !important; }
.badge-success, .bg-success { background: var(--ep-success) !important; color: #fff !important; }
.badge-danger, .bg-danger { background: var(--ep-danger) !important; color: #fff !important; }
.badge-warning, .bg-warning { background: var(--ep-warning) !important; color: #3A2500 !important; }
.badge-info, .bg-info { background: var(--ep-secondary) !important; color: #fff !important; }
.badge-secondary, .bg-secondary { background: #EDF2F7 !important; color: var(--ep-text) !important; }

.text-primary { color: var(--ep-primary) !important; }
.text-info { color: var(--ep-secondary) !important; }
.text-success { color: var(--ep-success) !important; }
.text-muted, .c-grey { color: var(--ep-muted) !important; }
.border-primary { border-color: var(--ep-primary) !important; }

.progress { background: #E6EDF3 !important; border-radius: 999px !important; height: 10px; overflow: hidden; }
.progress-bar { background: var(--ep-gradient) !important; border-radius: 999px !important; transition: width 1s var(--ep-ease); }
.progress-bar.bg-success { background: var(--ep-success) !important; }
.progress-bar.bg-warning { background: var(--ep-warning) !important; }
.progress-bar.bg-danger { background: var(--ep-danger) !important; }

/* --------------------------------------------------------------------------
   Feed, posts, comments, notifications (Olympus components)
   -------------------------------------------------------------------------- */
.post, .hentry.post { border-radius: var(--ep-radius-lg); }
.post__author-name, .author-name, .h6.author-name { color: var(--ep-ink) !important; font-weight: 700 !important; }
.post__date, .author-date, .published, .notification-date, .entry-date { color: var(--ep-subtle) !important; font-size: 12.5px; }
.post-additional-info { border-top: 1px solid var(--ep-border) !important; }
.post-add-icon, .post-add-icon span { color: var(--ep-muted) !important; transition: color .2s; }
.post-add-icon svg { fill: var(--ep-subtle) !important; transition: fill .2s, transform .2s var(--ep-ease); }
.post-add-icon:hover, .post-add-icon:hover span { color: var(--ep-accent) !important; }
.post-add-icon:hover svg { fill: var(--ep-accent) !important; transform: scale(1.12); }
.olymp-three-dots-icon { fill: var(--ep-subtle) !important; }
.more:hover .olymp-three-dots-icon { fill: var(--ep-primary) !important; }

.comments-list .comment-item, .comment-item { border-bottom: 1px solid var(--ep-border) !important; }
.comment-form textarea, .comment-form .form-control { background: var(--ep-surface-2) !important; }

.notification-list > li { border-bottom: 1px solid var(--ep-border) !important; transition: background .15s; }
.notification-list > li:hover { background: var(--ep-primary-50) !important; }
.notification-list .notification-event a, .notification-event .h6 { color: var(--ep-primary) !important; font-weight: 700; }
.notification-list .un-read, .notification-list li.un-read { background: #F0FDFA !important; }

.chat-message-item { border-radius: var(--ep-radius) !important; }
.chat-message-item.me, .chat-message-field .chat-message-item { background: var(--ep-primary-50); }

.friend-groups .friend-item-content, .friend-item-content { border-radius: var(--ep-radius-lg); }
.control-block-button { color: var(--ep-muted) !important; font-weight: 600; }

/* Calendar (FullCalendar) */
.fc .fc-button-primary, .fc-button-primary {
  background: var(--ep-primary) !important; border-color: var(--ep-primary) !important; border-radius: var(--ep-radius-sm) !important; font-weight: 700 !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--ep-primary-700) !important; }
.fc .fc-daygrid-day.fc-day-today, .fc-unthemed td.fc-today { background: var(--ep-primary-50) !important; }
.fc-event, .fc-h-event { background: var(--ep-primary) !important; border-color: var(--ep-primary) !important; border-radius: 6px !important; }
.fc .fc-col-header-cell-cushion, .fc-toolbar-title { color: var(--ep-ink) !important; font-weight: 800 !important; }

/* Back to top */
.back-to-top {
  background: var(--ep-gradient) !important; box-shadow: var(--ep-shadow) !important;
  transition: transform .2s var(--ep-ease) !important;
}
.back-to-top:hover { transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   Inline-style recolouring (legacy hard-coded template colours)
   -------------------------------------------------------------------------- */
[style*="background-color:#38a9ff"], [style*="background-color: #38a9ff"],
[style*="background-color:#38A9FF"], [style*="background:#38a9ff"],
[style*="background-color:#ff5e3a"], [style*="background-color: #ff5e3a"],
[style*="background-color:#FF5E3A"], [style*="background:#ff5e3a"],
[style*="background-color:#4a6cf7"], [style*="background-color: #4a6cf7"],
[style*="background-color:#3596d9"], [style*="background-color: #3596d9"] {
  background-color: var(--ep-primary) !important;
}
[style*="background-color:#002060"], [style*="background-color: #002060"],
[style*="background:#002060"], [style*="background-color:#041d57"] {
  background-color: #0B2540 !important;
}
[style*="color:#38a9ff"], [style*="color: #38a9ff"], [style*="color:#ff5e3a"],
[style*="color: #ff5e3a"], [style*="color:#4a6cf7"], [style*="color: #4a6cf7"] {
  color: var(--ep-primary) !important;
}
[style*="color:#002060"], [style*="color: #002060"], [style*="color:#2b3450"], [style*="color: #2b3450"] {
  color: var(--ep-ink) !important;
}

/* --------------------------------------------------------------------------
   Dashboard (redesigned)
   -------------------------------------------------------------------------- */
.ep-page { max-width: 1320px; margin: 0 auto; padding: 24px 24px 48px; }

.ep-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ep-gradient);
  border-radius: var(--ep-radius-xl);
  padding: 36px 36px 32px;
  color: #fff;
  box-shadow: var(--ep-shadow);
}
.ep-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(255,255,255,.20), transparent 60%),
    radial-gradient(420px 240px at 100% 100%, rgba(249, 115, 96,.35), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.16) 1px, transparent 0);
  background-size: auto, auto, 22px 22px;
}
.ep-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.ep-hero h1 { word-spacing: .06em; color: #fff !important; font-weight: 800 !important; font-size: clamp(26px, 3vw, 36px) !important; margin: 14px 0 8px; }
.ep-hero p { color: rgba(255,255,255,.86); font-size: 15.5px; max-width: 640px; margin: 0; }
.ep-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ep-hero__actions .ep-btn-white {
  background: #fff; color: var(--ep-primary-700) !important; font-weight: 800; border-radius: var(--ep-radius);
  padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important;
  box-shadow: 0 10px 24px -12px rgba(11, 31, 51,.5); transition: transform .15s var(--ep-ease);
}
.ep-hero__actions .ep-btn-ghost {
  background: rgba(255,255,255,.14); color: #fff !important; font-weight: 700; border-radius: var(--ep-radius);
  padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.3);
  text-decoration: none !important; transition: background .2s, transform .15s var(--ep-ease);
}
.ep-hero__actions a:hover { transform: translateY(-2px); }
.ep-hero__actions .ep-btn-ghost:hover { background: rgba(255,255,255,.22); }
.ep-hero__avatar {
  width: 92px; height: 92px; border-radius: 26px; object-fit: cover;
  border: 3px solid rgba(255,255,255,.6); box-shadow: 0 16px 30px -14px rgba(11, 31, 51,.6);
}

.ep-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0 8px; }
.ep-stat {
  background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: var(--ep-radius-lg);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--ep-shadow-xs);
  transition: transform .2s var(--ep-ease), box-shadow .2s var(--ep-ease);
  text-decoration: none !important;
}
.ep-stat:hover { transform: translateY(-3px); box-shadow: var(--ep-shadow); }
.ep-stat__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; flex: none;
  background: var(--ep-primary-50); color: var(--ep-primary);
}
.ep-stat__icon.is-teal { background: var(--ep-secondary-100); color: var(--ep-secondary); }
.ep-stat__icon.is-pink { background: #FFEDE9; color: #C2410C; }
.ep-stat__icon.is-amber { background: var(--ep-warning-50); color: #B45309; }
.ep-stat__value { font-size: 24px; font-weight: 800; color: var(--ep-ink); line-height: 1.1; }
.ep-stat__label { font-size: 12.5px; color: var(--ep-muted); font-weight: 600; margin-top: 2px; }

.ep-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.ep-section-head h2 { font-size: 19px !important; font-weight: 800 !important; margin: 0 !important; color: var(--ep-ink); }
.ep-section-head p { margin: 4px 0 0; color: var(--ep-muted); font-size: 13.5px; }

.ep-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ep-module {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: var(--ep-radius-lg);
  padding: 20px; text-decoration: none !important; color: inherit !important;
  box-shadow: var(--ep-shadow-xs);
  transition: transform .25s var(--ep-ease), box-shadow .25s var(--ep-ease), border-color .25s;
  animation: ep-rise .5s var(--ep-ease) both;
}
.ep-module:hover { transform: translateY(-4px); box-shadow: var(--ep-shadow); border-color: var(--ep-primary-100); }
.ep-module__top { display: flex; align-items: center; justify-content: space-between; }
.ep-module__img {
  width: 52px; height: 52px; border-radius: 16px; object-fit: cover;
  background: var(--ep-gradient-soft); border: 1px solid var(--ep-border); padding: 6px;
}
.ep-module__arrow {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ep-primary-50); color: var(--ep-primary); font-size: 13px;
  transition: transform .25s var(--ep-ease), background .25s, color .25s;
}
.ep-module:hover .ep-module__arrow { background: var(--ep-primary); color: #fff; transform: translateX(3px); }
.ep-module__title { font-weight: 800; color: var(--ep-ink); font-size: 15.5px; margin: 0; }
.ep-module__desc { color: var(--ep-muted); font-size: 13.5px; line-height: 1.55; margin: 0; }

.ep-panel {
  background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: var(--ep-radius-lg);
  box-shadow: var(--ep-shadow-xs); overflow: hidden;
}
.ep-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ep-border); }
.ep-panel__head h3 { font-size: 15px !important; font-weight: 800 !important; margin: 0 !important; }
.ep-panel__head a { font-size: 13px; font-weight: 700; text-decoration: none; }
.ep-list { list-style: none; margin: 0; padding: 6px 0; }
.ep-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; transition: background .15s; }
.ep-list li:hover { background: var(--ep-surface-2); }
.ep-list img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.ep-list__title { font-weight: 700; color: var(--ep-ink); font-size: 14px; display: block; text-decoration: none !important; }
.ep-list__meta { color: var(--ep-muted); font-size: 12.5px; }
.ep-list .progress { height: 6px; margin-top: 6px; }
.ep-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--ep-primary-50); color: var(--ep-primary-700);
}
.ep-chip.is-teal { background: var(--ep-secondary-100); color: var(--ep-secondary); }
.ep-chip.is-amber { background: var(--ep-warning-50); color: #B45309; }
.ep-chip.is-green { background: var(--ep-success-50); color: #047857; }

.ep-empty {
  text-align: center; padding: 34px 20px; color: var(--ep-muted);
}
.ep-empty i { font-size: 28px; color: var(--ep-primary); background: var(--ep-primary-50); width: 64px; height: 64px; border-radius: 20px; display: inline-grid; place-items: center; margin-bottom: 12px; }
.ep-empty h4 { font-size: 15px !important; font-weight: 800 !important; margin: 0 0 4px !important; }

/* VIP dashboard card grid -> same language as .ep-module */
.vip-dashboard { max-width: 1320px !important; padding: 0 24px 48px !important; width: 100% !important; }
.vip-dashboard-section { margin-bottom: 28px !important; }
.vip-dashboard-section-title {
  font-size: 13px !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ep-muted) !important; margin: 0 0 14px !important; padding: 0 !important; border: 0 !important;
}
.vip-dashboard-section-title::before, .vip-dashboard-section-title::after { display: none !important; }
.vip-dashboard-card-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; gap: 16px !important; }
.vip-dashboard-card {
  background: var(--ep-surface) !important; border: 1px solid var(--ep-border) !important;
  border-radius: var(--ep-radius-lg) !important; box-shadow: var(--ep-shadow-xs) !important;
  padding: 20px !important; min-height: 0 !important; color: inherit !important; position: relative;
  transition: transform .25s var(--ep-ease), box-shadow .25s var(--ep-ease), border-color .25s !important;
  animation: ep-rise .5s var(--ep-ease) both;
}
.vip-dashboard-card::before, .vip-dashboard-card::after { display: none !important; }
.vip-dashboard-card:hover { transform: translateY(-4px) !important; box-shadow: var(--ep-shadow) !important; border-color: var(--ep-primary-100) !important; }
.vip-dashboard-card-icon {
  width: 48px !important; height: 48px !important; border-radius: 14px !important; display: grid !important; place-items: center;
  background: var(--ep-primary-50) !important; color: var(--ep-primary) !important; font-size: 20px !important; margin-bottom: 14px !important;
  box-shadow: none !important;
}
.vip-dashboard-card-icon i { color: inherit !important; }
.vip-dashboard-card-red .vip-dashboard-card-icon { background: #FFEDE9 !important; color: #C2410C !important; }
.vip-dashboard-card-orange .vip-dashboard-card-icon { background: var(--ep-warning-50) !important; color: #B45309 !important; }
.vip-dashboard-card-title { font-size: 15.5px !important; font-weight: 800 !important; color: var(--ep-ink) !important; margin: 0 0 6px !important; }
.vip-dashboard-card-description { color: var(--ep-muted) !important; font-size: 13.5px !important; line-height: 1.55 !important; margin: 0 !important; }
.vip-dashboard-card-arrow {
  position: absolute !important; top: 20px; right: 20px; width: 32px; height: 32px; border-radius: 50%;
  display: grid !important; place-items: center; background: var(--ep-primary-50) !important; color: var(--ep-primary) !important;
  font-size: 15px !important; transition: transform .25s var(--ep-ease), background .25s, color .25s;
}
.vip-dashboard-card:hover .vip-dashboard-card-arrow { background: var(--ep-primary) !important; color: #fff !important; transform: translateX(3px); }
.vip-dashboard-card-badge { background: var(--ep-accent) !important; color: #fff !important; border-radius: 999px !important; font-weight: 800 !important; }

/* --------------------------------------------------------------------------
   Demo mode: banner + toasts
   -------------------------------------------------------------------------- */
.ep-demo-ribbon {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1060;
  display: flex; align-items: center; gap: 10px;
  background: rgba(11, 31, 51, .92); color: #fff; backdrop-filter: blur(10px);
  padding: 8px 10px 8px 14px; border-radius: 999px; font-family: var(--ep-font); font-size: 12.5px; font-weight: 600;
  box-shadow: 0 16px 40px -14px rgba(11, 31, 51,.6);
  max-width: calc(100vw - 32px);
  animation: ep-rise .5s var(--ep-ease) both .4s;
}
.ep-demo-ribbon__dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 4px rgba(52,211,153,.25); flex: none; animation: ep-pulse 2s infinite; }
.ep-demo-ribbon__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-demo-ribbon button {
  border: 0; background: rgba(255,255,255,.12); color: #fff; width: 24px; height: 24px; border-radius: 50%;
  line-height: 1; cursor: pointer; flex: none; transition: background .2s;
}
.ep-demo-ribbon button:hover { background: rgba(255,255,255,.25); }

.ep-toasts {
  position: fixed; top: 86px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
  width: min(380px, calc(100vw - 32px));
}
.ep-toast {
  pointer-events: auto;
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--ep-border); border-radius: 16px;
  box-shadow: var(--ep-shadow-lg); padding: 14px 14px 14px 16px;
  font-family: var(--ep-font);
  animation: ep-toast-in .45s var(--ep-ease) both;
  position: relative; overflow: hidden;
}
.ep-toast.is-leaving { animation: ep-toast-out .3s var(--ep-ease) both; }
.ep-toast__icon {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--ep-success-50); color: var(--ep-success); font-size: 16px;
}
.ep-toast.is-deleted .ep-toast__icon { background: var(--ep-danger-50); color: var(--ep-danger); }
.ep-toast.is-updated .ep-toast__icon { background: var(--ep-primary-50); color: var(--ep-primary); }
.ep-toast.is-error .ep-toast__icon { background: var(--ep-danger-50); color: var(--ep-danger); }
.ep-toast__title { font-weight: 800; color: var(--ep-ink); font-size: 14.5px; margin: 1px 0 2px; }
.ep-toast__text { color: var(--ep-muted); font-size: 12.5px; line-height: 1.45; }
.ep-toast__close { margin-left: auto; border: 0; background: transparent; color: var(--ep-subtle); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ep-toast__close:hover { color: var(--ep-ink); }
.ep-toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ep-gradient); animation: ep-bar 4.5s linear both; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@keyframes ep-spin { to { transform: rotate(360deg); } }
@keyframes ep-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ep-toast-in { from { opacity: 0; transform: translateX(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ep-toast-out { to { opacity: 0; transform: translateX(24px) scale(.98); } }
@keyframes ep-bar { from { width: 100%; } to { width: 0; } }
@keyframes ep-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(52,211,153,.25); } 50% { box-shadow: 0 0 0 7px rgba(52,211,153,.08); } }

.ep-modules > .ep-module:nth-child(2) { animation-delay: .03s; }
.ep-modules > .ep-module:nth-child(3) { animation-delay: .06s; }
.ep-modules > .ep-module:nth-child(4) { animation-delay: .09s; }
.ep-modules > .ep-module:nth-child(5) { animation-delay: .12s; }
.ep-modules > .ep-module:nth-child(6) { animation-delay: .15s; }
.ep-modules > .ep-module:nth-child(7) { animation-delay: .18s; }
.ep-modules > .ep-module:nth-child(n+8) { animation-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .ep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .main-header { width: calc(100% - 24px) !important; padding: 36px 18px 40px !important; border-radius: var(--ep-radius-lg); margin: 14px auto 18px !important; }
  .ep-page { padding: 16px 16px 90px; }
  .ep-hero { padding: 26px 20px; border-radius: var(--ep-radius-lg); }
  .ep-hero__avatar { display: none; }
  .ep-stats { gap: 10px; }
  .ep-stat { padding: 14px; gap: 10px; }
  .ep-stat__icon { width: 38px; height: 38px; font-size: 16px; border-radius: 12px; }
  .ep-stat__value { font-size: 20px; }
  .ep-modules { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ep-module { padding: 14px; }
  .ep-module__desc { display: none; }
  .ep-toasts { top: 74px; right: 16px; }
  .modal-dialog { margin: 12px !important; }
  .table-responsive, .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 575px) {
  .ep-demo-ribbon { left: 12px; right: 12px; bottom: 12px; transform: none; max-width: none; border-radius: 14px; }
  .ep-demo-ribbon__text { flex: 1; min-width: 0; white-space: normal; line-height: 1.35; }
}
@media (max-width: 420px) {
  .ep-modules { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   VIP / admin headers: same logo cell as the citizen layout
   -------------------------------------------------------------------------- */
#site-header:not(:has(#sidebar-left-responsive)) { padding-left: 70px !important; }
#site-header:not(:has(#sidebar-left-responsive))::before {
  content: ''; position: absolute; left: 0; top: 0; width: 70px; height: 70px; z-index: 2;
  background: url('../img/brand-icon.png') center / 40px 40px no-repeat, var(--ep-gradient-ink);
}
body:has(#site-header:not(:has(#sidebar-left-responsive))) #sidebar-left > a.logo { display: none !important; }
#site-header .page-title { padding-left: 4px; }

#site-header .author-page {
  display: flex !important; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px !important; border-radius: 999px; transition: background .2s;
}
#site-header .author-page:hover { background: var(--ep-primary-50); }
#site-header .author-page .author-thumb { margin: 0 !important; }
#site-header .author-page .author-thumb img,
#site-header .author-page .avatar {
  width: 38px !important; height: 38px !important; border-radius: 50% !important; object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ep-primary-100);
}
#site-header .author-page .author-name { display: flex; flex-direction: column; line-height: 1.2; }
#site-header .author-page .author-title { font-size: 13.5px !important; white-space: nowrap; }
#site-header .author-page .author-subtitle { font-size: 11px !important; font-weight: 600; text-transform: none !important; letter-spacing: 0 !important; }
#site-header .icon-status.online { background: var(--ep-success) !important; border: 2px solid #fff; }

/* --------------------------------------------------------------------------
   Listing cards: follow/support pills, "N more" dropdown, card headings
   -------------------------------------------------------------------------- */
.yz-pinned-post-tag {
  display: inline-flex !important; align-items: center; gap: 6px;
  border: 1.5px solid var(--ep-primary-100) !important; background: #fff !important;
  color: var(--ep-primary) !important; font-weight: 700; font-size: 12.5px;
  padding: 5px 14px !important; border-radius: 999px !important; margin: 4px 6px 4px 0;
  transition: background .2s, color .2s, border-color .2s, transform .15s var(--ep-ease);
}
.yz-pinned-post-tag span { color: inherit !important; }
a:hover > .yz-pinned-post-tag { border-color: var(--ep-primary) !important; transform: translateY(-1px); }
.yz-pinned-post-tag.hv,
.yz-pinned-post-tag[style*="background-color:#ffc107"] {
  background: var(--ep-gradient) !important; border-color: transparent !important; color: #fff !important;
}
.dropbtn {
  background: var(--ep-primary-50) !important; color: var(--ep-primary-700) !important;
  padding: 2px 10px !important; font-size: 12.5px !important; font-weight: 800; border-radius: 999px; cursor: pointer;
}
.dropdown-content {
  border-radius: var(--ep-radius) !important; border: 1px solid var(--ep-border); box-shadow: var(--ep-shadow-lg) !important;
  background: #fff !important; padding: 6px; z-index: 20 !important;
}
.dropdown-content a { border-radius: var(--ep-radius-sm); font-weight: 600; color: var(--ep-text) !important; }
.dropdown-content a:hover { background: var(--ep-primary-50) !important; color: var(--ep-primary-700) !important; }
.ui-block h3, .ui-block h4, .ui-block h5, .card h3, .card h4, .card h5 { font-weight: 700 !important; }
.friends-harmonic img { box-shadow: 0 0 0 2px #fff; }
.post-title, .h3.post-title, .h4.post-title, .post-title a { font-weight: 800 !important; color: var(--ep-ink) !important; font-size: 21px !important; line-height: 1.3 !important; letter-spacing: -.005em; }

/* Campaign workspace: promo panels and section headers in brand colours */
.today-events-thumb {
  position: relative; isolation: isolate; overflow: hidden;
  background-color: #0B2238 !important; background-image: var(--ep-gradient-ink) !important;
}
.today-events-thumb::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(20, 184, 166, .55), transparent 70%),
    radial-gradient(220px 140px at 0% 100%, rgba(14, 165, 233, .45), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1px, transparent 0);
  background-size: auto, auto, 18px 18px;
}
.today-events-thumb .day-number, .today-events-thumb .day-week, .today-events-thumb .month-year { color: #fff !important; font-weight: 800 !important; }
.today-events-thumb .month-year { opacity: .75; }
.campaign-media-header { background: var(--ep-gradient) !important; }

/* --------------------------------------------------------------------------
   Phones: off-canvas sidebar, compact header, scrollable tables
   -------------------------------------------------------------------------- */
.ep-menu-btn, .ep-scrim { display: none; }
@media (max-width: 767px) {
  body:has(.fixed-sidebar.left) .ep-menu-btn {
    display: grid; place-items: center; position: fixed; top: 0; left: 0; z-index: 1031;
    width: 70px; height: 70px; border: 0; color: #fff; font-size: 20px; cursor: pointer;
    background: var(--ep-gradient-ink);
  }
  .ep-menu-btn i { transition: transform .25s var(--ep-ease); }
  body.ep-nav-open .ep-menu-btn i { transform: rotate(90deg); }
  .fixed-sidebar.left {
    top: 70px !important; height: calc(100% - 70px) !important;
    transform: translateX(-110%); transition: transform .3s var(--ep-ease); z-index: 1030 !important;
  }
  body.ep-nav-open .fixed-sidebar.left { transform: none; box-shadow: 20px 0 40px -20px rgba(11, 31, 51,.6); }
  .ep-scrim { position: fixed; inset: 70px 0 0 0; background: rgba(11, 31, 51,.45); z-index: 1029; backdrop-filter: blur(2px); }
  body.ep-nav-open .ep-scrim { display: block; }

  #site-header { padding-left: 70px !important; }
  #site-header .search-bar, #site-header .header-content-wrapper > form { display: none !important; }
  #site-header .author-page .author-name, #site-header .author-page .author-title { display: none !important; }
  #site-header .author-page { padding: 4px !important; }
  #site-header .time-header { margin-left: 6px !important; padding: 6px 10px !important; }
  #site-header .page-title h6, #site-header #sidebar-left-responsive { display: none !important; }
  #site-header .page-title { min-width: 0; }
  #site-header .control-block { margin-left: auto; margin-right: 6px !important; padding-right: 0 !important; display: flex !important; align-items: center; flex-wrap: nowrap; }
  #site-header .control-block > * { flex: none; }
  #site-header .header-content-wrapper { min-width: 0; flex: 1; display: flex; justify-content: flex-end; }

  table.table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.table thead th, table.table td { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Footer credit (host-based company: Appdeft / Vasudev Innovative Software)
   -------------------------------------------------------------------------- */
.ep-credit { font-family: var(--ep-font); font-size: 14px; }
.ep-credit__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.ep-credit__copy { color: rgba(255,255,255,.7); }
.ep-credit__by { display: inline-flex; align-items: center; gap: 14px; color: rgba(255,255,255,.7) !important; text-decoration: none !important; transition: color .2s; }
.ep-credit__by:hover { color: #fff !important; }
.ep-credit__logo img { height: 28px; width: auto; display: block; transition: transform .2s var(--ep-ease); }
.ep-credit__by:hover .ep-credit__logo img { transform: translateY(-1px); }

.ep-credit--bar { background: #06121F; border-top: 1px solid rgba(255,255,255,.06); padding: 24px 32px; }
.ep-credit--bar .ep-credit__inner { max-width: 1320px; margin: 0 auto; }
body.page-has-left-panels .ep-credit--bar { margin-top: 32px; }

.ep-credit--light .ep-credit__inner { justify-content: center; }
.ep-credit--light .ep-credit__copy, .ep-credit--light .ep-credit__by { color: var(--ep-muted) !important; font-size: 13px; }
.ep-credit--light .ep-credit__by:hover { color: var(--ep-ink) !important; }
.ep-credit--light .ep-credit__logo { background: #06121F; border-radius: 10px; padding: 6px 10px; display: inline-flex; }
.ep-credit--light .ep-credit__logo img { height: 20px; }

@media (max-width: 767px) {
  .ep-credit--bar { padding: 20px 16px 86px; }
  .ep-credit__inner { justify-content: center; text-align: center; }
}
/* Keep fixed overlays off the footer credit once it is on screen */
.ep-demo-ribbon { transition: opacity .25s, visibility .25s; }
body.ep-credit-visible .ep-demo-ribbon { opacity: 0; visibility: hidden; }
.back-to-top { transition: bottom .25s var(--ep-ease), transform .2s var(--ep-ease) !important; }
body.ep-credit-visible .back-to-top { bottom: 96px !important; }

/* ==========================================================================
   App sidebar (partials/app-sidebar) - replaces the legacy Olympus sidebars
   ========================================================================== */
:root { --ep-rail: 76px; --ep-rail-open: 260px; }

/* retire the legacy sidebars and header logo cells */
body:has(.ep-sidebar) .fixed-sidebar { display: none !important; }
body:has(.ep-sidebar) #site-header #sidebar-left-responsive { display: none !important; }
body:has(.ep-sidebar) #site-header::before { display: none !important; }
body:has(.ep-sidebar) #site-header { padding-left: var(--ep-rail) !important; }
body.page-has-left-panels:has(.ep-sidebar) { padding-left: var(--ep-rail) !important; }
body:has(.ep-sidebar) #site-header .page-title h6 { margin-left: 26px !important; }

.ep-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1035;
  width: var(--ep-rail); display: flex; flex-direction: column;
  background: var(--ep-gradient-ink); color: #C3D9E6; font-family: var(--ep-font);
  box-shadow: 1px 0 0 rgba(255,255,255,.05);
  transition: width .28s var(--ep-ease), box-shadow .28s var(--ep-ease);
  overflow: hidden;
}
.ep-sidebar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(240px 200px at 0% 0%, rgba(20, 184, 166,.35), transparent 70%),
              radial-gradient(220px 220px at 100% 100%, rgba(14, 165, 233,.18), transparent 70%);
}
.ep-sidebar:hover, .ep-sidebar:focus-within {
  width: var(--ep-rail-open);
  box-shadow: 24px 0 60px -24px rgba(11, 31, 51,.55);
}

.ep-sidebar__brand { position: relative; display: flex; align-items: center; height: 70px; padding: 0 18px; flex: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.ep-sidebar__mark { width: 40px !important; height: 40px !important; flex: none; }
.ep-sidebar__word { height: 34px; width: auto; position: absolute; left: 18px; opacity: 0; transition: opacity .2s; }
.ep-sidebar:hover .ep-sidebar__mark, .ep-sidebar:focus-within .ep-sidebar__mark { opacity: 0; }
.ep-sidebar:hover .ep-sidebar__word, .ep-sidebar:focus-within .ep-sidebar__word { opacity: 1; transition-delay: .08s; }
.ep-sidebar__mark { transition: opacity .15s; }

.ep-sidebar__scroll { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0 14px; scrollbar-width: none; }
.ep-sidebar__scroll::-webkit-scrollbar { display: none; }
.ep-sidebar__section { padding: 6px 14px; }
.ep-sidebar__section + .ep-sidebar__section { border-top: 1px solid rgba(255,255,255,.06); margin-top: 4px; padding-top: 10px; }
.ep-sidebar__heading {
  display: block; height: 18px; padding: 0 10px; margin-bottom: 4px; white-space: nowrap;
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(195, 217, 230,.55);
  opacity: 0; transition: opacity .2s;
}
.ep-sidebar:hover .ep-sidebar__heading, .ep-sidebar:focus-within .ep-sidebar__heading { opacity: 1; transition-delay: .08s; }
.ep-sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.ep-sidebar__link {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: transparent;
  color: #C3D9E6 !important; text-decoration: none !important; font-weight: 600; font-size: 14px; white-space: nowrap;
  cursor: pointer; transition: background .2s, color .2s;
}
.ep-sidebar__link i { width: 20px; text-align: center; font-size: 16px; flex: none; color: #8FB8CC; transition: color .2s, transform .2s var(--ep-ease); }
.ep-sidebar__link span { opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .22s var(--ep-ease); }
.ep-sidebar:hover .ep-sidebar__link span, .ep-sidebar:focus-within .ep-sidebar__link span { opacity: 1; transform: none; transition-delay: .06s; }
.ep-sidebar__link:hover { background: rgba(20, 184, 166,.18); color: #fff !important; }
.ep-sidebar__link:hover i { color: #fff; transform: scale(1.08); }
.ep-sidebar__link.is-active { background: linear-gradient(90deg, rgba(20, 184, 166,.42), rgba(20, 184, 166,.12)); color: #fff !important; }
.ep-sidebar__link.is-active i { color: #fff; }
.ep-sidebar__link.is-active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #5EEAD4, #38BDF8);
}
.ep-sidebar__link:focus-visible { outline: 2px solid #5EEAD4; outline-offset: -2px; }

/* tooltip while collapsed */
.ep-sidebar__link::after {
  content: attr(data-tip); position: fixed; left: calc(var(--ep-rail) + 8px); transform: translateY(-50%);
  background: #0B1F33; color: #fff; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .15s;
}

.ep-sidebar__footer { position: relative; flex: none; border-top: 1px solid rgba(255,255,255,.07); padding: 10px 14px 14px; display: grid; gap: 4px; }
.ep-sidebar__footer form { margin: 0; }
.ep-sidebar__user { display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-radius: 12px; text-decoration: none !important; white-space: nowrap; transition: background .2s; }
.ep-sidebar__user:hover { background: rgba(255,255,255,.06); }
.ep-sidebar__user img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.ep-sidebar__user span { display: flex; flex-direction: column; min-width: 0; opacity: 0; transition: opacity .18s; }
.ep-sidebar:hover .ep-sidebar__user span, .ep-sidebar:focus-within .ep-sidebar__user span { opacity: 1; transition-delay: .06s; }
.ep-sidebar__user strong { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.ep-sidebar__user small { color: #8FB8CC; font-size: 11.5px; font-weight: 600; }

/* phones: drawer */
@media (max-width: 767px) {
  body:has(.ep-sidebar) .ep-menu-btn { display: grid !important; }
  body:has(.ep-sidebar) #site-header, body.page-has-left-panels:has(.ep-sidebar) { padding-left: 0 !important; }
  body:has(.ep-sidebar) #site-header { padding-left: 70px !important; }
  .ep-sidebar { top: 70px; width: var(--ep-rail-open); transform: translateX(-105%); transition: transform .3s var(--ep-ease); }
  .ep-sidebar__brand { display: none; }
  .ep-sidebar .ep-sidebar__heading, .ep-sidebar .ep-sidebar__link span, .ep-sidebar .ep-sidebar__user span { opacity: 1; transform: none; }
  body.ep-nav-open .ep-sidebar { transform: none; box-shadow: 24px 0 60px -24px rgba(11, 31, 51,.6); }
  .ep-sidebar__link::after { display: none; }
}

/* ==========================================================================
   App footer bar: slimmer, pinned to the bottom on short pages
   ========================================================================== */
.ep-credit--bar { background: #071827; border-top: 1px solid rgba(255,255,255,.06); padding: 18px 28px; margin-top: 40px; }
.ep-credit--bar .ep-credit__inner { max-width: 1320px; }
.ep-credit--bar .ep-credit__copy { font-size: 13.5px; color: rgba(255,255,255,.6); }
.ep-credit--bar .ep-credit__by { font-size: 13.5px; }
.ep-credit--bar .ep-credit__logo img { height: 24px; }
body.page-has-left-panels .ep-credit--bar { margin-top: 40px; }
/* compact rhythm so the full menu fits on ~800px tall screens */
.ep-sidebar__link { height: 39px; }
.ep-sidebar__section { padding-top: 4px; padding-bottom: 4px; }
.ep-sidebar__section + .ep-sidebar__section { padding-top: 8px; margin-top: 2px; }
.ep-sidebar__heading { margin-bottom: 2px; }
.ep-sidebar__footer { padding-top: 8px; padding-bottom: 10px; }
.ep-sidebar__user img { width: 36px; height: 36px; }
body.ep-nav-open .ep-demo-ribbon { display: none !important; }
/* Unify Engage logo sizing in the sidebar */
.ep-sidebar__word { height: 42px; left: 14px; }
.ep-sidebar__mark { border-radius: 11px; }
