/* =========================================================
   SHJ Store — Professional Theme Override
   Navy / slate palette (replaces default purple #5156be)
   ========================================================= */

:root,
[data-bs-theme="light"],
body {
  --bs-primary: #1a365d;
  --bs-primary-rgb: 26, 54, 93;
  --bs-primary-text-emphasis: #0f2744;
  --bs-primary-bg-subtle: #e8eef5;
  --bs-primary-border-subtle: #b8c9dc;

  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;

  --bs-success: #2f855a;
  --bs-success-rgb: 47, 133, 90;
  --bs-info: #2b6cb0;
  --bs-info-rgb: 43, 108, 176;
  --bs-warning: #c05621;
  --bs-warning-rgb: 192, 86, 33;
  --bs-danger: #c53030;
  --bs-danger-rgb: 197, 48, 48;

  --bs-light: #f1f5f9;
  --bs-dark: #1a202c;

  --bs-link-color: #1a365d;
  --bs-link-hover-color: #2b6cb0;
  --bs-focus-ring-color: rgba(26, 54, 93, 0.25);

  --pro-bg: #f1f5f9;
  --pro-surface: #ffffff;
  --pro-border: #e2e8f0;
  --pro-text: #1e293b;
  --pro-muted: #64748b;
  --pro-sidebar: #0f172a;
  --pro-sidebar-text: #94a3b8;
  --pro-sidebar-active: #ffffff;
  --pro-accent: #2b6cb0;
  --pro-radius: 10px;
  --pro-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --pro-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* ---------- Base ---------- */
body {
  background-color: var(--pro-bg) !important;
  color: var(--pro-text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.main-content {
  background-color: var(--pro-bg);
}

.page-content {
  padding-top: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
  --bs-btn-bg: #1a365d;
  --bs-btn-border-color: #1a365d;
  --bs-btn-hover-bg: #153050;
  --bs-btn-hover-border-color: #153050;
  --bs-btn-active-bg: #0f2744;
  --bs-btn-active-border-color: #0f2744;
  --bs-btn-disabled-bg: #1a365d;
  --bs-btn-disabled-border-color: #1a365d;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #153050 !important;
  border-color: #153050 !important;
}

.btn-soft-primary,
.bg-primary {
  background-color: #1a365d !important;
}

.text-primary {
  color: #1a365d !important;
}

.badge.bg-primary {
  background-color: #1a365d !important;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--pro-border) !important;
  border-radius: var(--pro-radius) !important;
  box-shadow: var(--pro-shadow) !important;
  background: var(--pro-surface);
}

.card-header {
  background: var(--pro-surface) !important;
  border-bottom: 1px solid var(--pro-border) !important;
  font-weight: 600;
}

.card-title {
  color: var(--pro-text);
  font-weight: 600;
}

/* Professional stat cards (replace harsh bg-warning / bg-danger) */
.stat-card {
  border: 1px solid var(--pro-border) !important;
  border-radius: var(--pro-radius) !important;
  box-shadow: var(--pro-shadow) !important;
  overflow: hidden;
  background: var(--pro-surface) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--pro-shadow-md) !important;
  transform: translateY(-2px);
}

.stat-card .card-body {
  background: var(--pro-surface) !important;
  padding: 1.25rem 1.35rem !important;
}

.stat-card .stat-label {
  color: var(--pro-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.5rem !important;
}

.stat-card .stat-value {
  color: var(--pro-text) !important;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem !important;
}

.stat-card .stat-meta {
  color: var(--pro-muted);
  font-size: 0.9rem;
}

.stat-card .stat-badge {
  background: #e8eef5 !important;
  color: #1a365d !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.35em 0.65em;
}

.stat-card.stat-card--pages {
  border-left: 4px solid #2b6cb0 !important;
}

.stat-card.stat-card--platforms {
  border-left: 4px solid #2f855a !important;
}

.stat-card.stat-card--warning {
  border-left: 4px solid #c05621 !important;
}

.stat-card.stat-card--danger {
  border-left: 4px solid #c53030 !important;
}

/* Soften legacy full-color card bodies if still present */
.card-body.bg-warning,
.card-body.bg-danger,
.card-body.bg-success,
.card-body.bg-info,
.card-body.bg-primary {
  background: var(--pro-surface) !important;
  color: var(--pro-text) !important;
}

.card-body.bg-warning .text-muted,
.card-body.bg-danger .text-muted,
.card-body.bg-success .text-muted,
.card-body.bg-info .text-muted {
  color: var(--pro-muted) !important;
}

/* ---------- Topbar ---------- */
#page-topbar {
  background: var(--pro-surface) !important;
  border-bottom: 1px solid var(--pro-border);
  box-shadow: var(--pro-shadow);
}

.navbar-header {
  background: transparent !important;
}

.navbar-brand-box {
  background: var(--pro-sidebar) !important;
}

.header-item {
  color: var(--pro-text) !important;
}

.header-item:hover {
  color: var(--pro-accent) !important;
}

/* ---------- Sidebar ---------- */
.vertical-menu {
  background: var(--pro-sidebar) !important;
  border-right: none !important;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.12);
}

#sidebar-menu .menu-title {
  color: #64748b !important;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

#sidebar-menu ul li a {
  color: var(--pro-sidebar-text) !important;
  border-radius: 8px;
  margin: 2px 10px;
  font-weight: 500;
}

#sidebar-menu ul li a:hover,
#sidebar-menu ul li a:focus {
  color: var(--pro-sidebar-active) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

#sidebar-menu ul li a i,
#sidebar-menu ul li a svg {
  color: var(--pro-sidebar-text) !important;
}

#sidebar-menu ul li.mm-active > a,
#sidebar-menu ul li a.active {
  color: var(--pro-sidebar-active) !important;
  background: rgba(43, 108, 176, 0.22) !important;
}

#sidebar-menu ul li.mm-active > a i,
#sidebar-menu ul li.mm-active > a svg,
#sidebar-menu ul li a.active i,
#sidebar-menu ul li a.active svg {
  color: #63b3ed !important;
}

#sidebar-menu .sub-menu a {
  color: #94a3b8 !important;
  padding-left: 2.75rem !important;
}

#sidebar-menu .sub-menu a:hover {
  color: #fff !important;
}

/* ---------- Page title / breadcrumb ---------- */
.page-title-box h4 {
  color: var(--pro-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.breadcrumb-item a {
  color: var(--pro-muted);
}

.breadcrumb-item.active {
  color: var(--pro-accent);
}

/* ---------- Tables ---------- */
.table {
  --bs-table-bg: transparent;
  color: var(--pro-text);
}

.table thead th {
  background: #f8fafc !important;
  color: var(--pro-muted) !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--pro-border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #f8fafc;
}

.table-borderless th,
.table-borderless td {
  border: 0;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  border-color: var(--pro-border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--pro-text);
}

.form-control:focus,
.form-select:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 0.2rem rgba(43, 108, 176, 0.18);
}

.form-label {
  font-weight: 600;
  color: var(--pro-text);
  font-size: 0.875rem;
}

/* ---------- Accordion ---------- */
.accordion-button {
  background: #f8fafc !important;
  color: var(--pro-text) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  font-size: 0.95rem !important;
}

.accordion-button.font-size-24 {
  font-size: 1rem !important;
}

.accordion-button:not(.collapsed) {
  background: #e8eef5 !important;
  color: #1a365d !important;
}

.accordion-item {
  border-color: var(--pro-border) !important;
  border-radius: var(--pro-radius) !important;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--pro-surface) !important;
  border-top: 1px solid var(--pro-border);
  color: var(--pro-muted);
  font-size: 0.875rem;
}

.footer a {
  color: #1a365d;
  font-weight: 600;
}

/* ---------- Alerts ---------- */
.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* ---------- SweetAlert confirm ---------- */
.swal2-confirm {
  background-color: #1a365d !important;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.auth-page-pro {
  min-height: 100vh;
  background: #0f172a;
}

.auth-page-pro .auth-panel {
  background: linear-gradient(165deg, #0f172a 0%, #1a365d 55%, #1e4a7a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.auth-page-pro .auth-panel-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
}

.auth-page-pro .auth-logo img {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.auth-page-pro .auth-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-page-pro .auth-card h5 {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.35rem;
}

.auth-page-pro .auth-card .auth-sub {
  color: #64748b;
  font-weight: 500;
  font-size: 0.95rem;
}

.auth-page-pro .auth-card .form-control {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  height: 46px;
}

.auth-page-pro .auth-card .form-control:focus {
  background: #fff;
}

.auth-page-pro .auth-card .btn-signin {
  height: 46px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  background: #1a365d !important;
  border-color: #1a365d !important;
}

.auth-page-pro .auth-card .btn-signin:hover {
  background: #153050 !important;
  border-color: #153050 !important;
}

.auth-page-pro .auth-footer {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  margin-top: 1.75rem;
  text-align: center;
}

.auth-page-pro .auth-footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.auth-page-pro .auth-footer a:hover {
  color: #fff;
}

.auth-page-pro .auth-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #0f172a;
}

.auth-page-pro .auth-media video,
.auth-page-pro .auth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100vh;
}

.auth-page-pro .auth-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.15) 100%);
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .auth-page-pro .auth-media {
    display: none;
  }

  .auth-page-pro .auth-panel {
    min-height: 100vh;
  }
}

/* Centered login (no side image/video) */
.auth-page-pro.auth-page-centered {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-page-pro.auth-page-centered > .container-fluid,
.auth-page-pro.auth-page-centered > .container-fluid > .row {
  min-height: 100vh;
  width: 100%;
}

.auth-page-pro.auth-page-centered .auth-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #0f172a 0%, #1a365d 55%, #1e4a7a 100%);
}

.auth-page-pro.auth-page-centered .auth-panel-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

/* Dark mode harmony */
body[data-layout-mode="dark"],
[data-bs-theme="dark"] {
  --pro-bg: #0f172a;
  --pro-surface: #1e293b;
  --pro-border: #334155;
  --pro-text: #e2e8f0;
  --pro-muted: #94a3b8;
}

body[data-layout-mode="dark"] .card,
[data-bs-theme="dark"] .card {
  background: var(--pro-surface) !important;
}

body[data-layout-mode="dark"] #page-topbar,
[data-bs-theme="dark"] #page-topbar {
  background: #1e293b !important;
}

/* =========================================================
   GLOBAL COMPONENTS — all pages
   ========================================================= */

/* Soft badges */
.badge-soft-primary {
  color: #1a365d !important;
  background-color: rgba(26, 54, 93, 0.12) !important;
}
.badge-soft-success {
  color: #276749 !important;
  background-color: rgba(47, 133, 90, 0.14) !important;
}
.badge-soft-info {
  color: #2b6cb0 !important;
  background-color: rgba(43, 108, 176, 0.14) !important;
}
.badge-soft-warning {
  color: #9c4221 !important;
  background-color: rgba(192, 86, 33, 0.14) !important;
}
.badge-soft-danger {
  color: #9b2c2c !important;
  background-color: rgba(197, 48, 48, 0.14) !important;
}
.badge-soft-secondary {
  color: #475569 !important;
  background-color: rgba(100, 116, 139, 0.14) !important;
}

.badge.bg-success { background-color: #2f855a !important; }
.badge.bg-danger { background-color: #c53030 !important; }
.badge.bg-warning { background-color: #c05621 !important; color: #fff !important; }
.badge.bg-info { background-color: #2b6cb0 !important; }
.badge.rounded-pill { font-weight: 600; }

/* Buttons */
.btn-info {
  --bs-btn-bg: #2b6cb0;
  --bs-btn-border-color: #2b6cb0;
  --bs-btn-hover-bg: #245a94;
  --bs-btn-hover-border-color: #245a94;
}
.btn-success {
  --bs-btn-bg: #2f855a;
  --bs-btn-border-color: #2f855a;
  --bs-btn-hover-bg: #276749;
  --bs-btn-hover-border-color: #276749;
}
.btn-danger {
  --bs-btn-bg: #c53030;
  --bs-btn-border-color: #c53030;
  --bs-btn-hover-bg: #9b2c2c;
  --bs-btn-hover-border-color: #9b2c2c;
}
.btn-warning {
  --bs-btn-bg: #c05621;
  --bs-btn-border-color: #c05621;
  --bs-btn-hover-bg: #9c4221;
  --bs-btn-hover-border-color: #9c4221;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: #1a365d;
  --bs-btn-border-color: #1a365d;
  --bs-btn-hover-bg: #1a365d;
  --bs-btn-hover-border-color: #1a365d;
  --bs-btn-hover-color: #fff;
}
.btn-soft-primary {
  color: #1a365d !important;
  background-color: rgba(26, 54, 93, 0.1) !important;
  border-color: transparent !important;
}
.btn-soft-primary:hover {
  background-color: #1a365d !important;
  color: #fff !important;
}
.btn {
  border-radius: 8px;
  font-weight: 600;
}
.btn-sm {
  border-radius: 6px;
}

/* Nav pills */
.nav-pills .nav-link {
  color: var(--pro-muted);
  font-weight: 600;
  border-radius: 8px;
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #1a365d !important;
  color: #fff !important;
}

/* Modals */
.modal-content {
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  box-shadow: var(--pro-shadow-md);
}
.modal-header {
  border-bottom: 1px solid var(--pro-border);
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}
.modal-title {
  color: var(--pro-text);
  font-weight: 700;
}
.modal-footer {
  border-top: 1px solid var(--pro-border);
  background: #f8fafc;
}

/* Tables */
.table-bordered {
  border-color: var(--pro-border) !important;
}
.table-bordered > :not(caption) > * > * {
  border-color: var(--pro-border);
}
.table > :not(caption) > * > * {
  padding: 0.75rem 0.85rem;
  vertical-align: middle;
}

/* Bare table areas → card look */
.page-content .table-responsive:not(.card .table-responsive) {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow);
}

/* DataTables */
table.dataTable thead th,
.dataTables_wrapper .dataTables_scrollHead th {
  background: #f8fafc !important;
  color: var(--pro-muted) !important;
  border-bottom: 1px solid var(--pro-border) !important;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: #2b6cb0;
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(43, 108, 176, 0.18);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.page-item.active .page-link {
  background: #1a365d !important;
  border-color: #1a365d !important;
  color: #fff !important;
}
.page-link {
  color: #1a365d;
}
.page-link:hover {
  color: #2b6cb0;
}
.dt-buttons .btn,
div.dt-buttons .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--bootstrap4 .select2-selection {
  border-color: var(--pro-border) !important;
  border-radius: 8px !important;
  min-height: 38px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--bootstrap4.select2-container--focus .select2-selection {
  border-color: #2b6cb0 !important;
  box-shadow: 0 0 0 0.15rem rgba(43, 108, 176, 0.18);
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap4 .select2-results__option--highlighted {
  background-color: #1a365d !important;
}
.select2-dropdown {
  border-color: var(--pro-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--pro-shadow-md);
}

/* Chat / page lists (Recharge pages) */
.chat-list li a,
.chat-list li .d-flex {
  transition: background 0.15s ease;
}
.chat-list li.active a,
.chat-list li a:hover,
.chat-list li.active {
  background-color: rgba(43, 108, 176, 0.1) !important;
  border-color: transparent !important;
}
.page-list-item:hover,
.page-list-item.selected-row,
.selected-row {
  background-color: rgba(43, 108, 176, 0.12) !important;
}
.user-chat,
.chat-leftsidebar {
  border-color: var(--pro-border) !important;
}
.chat-leftsidebar {
  background: var(--pro-surface);
  border-radius: var(--pro-radius);
  border: 1px solid var(--pro-border);
  box-shadow: var(--pro-shadow);
}

/* Filter / search form panels */
.page-content form .row .form-label {
  margin-bottom: 0.35rem;
}
.page-title-box {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pro-border);
}

/* Input groups */
.input-group-text {
  background: #f8fafc;
  border-color: var(--pro-border);
  color: var(--pro-muted);
}
.bg-light-subtle {
  background-color: #f8fafc !important;
}

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  box-shadow: var(--pro-shadow-md);
  padding: 0.4rem;
}
.dropdown-item {
  border-radius: 6px;
  font-weight: 500;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: #e8eef5;
  color: #1a365d;
}

/* Right bar customizer */
.right-bar {
  background: var(--pro-surface) !important;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.1);
}
.rightbar-title {
  background: #1a365d !important;
  color: #fff !important;
}
.rightbar-title h5 {
  color: #fff !important;
}

/* Pagination / tabs misc */
.nav-tabs .nav-link.active {
  color: #1a365d !important;
  border-bottom-color: #1a365d !important;
  font-weight: 600;
}

/* Flatpickr / datepicker accent */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #1a365d !important;
  border-color: #1a365d !important;
}

/* Progress / waves leftover purple */
.bg-primary-subtle {
  background-color: rgba(26, 54, 93, 0.1) !important;
}
.text-primary-emphasis {
  color: #1a365d !important;
}

/* Layout wrapper consistency */
#layout-wrapper,
.layout-wrapper {
  background: var(--pro-bg);
}

/* Logo box sizing */
.navbar-brand-box .logo img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}
.navbar-brand-box .logo-lg img {
  max-height: 56px;
}

/* Invoice print area */
.invoice-container {
  background: #fff;
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow);
  padding: 1.5rem;
}

/* Alert success soft */
.alert-success {
  background: #f0fff4;
  border-color: #9ae6b4;
  color: #22543d;
}
.alert-warning {
  background: #fffaf0;
  border-color: #fbd38d;
  color: #7b341e;
}
.alert-info {
  background: #ebf8ff;
  border-color: #90cdf4;
  color: #2a4365;
}

/* Override leftover Minia purple accents */
a.text-primary,
.font-size-15.text-primary,
.sidebar-alert .alertcard-title {
  color: #1a365d !important;
}

/* Compact action button groups in tables */
td .btn.m-1 {
  margin: 0.15rem !important;
}

/* Make cards in filter sections consistent */
.card .card-body form .btn-primary {
  min-width: 110px;
}

/* Filter forms often misuse .modal-footer — clean them up */
.page-content form > .row > .modal-footer,
.page-content form .modal-footer,
.card-body form .modal-footer,
.card-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  border: 0 !important;
  background: transparent !important;
  padding: 0.25rem 0 0 !important;
  margin: 0 !important;
}

/* Soften oversized table text leftovers */
.table.font-size-18,
.table.font-size-18 td,
.table.font-size-18 th {
  font-size: 0.9rem !important;
}

/* Chat conversation area */
.chat-conversation {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow);
}

/* Secondary clear buttons look better outlined */
#clearfilter.btn-primary {
  background: transparent !important;
  color: #1a365d !important;
  border: 1px solid #1a365d !important;
}
#clearfilter.btn-primary:hover {
  background: #1a365d !important;
  color: #fff !important;
}

/* Games report — editable % column */
.report-percent-group {
  max-width: 120px;
  min-width: 96px;
}
.report-percent-input {
  text-align: right;
  font-weight: 600;
  color: #1a365d !important;
  background: #f8fafc !important;
}
.report-percent-input:focus {
  background: #fff !important;
  border-color: #2b6cb0 !important;
  box-shadow: 0 0 0 0.15rem rgba(43, 108, 176, 0.18);
}
.after-percent-col {
  font-weight: 600;
  color: #2f855a;
}

/* =========================================================
   Extended UI — DataTables, Select2, nav, badges, lists
   ========================================================= */

/* ---------- Soft / outline buttons (override early solid rule) ---------- */
.btn-soft-primary {
  background-color: #e8eef5 !important;
  color: #1a365d !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.btn-soft-primary:hover,
.btn-soft-primary:focus {
  background-color: #d4e2f0 !important;
  color: #153050 !important;
}

.btn-outline-primary {
  --bs-btn-color: #1a365d;
  --bs-btn-border-color: #1a365d;
  --bs-btn-hover-bg: #1a365d;
  --bs-btn-hover-border-color: #1a365d;
  --bs-btn-active-bg: #153050;
  --bs-btn-active-border-color: #153050;
  --bs-btn-focus-shadow-rgb: 26, 54, 93;
}

/* ---------- Nav pills ---------- */
.nav-pills .nav-link {
  color: var(--pro-muted);
  font-weight: 600;
  border-radius: 8px;
}

.nav-pills .nav-link:hover {
  color: #1a365d;
  background: rgba(43, 108, 176, 0.08);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #1a365d !important;
  color: #fff !important;
}

/* ---------- Soft badges ---------- */
.badge-soft-primary {
  background-color: #e8eef5 !important;
  color: #1a365d !important;
}

.badge-soft-success {
  background-color: #e6f4ed !important;
  color: #276749 !important;
}

.badge-soft-danger {
  background-color: #fef2f2 !important;
  color: #c53030 !important;
}

.badge-soft-warning {
  background-color: #fff7ed !important;
  color: #c05621 !important;
}

.badge-soft-info {
  background-color: #ebf4ff !important;
  color: #2b6cb0 !important;
}

/* ---------- Modals ---------- */
.modal-header {
  background: var(--pro-surface);
  border-bottom: 1px solid var(--pro-border);
  padding: 1rem 1.25rem;
}

.modal-header .modal-title {
  color: var(--pro-text);
  font-weight: 700;
}

.modal-footer {
  background: #f8fafc;
  border-top: 1px solid var(--pro-border);
  padding: 0.85rem 1.25rem;
}

.modal-content {
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow-md);
}

/* ---------- Pagination (Bootstrap + DataTables) ---------- */
.pagination .page-item .page-link {
  color: #1a365d;
  border-color: var(--pro-border);
  border-radius: 6px !important;
  margin: 0 2px;
  font-weight: 500;
}

.pagination .page-item .page-link:hover {
  background: #e8eef5;
  border-color: #b8c9dc;
  color: #153050;
}

.pagination .page-item.active .page-link,
.page-item.active .page-link {
  background-color: #1a365d !important;
  border-color: #1a365d !important;
  color: #fff !important;
}

.pagination .page-item.disabled .page-link {
  color: var(--pro-muted);
  background: #f8fafc;
}

/* ---------- Dropdown menus ---------- */
.dropdown-menu {
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-md);
  padding: 0.35rem 0;
}

.dropdown-item {
  color: var(--pro-text);
  font-weight: 500;
  padding: 0.45rem 1rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(43, 108, 176, 0.1);
  color: #1a365d;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: #1a365d;
  color: #fff;
}

.dropdown-divider {
  border-color: var(--pro-border);
}

/* ---------- Table bordered ---------- */
.table-bordered {
  border-color: var(--pro-border) !important;
}

.table-bordered > :not(caption) > * > * {
  border-color: var(--pro-border) !important;
}

.table-bordered thead th {
  border-bottom-width: 1px !important;
}

/* Bare table-responsive outside cards → card-like surface */
.page-content .table-responsive:not(.card .table-responsive) {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow);
  padding: 1rem;
}

/* ---------- Filter / search rows in cards ---------- */
.card .card-filter-bar,
.card form#searchform > .row {
  margin-bottom: 0;
}

.card-filter-actions,
.card form#searchform .card-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: none;
  background: transparent;
}

.card .card-header + .card-body form#searchform .row .mb-4 {
  margin-bottom: 1rem !important;
}

.card-body.bg-light-subtle,
.input-group.bg-light-subtle,
.input-group-text.bg-light-subtle {
  background-color: #f8fafc !important;
}

.input-group .input-group-text {
  border-color: var(--pro-border);
  color: var(--pro-muted);
  background: #f8fafc;
}

.input-group .form-control {
  border-color: var(--pro-border);
}

/* ---------- Chat / page list (sidebar lists) ---------- */
.chat-list li,
.chat-list .page-list-item {
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.chat-list li a:hover,
.chat-list li:hover,
.page-list-item:hover {
  background-color: rgba(43, 108, 176, 0.08) !important;
}

.chat-list li.active,
.chat-list li.active a,
.page-list-item.selected-row,
.selected-row {
  background-color: rgba(43, 108, 176, 0.12) !important;
}

.chat-list .unread .badge,
.chat-list .unread h5 {
  color: var(--pro-text);
}

/* ---------- Right sidebar ---------- */
.right-bar {
  background: var(--pro-surface) !important;
  border-left: 1px solid var(--pro-border);
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.08);
}

.rightbar-title {
  background: #f8fafc !important;
  border-bottom: 1px solid var(--pro-border);
}

.rightbar-title h5 {
  color: var(--pro-text);
  font-weight: 700;
}

.right-bar .form-check-input:checked {
  background-color: #1a365d;
  border-color: #1a365d;
}

.right-bar h6 {
  color: var(--pro-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- DataTables (bootstrap4) ---------- */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
  color: var(--pro-muted);
  font-weight: 600;
  font-size: 0.875rem;
}

div.dataTables_wrapper div.dataTables_length select {
  border-color: var(--pro-border);
  border-radius: 6px;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  color: var(--pro-text);
  margin: 0 0.35rem;
}

div.dataTables_wrapper div.dataTables_filter input {
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  margin-left: 0.5rem;
  color: var(--pro-text);
}

div.dataTables_wrapper div.dataTables_filter input:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 0.2rem rgba(43, 108, 176, 0.18);
  outline: 0;
}

div.dataTables_wrapper div.dataTables_info {
  color: var(--pro-muted);
  font-size: 0.875rem;
  padding-top: 0.85rem;
}

div.dataTables_wrapper div.dataTables_paginate {
  padding-top: 0.75rem;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  border: 1px solid var(--pro-border) !important;
  color: #1a365d !important;
  margin-left: 3px;
  padding: 0.35rem 0.75rem !important;
  background: var(--pro-surface) !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button:hover {
  background: #e8eef5 !important;
  border-color: #b8c9dc !important;
  color: #153050 !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.current,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.current:hover {
  background: #1a365d !important;
  border-color: #1a365d !important;
  color: #fff !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled:hover {
  color: var(--pro-muted) !important;
  background: #f8fafc !important;
  border-color: var(--pro-border) !important;
}

table.dataTable thead th,
table.dataTable thead td {
  border-bottom: 1px solid var(--pro-border) !important;
}

table.dataTable.no-footer {
  border-bottom: 1px solid var(--pro-border);
}

.dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.92);
  color: var(--pro-text);
  border: 1px solid var(--pro-border);
  border-radius: 8px;
}

/* DataTables export buttons */
.dt-buttons {
  margin-bottom: 0.75rem;
}

.dt-buttons .btn,
.dt-button {
  background: #e8eef5 !important;
  border: 1px solid #b8c9dc !important;
  color: #1a365d !important;
  border-radius: 6px !important;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  margin-right: 0.35rem;
  box-shadow: none !important;
}

.dt-buttons .btn:hover,
.dt-button:hover {
  background: #d4e2f0 !important;
  border-color: #94a3b8 !important;
  color: #153050 !important;
}

.dt-buttons .btn:active,
.dt-button:active {
  background: #1a365d !important;
  border-color: #1a365d !important;
  color: #fff !important;
}

div.dt-button-collection {
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-md);
}

div.dt-button-collection .dt-button {
  background: var(--pro-surface) !important;
  border: none !important;
  border-radius: 0 !important;
}

div.dt-button-collection .dt-button:hover {
  background: rgba(43, 108, 176, 0.1) !important;
}

/* ---------- Select2 (bootstrap4 theme) ---------- */
.select2-container--bootstrap4 .select2-selection {
  border-color: var(--pro-border) !important;
  border-radius: 8px !important;
  min-height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
  border-color: #2b6cb0 !important;
  box-shadow: 0 0 0 0.2rem rgba(43, 108, 176, 0.18);
}

.select2-container--bootstrap4 .select2-selection__rendered {
  color: var(--pro-text);
}

.select2-container--bootstrap4 .select2-results__option--highlighted,
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #1a365d !important;
  color: #fff !important;
}

.select2-container--bootstrap4 .select2-results__option--selected,
.select2-container--bootstrap4 .select2-results__option[aria-selected="true"] {
  background-color: #e8eef5 !important;
  color: #1a365d !important;
}

.select2-container--bootstrap4 .select2-dropdown {
  border-color: var(--pro-border);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-md);
}

.select2-container--bootstrap4 .select2-search__field {
  border-color: var(--pro-border);
  border-radius: 6px;
}

.select2-container--bootstrap4 .select2-search__field:focus {
  border-color: #2b6cb0;
  outline: 0;
}

.select2-container--bootstrap4 .select2-selection__choice {
  background-color: #e8eef5 !important;
  border-color: #b8c9dc !important;
  color: #1a365d !important;
}

.select2-container--bootstrap4 .select2-selection__choice__remove {
  color: #64748b !important;
}

.select2-container--bootstrap4 .select2-selection__choice__remove:hover {
  color: #c53030 !important;
}

/* Generic select2 fallback (non-bootstrap4 class) */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #1a365d;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #2b6cb0;
}

/* Accordion size utility used on dashboard */
.accordion-button.font-size-16 {
  font-size: 1rem !important;
}
