/* ================================================
   PAYDHARA ADMIN THEME - Premium Design
   Brand Colors: #6b52df (Purple), #1a1a2e (Dark), #ffffff (White)
   ================================================ */

:root {
  --primary: #6b52df;
  --primary-dark: #5a42c9;
  --primary-light: rgba(107, 82, 223, 0.1);
  --dark: #1a1a2e;
  --dark-secondary: #16213e;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ===== HEADER/NAVBAR - Light Mode ===== */
.adminor-header {
  background: var(--white) !important;
  padding: 0;
  height: 65px;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 var(--gray-200), 0 2px 8px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--gray-200);
}

.adminor-header .header-brand {
  width: 260px;
  min-width: 260px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  transition: all 0.3s ease;
  position: relative;
}

.adminor-header .header-brand::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 0;
  height: 100%;
  width: 40px;
  background: var(--white);
  clip-path: polygon(0 0, 0% 100%, 100% 100%);
}

.adminor-header .header-brand img {
  height: 150px;
  max-width: 200px;
  object-fit: contain;
}

.adminor-header .header-toggle {
  width: 50px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--gray-500);
  border: none;
  cursor: pointer;
  font-size: 22px;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.adminor-header .header-toggle:hover {
  color: var(--dark);
}

.adminor-header .header-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  height: 100%;
}

.adminor-header .header-title {
  color: var(--dark);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.3px;
}

.adminor-header .header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adminor-header .header-nav-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.adminor-header .header-nav-item:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.adminor-header .header-nav-item i {
  font-size: 20px;
}

.adminor-header .header-nav-item .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  padding: 2px 5px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--white);
}

.adminor-header .header-search {
  position: relative;
  margin-right: 15px;
}

.adminor-header .header-search input {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  padding: 10px 18px 10px 45px;
  color: var(--dark);
  width: 220px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.adminor-header .header-search input::placeholder {
  color: var(--gray-400);
}

.adminor-header .header-search input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.1);
  width: 280px;
}

.adminor-header .header-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 18px;
}

.adminor-header .header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.adminor-header .header-profile:hover {
  background: var(--gray-200);
  border-color: var(--primary);
}

.adminor-header .header-profile img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

/* ===== WALLET INFO BOX ===== */
.adminor-header .wallet-info {
  display: flex;
  gap: 12px;
  margin-right: 20px;
}

.adminor-header .wallet-box {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 16px;
  text-align: center;
  min-width: 100px;
}

.adminor-header .wallet-box small {
  display: block;
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.adminor-header .wallet-box .amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

/* ===== SIDEBAR - Light Mode White Design ===== */
.adminor-sidebar {
  position: fixed;
  top: 65px;
  left: 0;
  width: 260px;
  height: calc(100vh - 65px);
  background: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1020;
  transition: all 0.3s ease;
  border-right: 1px solid var(--gray-200);
}

/* Top accent line */
.adminor-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  z-index: 1;
}

/* Right edge glow */
.adminor-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(107, 82, 223, 0.3) 0%,
    transparent 30%,
    transparent 70%,
    rgba(107, 82, 223, 0.2) 100%
  );
  pointer-events: none;
}

.adminor-sidebar::-webkit-scrollbar {
  width: 5px;
}

.adminor-sidebar::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 5px;
}

.adminor-sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 5px;
}

.adminor-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Sidebar Menu */
.adminor-sidebar .sidebar-menu {
  padding: 15px 0;
  list-style: none;
  margin: 0;
}

.adminor-sidebar .menu-header {
  padding: 25px 20px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-400);
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.adminor-sidebar .menu-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gray-200) 0%, transparent 100%);
}

.adminor-sidebar .menu-item {
  margin: 2px 10px;
  position: relative;
}

.adminor-sidebar .menu-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.adminor-sidebar .menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 0 3px 3px 0;
}

.adminor-sidebar .menu-link:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.adminor-sidebar .menu-link:hover::before {
  opacity: 1;
}

.adminor-sidebar .menu-link i {
  font-size: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-500);
  transition: all 0.3s ease;
  background: var(--gray-100);
  border-radius: 10px;
}

.adminor-sidebar .menu-link:hover i {
  color: var(--primary);
  background: rgba(107, 82, 223, 0.15);
  transform: scale(1.05);
}

.adminor-sidebar .menu-link span {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adminor-sidebar .menu-link .menu-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
  color: var(--gray-400);
}

.adminor-sidebar .menu-item.open > .menu-link .menu-arrow {
  transform: rotate(90deg);
  color: var(--primary);
}

/* Active Menu Item */
.adminor-sidebar .menu-item.active > .menu-link {
  background: linear-gradient(
    90deg,
    rgba(107, 82, 223, 0.15) 0%,
    rgba(107, 82, 223, 0.04) 100%
  );
  color: var(--gray-800);
}

.adminor-sidebar .menu-item.active > .menu-link::before {
  opacity: 1;
  width: 4px;
}

.adminor-sidebar .menu-item.active > .menu-link i {
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 4px 15px rgba(107, 82, 223, 0.4);
}

.adminor-sidebar .menu-item.active > .menu-link .menu-arrow {
  color: var(--primary);
}

/* Submenu */
.adminor-sidebar .submenu {
  list-style: none;
  padding: 0;
  margin: 0 0 0 30px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-left: 1px solid var(--gray-200);
}

.adminor-sidebar .menu-item.open > .submenu {
  max-height: 500px;
  padding: 8px 0;
}

.adminor-sidebar .submenu .menu-item {
  margin: 0;
}

.adminor-sidebar .submenu .menu-link {
  padding: 10px 15px 10px 20px;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
  color: var(--gray-500);
  background: transparent;
}

.adminor-sidebar .submenu .menu-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 1px;
  background: var(--gray-300);
  border-radius: 0;
  opacity: 1;
}

.adminor-sidebar .submenu .menu-link::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: all 0.3s ease;
}

.adminor-sidebar .submenu .menu-link:hover {
  color: var(--gray-800);
  background: var(--gray-100);
}

.adminor-sidebar .submenu .menu-link:hover::after {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(107, 82, 223, 0.5);
}

.adminor-sidebar .submenu .menu-item.active .menu-link {
  color: var(--primary);
  font-weight: 600;
  background: rgba(107, 82, 223, 0.08);
}

.adminor-sidebar .submenu .menu-item.active .menu-link::before {
  background: var(--primary);
}

.adminor-sidebar .submenu .menu-item.active .menu-link::after {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(107, 82, 223, 0.6);
}

/* Sidebar Badge */
.adminor-sidebar .badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Sidebar Footer / User Info (Optional) */
.adminor-sidebar .sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--gray-200);
  margin-top: auto;
}

.adminor-sidebar .sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: 12px;
}

.adminor-sidebar .sidebar-user img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.adminor-sidebar .sidebar-user-info h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.adminor-sidebar .sidebar-user-info span {
  font-size: 12px;
  color: var(--gray-500);
}

/* ===== MAIN CONTENT ===== */
.adminor-main {
  margin-left: 260px;
  margin-top: 65px;
  min-height: calc(100vh - 65px);
  background: var(--gray-100);
  transition: all 0.3s ease;
}

.adminor-content {
  padding: 25px;
}

/* Page Header */
.adminor-page-header {
  background: var(--white);
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  margin: -25px -25px 25px -25px;
}

.adminor-page-header h4 {
  color: var(--dark);
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.adminor-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.adminor-breadcrumb li {
  color: var(--gray-500);
  font-size: 13px;
}

.adminor-breadcrumb li a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.adminor-breadcrumb li a:hover {
  text-decoration: underline;
}

.adminor-breadcrumb li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--gray-400);
}

/* ===== COLLAPSED SIDEBAR ===== */
body.sidebar-collapsed .adminor-header .header-brand {
  width: 75px;
  min-width: 75px;
}

body.sidebar-collapsed .adminor-header .header-brand::after {
  display: none;
}

body.sidebar-collapsed .adminor-sidebar {
  width: 75px;
}

body.sidebar-collapsed .adminor-sidebar .menu-header {
  display: none;
}

body.sidebar-collapsed .adminor-sidebar .menu-link span,
body.sidebar-collapsed .adminor-sidebar .menu-link .menu-arrow {
  display: none;
}

body.sidebar-collapsed .adminor-sidebar .menu-link {
  justify-content: center;
  padding: 10px;
}

body.sidebar-collapsed .adminor-sidebar .menu-link i {
  margin: 0;
  font-size: 22px;
  width: 45px;
  height: 45px;
}

body.sidebar-collapsed .adminor-sidebar .menu-link::before {
  display: none;
}

body.sidebar-collapsed .adminor-sidebar .submenu {
  display: none;
}

body.sidebar-collapsed .adminor-main {
  margin-left: 75px;
}

/* ===== SIDEBAR HOVER EXPAND ===== */
body.sidebar-hover-expanded .adminor-sidebar {
  width: 260px;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(107, 82, 223, 0.1);
  z-index: 1025;
}

body.sidebar-hover-expanded .adminor-sidebar .menu-header {
  display: flex;
  animation: fadeIn 0.3s ease;
}

body.sidebar-hover-expanded .adminor-sidebar .menu-link span,
body.sidebar-hover-expanded .adminor-sidebar .menu-link .menu-arrow {
  display: inline;
  animation: fadeIn 0.3s ease;
}

body.sidebar-hover-expanded .adminor-sidebar .menu-link {
  justify-content: flex-start;
  padding: 12px 15px;
}

body.sidebar-hover-expanded .adminor-sidebar .menu-link i {
  font-size: 22px;
  width: 38px;
  height: 38px;
}

body.sidebar-hover-expanded .adminor-sidebar .menu-link::before {
  display: block;
}

body.sidebar-hover-expanded .adminor-sidebar .submenu {
  display: block;
}

body.sidebar-hover-expanded.sidebar-collapsed .adminor-main {
  margin-left: 75px;
}

body.sidebar-hover-expanded.sidebar-collapsed .adminor-header .header-brand {
  width: 75px;
  min-width: 75px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== DROPDOWN MENU ===== */
.adminor-dropdown {
  position: relative;
}

.adminor-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px 0;
  display: none;
  z-index: 1050;
  margin-top: 12px;
  border: 1px solid var(--gray-200);
}

.adminor-dropdown.show .adminor-dropdown-menu {
  display: block;
  animation: dropdownFade 0.2s ease;
}

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

.adminor-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--white);
}

.adminor-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--gray-700);
  text-decoration: none;
  gap: 12px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.adminor-dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.adminor-dropdown-item i {
  font-size: 20px;
  width: 24px;
  color: var(--gray-500);
}

.adminor-dropdown-item:hover i {
  color: var(--primary);
}

.adminor-dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 8px 0;
}

.adminor-dropdown-header {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 8px;
  background: var(--gray-50);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.adminor-dropdown-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.adminor-dropdown-header h6 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.adminor-dropdown-header small {
  color: var(--gray-500);
  font-size: 12px;
}

/* ===== NOTIFICATION DROPDOWN ===== */
.notification-dropdown {
  min-width: 360px;
  padding: 0;
  max-height: 450px;
  overflow: hidden;
}

.notification-header {
  padding: 16px 20px;
  background: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.notification-header h6 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  display: flex;
  align-items: center;
}

.notification-header h6 i {
  margin-right: 10px;
  color: var(--primary);
}

.notification-header .badge {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--primary);
}

.notification-body {
  max-height: 320px;
  overflow-y: auto;
}

.notification-body::-webkit-scrollbar {
  width: 5px;
}

.notification-body::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.notification-body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 14px;
}

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

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.unread {
  background: rgba(107, 82, 223, 0.04);
  border-left: 3px solid var(--primary);
}

.notification-item.unread:hover {
  background: rgba(107, 82, 223, 0.08);
}

.notification-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon i {
  font-size: 20px;
  color: var(--white);
}

.notification-icon.bg-success {
  background: var(--success);
}
.notification-icon.bg-danger {
  background: var(--danger);
}
.notification-icon.bg-warning {
  background: var(--warning);
}
.notification-icon.bg-info {
  background: var(--primary);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  margin: 0;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

.notification-text strong {
  color: var(--primary);
  font-weight: 600;
}

.notification-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
  display: block;
}

.notification-footer {
  padding: 14px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.notification-footer a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.notification-footer a:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.adminor-footer {
  background: var(--white);
  padding: 18px 25px;
  text-align: center;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-500);
}

.adminor-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.adminor-footer a:hover {
  text-decoration: underline;
}

/* ===== CARDS ===== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--white);
  margin-bottom: 25px;
  overflow: hidden;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5,
.card-header .card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.card-body {
  padding: 24px;
}

.card-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 16px 24px;
}

/* ===== TABLES ===== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.table {
  width: 100%;
  margin-bottom: 0;
  background: var(--white);
  border-collapse: collapse;
}

.table thead th {
  background: var(--dark);
  color: var(--white);
  border: none;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  vertical-align: middle;
}

.table thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.table thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
  color: var(--gray-700);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

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

.table-striped tbody tr:nth-of-type(odd) {
  background: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background: var(--gray-100);
}

/* DataTables Styling */
.dataTables_wrapper {
  padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 20px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dataTables_wrapper .dataTables_length select {
  padding: 8px 35px 8px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--white);
  min-width: 80px;
  cursor: pointer;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  margin-left: 10px;
  min-width: 220px;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.1);
}

.dataTables_wrapper .dataTables_info {
  font-size: 13px;
  color: var(--gray-500);
  padding: 15px 0;
}

.dataTables_wrapper .dataTables_paginate {
  padding: 15px 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 8px 14px;
  margin: 0 3px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-600);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary);
  color: var(--white) !important;
  border-color: var(--primary);
  font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: var(--white);
  color: var(--gray-600) !important;
  border-color: var(--gray-300);
}

/* ===== FORMS ===== */
.form-control {
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-800);
  transition: all 0.3s ease;
  height: auto;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.1);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control:disabled,
.form-control[readonly] {
  background: var(--gray-100);
  cursor: not-allowed;
}

.form-select {
  padding: 12px 45px 12px 16px;
  font-size: 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background-color: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  display: block;
}

.form-label.required::after {
  content: "*";
  color: var(--danger);
  margin-left: 4px;
}

.input-group {
  border-radius: var(--radius);
  overflow: hidden;
}

.input-group-text {
  padding: 12px 16px;
  font-size: 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}

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

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.2);
  border-color: var(--primary);
}

.form-control[type="file"]::file-selector-button {
  padding: 10px 16px;
  margin: -12px 16px -12px -16px;
  background: var(--primary);
  border: none;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(107, 82, 223, 0.2);
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(107, 82, 223, 0.35);
}

.btn-secondary {
  background: var(--gray-600);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--gray-700);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  filter: brightness(0.9);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  filter: brightness(0.9);
}

.btn-warning {
  background: var(--warning);
  color: var(--dark);
}

.btn-warning:hover {
  filter: brightness(0.9);
}

.btn-info {
  background: var(--info);
  color: var(--white);
}

.btn-info:hover {
  filter: brightness(0.9);
}

.btn-dark {
  background: var(--dark);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--dark-secondary);
}

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

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

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

.btn-outline-dark:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ===== BADGES ===== */
.badge {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50px;
}

.badge-success,
.bg-label-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--success) !important;
}

.badge-danger,
.bg-label-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--danger) !important;
}

.badge-warning,
.bg-label-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--warning) !important;
}

.badge-info,
.bg-label-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--info) !important;
}

.badge-primary,
.bg-label-primary {
  background: rgba(107, 82, 223, 0.15) !important;
  color: var(--primary) !important;
}

.badge-dark,
.bg-label-dark {
  background: rgba(26, 26, 46, 0.15) !important;
  color: var(--dark) !important;
}

.bg-success {
  background: var(--success) !important;
}
.bg-danger {
  background: var(--danger) !important;
}
.bg-warning {
  background: var(--warning) !important;
}
.bg-info {
  background: var(--info) !important;
}
.bg-primary {
  background: var(--primary) !important;
}
.bg-dark {
  background: var(--dark) !important;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination .page-item .page-link {
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-600);
  background: var(--white);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination .page-item .page-link:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===== ALERTS ===== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  border: none;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-primary {
  background: rgba(107, 82, 223, 0.1);
  color: var(--primary);
  border-left: 4px solid var(--primary);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* ===== MODAL ===== */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: var(--dark);
  color: var(--white);
  padding: 20px 24px;
  border-bottom: none;
}

.modal-header .modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 16px 24px;
  background: var(--gray-50);
}

/* ===== EXPORT BUTTONS ===== */
.dt-buttons {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dt-buttons .dt-button {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dt-buttons .buttons-copy {
  background: var(--primary);
  color: var(--white);
}

.dt-buttons .buttons-csv,
.dt-buttons .buttons-excel {
  background: var(--success);
  color: var(--white);
}

.dt-buttons .buttons-pdf {
  background: var(--danger);
  color: var(--white);
}

.dt-buttons .buttons-print {
  background: var(--dark);
  color: var(--white);
}

.dt-buttons .dt-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
  color: var(--primary) !important;
}
.text-success {
  color: var(--success) !important;
}
.text-danger {
  color: var(--danger) !important;
}
.text-warning {
  color: var(--warning) !important;
}
.text-info {
  color: var(--info) !important;
}
.text-dark {
  color: var(--dark) !important;
}
.text-muted {
  color: var(--gray-500) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
  .adminor-header .header-search input {
    width: 180px;
  }
  .adminor-header .header-search input:focus {
    width: 220px;
  }
}

@media (max-width: 991px) {
  .adminor-header .header-brand {
    width: 200px;
    min-width: 200px;
  }
  .adminor-header .header-brand::after {
    display: none;
  }
  .adminor-header .header-search {
    display: none;
  }
  .adminor-sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .adminor-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .adminor-main {
    margin-left: 0;
  }
  body.sidebar-collapsed .adminor-main {
    margin-left: 0;
  }
  .adminor-overlay {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1015;
    backdrop-filter: blur(4px);
  }
  body.sidebar-open .adminor-overlay {
    display: block;
  }
}

@media (max-width: 767px) {
  .adminor-header {
    height: 60px;
  }
  .adminor-header .header-brand {
    width: 60px;
    min-width: 60px;
  }
  .adminor-header .header-brand img {
    height: 30px;
  }
  .adminor-header .header-toggle {
    width: 40px;
    height: 60px;
    margin-left: 5px;
  }
  .adminor-header .header-content {
    padding: 0 12px;
  }
  .adminor-header .header-title {
    display: none;
  }
  .adminor-header .header-nav-item {
    width: 38px;
    height: 38px;
  }
  .adminor-header .header-nav-item i {
    font-size: 18px;
  }
  .adminor-header .header-nav {
    gap: 5px;
  }
  .adminor-sidebar {
    top: 60px;
    height: calc(100vh - 60px);
  }
  .adminor-main {
    margin-top: 60px;
  }
  .adminor-content {
    padding: 15px;
  }
  .adminor-page-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    margin: -15px -15px 15px -15px;
    padding: 15px;
  }
  .card-body {
    padding: 16px;
  }
  .form-control,
  .form-select {
    font-size: 16px;
  }
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 575px) {
  .adminor-header .header-nav-item.hide-mobile {
    display: none;
  }
  .adminor-header .wallet-info {
    display: none !important;
  }
  .notification-dropdown {
    min-width: 300px;
    right: -50px;
  }
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode {
  background: var(--dark);
  color: var(--gray-300);
}

body.dark-mode .adminor-main {
  background: #0f0f1a;
}

body.dark-mode .adminor-content {
  background: #0f0f1a;
}

/* Dark Mode - Header */
body.dark-mode .adminor-header {
  background: var(--dark) !important;
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .adminor-header .header-brand {
  background: var(--primary);
}

body.dark-mode .adminor-header .header-brand::after {
  background: var(--primary);
}

body.dark-mode .adminor-header .header-brand img {
  filter: brightness(0) invert(1);
}

body.dark-mode .adminor-header .header-toggle {
  color: var(--gray-300);
}

body.dark-mode .adminor-header .header-toggle:hover {
  color: var(--white);
}

body.dark-mode .adminor-header .header-title {
  color: var(--white);
}

body.dark-mode .adminor-header .header-nav-item {
  color: var(--gray-300);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .adminor-header .header-nav-item .badge {
  border-color: var(--dark);
}

body.dark-mode .adminor-header .header-search input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

body.dark-mode .adminor-header .header-search input:focus {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.dark-mode .adminor-header .header-profile {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .adminor-header .header-profile:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-header .wallet-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-header .wallet-box small {
  color: var(--gray-400);
}

body.dark-mode .adminor-header .wallet-box .amount {
  color: var(--white);
}

/* Dark Mode - Sidebar */
body.dark-mode .adminor-sidebar {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .adminor-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .adminor-sidebar::-webkit-scrollbar-thumb {
  background: rgba(107, 82, 223, 0.3);
}

body.dark-mode .adminor-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 82, 223, 0.5);
}

body.dark-mode .adminor-sidebar .menu-header {
  color: rgba(255, 255, 255, 0.35);
}

body.dark-mode .adminor-sidebar .menu-header::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
}

body.dark-mode .adminor-sidebar .menu-link {
  color: rgba(255, 255, 255, 0.65);
}

body.dark-mode .adminor-sidebar .menu-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

body.dark-mode .adminor-sidebar .menu-link i {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .adminor-sidebar .menu-link:hover i {
  color: var(--primary);
  background: rgba(107, 82, 223, 0.15);
}

body.dark-mode .adminor-sidebar .menu-link .menu-arrow {
  color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .adminor-sidebar .menu-item.active > .menu-link {
  background: linear-gradient(
    90deg,
    rgba(107, 82, 223, 0.2) 0%,
    rgba(107, 82, 223, 0.05) 100%
  );
  color: var(--white);
}

body.dark-mode .adminor-sidebar .menu-item.active > .menu-link i {
  color: var(--white);
  background: var(--primary);
}

body.dark-mode .adminor-sidebar .menu-item.active > .menu-link .menu-arrow {
  color: var(--white);
}

body.dark-mode .adminor-sidebar .menu-item.open > .menu-link .menu-arrow {
  color: var(--primary);
}

body.dark-mode .adminor-sidebar .submenu {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-sidebar .submenu .menu-link {
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .adminor-sidebar .submenu .menu-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .adminor-sidebar .submenu .menu-link::before {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .adminor-sidebar .submenu .menu-link::after {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .adminor-sidebar .submenu .menu-item.active .menu-link {
  color: var(--primary);
  background: rgba(107, 82, 223, 0.08);
}

body.dark-mode .adminor-sidebar .submenu .menu-item.active .menu-link::after {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(107, 82, 223, 0.6);
}

body.dark-mode .adminor-sidebar .sidebar-footer {
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .adminor-sidebar .sidebar-user {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .adminor-sidebar .sidebar-user-info h6 {
  color: var(--white);
}

body.dark-mode .adminor-sidebar .sidebar-user-info span {
  color: rgba(255, 255, 255, 0.5);
}

/* Dark Mode - Cards */
body.dark-mode .card {
  background: var(--dark-secondary);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card-header {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .card-header h5,
body.dark-mode .card-header .card-title {
  color: var(--white);
}

body.dark-mode .card-footer {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Tables */
body.dark-mode .table {
  background: var(--dark-secondary);
  color: var(--gray-300);
}

body.dark-mode .table tbody td {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--gray-300);
}

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

/* Dark Mode - Forms */
body.dark-mode .form-control {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

body.dark-mode .form-control:focus {
  background: var(--dark);
  border-color: var(--primary);
}

body.dark-mode .form-select {
  background-color: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

body.dark-mode .form-label {
  color: var(--gray-300);
}

body.dark-mode .input-group-text {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--gray-400);
}

/* Dark Mode - Dropdown */
body.dark-mode .adminor-dropdown-menu {
  background: var(--dark-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-dropdown-menu::before {
  border-bottom-color: var(--dark-secondary);
}

body.dark-mode .adminor-dropdown-item {
  color: var(--gray-300);
}

body.dark-mode .adminor-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .adminor-dropdown-header {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-dropdown-header h6 {
  color: var(--white);
}

body.dark-mode .adminor-dropdown-divider {
  background: rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Page Header */
body.dark-mode .adminor-page-header {
  background: var(--dark-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .adminor-page-header h4 {
  color: var(--white);
}

/* Dark Mode - Footer */
body.dark-mode .adminor-footer {
  background: var(--dark-secondary);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--gray-500);
}

/* Dark Mode - Modal */
body.dark-mode .modal-content {
  background: var(--dark-secondary);
}

body.dark-mode .modal-body {
  color: var(--gray-300);
}

body.dark-mode .modal-footer {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Notification */
body.dark-mode .notification-dropdown {
  background: var(--dark-secondary);
}

body.dark-mode .notification-item {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notification-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .notification-text {
  color: var(--gray-300);
}

body.dark-mode .notification-footer {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode - DataTables */
body.dark-mode .dataTables_wrapper .dataTables_length select,
body.dark-mode .dataTables_wrapper .dataTables_filter input {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--gray-300) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary);
  color: var(--white) !important;
}

/* Dark Mode - Pagination */
body.dark-mode .pagination .page-item .page-link {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--gray-300);
}

/* Dark Mode - Text */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--white);
}

body.dark-mode .text-muted {
  color: var(--gray-500) !important;
}

body.dark-mode .bg-white {
  background: var(--dark-secondary) !important;
}

body.dark-mode .bg-light {
  background: var(--dark) !important;
}

body.dark-mode .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode hr {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode Transition */
body,
.adminor-main,
.adminor-sidebar,
.card,
.table,
.form-control,
.form-select,
.adminor-dropdown-menu,
.modal-content,
.adminor-footer {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

/* ============================================
   RESPONSIVE TABLE WITH EXPANDABLE ROWS
   ============================================ */

.table-wrapper {
  width: 100%;
  overflow: hidden;
}

.table-expandable {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.table-expandable thead th {
  white-space: nowrap;
  font-size: 12px;
  padding: 12px 10px;
}

.table-expandable tbody td {
  font-size: 13px;
  padding: 10px 8px;
  word-break: break-word;
}

/* Toggle Button */
.row-toggle {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
  line-height: 1;
}

.row-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.row-toggle.expanded {
  background: var(--danger);
}

.row-toggle.expanded::before {
  content: "−";
}

.row-toggle:not(.expanded)::before {
  content: "+";
}

/* Hidden Columns Container */
.expanded-row {
  display: none;
  background: var(--gray-50);
}

.expanded-row.show {
  display: table-row;
}

.expanded-row td {
  padding: 0 !important;
  border-top: none !important;
}

.expanded-content {
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-left: 3px solid var(--primary);
  margin: 0;
}

.expanded-content .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.expanded-content .detail-item {
  display: flex;
  flex-direction: column;
  padding: 10px 15px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.expanded-content .detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.expanded-content .detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.expanded-content .detail-value.text-success {
  color: var(--success) !important;
}

.expanded-content .detail-value.text-danger {
  color: var(--danger) !important;
}

/* Responsive Column Hiding */
@media (max-width: 1400px) {
  .table-expandable .col-hide-xl {
    display: none;
  }
}

@media (max-width: 1200px) {
  .table-expandable .col-hide-lg {
    display: none;
  }
}

@media (max-width: 992px) {
  .table-expandable .col-hide-md {
    display: none;
  }
}

@media (max-width: 768px) {
  .table-expandable .col-hide-sm {
    display: none;
  }
}

@media (max-width: 576px) {
  .table-expandable .col-hide-xs {
    display: none;
  }
}

/* Show toggle column only when there are hidden columns */
.table-expandable .col-toggle {
  width: 50px;
  text-align: center;
}

@media (min-width: 1401px) {
  .table-expandable.has-hidden-xl .col-toggle {
    display: table-cell;
  }
  .table-expandable:not(.has-hidden-xl) .col-toggle {
    display: none;
  }
}

/* Dark Mode - Expanded Row */
body.dark-mode .expanded-content {
  background: linear-gradient(
    135deg,
    var(--dark) 0%,
    var(--dark-secondary) 100%
  );
}

body.dark-mode .expanded-content .detail-item {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .expanded-content .detail-value {
  color: var(--white);
}
