/* ==========================================================================
   RUANG TENDANG - MODERN REDESIGN SYSTEM (2026 EDITION)
   Mobile-First, Responsive, Sports Academy SaaS UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-family-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Primary Athletic Palette: Deep Emerald & Pitch Teal */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --primary-gradient: linear-gradient(135deg, #059669 0%, #0f766e 100%);
  --accent-gold: #f59e0b;
  --accent-gold-light: #fffbeb;

  /* Neutrals & Slate */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Header & Sidebar */
  --header-height: 68px;
  --sidebar-width: 280px;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active-bg: rgba(5, 150, 105, 0.15);
  --sidebar-active-text: #34d399;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

/* Base Overrides */
body {
  font-family: var(--font-family-base) !important;
  background-color: var(--bg-body) !important;
  color: var(--text-main) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .card-title, .pagetitle h1 {
  font-family: var(--font-family-base) !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   AUTH / LOGIN PAGE REDESIGN
   ========================================================================== */
.auth-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(5, 150, 105, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(15, 118, 110, 0.1) 0%, transparent 40%),
              linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-page-wrapper::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.25rem 2rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 576px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-lg);
  }
}

.auth-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-brand-logo img {
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
  margin-bottom: 0.75rem;
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Modern Input Groups with Icons */
.modern-input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.modern-input-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.modern-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  font-size: 1.15rem;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 4;
}

.modern-input-wrapper .form-control {
  padding-left: 42px !important;
  padding-right: 42px !important;
  min-height: 48px;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-input-wrapper .form-control:focus {
  border-color: var(--primary) !important;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12) !important;
}

.modern-input-wrapper .form-control:focus ~ .input-icon {
  color: var(--primary);
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 5;
}

.btn-toggle-password:hover {
  color: var(--text-main);
}

.btn-modern-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-modern-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #0d5f58 100%) !important;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.btn-modern-primary:active {
  transform: translateY(0);
}

/* ==========================================================================
   APP HEADER / TOPBAR REDESIGN
   ========================================================================== */
#header.header {
  height: var(--header-height) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm) !important;
  padding: 0 1.25rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1040 !important;
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.header .logo img {
  max-height: 40px !important;
  width: auto;
  object-fit: contain;
}

.header .logo span {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  letter-spacing: -0.02em;
}

.header .toggle-sidebar-btn {
  font-size: 1.5rem !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-sm);
  color: var(--text-main) !important;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header .toggle-sidebar-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary) !important;
  border-color: var(--primary-border);
}

/* Profile Badge in Header */
.header-nav .nav-profile {
  padding: 4px 8px;
  border-radius: 9999px;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.header-nav .nav-profile:hover {
  background-color: #e2e8f0;
}

.header-nav .nav-profile img {
  width: 34px !important;
  height: 34px !important;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.header-nav .nav-profile span {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
}

.header-nav .profile.dropdown-menu {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 0.75rem !important;
  min-width: 240px;
}

.header-nav .profile .dropdown-header {
  padding: 0.5rem 0.75rem 0.75rem !important;
  border-bottom: 1px solid var(--border-light);
}

.header-nav .profile .dropdown-header h6 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-nav .profile .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
  transition: all 0.15s ease;
}

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

/* ==========================================================================
   SIDEBAR REDESIGN (EXECUTIVE OBSIDIAN SLATE & ATHLETIC EMERALD)
   ========================================================================== */
.sidebar {
  top: var(--header-height) !important;
  width: var(--sidebar-width) !important;
  background-color: #0b1120 !important;
  border-right: 1px solid #1e293b !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12) !important;
  padding: 1.15rem 0.85rem !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1030 !important;
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 17, 32, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1025;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.toggle-sidebar .sidebar-backdrop {
  opacity: 1;
  visibility: visible;
}

/* Sidebar mobile drawer mechanics */
@media (max-width: 1199px) {
  .sidebar {
    left: -320px !important;
    top: 0 !important;
    height: 100vh !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35) !important;
  }

  body.toggle-sidebar .sidebar {
    left: 0 !important;
  }
}

/* Mobile Sidebar Close Button */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem 1.15rem 0.5rem;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 0.85rem;
}

@media (max-width: 1199px) {
  .sidebar-mobile-header {
    display: flex;
  }
}

.sidebar-close-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: #334155;
  color: #34d399;
}

/* Sidebar Nav Items */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #64748b;
  padding: 0.95rem 0.75rem 0.4rem;
}

.sidebar-nav .nav-item {
  margin-bottom: 4px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  background-color: transparent !important;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
  font-size: 1.15rem !important;
  color: #64748b !important;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
}

.sidebar-nav .nav-link:hover i {
  color: #34d399 !important;
  transform: translateX(2px);
}

/* Active State */
.sidebar-nav .nav-link:not(.collapsed) {
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.22) 0%, rgba(5, 150, 105, 0.05) 100%) !important;
  color: #34d399 !important;
  border-left: 3px solid #10b981 !important;
}

.sidebar-nav .nav-link:not(.collapsed) i {
  color: #34d399 !important;
}

/* Submenu dropdown */
.sidebar-nav .nav-content {
  padding: 0.35rem 0 0.35rem 1.25rem !important;
  list-style: none;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.sidebar-nav .nav-content a i {
  font-size: 0.45rem !important;
  color: #475569 !important;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: #34d399 !important;
  background-color: rgba(5, 150, 105, 0.12);
  font-weight: 700 !important;
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
  color: #34d399 !important;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.sidebar-nav .nav-content a i {
  font-size: 0.5rem !important;
  color: #94a3b8 !important;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--primary) !important;
  background-color: var(--primary-light);
  font-weight: 700 !important;
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
  color: var(--primary) !important;
}

/* ==========================================================================
   MAIN CONTENT & DASHBOARD REDESIGN
   ========================================================================== */
#main {
  margin-top: var(--header-height) !important;
  padding: 1.5rem !important;
  background-color: var(--bg-body) !important;
  min-height: calc(100vh - var(--header-height));
}

@media (max-width: 768px) {
  #main {
    padding: 1rem !important;
  }
}

@media (min-width: 1200px) {
  #main, #footer {
    margin-left: var(--sidebar-width) !important;
  }
  
  body.toggle-sidebar #main,
  body.toggle-sidebar #footer {
    margin-left: 0 !important;
  }
}

/* Breadcrumbs & Page Titles */
.pagetitle {
  margin-bottom: 1.5rem !important;
}

.pagetitle h1 {
  font-size: 1.625rem !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin-bottom: 0.25rem !important;
}

.breadcrumb {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.breadcrumb-item a {
  color: var(--text-muted) !important;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary) !important;
}

.breadcrumb-item.active {
  color: var(--text-main) !important;
  font-weight: 700 !important;
}

/* Welcome Hero Banner on Dashboard */
.dashboard-hero-banner {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.3);
  position: relative;
  overflow: hidden;
}

.dashboard-hero-banner::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-hero-banner h2 {
  color: #ffffff !important;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.dashboard-hero-banner p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* Modern Metric / Stat Cards */
.card {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  background-color: var(--bg-surface) !important;
  margin-bottom: 1.5rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md) !important;
}

.card-body {
  padding: 1.5rem !important;
}

@media (max-width: 576px) {
  .card-body {
    padding: 1.15rem !important;
  }
}

.card-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  padding: 0 0 1rem 0 !important;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stat Cards */
.stat-card-modern {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  display: block;
  text-decoration: none !important;
}

.stat-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

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

.icon-blue {
  background: #eff6ff;
  color: #2563eb;
}

.icon-amber {
  background: #fffbeb;
  color: #d97706;
}

.icon-violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.icon-rose {
  background: #fff1f2;
  color: #e11d48;
}

.stat-card-action-icon {
  color: var(--text-light);
  font-size: 1.1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.stat-card-modern:hover .stat-card-action-icon {
  color: var(--primary);
  transform: translate(2px, -2px);
}

.stat-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

/* ==========================================================================
   RESPONSIVE TABLES & DATATABLES
   ========================================================================== */
.table-responsive,
.dataTable-wrapper,
.dataTables_wrapper,
.card-body > .table {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
  width: 100%;
}

/* Ensure table container scrolls cleanly on phone screens */
@media (max-width: 768px) {
  .table {
    min-width: 650px;
  }
}

.table {
  width: 100% !important;
  margin-bottom: 0 !important;
  color: var(--text-main) !important;
  vertical-align: middle !important;
}

.table thead th {
  background-color: #f8fafc !important;
  color: var(--text-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--border-color) !important;
  white-space: nowrap !important;
}

.table tbody td,
.table tbody th {
  padding: 0.85rem 1rem !important;
  font-size: 0.875rem !important;
  border-bottom: 1px solid var(--border-light) !important;
}

.table tbody tr:hover {
  background-color: #f8fafc !important;
}

/* DataTables Controls Redesign */
.dataTable-top, .dataTable-bottom {
  padding: 0.85rem 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dataTable-input, .dataTables_filter input {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.875rem !important;
  outline: none;
}

.dataTable-input:focus, .dataTables_filter input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}

.dataTable-selector, .dataTables_length select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.4rem 0.65rem !important;
  font-size: 0.875rem !important;
}

/* Modern Action Buttons in Tables */
.table .btn-sm {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.785rem !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

/* Form Controls Redesign */
.form-control, .form-select {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 0.9rem !important;
  color: var(--text-main) !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}

.form-label {
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  margin-bottom: 0.35rem !important;
}

/* Modern Form Action Footer */
form:not(.auth-form) div:has(> button[type="submit"]),
.form-actions-footer,
.form-footer,
div[class*="martop"]:has(button[type="submit"]) {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-top: 2rem !important;
  padding-top: 1.25rem !important;
  border-top: 1px solid var(--border-light) !important;
  flex-wrap: wrap !important;
}

form:not(.auth-form) div > button[type="submit"],
.form-actions-footer .btn,
.form-footer .btn,
div[class*="martop"] button[type="submit"] {
  padding: 0.65rem 1.5rem !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  border-radius: var(--radius-md) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  transition: all 0.25s ease !important;
}

form:not(.auth-form) div > button[type="submit"]:hover,
div[class*="martop"] button[type="submit"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35) !important;
}

/* Tabs */
.nav-tabs {
  border-bottom: 2px solid var(--border-light) !important;
  gap: 0.5rem !important;
}

.nav-tabs .nav-link {
  border: none !important;
  border-bottom: 3px solid transparent !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.2s ease !important;
}

.nav-tabs .nav-link:hover {
  color: var(--primary) !important;
  background-color: var(--primary-light) !important;
}

.nav-tabs .nav-link.active {
  color: var(--primary) !important;
  border-bottom: 3px solid var(--primary) !important;
  background: var(--primary-light) !important;
}

/* ==========================================================================
   DATATABLES 2 MODERN SAAS UPGRADE
   ========================================================================== */
div.dt-container {
  padding: 0.25rem 0 !important;
  font-family: var(--font-family-base) !important;
}

div.dt-container div.dt-layout-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  margin-bottom: 1.25rem !important;
}

div.dt-container div.dt-layout-row:last-child {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
  padding-top: 1rem !important;
  border-top: 1px solid var(--border-light) !important;
}

/* Modern Search Box */
div.dt-container .dt-search {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0 !important;
}

div.dt-container .dt-search label {
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  text-transform: capitalize !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

div.dt-container .dt-search input {
  border-radius: 9999px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 14px center !important;
  padding: 0.55rem 1.15rem 0.55rem 2.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--text-main) !important;
  min-width: 240px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

div.dt-container .dt-search input:focus {
  min-width: 290px !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14) !important;
  outline: none !important;
}

/* Modern Length Selector */
div.dt-container .dt-length {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

div.dt-container .dt-length select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  padding: 0.45rem 1.75rem 0.45rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}

div.dt-container .dt-length select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12) !important;
  outline: none !important;
}

/* Modern Table Layout */
table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

table.dataTable thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 1rem 1.15rem !important;
  border-bottom: 1px solid var(--border-color) !important;
  border-top: none !important;
  vertical-align: middle !important;
}

table.dataTable tbody tr {
  transition: background-color 0.18s ease !important;
}

table.dataTable tbody tr:hover {
  background-color: #f0fdf4 !important;
}

table.dataTable tbody td {
  padding: 0.95rem 1.15rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid var(--border-light) !important;
  font-size: 0.875rem !important;
  color: #1e293b !important;
}

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

/* Info and Pagination */
div.dt-container .dt-info {
  font-size: 0.825rem !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
}

div.dt-container .dt-paging {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

div.dt-container .dt-paging .dt-paging-button {
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 0.65rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

div.dt-container .dt-paging .dt-paging-button:hover:not(.disabled) {
  background-color: var(--primary-light) !important;
  border-color: var(--primary-border) !important;
  color: var(--primary) !important;
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--primary-gradient) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}

div.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background-color: #f8fafc !important;
}

/* ==========================================================================
   TABLE CELL EYE-CATCHING COMPONENTS
   ========================================================================== */
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.table-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.table-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-add-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  background: var(--primary-gradient);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.25s ease;
  text-decoration: none !important;
}

.btn-add-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.player-avatar-circle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.825rem;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  border: 2px solid #ffffff;
}

.badge-code {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #047857;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.contact-pill:hover {
  background-color: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
  transform: translateY(-1px);
}

/* Action Buttons in Rows & Tables */
.btn-action-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-action,
.table .btn-sm,
table.dataTable .btn-sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.785rem !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
}

/* Green Edit / Success */
.btn-action-edit,
.table .btn-success {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
}

.btn-action-edit:hover,
.table .btn-success:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Red Delete / Danger */
.btn-action-delete,
.table .btn-danger {
  background-color: #fff1f2 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}

.btn-action-delete:hover,
.table .btn-danger:hover {
  background-color: #e11d48 !important;
  color: #ffffff !important;
  border-color: #e11d48 !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Blue Detail / Primary / Info */
.btn-action-detail,
.table .btn-primary,
.table .btn-info {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

.btn-action-detail:hover,
.table .btn-primary:hover,
.table .btn-info:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Amber Warning / Attendance */
.table .btn-warning {
  background-color: #fffbeb !important;
  color: #d97706 !important;
  border-color: #fde68a !important;
}

.table .btn-warning:hover {
  background-color: #d97706 !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Add Data Buttons in card bodies (legacy support) */
.card-body > a.btn-primary:first-of-type:not(.btn-action),
.card-body > button.btn-primary:first-of-type:not(.btn-action) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.55rem 1.15rem !important;
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  margin-bottom: 1rem !important;
  transition: all 0.25s ease !important;
}

.card-body > a.btn-primary:first-of-type:not(.btn-action):hover,
.card-body > button.btn-primary:first-of-type:not(.btn-action):hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35) !important;
  transform: translateY(-1px) !important;
}

.badge-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Pulse Dot for Active Status */
.pulse-dot-active {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  margin-right: 5px;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   MOBILE VIEW & TOUCH CARDS TRANSFORMATION (< 768px)
   Transforms rigid desktop tables into beautiful native-feeling mobile cards
   ========================================================================== */
@media (max-width: 768px) {
  #main {
    padding: 0.75rem 0.65rem 3.5rem 0.65rem !important;
  }

  /* Hide duplicate desktop page title & breadcrumbs on mobile */
  .pagetitle {
    display: none !important;
  }

  /* Seamless outer card container on mobile (eliminates awkward card-in-card look) */
  .card:has(.table-responsive),
  .card:has(table.dataTable),
  .card:has(.datatable) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0.25rem !important;
  }

  .card:has(.table-responsive) .card-body,
  .card:has(table.dataTable) .card-body,
  .card:has(.datatable) .card-body {
    padding: 0 !important;
  }

  /* Mobile App Bar Header: Sleek single-line header with inline Add button */
  .table-card-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.25rem 0.75rem 0.25rem !important;
    margin-bottom: 0.25rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  .table-card-header > div:first-child {
    flex: 1 1 auto !important;
  }

  .table-card-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .table-card-subtitle {
    display: none !important; /* Hide long desktop subtitle on mobile */
  }

  .btn-add-primary,
  .card-body > a.btn-primary:first-of-type,
  .card-body > button.btn-primary:first-of-type,
  .table-card-header a.btn-add-primary {
    width: auto !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 9999px !important; /* Pill style */
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
  }

  /* DataTables Search on mobile: clean standalone search bar, hide length dropdown */
  div.dt-container {
    padding: 0 !important;
  }

  div.dt-container div.dt-layout-row:first-child {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 0.85rem !important;
    display: block !important;
  }

  div.dt-container .dt-length {
    display: none !important; /* Hide "Tampilkan 10 data" dropdown on mobile */
  }

  div.dt-container .dt-search {
    width: 100% !important;
    margin: 0 !important;
  }

  div.dt-container .dt-search label {
    width: 100% !important;
    display: flex !important;
    position: relative !important;
    margin: 0 !important;
  }

  div.dt-container .dt-search input {
    width: 100% !important;
    min-width: 100% !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    padding: 0.55rem 1rem 0.55rem 2.65rem !important;
    font-size: 0.875rem !important;
  }

  div.dt-container .dt-search input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  }

  div.dt-container .dt-search label::before {
    content: "\F52A" !important;
    font-family: "bootstrap-icons" !important;
    position: absolute !important;
    left: 0.95rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 1rem !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }

  /* Table to Native-Feeling Mobile Cards */
  .table-responsive {
    overflow: visible !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  table.datatable,
  table.dataTable {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
  }

  table.datatable thead,
  table.dataTable thead {
    display: none !important; /* Hide desktop table column headers */
  }

  table.datatable tbody,
  table.dataTable tbody {
    display: block !important;
    width: 100% !important;
  }

  table.datatable tbody tr,
  table.dataTable tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 0.95rem 1rem 0.85rem 1rem !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 0.75rem !important; /* Optimal compact card separation */
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  table.datatable tbody tr:hover,
  table.dataTable tbody tr:hover {
    background-color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  }

  /* Row Number Badge: Fixed cleanly at top-right corner of each card */
  table.datatable tbody td.mobile-row-badge,
  table.dataTable tbody td.mobile-row-badge {
    position: absolute !important;
    top: 0.85rem !important;
    right: 0.85rem !important;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
    z-index: 5 !important;
  }

  .badge-row-number {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Headline: Top Hero Section of the card (Avatar + Item Name + Subtitle) */
  table.datatable tbody td.mobile-card-headline,
  table.dataTable tbody td.mobile-card-headline {
    order: -1 !important; /* Forces Headline to be the very top element of the card */
    width: 100% !important;
    padding: 0 2.25rem 0.65rem 0 !important; /* Clearance on right so it never overlaps #number badge */
    margin-bottom: 0.45rem !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  table.datatable tbody td.mobile-card-headline > * {
    text-align: left !important;
  }

  .player-avatar-circle {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
  }

  /* Hide Technical Audit columns on mobile */
  table.datatable tbody td.mobile-hide-meta,
  table.dataTable tbody td.mobile-hide-meta,
  table.datatable tbody td[data-label*="Dibuat"],
  table.datatable tbody td[data-label*="Diubah"],
  table.datatable tbody td[data-label*="Created"],
  table.datatable tbody td[data-label*="Updated"],
  table.dataTable tbody td[data-label*="Dibuat"],
  table.dataTable tbody td[data-label*="Diubah"],
  table.dataTable tbody td[data-label*="Created"],
  table.dataTable tbody td[data-label*="Updated"] {
    display: none !important;
  }

  /* Hide empty / dash-only cells (e.g. empty phone or unassigned fields) on mobile */
  table.datatable tbody td.mobile-empty-val:not(.mobile-card-headline):not(:last-child):not(.mobile-card-actions),
  table.dataTable tbody td.mobile-empty-val:not(.mobile-card-headline):not(:last-child):not(.mobile-card-actions) {
    display: none !important;
  }

  /* Data Row Items inside Card */
  table.datatable tbody td:not(.mobile-card-headline):not(.mobile-row-badge):not(:last-child):not(.mobile-card-actions),
  table.dataTable tbody td:not(.mobile-card-headline):not(.mobile-row-badge):not(:last-child):not(.mobile-card-actions) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.35rem 0 !important;
    border: none !important;
    font-size: 0.84rem !important;
    width: 100% !important;
  }

  /* Auto Data Label Generated from Table Headers on mobile */
  table.datatable tbody td[data-label]:not(.mobile-card-headline):not(.mobile-row-badge):not(:last-child):not(.mobile-card-actions)::before,
  table.dataTable tbody td[data-label]:not(.mobile-card-headline):not(.mobile-row-badge):not(:last-child):not(.mobile-card-actions)::before {
    content: attr(data-label);
    font-size: 0.725rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
    text-align: left !important;
  }

  table.datatable tbody td:has(.mobile-field-label)::before,
  table.dataTable tbody td:has(.mobile-field-label)::before {
    display: none !important;
  }

  .mobile-field-label {
    display: inline-block !important;
    font-size: 0.725rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
  }

  .badge-code {
    font-size: 0.775rem !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 6px !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-weight: 600 !important;
  }

  /* Action Buttons: Full-width tactile touch buttons at the bottom of the card */
  table.datatable tbody td:last-child,
  table.dataTable tbody td:last-child,
  table.datatable tbody td.mobile-card-actions,
  table.dataTable tbody td.mobile-card-actions {
    order: 99 !important; /* Always sits at the very bottom of the card */
    display: flex !important;
    border: none !important;
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0 !important;
    margin-top: 0.45rem !important;
    width: 100% !important;
    justify-content: stretch !important;
  }

  table.datatable tbody td:last-child::before,
  table.dataTable tbody td:last-child::before,
  table.datatable tbody td.mobile-card-actions::before {
    display: none !important;
  }

  .btn-action-group,
  table.datatable tbody td:last-child .d-flex,
  table.dataTable tbody td:last-child .d-flex,
  table.datatable tbody td.mobile-card-actions .d-flex {
    width: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  .btn-action,
  table.datatable tbody td:last-child .btn,
  table.dataTable tbody td:last-child .btn,
  table.datatable tbody td.mobile-card-actions .btn {
    flex: 1 1 0 !important; /* 50/50 equal width buttons */
    min-height: 40px !important;
    height: 40px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    transition: transform 0.1s ease, filter 0.1s ease !important;
  }

  .btn-action:active,
  table.datatable tbody td:last-child .btn:active,
  table.datatable tbody td.mobile-card-actions .btn:active {
    transform: scale(0.97) !important;
  }

  /* Crisp Emerald Edit button */
  .btn-action-edit,
  table.datatable tbody td .btn-success,
  table.datatable tbody td .btn-outline-warning,
  table.datatable tbody td a[href*="edit"] {
    background-color: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
  }

  /* Crisp Rose Delete button */
  .btn-action-delete,
  table.datatable tbody td .btn-danger,
  table.datatable tbody td .btn-outline-danger,
  table.datatable tbody td button[onclick*="delete"],
  table.datatable tbody td a[onclick*="delete"] {
    background-color: #fff1f2 !important;
    border: 1px solid #fecdd3 !important;
    color: #be123c !important;
  }

  /* Crisp Blue Detail / Show button */
  table.datatable tbody td .btn-primary,
  table.datatable tbody td .btn-outline-info,
  table.datatable tbody td a[href*="show"] {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
  }

  /* DataTables Pagination & Info Card on mobile */
  div.dt-container div.dt-layout-row:last-child {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 0.85rem 1rem !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.65rem !important;
    text-align: center !important;
  }

  div.dt-container .dt-info {
    font-size: 0.775rem !important;
    text-align: center !important;
    color: #64748b !important;
  }

  div.dt-container .dt-paging {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }

  div.dt-container .dt-paging .dt-paging-button {
    min-width: 36px !important;
    height: 36px !important;
    font-size: 0.825rem !important;
    border-radius: 8px !important;
  }
}
