/* ==========================================================================
   Modern Admin Dashboard UI Theme - "Neo-Glass" & Clean Aesthetic
   ========================================================================== */

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

:root {
  /* Brand Colors - Sophisticated Indigo/Violet */
  --primary-base: #6366f1;
  /* Indigo 500 */
  --primary-dark: #4338ca;
  /* Indigo 700 */
  --primary-light: #818cf8;
  /* Indigo 400 */
  --primary-subtle: #e0e7ff;
  /* Indigo 100 */

  --secondary-base: #ec4899;
  /* Pink 500 */

  --accent-base: #06b6d4;
  /* Cyan 500 */

  /* Functional Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Neutrals */
  --bg-body: #f3f4f6;
  /* Gray 100 */
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --text-main: #111827;
  /* Gray 900 */
  --text-secondary: #4b5563;
  /* Gray 600 */
  --text-muted: #9ca3af;
  /* Gray 400 */

  /* Dimensions & Spacing */
  --sidebar-width: 260px;
  --header-height: 72px;
  --card-radius: 24px;
  --btn-radius: 12px;

  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  /* Primary glow */

  --glass-blur: blur(12px);
  --border-subtle: 1px solid rgba(229, 231, 235, 0.5);
  /* Gray 200 equivalent */

  --font-family: "Kanit", sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Global Reset & Typography
   ========================================================================== */
body {
  font-family: var(--font-family) !important;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.025em;
  /* Tighter headings */
}

a {
  text-decoration: none;
  color: var(--primary-base);
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.content-wrapper {
  margin-left: var(--sidebar-width);
  padding-top: calc(var(--header-height) + 2rem);
  /* Add space for separated header */
  padding-bottom: 2rem;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.main-content {
  padding: 0 2rem;
  margin: 0 auto;
}

/* ==========================================================================
   Sidebar (Modern Dark)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  background: #0f172a;
  /* Slate 900 */
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* BRAND LOGO STYLES */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
  margin: 0;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-family);
  letter-spacing: 0.5px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.brand-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

.sidebar-menu {
  flex: 1;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

/* Sidebar Links */
.nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  /* Slate 500 */
  margin: 1.5rem 0.5rem 0.5rem;
  font-weight: 700;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: #94a3b8;
  /* Slate 400 */
  border-radius: var(--btn-radius);
  margin-bottom: 4px;
  font-weight: 400;
  transition: var(--transition-smooth);
}

.nav-link i {
  width: 24px;
  text-align: center;
  margin-right: 12px;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  transform: translateX(4px);
}

.nav-link:hover i {
  color: var(--primary-light);
}

.nav-link.active {
  background: var(--primary-base);
  color: white !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.nav-link.active i {
  color: white;
}

/* ==========================================================================
   Navbar (Floating Glass)
   ========================================================================== */
.navbar-custom {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--header-height);
  z-index: 1030;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(229, 231, 235, 0.4);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar-custom .user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 6px 8px 6px 16px;
  border-radius: 999px;
  /* Pill */
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.navbar-custom .user-profile:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-subtle);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-subtle);
  color: var(--primary-base);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ==========================================================================
   Dashboard Cards
   ========================================================================== */
.card-dashboard {
  background: var(--bg-surface);
  border-radius: var(--card-radius);
  border: var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-dashboard-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.card-dashboard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-subtle);
}

/* Stat Cards specialized */
.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  /* Soft colored backgrounds instead of simple solid */
  position: relative;
  overflow: hidden;
}

/* Variant backgrounds for icons */
.icon-primary {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #4338ca;
}

.icon-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
}

.icon-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}

.icon-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #b91c1c;
}

.icon-info {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0284c7;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(120deg,
      var(--primary-dark) 0%,
      var(--primary-base) 100%);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(67, 56, 202, 0.3);
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 1.79 4 4 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 2.24 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 2.24 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom thead th {
  background: #f9fafb;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.table-custom tbody tr:hover td {
  background-color: #f8fafc;
}

.table-custom td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text-main);
  font-size: 0.95rem;
}

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

/* ==========================================================================
   Utilities & Animations
   ========================================================================== */
.fade-in-up {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

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

.delay-1 {
  animation-delay: 100ms;
}

.delay-2 {
  animation-delay: 200ms;
}

.delay-3 {
  animation-delay: 300ms;
}

/* Status Badges */
.badge-soft-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-soft-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-soft-danger {
  background-color: #fee2e2;
  color: #b91c1c;
}

.badge-soft-info {
  background-color: #e0f2fe;
  color: #075985;
}

.badge-soft-primary {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .content-wrapper {
    margin-left: 0;
  }

  .navbar-custom {
    left: 0;
  }
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */
/* Global Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  /* Slate 400 with opacity */
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.8);
}

/* Sidebar Specific Scrollbar */
.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

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

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Top-Of-Page Progress Bar (Determinate Logic)
   ========================================================================== */
.header-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-progress-value {
  width: 0%;
  /* Start at 0 */
  height: 100%;
  /* Solid High-Contrast Gradient */
  background: linear-gradient(90deg, #6366f1 0%, #ec4899 50%, #06b6d4 100%);
  background-size: 200% 100%;
  transition: width 0.3s ease-out;
  /* Smooth width transition */
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ==========================================================================
   Refined Sidebar Brand
   ========================================================================== */
.brand-logo-img {
  width: 42px;
  height: 42px;
  min-width: 42px;
  /* Prevent shrinking */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
  font-weight: 500;
}

/* ==========================================================================
   Sidebar Collapsed State (Desktop)
   ========================================================================== */
@media (min-width: 992px) {
  body.sidebar-collapsed .sidebar {
    width: 80px;
  }

  body.sidebar-collapsed .content-wrapper {
    margin-left: 80px;
  }

  body.sidebar-collapsed .navbar-custom {
    left: 80px;
  }

  /* Hide text elements */
  body.sidebar-collapsed .nav-link span,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .sidebar-brand .brand-text,
  body.sidebar-collapsed .sidebar-brand .brand-sub,
  body.sidebar-collapsed .badge {
    display: none !important;
  }

  /* Center icons */
  body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  body.sidebar-collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.25rem;
  }

  /* Show a mini logo/icon when collapsed since regular logo is removed */
  body.sidebar-collapsed .sidebar-brand .brand-info::before {
    content: "GS";
    display: block;
    font-weight: 800;
    color: white;
    font-size: 1.5rem;
  }
}

/* Custom Spacing Utility */
.me-4 {
  margin-right: 2rem !important;
  /* Custom override for wider spacing */
}

.me-1 {
  margin-right: 0.5rem !important;
}

/* -------------------------------------------------------------------------- */
/* DataTables Customization for Neo-Glass Theme                               */
/* -------------------------------------------------------------------------- */

.dataTables_wrapper .dataTables_length select {
  border: 1px solid rgba(0, 0, 0, 0.08);
  /* border-light */
  border-radius: 50rem !important;
  /* rounded-pill */
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 0.875rem;
  background-color: #f8f9fa;
  /* bg-light */
  color: #475569;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid rgba(0, 0, 0, 0.08);
  /* border-light */
  border-radius: 50rem !important;
  /* rounded-pill */
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  background-color: #f8f9fa;
  /* bg-light */
  color: #475569;
  margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: #8da2fb;
  box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.1);
  outline: 0;
}

.dataTables_wrapper .dataTables_info {
  padding-top: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.3rem 0.8rem !important;
  margin-left: 0 !important;
  border-radius: 50rem !important;
  border: 1px solid transparent !important;
  font-size: 0.85rem;
  color: #64748b !important;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent !important;
  display: inline-block;
  /* Ensure they sit next to each other */
  text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #f1f5f9 !important;
  /* slate-100 */
  color: #334155 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background-color: #4f46e5 !important;
  /* primary */
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  cursor: default;
  color: #cbd5e1 !important;
  background: transparent !important;
  box-shadow: none;
}

/* Row Styling Enhancements */
table.dataTable tbody tr {
  transition: background-color 0.2s;
}

table.dataTable tbody tr:hover {
  background-color: rgba(241, 245, 249, 0.5) !important;
  /* slate-50 opacity 50 */
}

/* Ensure no weird default DataTable styles interfere */
table.dataTable.no-footer {
  border-bottom: 0;
}

/* Processing Indicator Customization */
.dataTables_wrapper .dataTables_processing {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  /* Centering trick */
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 1.5rem 2rem !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  z-index: 100;
}

/* Premium Loading & Spinners */
.spinner-premium {
  border-width: 0.15em;
  border-right-color: transparent !important;
}

.processing-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.btn-gradient-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-gradient-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  color: white;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin-bottom: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  /* slate-300 */
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
  background-color: #10b981;
  /* success color */
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.processing-text {
  font-weight: 500;
  margin-top: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.btn-loading-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Premium Soft Buttons */
.btn-soft-warning {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: none !important;
}

.btn-soft-warning:hover {
  background-color: #fde68a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-soft-danger {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: none !important;
}

.btn-soft-danger:hover {
  background-color: #fecaca !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-soft-primary {
  background-color: #e0e7ff !important;
  color: #3730a3 !important;
  border: none !important;
}

/* ==========================================================================
   Modern Modal & Form Styles
   ========================================================================== */
.modal-modern .modal-content {
  border: none;
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.25);
}

.bg-header-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.form-label-modern {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control::placeholder {
  color: #cbd5e1;
  opacity: 1;
  /* Firefox */
}

.form-control:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: #cbd5e1;
}

.form-control::-ms-input-placeholder {
  /* Microsoft Edge */
  color: #cbd5e1;
}

/* Seamless Input Group Styling */
.input-group-modern {
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.input-group-modern:focus-within {
  border-color: #6366f1;
  /* Indigo-500 */
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-group-modern .input-group-text {
  background-color: transparent;
  border: none;
  color: #94a3b8;
  padding-left: 1.2rem;
  padding-right: 0.8rem;
}

.input-group-modern .form-control,
.input-group-modern .form-select {
  border: none;
  box-shadow: none;
  padding: 0.8rem 0.5rem;
  font-size: 1rem;
  color: #1e293b;
  background-color: transparent;
}

.input-group-modern .form-control:focus,
.input-group-modern .form-select:focus {
  box-shadow: none;
}

/* Button Styling */
.btn-close-custom {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  transition: all 0.2s;
  outline: none !important;
}

.btn-close-custom:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.btn-close-custom:hover i {
  color: white !important;
}

.btn-gradient-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: white;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient-primary:hover {
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

/* Bootstrap Select Overrides */
.bootstrap-select .dropdown-toggle {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  /* rounded-3 equivalent */
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  color: #495057;
  height: auto;
  outline: none !important;
  box-shadow: none !important;
}

.bootstrap-select .dropdown-toggle:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.bootstrap-select .dropdown-menu {
  border: 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
  padding: 0.5rem 0;
  z-index: 1060;
  /* Premium Fixes */
  margin-top: 8px !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

.bs-searchbox .form-control {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  background-color: #f8fafc;
}

.bs-searchbox .form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.bootstrap-select .dropdown-menu li a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.bootstrap-select .dropdown-menu .active a {
  background-color: var(--primary-color) !important;
  color: white !important;
}

/* Fix for input group overlapping */
/* Fix for input group overlapping */
.bootstrap-select {
  width: 100% !important;
}

/* Force hide the original select to prevent double inputs */
.bootstrap-select>select {
  display: none !important;
}

/* Improve toggle button alignment */
.bootstrap-select .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  /* Match standard input height */
}

.bootstrap-select .filter-option {
  display: flex !important;
  align-items: center;
  height: 100%;
}

.bootstrap-select .filter-option-inner-inner {
  margin-top: 1px;
}

/* =========================================
   Detail Page Styles (Moved from rounds-detail.php)
   ========================================= */

.card-modern {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
}

.card-header-modern {
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  padding: 1.5rem;
  border-radius: 16px 16px 0 0;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
}

.table-custom thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.btn-icon-soft {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-back {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateX(-3px);
}

/* Status Badge Styles */
.badge-status {
  padding: 0.5rem 1rem !important;
}

.badge-status.active {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754;
}

.badge-status.inactive {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* =========================================
   Top Progress Loader
   ========================================= */
#top-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary-base);
  z-index: 999999;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}