/* ========================================
   SNEAT Admin – Plain HTML/CSS/JS Version
   Design System & Global Styles
======================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Game Theme Colors */
  --primary-color: #1A73E8;
  --primary-rgb: 26, 115, 232;
  --secondary-color: #2C3E50;
  --accent-color: #FFC107;

  /* Mapped Framework Colors */
  --primary: var(--primary-color);
  --primary-hover: #1557B0;
  --primary-light: rgba(26, 115, 232, 0.12);
  --primary-shadow: rgba(26, 115, 232, 0.4);
  --primary-border: rgba(50, 71, 92, 0.15);
  --primary-readable: var(--primary);
  --secondary: var(--secondary-color);
  --success: #71DD37;
  --info: #00E5FF;
  --warning: var(--accent-color);
  --error: #FF3E1D;
  --surface: #fff;
  --bg: #F5F5F9;
  --on-surface: #32475C;
  --on-primary: #fff;
  --text-primary: rgba(50, 71, 92, .9);
  --text-secondary: rgba(50, 71, 92, .7);
  --text-disabled: rgba(50, 71, 92, .38);
  --border: rgba(50, 71, 92, .12);
  --nav-width: 270px;
  --nav-width-mini: 95px;
  --topbar-h: 64px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 2px 6px rgba(50, 71, 92, .06), 0 1px 2px rgba(50, 71, 92, .04);
  --shadow-md: 0 4px 18px rgba(50, 71, 92, .1);
  --transition: .2s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Public Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--primary-readable);
  text-decoration: none !important;
}

a:hover {
  text-decoration: none !important;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ---------- Layout Shell ---------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar / Vertical Nav ---------- */
.sidebar {
  width: var(--nav-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: 100vh !important;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden;
}

body.dark-theme .sidebar {
  background-color: var(--surface);
  border-right-color: var(--border);
}

body.dark-theme .sidebar .nav-list::-webkit-scrollbar-thumb {
  background: transparent;
}

body.dark-theme .sidebar .nav-list:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

/* Sidebar scrolling managed cleanly via padding now */

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  flex-direction: column;
}

.sidebar-logo svg {
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.5px;
}

.sidebar .nav-list {
  padding: 0 0 1rem 0;
  margin: 0;
  list-style: none;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: calc(100vh - 80px) !important;
}

/* Bypass AdminLTE SlimScroll JS Wrapper Intrusions */
.sidebar .slimScrollDiv {
  height: calc(100vh - 80px) !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Eradicate internal JS generated scrollbars */
.sidebar .slimScrollBar,
.sidebar .slimScrollRail {
  display: none !important;
}

/* ---------- Extremely Thin Seamless Scrollbar for Sidebar ---------- */
.sidebar .nav-list::-webkit-scrollbar {
  width: 2px !important;
}

.sidebar .nav-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 10px;
}

.sidebar:hover .nav-list::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, 0.25);
}

.nav-section-title {
  padding: .6rem 1.5rem .25rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-disabled);
  margin-top: .5rem;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  margin: .1rem .75rem;
  /* Equal left and right margins for pillar gap */
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  position: relative;
  /* needed for ::after indicator */
}

.nav-item a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- Treeview Dropdown Support ---------- */

/* Dropdown arrow */
.nav-item.treeview>a::after {
  content: '';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform var(--transition);
  display: block;
}

.nav-item.treeview.menu-open>a::after {
  transform: translateY(-50%) rotate(45deg);
}

.sidebar-menu .treeview-menu {
  display: none;
  list-style: none;
  padding: 0 0 0 0;
  margin: 0;
}

.sidebar-menu .treeview-menu .nav-item a {
  padding-left: 3.5rem;
  /* align correctly with parent */
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-secondary);
}

.sidebar-menu .treeview-menu .nav-item.active>a {
  color: var(--primary) !important;
  font-weight: 600;
}

/* Bullet Dots for Submenu items */
.sidebar-menu .treeview-menu .nav-item a i {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 6px;
  height: 6px;
  font-size: 0;
  /* Hide default icon completely */
}

.sidebar-menu .treeview-menu .nav-item a i::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-disabled);
  display: block;
  transition: all var(--transition);
}

/* Active child dot receives halo */
.sidebar-menu .treeview-menu .nav-item.active>a i::before {
  background-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Remove right indicator from children */
.sidebar-menu .treeview-menu .nav-item.active>a::before {
  display: none !important;
}

/* Support multi-level hover correctly */
.sidebar-menu .treeview-menu .nav-item a:hover {
  background: transparent !important;
  color: var(--text-primary);
}

.sidebar-menu .treeview-menu .nav-item a:hover i::before {
  background-color: var(--text-secondary);
}

/* Right-side active indicator bar – matches original Sneat ::after */
.nav-item a.active,
.nav-item.active>a {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 12px var(--primary-shadow);
}

.nav-item a.active::before,
.nav-item.active>a::before {
  content: '';
  position: absolute;
  right: calc(-0.5rem - 4px) !important;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 2.625rem;
  background: var(--primary);
  border-radius: 6px 0 0 6px;
  /* Pill rounded on left */
  display: block;
}

.nav-item a i {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
}

.sidebar-upgrade {
  padding: 1rem;
  text-align: center;
}

.sidebar-upgrade img {
  max-width: 210px;
  margin: 0 auto;
}

/* ── Sidebar Collapsed (desktop icon-only mode) ── */
@media (min-width: 1025px) {
  .sidebar.collapsed:not(:hover) {
    width: var(--nav-width-mini);
  }

  .sidebar.collapsed:not(:hover) .sidebar-logo-text,
  .sidebar.collapsed:not(:hover) .nav-item a span,
  .sidebar.collapsed:not(:hover) .nav-section-title,
  .sidebar.collapsed:not(:hover) .sidebar-upgrade {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .sidebar.collapsed:not(:hover) .nav-item a {
    justify-content: center;
    padding: .65rem;
    margin: .1rem .5rem;
  }

  .sidebar.collapsed:not(:hover) .nav-item a i {
    font-size: 1.25rem;
    width: auto;
    margin: 0;
  }

  .sidebar.collapsed:not(:hover) .sidebar-logo {
    justify-content: center;
    padding: 1.25rem .75rem;
  }

  /* Hide submenu entirely in collapsed mode (text is invisible but items still take up space) */
  .sidebar.collapsed:not(:hover) .treeview-menu {
    display: none !important;
  }

  /* Main content shifts precisely with the mathematical width */
  .main-content.sidebar-collapsed {
    margin-left: var(--nav-width-mini);
  }
}


/* ---------- Main Content Area ---------- */
.main-content {
  margin-left: var(--nav-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
  min-width: 0;
  /* Prevents flex blowout from wide tables */
}

/* ---------- Top Bar (floating/contained style matching original) ---------- */
.topbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: .75rem 1.5rem 0;
  background: transparent;
  pointer-events: none;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: .5rem;
  box-shadow: 0 4px 8px -4px rgba(50, 71, 92, .16), 0 2px 4px rgba(50, 71, 92, .12);
  pointer-events: all;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.topbar-row-toggle {
  display: none;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .375rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .2s;
}

.theme-color-wrapper {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
}

.theme-color-wrapper input[type="color"] {
  position: absolute;
  width: 150%;
  height: 150%;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  opacity: 0;
}

.theme-color-wrapper i {
  font-size: 1.25rem;
  color: var(--primary);
  pointer-events: none;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: background var(--transition), color var(--transition);
}

.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.icon-btn a {
  color: inherit;
  display: flex;
  align-items: center;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-disabled);
  cursor: pointer;
}

.search-trigger .meta-key {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: .7rem;
}

/* User Avatar / Profile */
.user-profile {
  position: relative;
}

.user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--primary-light);
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar .online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid #fff;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
}

.dropdown-user-header .user-avatar-sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.dropdown-user-header .user-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-user-header .user-avatar-sm .online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid #fff;
}

.dropdown-user-name {
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.2;
}

.dropdown-user-role {
  font-size: .75rem;
  color: var(--text-disabled);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: .25rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  color: var(--text-secondary);
  font-size: .875rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

.dropdown-item i {
  font-size: 1.1rem;
  width: 1rem;
  text-align: center;
}

/* ---------- Dropdown Animation ---------- */
.dropdown-menu.smooth-anim {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.smooth-anim.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Rake Badge UI ---------- */
.rake-badge {
  padding: 0.35rem 0.5rem 0.35rem 0.5rem;
  border-radius: 50rem;
  /* pill shape */
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.rake-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rake-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

/* Metric Cards Icons Fix */
.metric-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 4.5rem;
  /* Ensure consistent content height */
}

.metric-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.metric-card-info .text-muted {
  line-height: 1.1;
  min-height: 1.8rem;
  /* Reserve space for potentially 2 lines */
  display: flex;
  align-items: flex-end;
}


.metric-card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.25rem;
  flex-shrink: 0;
}



.bg-label-info {
  background: rgba(0, 229, 255, 0.16);
  color: var(--info);
}

.bg-label-info .rake-icon {
  color: var(--info);
}

.bg-label-primary {
  background: var(--primary-light);
  color: var(--primary-readable);
  border: 1px solid var(--primary-border);
}

.bg-label-primary .rake-icon {
  color: var(--primary-readable);
}

.rake-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.rake-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.8;
}

.rake-value {
  font-size: 0.875rem;
  font-weight: 700;
}

.rake-badge .btn {
  border-radius: 50rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

/* ---------- Dropdown Transfer Form ---------- */
.transfer-dropdown-menu {
  width: 270px;
  padding: 1rem !important;
}

.transfer-dropdown-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.transfer-mb {
  margin-bottom: 1rem;
}

.transfer-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--text-secondary);
}

.transfer-input {
  padding: 0.5rem 0.75rem !important;
}

.transfer-btn {
  padding: 0.6rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------- User Profile Chips Widget ---------- */
.chips-wallet-widget {
  background: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin: 0.25rem 0;
  overflow: hidden;
}

.chips-wallet-widget:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.chips-wallet-label {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.chips-wallet-label i {
  font-size: 1.15rem;
  margin-right: 0.6rem;
  color: var(--primary);
}

.chips-wallet-value {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  font-family: inherit;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-info {
  background: var(--info);
  border: 1px solid var(--info);
  color: #fff;
}

.btn-info:hover {
  background: #02a9cd;
  border-color: #02a9cd;
  color: #fff;
}

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

/* ---------- Page Content ---------- */
.page-content {
  padding: 1.5rem;
  flex: 1;
  min-width: 0;
  /* Prevents flex blowout from wide containers */
}

/* ---------- Row / Col Grid ---------- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0rem;
}

.col {
  padding: .75rem;
  flex: 1 1 0;
  min-width: 0;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  min-width: 0;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
}

.col-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  min-width: 0;
}

.col-8 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
  min-width: 0;
}

.col-5 {
  flex: 0 0 41.666%;
  max-width: 41.666%;
  min-width: 0;
}

.col-7 {
  flex: 0 0 58.333%;
  max-width: 58.333%;
  min-width: 0;
}

.col-3 {
  flex: 0 0 25%;
  max-width: 25%;
  min-width: 0;
}

.col-9 {
  flex: 0 0 75%;
  max-width: 75%;
  min-width: 0;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem .75rem;
  gap: .5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: .8rem;
  color: var(--text-disabled);
  margin-top: .1rem;
}

.card-body {
  padding: 1rem 1.5rem 1.5rem;
}

.card-body-nb {
  padding: 0 1.5rem 1.5rem;
}

/* No top padding */

/* ---------- Stats Card (Vertical) ---------- */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.stat-card-icon img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.stat-card-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card-title {
  font-size: .8rem;
  color: var(--text-secondary);
}

.stat-card-change {
  font-size: .8rem;
  font-weight: 600;
}

.stat-card-change.positive {
  color: var(--success);
}

.stat-card-change.negative {
  color: var(--error);
}

/* ---------- Legacy Info Box mapped to Stat Card ---------- */
.info-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.info-box-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: .25rem;
  display: block;
}

/* Map AdminLTE background classes to Sneat text colors */
.info-box-icon.bg-aqua,
.info-box-icon.bg-info {
  color: var(--info);
}

.info-box-icon.bg-red,
.info-box-icon.bg-danger {
  color: var(--error);
}

.info-box-icon.bg-green,
.info-box-icon.bg-success {
  color: var(--success);
}

.info-box-icon.bg-yellow,
.info-box-icon.bg-warning {
  color: var(--warning);
}

.info-box-icon.bg-blue,
.info-box-icon.bg-primary {
  color: var(--primary);
}

.info-box-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.info-box-text {
  font-size: .8rem;
  color: var(--text-secondary);
}

.info-box-number {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ---------- Congratulations Card ---------- */
.congrats-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.congrats-card-inner {
  display: flex;
  align-items: center;
  min-height: 175px;
}

.congrats-card-body {
  padding: 2rem 1.5rem;
  flex: 1;
}

.congrats-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}

.congrats-card-text {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.congrats-card-image {
  width: 195px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.congrats-card-image img {
  width: 175px;
}

@media (max-width: 768px) {
  .congrats-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .congrats-card-body {
    padding-bottom: 0;
  }
}


/* ---------- Transaction List ---------- */
.transaction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: .875rem;
}

.transaction-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.transaction-icon img {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
}

.transaction-icon.error {
  background: rgba(234, 84, 85, .12);
}

.transaction-icon.primary {
  background: var(--primary-light);
}

.transaction-icon.info {
  background: rgba(0, 207, 232, .12);
}

.transaction-icon.success {
  background: rgba(40, 199, 111, .12);
}

.transaction-icon.warning {
  background: rgba(255, 159, 67, .12);
}

.transaction-meta {
  flex: 1;
  min-width: 0;
}

.transaction-method {
  font-size: .75rem;
  color: var(--text-disabled);
}

.transaction-desc {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.transaction-amount {
  font-size: .875rem;
  font-weight: 600;
  text-align: right;
}

.transaction-amount.plus {
  color: var(--success);
}

.transaction-amount.minus {
  color: var(--error);
}

.transaction-usd {
  font-size: .75rem;
  color: var(--text-disabled);
}

/* ---------- Order Statistics ---------- */
.order-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1rem;
}

.order-item {
  display: flex;
  align-items: center;
  gap: .875rem;
}

.order-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.order-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.order-icon.success {
  background: rgba(40, 199, 111, .12);
  color: var(--success);
}

.order-icon.info {
  background: rgba(0, 207, 232, .12);
  color: var(--info);
}

.order-icon.secondary {
  background: rgba(168, 170, 174, .12);
  color: var(--secondary);
}

.order-meta {
  flex: 1;
  min-width: 0;
}

.order-title {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.order-subtitle {
  font-size: .75rem;
  color: var(--text-disabled);
}

.order-amount {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Finance Tabs ---------- */
.tabs {
  display: flex;
  gap: .25rem;
  padding: .25rem;
  background: var(--bg);
  border-radius: 9999px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: .4rem 1rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.finance-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem 1.5rem .25rem;
}

.finance-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.finance-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.finance-stats {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.finance-label {
  font-size: .8rem;
  color: var(--text-secondary);
}

.finance-change {
  font-size: .8rem;
  font-weight: 600;
}

.finance-change.positive {
  color: var(--success);
}

.finance-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem 1.25rem;
}

.progress-ring {
  flex-shrink: 0;
}

.finance-week-title {
  font-size: .875rem;
  font-weight: 500;
}

.finance-week-sub {
  font-size: .75rem;
  color: var(--text-disabled);
}

/* ---------- Tables Page ---------- */
.table-section {
  margin-bottom: 1.5rem;
}

.table-section .card-header {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  display: block;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  white-space: nowrap;
}

thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(115, 103, 240, .04);
}

td.text-center,
th.text-center {
  text-align: center;
}

table.table-dark thead th {
  background: #2F2B3D;
  color: rgba(255, 255, 255, .7);
}

table.table-dark tbody tr {
  background: #312d4b;
  color: rgba(255, 255, 255, .9);
}

table.table-dark tbody td {
  border-color: rgba(255, 255, 255, .08);
}

table.table-dark tbody tr:hover {
  background: rgba(255, 255, 255, .04);
}

table.table-dense thead th,
table.table-dense tbody td {
  padding: .4rem 1rem;
}

.table-scrollable {
  max-height: 300px;
  overflow-y: auto;
}

/* Fixed header table */
.table-fixed-header {
  border-collapse: separate;
  border-spacing: 0;
}

.table-fixed-header thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ---------- Forms Page ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}

.form-control {
  width: 100%;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
  color: var(--text-disabled);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-left: 2.5rem;
}

.input-with-icon i {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-disabled);
  font-size: 1.1rem;
}

.input-right-icon {
  position: relative;
}

.input-right-icon .form-control {
  padding-right: 2.5rem;
}

.input-right-icon button.toggle-pw {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-disabled);
  font-size: 1.1rem;
  padding: 0;
}

.input-right-icon button.toggle-pw:hover {
  color: var(--primary);
}

.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .875rem;
  color: var(--text-secondary);
}

.justify-content-end {
  display: flex;
  justify-content: flex-end;
}

.form-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-error {
  font-size: .75rem;
  color: var(--error);
  margin-top: .25rem;
  display: none;
}

.form-group.has-error .form-control {
  border-color: var(--error);
}

.form-group.has-error .form-error {
  display: block;
}

.form-horizontal .form-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.form-horizontal .form-group label {
  flex: 0 0 140px;
  padding-top: .6rem;
  margin-bottom: 0;
  text-align: right;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary-border);
  box-shadow: 0 4px 12px var(--primary-shadow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
  box-shadow: 0 6px 16px var(--primary-shadow);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(115, 103, 240, .2);
}

.btn-sm {
  padding: .35rem .9rem;
  font-size: .8rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Auth Pages ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 448px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem 1.75rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.auth-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.auth-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-disabled);
  font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-providers {
  display: flex;
  justify-content: center;
  gap: .75rem;
}

.auth-provider-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-provider-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-provider-btn.facebook {
  color: #4267b2;
}

.auth-provider-btn.twitter {
  color: #1da1f2;
}

.auth-provider-btn.github {
  color: #333;
}

.auth-footer-text {
  text-align: center;
  font-size: .875rem;
  margin-top: 1rem;
  color: var(--text-secondary);
}

.auth-footer-text a {
  font-weight: 600;
}

/* ---------- Footer ---------- */
.app-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-disabled);
}

.app-footer a {
  color: var(--primary);
  font-weight: 500;
}

/* ---------- Chip / Badge ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
}

.chip-warning {
  background: rgba(255, 159, 67, .15);
  color: var(--warning);
}

.chip-success {
  background: rgba(40, 199, 111, .15);
  color: var(--success);
}

.chip-primary {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- Circular Progress (SVG) ---------- */
.circular-progress {
  position: relative;
  display: inline-flex;
}

.circular-progress svg {
  transform: rotate(-90deg);
}

.circular-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Mobile Overlay Sidebar ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 99;
}

.sidebar-overlay.open {
  display: block;
}

/* ---------- Responsive ─ All Screen Sizes ---------- */

/* Utility: show/hide helpers */
.d-none {
  display: none !important;
}

.d-flex {
  display: flex !important;
}

.d-md-flex {
  display: flex;
}

/* ── ≤1280px – Large tablet / small laptop ── */
@media (max-width: 1280px) {
  .col-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ── ≤1024px – Tablet: sidebar off-canvas ── */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    width: var(--nav-width) !important;
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
    z-index: 100;
  }

  .main-content {
    margin-left: 0 !important;
  }

  /* Topbar wrapper: no side padding on tablet – it spans full width */
  .topbar-wrapper {
    padding: .5rem .75rem 0;
  }

  .topbar {
    border-radius: var(--radius);
  }

  /* Collapse breakpoint columns to full-width */
  .col-8,
  .col-4,
  .col-5,
  .col-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ── ≤768px – Mobile / small tablet ── */
@media (max-width: 768px) {
  :root {
    --topbar-h: 56px;
  }

  /* Keep topbar floating and exactly match page-content padding for perfect width alignment */
  .topbar-wrapper {
    padding: .875rem .875rem 0;
    background: transparent;
  }

  .topbar {
    height: auto;
    min-height: 56px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar-left {
    width: auto;
  }

  .topbar-right {
    flex: 1;
    display: flex;
    flex-direction: row;
    /* Horizontal top line first */
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    margin-left: 0.5rem;
    gap: 0;
  }

  .topbar-row {
    padding: 2px 0;
  }

  /* LINE 1 Positioning: All items pushed to the RIGHT */
  .topbar-row-theme {
    order: 1;
    margin: 0 0 0 0.5rem;
  }

  .topbar-row-profile {
    order: 2;
    margin: 0 0 0 0.5rem;
  }

  .topbar-row-toggle {
    order: 3;
    display: flex !important;
    margin: 0 0 0 0.5rem;
  }

  /* LINE 2 & 3: Rakes (Hidden by default, full width when shown) */
  .topbar-row-admin-rake,
  .topbar-row-rake,
  .topbar-row-theme-color {
    display: none;
    width: 100%;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(-10px);
  }

  /* Show Rakes and Theme Color when toggled */
  .topbar-right.show-mobile .topbar-row-admin-rake,
  .topbar-right.show-mobile .topbar-row-rake,
  .topbar-right.show-mobile .topbar-row-theme-color {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: slideDownFade 0.3s ease forwards;
    align-items: center;
  }

  .topbar-row-theme-color {
    order: 4;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 10px;
  }

  .topbar-row-admin-rake {
    order: 5;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 10px;
  }

  .topbar-row-rake {
    order: 6;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  @keyframes slideDownFade {
    from {
      opacity: 0;
      transform: translateY(-15px);
    }

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

  .page-content {
    padding: .875rem;
  }

  /* Stack most columns */
  .col-6,
  .col-3,
  .col-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Keep 2-col for stat cards at tablet */
  .stat-cols .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Horizontal form: stack labels */
  .form-horizontal .form-group {
    flex-direction: column;
  }

  .form-horizontal .form-group label {
    text-align: left;
    padding-top: 0;
    flex: none;
    width: auto;
  }

  /* Topbar search text hidden on mobile */
  .search-trigger span {
    display: none;
  }

  /* Footer stack */
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
  }

  /* Row negative margin reduced */
  .row {
    margin: -.5rem;
  }

  .col,
  .col-12,
  .col-6,
  .col-4,
  .col-8,
  .col-3,
  .col-9 {
    padding: .5rem;
  }
}

/* ── ≤576px – Small mobile: fully single column ── */
@media (max-width: 576px) {
  .stat-cols .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .page-content {
    padding: .625rem;
  }

  .topbar-wrapper {
    padding: .625rem .625rem 0;
  }

  .topbar {
    padding: 0 .75rem;
    gap: .25rem;
  }

  /* Smaller icon buttons */
  .icon-btn {
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
  }

  /* Auth card */
  .auth-card {
    padding: 1.5rem 1rem;
  }

  /* Only hide congrats illustration on very small screens */
  .congrats-card-image {
    display: none;
  }
}

/* ── ≤400px – Very small phones ── */
@media (max-width: 400px) {

  /* Account for smaller screens, keep exact alignment */
  .page-content {
    padding: .5rem;
  }

  .topbar-wrapper {
    padding: .5rem .5rem 0;
  }

  /* Hide GitHub icon from topbar on very small screens */
  .topbar .icon-btn[aria-label="GitHub"] {
    display: none;
  }

  .card-body {
    padding: .875rem 1rem 1rem;
  }

  .card-header {
    padding: 1rem 1rem .75rem;
  }
}


/* ---------- Utility ---------- */
.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: .25rem;
}

.gap-2 {
  gap: .5rem;
}

.gap-3 {
  gap: .75rem;
}

.gap-4 {
  gap: 1rem;
}

.flex-1 {
  flex: 1;
}

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

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

.text-error {
  color: var(--error);
}

.text-disabled {
  color: var(--text-disabled);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fs-sm {
  font-size: .8rem;
}

.fs-xs {
  font-size: .72rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: .25rem;
}

.mb-2 {
  margin-bottom: .5rem;
}

.w-100 {
  width: 100% !important;
}

.hidden {
  display: none !important;
}

/* ---------- Theme Toggle ---------- */
/* ---------- Dark Theme – exact colors from theme.js ---------- */
body.dark-theme {
  --success: #71DD37;
  --info: #00E5FF;
  --warning: var(--accent-color);
  --error: #FF3E1D;
  --surface: #1E293B;
  --bg: #0F172A;
  --on-surface: #DBDBEB;
  --text-primary: rgba(241, 245, 249, .9);
  --text-secondary: rgba(241, 245, 249, .7);
  --text-disabled: rgba(241, 245, 249, .38);
  --border: rgba(241, 245, 249, .12);
}

body.dark-theme .sidebar {
  background: #1E293B;
  border-color: rgba(241, 245, 249, .08);
}

body.dark-theme .topbar {
  background: #1E293B;
  box-shadow: 0 4px 8px -4px rgba(20, 21, 33, .2);
}

body.dark-theme .card,
body.dark-theme .auth-card,
body.dark-theme .stat-card {
  background: #1E293B;
}

body.dark-theme .congrats-card {
  background: #1E293B;
}

body.dark-theme .dropdown-menu {
  background: #1E293B;
  border-color: rgba(241, 245, 249, .12);
}

body.dark-theme .tabs {
  background: #0F172A;
}

body.dark-theme .tab-btn.active {
  background: #1E293B;
}

body.dark-theme .form-control {
  background: #1b2335;
  border-color: rgba(241, 245, 249, .12);
  color: var(--text-primary);
}

body.dark-theme tbody tr {
  background: #1E293B;
  color: rgba(241, 245, 249, .9);
}

body.dark-theme tbody td {
  border-color: rgba(241, 245, 249, .08);
}

body.dark-theme th {
  background: #0F172A;
  color: rgba(241, 245, 249, .6);
}

body.dark-theme thead th {
  background: #0F172A;
  color: rgba(241, 245, 249, .6);
}

body.dark-theme .sidebar-logo-text {
  color: rgba(241, 245, 249, .9);
}

body.dark-theme .topbar-wrapper {
  background: transparent;
}

@media (max-width: 768px) {
  body.dark-theme .topbar {
    box-shadow: 0 4px 8px -4px rgba(11, 14, 31, .6), 0 2px 4px rgba(11, 14, 31, .4);
  }
}


/* ---------- Page Transition ---------- */
body.dark-theme .rake-badge.bg-label-info {
  background: rgba(0, 229, 255, 0.16);
}

body.dark-theme .rake-badge.bg-label-info .rake-icon {
  background: rgba(0, 0, 0, 0.25);
}

body.dark-theme .rake-badge.bg-label-primary {
  background: var(--primary-light);
}

body.dark-theme .rake-badge.bg-label-primary .rake-icon {
  background: rgba(0, 0, 0, 0.25);
}

#page-container {
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* =========================================================================
   SNEAT DASHBOARD COMPONENT STYLES 
   ========================================================================= */

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--surface);
  background-clip: border-box;
  border: 0 solid transparent;
  border-radius: .5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

body.dark-theme .card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
  /* Slightly reduced padding */
}

.card-header {
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 0;
  background-color: transparent;
  border-bottom: 0 solid transparent;
}

.card-title,
.section-title {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  /* Exactly 16px */
}


/* Avatar / Icon Container */
.avatar {
  position: relative;
  width: 2.375rem;
  height: 2.375rem;
  cursor: pointer;
  flex-shrink: 0;
}

.avatar .avatar-initial {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .375rem;
  font-size: 1.15rem;
}

/* Label Colors */
.bg-label-primary {
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

body.dark-theme .bg-label-primary {
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

.bg-label-success {
  background-color: rgba(113, 221, 55, 0.16) !important;
  color: #71dd37 !important;
}

body.dark-theme .bg-label-success {
  background-color: rgba(113, 221, 55, 0.3) !important;
  color: #71dd37 !important;
}

.bg-label-info {
  background-color: rgba(0, 229, 255, 0.16) !important;
  color: #00e5ff !important;
}

body.dark-theme .bg-label-info {
  background-color: rgba(0, 229, 255, 0.3) !important;
  color: #00e5ff !important;
}

.bg-label-warning {
  background-color: rgba(255, 193, 7, 0.16) !important;
  color: #ffc107 !important;
}

body.dark-theme .bg-label-warning {
  background-color: rgba(255, 193, 7, 0.3) !important;
  color: #ffc107 !important;
}

.bg-label-danger {
  background-color: rgba(255, 62, 29, 0.16) !important;
  color: #ff3e1d !important;
}

body.dark-theme .bg-label-danger {
  background-color: rgba(255, 62, 29, 0.3) !important;
  color: #ff3e1d !important;
}

/* Dashboard Typography */
.card-subtitle {
  color: var(--text-disabled);
  font-size: 0.8125rem;
  margin-top: -0.25rem;
  margin-bottom: 0;
  display: block;
}

.card-title-lg {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Flex Utilities */
.d-flex {
  display: flex !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.flex-column {
  flex-direction: column !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.pb-3 {
  padding-bottom: 1rem !important;
}

.pb-1 {
  padding-bottom: 0.25rem !important;
}

.justify-content-center {
  justify-content: center !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

/* =========================================================================
   DATATABLES NATIVE OVERRIDE FOR SNEAT (Latest Game History)
   ========================================================================= */

.dataTables_wrapper::after {
  content: "";
  display: table;
  clear: both;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_length {
  padding: 1.25rem 1.5rem;
  float: left;
  color: var(--text-secondary);
}

.dataTables_wrapper .dataTables_filter {
  padding: 1.25rem 1.5rem;
  float: right;
  color: var(--text-secondary);
}


.dataTables_wrapper::after {
  content: "";
  display: table;
  clear: both;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  display: inline-block;
  width: auto;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  padding: 0.422rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  background-color: var(--card-bg);
  background-clip: padding-box;
  transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0.25rem 0.05rem rgba(26, 115, 232, 0.1);
}

/* Ensure same line behavior on tablet and above */
@media (min-width: 576px) {

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    max-width: 50%;
  }
}

.dataTables_wrapper .dataTables_info {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  float: left;
  display: flex !important;
  align-items: center;
  min-height: 3.5rem;
}

.dataTables_wrapper .dataTables_paginate {
  padding: 1rem 1.5rem;
  float: right;
  display: flex !important;
  align-items: center;
  min-height: 3.5rem;
}

.dataTables_wrapper .dataTables_paginate span {
  display: flex;
  gap: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.45rem 0.9rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  color: var(--text-primary) !important;
  background-color: transparent !important;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  margin-left: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
  border-color: var(--primary);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--on-primary) !important;
  box-shadow: 0 0.125rem 0.375rem var(--primary-shadow);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  color: var(--text-disabled) !important;
  border-color: var(--border) !important;
  cursor: default;
  opacity: 0.6;
}

/* DataTables Buttons Styling */
.dt-buttons {
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.dt-button {
  padding: 0.45rem 0.9rem;
  border-radius: 0.375rem;
  border: none !important;
  color: var(--primary) !important;
  background-color: var(--primary-light) !important;
  background-image: none !important;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dt-button:hover {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
  box-shadow: 0 0.125rem 0.375rem var(--primary-shadow);
}

/* Mobile alignment for buttons and DataTables elements */
@media (max-width: 767.98px) {
  .dt-buttons {
    justify-content: center;
    padding: 1rem;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    padding: 1rem;
    float: none;
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    padding: 1rem;
    float: none;
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}



.btn-label-secondary {
  color: #2c3e50;
  background-color: #ebeef0;
  border-color: transparent;
}

.btn-label-secondary:hover {
  background-color: #e1e4e8 !important;
  color: #717b8a !important;
}

body.dark-theme .btn-label-secondary {
  background-color: #334155;
  color: #a3adbb;
}

body.dark-theme .btn-label-secondary:hover {
  background-color: #3f3f5a !important;
  color: #cbd3df !important;
}

/* Bootstrap 5 Modal Polyfill CSS */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  background-color: rgba(34, 48, 62, 0.4);
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.5rem auto;
  pointer-events: none;
  max-width: 500px;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3rem);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: var(--surface, #fff);
  background-clip: padding-box;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.2));
  border-radius: var(--radius-lg, 0.5rem);
  outline: 0;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border, #d9dee3);
  border-top-left-radius: calc(var(--radius-lg, 0.5rem) - 1px);
  border-top-right-radius: calc(var(--radius-lg, 0.5rem) - 1px);
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid var(--border, #d9dee3);
  border-bottom-right-radius: calc(var(--radius-lg, 0.5rem) - 1px);
  border-bottom-left-radius: calc(var(--radius-lg, 0.5rem) - 1px);
}

.modal-footer>* {
  margin: 0.25rem;
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: var(--text-primary, #000);
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
  cursor: pointer;
}

body.dark-theme .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.btn-close:hover {
  opacity: 0.75;
}

/* DataTables Empty State Centering */
.dataTables_empty {
  text-align: center !important;
  padding: 2rem !important;
  color: #697a8d !important;
}

/* Sneat Label Buttons */
.btn-label-primary {
  color: var(--primary);
  background-color: var(--primary-light);
  border-color: transparent;
}

.btn-label-primary:hover {
  color: var(--primary) !important;
  background-color: var(--primary-light) !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 var(--primary-shadow);
}

.btn-label-secondary {
  color: #2c3e50;
  background-color: #ebeef0;
  border-color: transparent;
}

.btn-label-secondary:hover {
  color: #2c3e50 !important;
  background-color: #e2e6e9 !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(44, 62, 80, 0.4);
}

.btn-label-success {
  color: #71dd37;
  background-color: #e8fadf;
  border-color: transparent;
}

.btn-label-success:hover {
  color: #71dd37 !important;
  background-color: #d1f4be !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(113, 221, 55, 0.4);
}

.btn-label-info {
  color: #00e5ff;
  background-color: #d7f5fc;
  border-color: transparent;
}

.btn-label-info:hover {
  color: #00e5ff !important;
  background-color: #c9effa !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(0, 229, 255, 0.4);
}

.btn-label-warning {
  color: #ffc107;
  background-color: #fff2d6;
  border-color: transparent;
}

.btn-label-warning:hover {
  color: #ffc107 !important;
  background-color: #ffe8b3 !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(255, 193, 7, 0.4);
}

.btn-label-danger {
  color: #ff3e1d;
  background-color: #ffe2dd;
  border-color: transparent;
}

.btn-label-danger:hover {
  color: #ff3e1d !important;
  background-color: #ffc4bb !important;
  border-color: transparent !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(255, 62, 29, 0.4);
}

/* Modernize DateRangePicker to match Sneat UI */
.daterangepicker {
  border-radius: 0.5rem !important;
  box-shadow: 0 0.25rem 1rem rgba(161, 172, 184, 0.45) !important;
  border: none !important;
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !important;
  z-index: 1090 !important;
}

.daterangepicker .ranges li {
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
}

.daterangepicker .ranges li.active {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
  border-color: var(--primary) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: var(--primary) !important;
  border-color: transparent !important;
  color: var(--on-primary) !important;
  border-radius: 50% !important;
}

.daterangepicker td.in-range {
  background-color: var(--primary-light) !important;
  border-color: transparent !important;
  color: var(--primary) !important;
}

.daterangepicker .btn-success.applyBtn {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--on-primary) !important;
  border-radius: 0.375rem;
}

.daterangepicker .btn-success.applyBtn:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: 0 0.125rem 0.25rem 0 var(--primary-shadow);
}

.daterangepicker .btn-default.cancelBtn {
  border-radius: 0.375rem;
  background-color: #ebeef0;
  color: #2c3e50;
  border: none;
}

.daterangepicker .btn-default.cancelBtn:hover {
  background-color: #e2e6e9;
}

/* Fix Daterangepicker Table Squishing caused by Sneat global table padding */
.daterangepicker .calendar-table table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
  padding: 0.25rem !important;
  min-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 24px !important;
  text-align: center !important;
}

.daterangepicker .drp-calendar {
  max-width: none !important;
  padding: 0.5rem !important;
}

.daterangepicker.show-ranges.opensright .drp-calendar.left {
  border-left: 1px solid var(--border) !important;
}

/* DateRangePicker Dark Mode */
.dark-theme .daterangepicker {
  background-color: #1E293B !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4) !important;
  color: #cbd5e1 !important;
}

.dark-theme .daterangepicker .calendar-table {
  background-color: #1E293B !important;
  border: none !important;
}

.dark-theme .daterangepicker .calendar-table table {
  background-color: transparent !important;
}

.dark-theme .daterangepicker .calendar-table td,
.dark-theme .daterangepicker .calendar-table th {
  color: #cbd5e1 !important;
}

.dark-theme .daterangepicker .calendar-table .next span,
.dark-theme .daterangepicker .calendar-table .prev span {
  border-color: #cbd5e1 !important;
}

.dark-theme .daterangepicker td.off,
.dark-theme .daterangepicker td.off.in-range,
.dark-theme .daterangepicker td.off.start-date,
.dark-theme .daterangepicker td.off.end-date {
  background-color: #1E293B !important;
  color: #64748b !important;
}

.dark-theme .daterangepicker td.available:hover,
.dark-theme .daterangepicker th.available:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.dark-theme .daterangepicker .ranges li:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.dark-theme .daterangepicker .drp-buttons {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .daterangepicker .drp-selected {
  color: #cbd5e1 !important;
}

.dark-theme .daterangepicker:after {
  border-bottom-color: #1E293B !important;
}

.dark-theme .daterangepicker:before {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   Tempus Dominus v6 — Global Styling (Sneat Design System)
   ============================================================ */

/* ---- COMMON / LIGHT MODE DEFAULTS ---- */
.tempus-dominus-widget {
  font-family: 'Public Sans', sans-serif !important;
  border-radius: 0.5rem !important;
}

/* Hover & Active states for Light Mode */
.tempus-dominus-widget.light .date-container-days .dow {
  color: #677e97 !important;
  /* Sneat body text color */
}

.tempus-dominus-widget.light .date-container-days div:not(.no-highlight):hover,
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight):hover,
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight):hover,
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight):hover,
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight):hover,
.tempus-dominus-widget.light .toolbar div:hover {
  background: var(--primary) !important;
  color: var(--on-primary) !important;
}

.tempus-dominus-widget.light .date-container-days div.active:not(.no-highlight),
.tempus-dominus-widget.light .date-container-months div.active:not(.no-highlight),
.tempus-dominus-widget.light .date-container-years div.active:not(.no-highlight),
.tempus-dominus-widget.light .time-container-clock div.active:not(.no-highlight),
.tempus-dominus-widget.light .time-container-hour div.active:not(.no-highlight),
.tempus-dominus-widget.light .time-container-minute div.active:not(.no-highlight),
.tempus-dominus-widget.light .time-container-second div.active:not(.no-highlight) {
  background: var(--primary) !important;
  color: var(--on-primary) !important;
}

/* Today indicator for Light Mode */
.tempus-dominus-widget.light .date-container-days div.today::before {
  border-bottom-color: var(--primary) !important;
}

/* ---- DARK MODE OVERRIDES (Scoped to .dark-theme) ---- */
.dark-theme .tempus-dominus-widget,
.tempus-dominus-widget {
  z-index: 9999 !important;
}

.dark-theme .tempus-dominus-widget {
  background-color: #1E293B !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.4) !important;
}

/* Force dark backgrounds on tables/containers */
.dark-theme .tempus-dominus-widget table,
.dark-theme .tempus-dominus-widget .time-container,
.dark-theme .tempus-dominus-widget .time-container table {
  background-color: transparent !important;
}

.dark-theme .tempus-dominus-widget .picker-header,
.dark-theme .tempus-dominus-widget .calendar-header,
.dark-theme .tempus-dominus-widget .toolbar,
.dark-theme .tempus-dominus-widget .picker-footer {
  background-color: #252636 !important;
  color: #cbd5e1 !important;
}

/* Cells & Buttons text in Dark Mode */
.dark-theme .tempus-dominus-widget td.day,
.dark-theme .tempus-dominus-widget td.month,
.dark-theme .tempus-dominus-widget td.year,
.dark-theme .tempus-dominus-widget td.hour,
.dark-theme .tempus-dominus-widget td.minute,
.dark-theme .tempus-dominus-widget .picker-header .btn,
.dark-theme .tempus-dominus-widget .calendar-header .btn,
.dark-theme .tempus-dominus-widget th.picker-switch,
.dark-theme .tempus-dominus-widget .toolbar .btn,
.dark-theme .tempus-dominus-widget .picker-footer .btn,
.dark-theme .tempus-dominus-widget .time-container span {
  color: #cbd5e1 !important;
  background-color: transparent !important;
}

/* Dark Mode Hover & Active — Sneat purple */
.dark-theme .tempus-dominus-widget td.day:hover,
.dark-theme .tempus-dominus-widget td.month:hover,
.dark-theme .tempus-dominus-widget td.year:hover,
.dark-theme .tempus-dominus-widget td.hour:hover,
.dark-theme .tempus-dominus-widget td.minute:hover,
.dark-theme .tempus-dominus-widget th.prev:hover,
.dark-theme .tempus-dominus-widget th.next:hover,
.dark-theme .tempus-dominus-widget th.picker-switch:hover,
.dark-theme .tempus-dominus-widget .toolbar .btn:hover,
.dark-theme .tempus-dominus-widget .picker-footer .btn:hover {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
}

.dark-theme .tempus-dominus-widget td.day.active,
.dark-theme .tempus-dominus-widget td.month.active,
.dark-theme .tempus-dominus-widget td.year.active,
.dark-theme .tempus-dominus-widget td.hour.active,
.dark-theme .tempus-dominus-widget td.minute.active {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
}

/* Misc Dark Mode fixes */
.dark-theme .tempus-dominus-widget th.dow {
  color: #8a8eb8 !important;
}

.dark-theme .tempus-dominus-widget td.day.old,
.dark-theme .tempus-dominus-widget td.day.new,
.dark-theme .tempus-dominus-widget td.day.disabled {
  color: #64748b !important;
}

.dark-theme .tempus-dominus-widget .separator {
  color: #cbd5e1 !important;
}

.dark-theme .tempus-dominus-widget td.day.today::before {
  border-bottom-color: var(--primary) !important;
}

.h-100 {
  height: 100% !important;
}

/* ============================================================
   Compatibility Layer & Global Overrides (Moved from Templates)
   ============================================================ */

/* AdminLTE to Sneat Compatibility Layer */
.box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border: none !important;
}

.box-header {
  padding: 1.25rem 1.5rem .75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.box-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.box-body {
  padding: 1.5rem;
}

.box-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: transparent;
}

/* Info Boxes */
.info-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.info-box-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #fff;
}

.info-box-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-box-text {
  font-size: .8125rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.info-box-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

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

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

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

/* Tables */
.table-responsive {
  border: none !important;
}

.table thead th {
  background: var(--bg);
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* Buttons */
.btn-flat {
  border-radius: var(--radius) !important;
}

/* Select2 integration */
.select2-container--default .select2-selection--single {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  height: 38px !important;
  border-radius: var(--radius) !important;
  transition: all var(--transition);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px !important;
  padding-left: 12px !important;
  color: var(--text-primary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

.select2-dropdown {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-md) !important;
  z-index: 1060 !important;
}

.select2-container--default .select2-results__option {
  color: var(--text-primary) !important;
  padding: 8px 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary) !important;
  color: #fff !important;
}

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

.select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: var(--bg) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius) !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--text-disabled) !important;
}

/* Utility overrides */
#username {
  text-transform: lowercase;
}

.hedarModeColor {
  background-color: var(--error) !important;
}

.note-container {
  font-size: 16px;
  color: var(--error);
  font-weight: 700;
}

/* Table Action Buttons */
.table-action-btn {
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  transition: all var(--transition);
  cursor: pointer;
}

.table-action-btn:hover {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 4px var(--primary-shadow);
  transform: translateY(-1px);
}

body.dark-theme .table-action-btn {
  background: var(--primary-light) !important;
}

/* SweetAlert Dark Mode Fix */
body.dark-theme .sweet-alert {
  background-color: var(--surface) !important;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .sweet-alert h2,
body.dark-theme .sweet-alert p {
  color: var(--text-primary) !important;
}

body.dark-theme .sweet-alert .sa-icon.sa-success::before,
body.dark-theme .sweet-alert .sa-icon.sa-success::after,
body.dark-theme .sweet-alert .sa-icon.sa-success .sa-fix {
  background-color: var(--surface) !important;
}

body.dark-theme .sweet-alert .sa-button-container .cancel {
  background-color: var(--secondary) !important;
  color: #fff !important;
}

body.dark-theme .sweet-alert .sa-button-container .confirm {
  box-shadow: 0 2px 4px var(--primary-shadow) !important;
}

/* Label Buttons Dark Mode */
body.dark-theme .btn-label-primary {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

body.dark-theme .btn-label-primary:hover {
  background: rgba(var(--primary-rgb), 0.24) !important;
}

body.dark-theme .btn-label-success {
  background: rgba(113, 221, 55, 0.16) !important;
  color: #71dd37 !important;
}

body.dark-theme .btn-label-success:hover {
  background: rgba(113, 221, 55, 0.24) !important;
}

body.dark-theme .btn-label-info {
  background: rgba(var(--info-rgb), 0.16) !important;
  color: var(--info) !important;
}

body.dark-theme .btn-label-info:hover {
  background: rgba(var(--primary-rgb), 0.24) !important;
}

body.dark-theme .btn-label-warning {
  background: rgba(255, 193, 7, 0.16) !important;
  color: #ffc107 !important;
}

body.dark-theme .btn-label-warning:hover {
  background: rgba(255, 193, 7, 0.24) !important;
}

body.dark-theme .btn-label-danger {
  background: rgba(255, 62, 29, 0.16) !important;
  color: #ff3e1d !important;
}

body.dark-theme .btn-label-danger:hover {
  background: rgba(255, 62, 29, 0.24) !important;
}

/* DateRangePicker Dark Mode Overrides */
body.dark-theme .daterangepicker {
  background-color: #1E293B !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .daterangepicker:before {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .daterangepicker:after {
  border-bottom-color: #1E293B !important;
}

body.dark-theme .daterangepicker .calendar-table {
  background-color: #1E293B !important;
  border: none !important;
}

body.dark-theme .daterangepicker .calendar-table td,
body.dark-theme .daterangepicker .calendar-table th {
  color: #cbd5e1 !important;
}

body.dark-theme .daterangepicker .calendar-table .next span,
body.dark-theme .daterangepicker .calendar-table .prev span {
  border-color: #cbd5e1 !important;
}

body.dark-theme .daterangepicker select.monthselect,
body.dark-theme .daterangepicker select.yearselect,
body.dark-theme .daterangepicker select.hourselect,
body.dark-theme .daterangepicker select.minuteselect,
body.dark-theme .daterangepicker select.secondselect,
body.dark-theme .daterangepicker select.ampmselect {
  background-color: #334155 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  border-radius: 0.25rem !important;
  padding: 2px !important;
}

body.dark-theme .daterangepicker .calendar-table td.available:hover,
body.dark-theme .daterangepicker .calendar-table th.available:hover {
  background-color: var(--primary-light) !important;
  color: #fff !important;
}

body.dark-theme .daterangepicker td.off,
body.dark-theme .daterangepicker td.off.in-range,
body.dark-theme .daterangepicker td.off.start-date,
body.dark-theme .daterangepicker td.off.end-date {
  background-color: transparent !important;
  color: #64748b !important;
}

body.dark-theme .daterangepicker td.in-range {
  background-color: rgba(var(--primary-rgb), 0.08) !important;
  color: #cbd5e1 !important;
}

body.dark-theme .daterangepicker td.active,
body.dark-theme .daterangepicker td.active:hover {
  background-color: var(--primary) !important;
  color: #fff !important;
}

body.dark-theme .daterangepicker .drp-buttons {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background-color: #1E293B !important;
}

body.dark-theme .daterangepicker .drp-selected {
  color: #cbd5e1 !important;
}

body.dark-theme .daterangepicker .btn-default.cancelBtn {
  background-color: rgba(44, 62, 80, 0.16) !important;
  color: #2c3e50 !important;
  border: none !important;
}

body.dark-theme .daterangepicker .btn-default.cancelBtn:hover {
  background-color: rgba(44, 62, 80, 0.24) !important;
}

body.dark-theme .daterangepicker .ranges li {
  color: #cbd5e1 !important;
}

body.dark-theme .daterangepicker .ranges li:hover {
  background-color: var(--primary-light) !important;
}

/* True Mobile-First Grid for Snapshot Compatibility */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

[class*="col-"] {
  position: relative;
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

/* Mobile First Defaults */
.col-12,
.col-xs-12,
.col-sm-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-6,
.col-xs-6,
.col-sm-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.col-4,
.col-xs-4,
.col-sm-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.col-3,
.col-xs-3,
.col-sm-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.col-8,
.col-xs-8,
.col-sm-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}

/* Tablet and Landscape Breakpoints */
@media (min-width: 768px) {
  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }

  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* Desktop and Large Breakpoints */
@media (min-width: 992px) {
  .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }

  .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* Content Layout */
.content-header {
  padding: 0 0 1.5rem 0;
}

.content-header h1 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.content-header h1 small {
  font-size: .875rem;
  color: var(--text-disabled);
  font-weight: 400;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-top: .5rem;
  display: flex;
  list-style: none;
  font-size: .8125rem;
}

.breadcrumb li+li::before {
  content: "/";
  padding: 0 .5rem;
  color: var(--text-disabled);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb .active {
  color: var(--text-primary);
  font-weight: 500;
}

.content {
  padding: 0;
}

/* Box/Card refinement */
.box-header.with-border {
  border-bottom: 1px solid var(--border);
}

.box-tools {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.btn-box-tool {
  padding: .25rem;
  background: transparent;
  border: none;
  color: var(--text-disabled);
  cursor: pointer;
  font-size: .875rem;
  transition: color var(--transition);
}

.btn-box-tool:hover {
  color: var(--text-secondary);
}

.box-danger {
  border-top: 3px solid var(--error) !important;
}

.box-info {
  border-top: 3px solid var(--info) !important;
}

.box-primary {
  border-top: 3px solid var(--primary) !important;
}

.box-warning {
  border-top: 3px solid var(--warning) !important;
}

.box-success {
  border-top: 3px solid var(--success) !important;
}

.pull-right {
  margin-left: auto;
}

.pull-left {
  margin-right: auto;
}

/* Users List */
.users-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.users-list>li {
  width: 25%;
  text-align: center;
  padding: .5rem;
}

.users-list>li img {
  border-radius: 50%;
  max-width: 60px;
  height: auto;
  margin: 0 auto .5rem;
}

.users-list-name {
  font-weight: 600;
  font-size: .8rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-list-date {
  color: var(--text-disabled);
  font-size: .7rem;
}

/* Product List */
.products-list {
  list-style: none;
  padding: 0;
}

.products-list .item {
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  display: flex;
  align-items: center;
}

.products-list .item:last-child {
  border-bottom: none;
}

.product-img {
  margin-right: 1rem;
}

.product-img img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-primary);
}

.product-description {
  font-size: .8rem;
  color: var(--text-disabled);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Chart Legend */
.chart-legend {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-bottom: .25rem;
}

.chart-legend li i {
  font-size: .75rem;
}

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

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

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

/* Badges & Labels */
.badge {
  display: inline-block;
  padding: .25em .6em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25rem;
}

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

.bg-label-success {
  background: rgba(113, 221, 55, .12) !important;
  color: var(--success) !important;
}

.bg-label-info {
  background: rgba(0, 229, 255, .12) !important;
  color: var(--info) !important;
}

.bg-label-warning {
  background: rgba(255, 193, 7, .12) !important;
  color: var(--warning) !important;
}

.bg-label-danger {
  background: rgba(255, 62, 29, .12) !important;
  color: var(--error) !important;
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* Nav Pilled (Stacked) */
.nav-stacked>li {
  border-bottom: 1px solid var(--border);
}

.nav-stacked>li:last-child {
  border-bottom: none;
}

.nav-stacked>li>a {
  display: flex;
  justify-content: space-between;
  padding: .65rem 0;
  color: var(--text-secondary);
  font-size: .875rem;
}

/* Sidebar specific overrides for Admin Panel */
.sidebar-menu .treeview-menu {
  display: none;
  list-style: none;
  padding: 0 0 0 .5rem;
}

.sidebar-menu .treeview.menu-open>.treeview-menu {
  display: block;
}

/* Responsive Tables & Scrollbars (Moved from scripts.html) */
.table-responsive {
  /* overflow-x: auto !important; */
  /* -webkit-overflow-scrolling: touch; */
}

.dataTables_wrapper .table-responsive,
.card-datatable {
  /* overflow-x: auto !important; */
  /* -webkit-overflow-scrolling: touch; */
}

.table-responsive>table,
.card-datatable>table {
  /* min-width: 600px; */
}

.table th:last-child,
.table td:last-child {
  min-width: 60px;
}

.table-responsive::-webkit-scrollbar,
.card-datatable::-webkit-scrollbar {
  height: 4px;
}

.table-responsive::-webkit-scrollbar-track,
.card-datatable::-webkit-scrollbar-track {
  background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb,
.card-datatable::-webkit-scrollbar-thumb {
  background: rgba(67, 89, 113, 0.3);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.card-datatable::-webkit-scrollbar-thumb:hover {
  background: rgba(67, 89, 113, 0.6);
}

@media (max-width: 767px) {

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: left !important;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    text-align: center !important;
  }

  .dt-buttons {
    flex-wrap: wrap;
  }
}

/* Datetimepicker Fixes */
.card,
.card-body {
  overflow: visible !important;
}

.bootstrap-datetimepicker-widget {
  z-index: 1060 !important;
  background: #fff;
  border: 0 solid rgba(67, 89, 113, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 1rem rgba(161, 172, 184, 0.45);
  padding: 0.5rem;
}

.dark-theme .bootstrap-datetimepicker-widget {
  background: #2b2c40;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4);
}

.dark-theme .bootstrap-datetimepicker-widget th.picker-switch {
  color: #cbcbe2;
}

.dark-theme .bootstrap-datetimepicker-widget th.picker-switch:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dark-theme .bootstrap-datetimepicker-widget table td.day:hover,
.dark-theme .bootstrap-datetimepicker-widget table td.hour:hover,
.dark-theme .bootstrap-datetimepicker-widget table td.minute:hover,
.dark-theme .bootstrap-datetimepicker-widget table td.second:hover {
  background: rgba(255, 255, 255, 0.05);
}

.bootstrap-datetimepicker-widget span.bx {
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  margin: 0 !important;
  display: inline-block !important;
  font-family: 'boxicons' !important;
  font-size: 1.5rem;
  color: #696cff;
  padding: 5px;
}

.bootstrap-datetimepicker-widget th.prev,
.bootstrap-datetimepicker-widget th.next {
  cursor: pointer;
}

.bootstrap-datetimepicker-widget th.prev:hover span.bx,
.bootstrap-datetimepicker-widget th.next:hover span.bx {
  background: rgba(105, 108, 255, 0.1);
  border-radius: 50%;
}

.bootstrap-datetimepicker-widget th.picker-switch {
  font-weight: 600;
  color: #566a7f;
  cursor: pointer;
}

.bootstrap-datetimepicker-widget th.picker-switch:hover {
  background: #f5f5f9;
  border-radius: 0.375rem;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
  background-color: #696cff !important;
  color: #fff !important;
  text-shadow: none;
  border-radius: 0.375rem;
}

.bootstrap-datetimepicker-widget table td.today:before {
  border-bottom-color: #696cff;
}

.bootstrap-datetimepicker-widget .timepicker-picker a.btn {
  background: transparent;
  border: none;
  padding: 0;
}

.bootstrap-datetimepicker-widget .timepicker-picker a.btn:hover span.bx {
  background: rgba(105, 108, 255, 0.1);
  border-radius: 50%;
}

/* Authentication Pages (Moved from login.html) */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #566a7f;
  text-transform: lowercase;
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 500;
  color: #566a7f;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-subtitle {
  color: #697a8d;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.9375rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  /* color: #566a7f; */
  color: var(--text-secondary);
  text-transform: uppercase;
}

.alert {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  position: relative;
}

.alert-danger {
  color: #ff3e1d;
  background-color: #ffe5e0;
  border-color: #ff3e1d;
}

.alert-success {
  color: #71dd37;
  background-color: #e8fadf;
  border-color: #71dd37;
}

.forgot-password {
  font-size: 0.8125rem;
  color: #696cff;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Dashboard Specific Overrides */
.dashboard-header-title {
  color: var(--text-primary);
  margin-top: 1rem;
}

.game-usage-wrap {
  min-height: 130px;
}

.users-list-date-sm {
  font-size: .75rem;
}

.product-desc-sm {
  font-size: .8125rem;
}

/* ====================================================================
   Global DataTables UI Fixes for Sneat (Bootstrap 5)
   ==================================================================== */
.dataTables_wrapper .dataTables_length {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.dataTables_wrapper .dataTables_length select {
  display: inline-block;
  width: auto;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #697a8d;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2332475c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #d9dee3;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  appearance: none;
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  font-weight: 400;
}

.dataTables_wrapper .dataTables_filter input {
  display: inline-block;
  width: auto;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #697a8d;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #d9dee3;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dataTables_wrapper .dataTables_info {
  padding-top: 0.85em;
  color: #697a8d;
}

.dataTables_wrapper .dataTables_paginate {
  margin: 0;
  white-space: nowrap;
  text-align: right;
  padding-top: 0.25em;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  box-sizing: border-box;
  display: inline-block;
  min-width: 1.5em;
  padding: 0.375rem 0.75rem;
  margin-left: 2px;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  color: #697a8d !important;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  border: 1px solid #696cff;
  background-color: #696cff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
  cursor: default;
  color: #a1acb8 !important;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #697a8d !important;
  border: 1px solid #d9dee3;
  background-color: #f5f5f9;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:active {
  outline: none;
  background-color: #e8e8f0;
  box-shadow: inset 0 0 3px #111;
}

/* Dark Mode Overrides */
body.dark-theme .dataTables_wrapper .dataTables_length select,
body.dark-theme .dataTables_wrapper .dataTables_filter input {
  color: #cbcbe2;
  background-color: #2b2c40;
  border-color: #444564;
}

body.dark-theme .dataTables_wrapper .dataTables_length select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbcbe2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.dark-theme .dataTables_wrapper .dataTables_length select:focus,
body.dark-theme .dataTables_wrapper .dataTables_filter input:focus {
  border-color: #696cff;
  outline: none;
}

body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #cbcbe2 !important;
}

body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  color: #7071a4 !important;
}

body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #323249;
  border-color: #444564;
}

body.dark-theme .dataTables_wrapper .dataTables_info {
  color: #cbcbe2;
}

@media (max-width: 767.98px) {

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: left;
  }

  .dataTables_wrapper .dataTables_length label,
  .dataTables_wrapper .dataTables_filter label {
    justify-content: flex-start;
  }

  .dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
    text-align: center;
  }

  .dataTables_wrapper .dataTables_info {
    text-align: center;
  }
}

/* =========================================================================
   PREMIUM CUSTOM DESIGN OVERRIDES & THEME IMPROVEMENTS
   ========================================================================= */

/* Smooth Global Transitions */
body,
.card,
.sidebar,
.topbar,
.form-control,
.btn,
.dropdown-menu {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorphism Cards in Dark Mode */
body.dark-theme .card,
body.dark-theme .auth-card,
body.dark-theme .stat-card {
  background: rgba(30, 41, 59, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(241, 245, 249, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25) !important;
}

/* Subtle elevation and glow on card hover */
.card {
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .card:hover {
  border-color: rgba(var(--primary-rgb), 0.25) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(var(--primary-rgb), 0.05) !important;
}

/* Live Pulsing Badge Components */
.status-pulse-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: middle;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  z-index: 2;
}

.status-pulse-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  opacity: 0;
  z-index: 1;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.3);
    opacity: 0.8;
  }

  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Premium gradient overlay for congratulations card */
body.dark-theme .congrats-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(30, 41, 59, 0.7) 100%) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
}

/* Skeleton Loading styles */
.skeleton-loading {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.6s infinite ease-in-out;
}

@keyframes skeleton-shine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* =========================================================================
   SELECT2 CUSTOM DESIGN SYSTEM COMPATIBILITY
   ========================================================================= */

.select2-container--default .select2-selection--single {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid var(--border) !important;
  background-color: var(--surface) !important;
  border-radius: 0.375rem !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary) !important;
  padding-left: 12px !important;
  font-size: 0.9375rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--text-secondary) transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--text-secondary) transparent !important;
}

.select2-dropdown {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 4px 18px rgba(50, 71, 92, 0.1) !important;
  z-index: 9999 !important;
}

.select2-results__option {
  color: var(--text-primary) !important;
  padding: 8px 12px !important;
  font-size: 0.9375rem;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
}

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

.select2-results__group {
  font-weight: 600 !important;
  color: var(--text-disabled) !important;
  background-color: var(--bg) !important;
  padding: 6px 12px !important;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-theme .select2-container--default .select2-selection--single {
  background-color: #1b2335 !important;
}

body.dark-theme .select2-results__group {
  background-color: #0F172A !important;
}

/* =========================================================================
   FORM VALIDATION ERRORS
   ========================================================================= */

label.error, .error-message, .help-block.form-error, span.invalid-feedback, .invalid-feedback {
  color: #ff3e1d !important;
  font-size: 85%;
  margin-top: 0.25rem;
  display: block;
  font-weight: 500;
}

body.dark-theme label.error, body.dark-theme .error-message, body.dark-theme .help-block.form-error, body.dark-theme span.invalid-feedback, body.dark-theme .invalid-feedback {
  color: #ff5c40 !important;
}

input.error, select.error, textarea.error, .is-invalid {
  border-color: #ff3e1d !important;
}

body.dark-theme input.error, body.dark-theme select.error, body.dark-theme textarea.error, body.dark-theme .is-invalid {
  border-color: #ff5c40 !important;
}