/* ========================================
   GreenAdmin - Bootstrap Admin Template
   Modern UI inspired by TailAdmin
   ======================================== */

:root {
  --sidebar-width: 236px;
  --sidebar-collapsed: 66px;
  --header-height: 52px;
  /* Compact density scale. Raise these three to loosen the whole UI back up. */
  --ga-font-size-base: 0.82rem;
  --ga-line-height: 1.45;
  --ga-content-pad: 20px;
  --ga-space-1: 0.2rem;
  --ga-space-2: 0.4rem;
  --ga-space-3: 0.8rem;
  --ga-space-4: 1.2rem;
  --ga-space-5: 2.4rem;
  --ga-primary: #22c55e;
  --ga-primary-dark: #16a34a;
  --ga-primary-rgb: 34, 197, 94;
  --ga-sidebar-bg: #1c2434;
  --ga-sidebar-text: #dee4ee;
  --ga-sidebar-hover: rgba(255, 255, 255, 0.06);
  --ga-sidebar-active: rgba(34, 197, 94, 0.15);
  --ga-sidebar-border: rgba(255,255,255,0.08);
  --ga-sidebar-label-color: rgba(255,255,255,0.35);
  --ga-sidebar-brand-color: #ffffff;
  --ga-sidebar-submenu-border: rgba(255,255,255,0.08);
  --ga-sidebar-submenu-dot: rgba(255,255,255,0.25);
  --ga-sidebar-submenu-dot-hover: rgba(255,255,255,0.6);
  --ga-sidebar-footer-border: rgba(255,255,255,0.08);
  --ga-sidebar-user-name-color: #ffffff;
  --ga-sidebar-user-role-color: rgba(255,255,255,0.5);
  --ga-body-bg: #f1f5f9;
  --ga-card-bg: #ffffff;
  --ga-border: #e2e8f0;
  --ga-text: #1e293b;
  --ga-text-secondary: #64748b;
  --ga-text-muted: #94a3b8;
  --ga-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --ga-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --ga-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --ga-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --ga-radius: 8px;
  --ga-radius-lg: 12px;
  --ga-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme - handled by css/theme.css */
/* Modes: light, dark, mix + 10 color palettes */

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--ga-body-bg);
  color: var(--ga-text);
  font-size: var(--ga-font-size-base);
  line-height: var(--ga-line-height);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ========================================
   Sidebar
   ======================================== */
.ga-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--ga-sidebar-bg);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform var(--ga-transition), width var(--ga-transition);
  overflow: hidden;
}

.ga-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ga-sidebar-border, rgba(255,255,255,0.08));
  min-height: var(--header-height);
}

.ga-sidebar-logo {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--ga-primary) 0%, var(--ga-primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ga-sidebar-logo svg { width: 16px; height: 16px; }

.ga-sidebar-brand {
  font-size: 1.025rem;
  font-weight: 700;
  color: var(--ga-sidebar-brand-color, #fff);
  white-space: nowrap;
}

.ga-sidebar-brand span { color: var(--ga-primary); }

.ga-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 13px 10px;
}

.ga-sidebar-body::-webkit-scrollbar { width: 4px; }
.ga-sidebar-body::-webkit-scrollbar-thumb { background: var(--ga-sidebar-submenu-dot, rgba(255,255,255,0.1)); border-radius: 4px; }

/* Nav Groups */
.ga-nav-group { margin-bottom: 20px; }

.ga-nav-label {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ga-sidebar-label-color, rgba(255,255,255,0.35));
  padding: 0 10px;
  margin-bottom: 7px;
}

/* Nav Items */
.ga-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ga-sidebar-text);
  font-size: 0.715rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  margin-bottom: 1px;
  white-space: nowrap;
}

.ga-nav-item:hover {
  background: var(--ga-sidebar-hover);
  color: var(--ga-sidebar-brand-color, #fff);
}

.ga-nav-item.active {
  background: var(--ga-sidebar-active);
  color: var(--ga-primary);
}

.ga-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--ga-primary);
  border-radius: 0 3px 3px 0;
}

.ga-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Override .ga base styles when used as nav icon */
i.ga.ga-nav-icon {
  display: block;
  width: 18px;
  height: 18px;
}

i.ga.ga-chevron {
  display: block;
}

.ga-nav-item.active .ga-nav-icon,
.ga-nav-item:hover .ga-nav-icon {
  opacity: 1;
}

.ga-nav-badge {
  margin-left: auto;
  background: var(--ga-primary);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 16px;
  text-align: center;
}

/* Submenu - Level 2 */
.ga-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  margin-left: 16px;
  padding-left: 10px;
  border-left: 1.5px solid var(--ga-sidebar-submenu-border, rgba(255,255,255,0.08));
}

.ga-submenu.open { max-height: 1000px; }

.ga-submenu .ga-nav-item {
  font-size: 0.675rem;
  padding: 6px 10px 6px 13px;
  position: relative;
  border-radius: 6px;
  gap: 7px;
}

.ga-submenu .ga-nav-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ga-sidebar-submenu-dot, rgba(255,255,255,0.25));
  transition: all 0.2s;
}

.ga-submenu .ga-nav-item:hover::before {
  background: var(--ga-sidebar-submenu-dot-hover, rgba(255,255,255,0.6));
}

.ga-submenu .ga-nav-item.active {
  background: transparent;
  color: var(--ga-primary);
}

.ga-submenu .ga-nav-item.active::before {
  background: var(--ga-primary);
  width: 5px;
  height: 5px;
  left: 3px;
  border-radius: 50%;
}

/* Submenu - Level 3 */
.ga-submenu-l3 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 7px;
  padding-left: 8px;
  border-left: 1.5px solid var(--ga-sidebar-submenu-border, rgba(255,255,255,0.06));
}

.ga-submenu-l3.open { max-height: 500px; }

.ga-submenu-l3 .ga-nav-item {
  font-size: 0.66rem;
  padding: 5px 8px 5px 11px;
  color: var(--ga-sidebar-text, rgba(255,255,255,0.55));
  opacity: 0.7;
}

.ga-submenu-l3 .ga-nav-item::before {
  width: 4px;
  height: 4px;
  left: 3px;
  background: var(--ga-sidebar-submenu-dot, rgba(255,255,255,0.15));
}

.ga-submenu-l3 .ga-nav-item:hover { color: var(--ga-sidebar-brand-color, #fff); opacity: 1; }
.ga-submenu-l3 .ga-nav-item:hover::before { background: var(--ga-sidebar-submenu-dot-hover, rgba(255,255,255,0.5)); }
.ga-submenu-l3 .ga-nav-item.active { color: var(--ga-primary); }
.ga-submenu-l3 .ga-nav-item.active::before { background: var(--ga-primary); width: 4px; height: 4px; }

.ga-nav-item .ga-chevron {
  margin-left: auto;
  width: 13px;
  height: 13px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  opacity: 0.5;
  line-height: 0;
}

.ga-nav-item.expanded .ga-chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}

/* Parent toggle active state when child is active */
.ga-nav-toggle.has-active {
  color: var(--ga-sidebar-brand-color, #fff);
  background: var(--ga-sidebar-hover, rgba(255,255,255,0.04));
}

.ga-nav-toggle.has-active .ga-nav-icon {
  opacity: 1;
  color: var(--ga-primary);
}

.ga-nav-toggle.has-active .ga-chevron {
  color: var(--ga-primary);
  opacity: 0.8;
}

/* Submenu toggle inside submenu (level 3 trigger) */
.ga-submenu .ga-nav-toggle-l3 {
  font-size: 0.675rem;
  padding: 6px 10px 6px 13px;
}

.ga-submenu .ga-nav-toggle-l3 .ga-chevron {
  width: 11px;
  height: 11px;
}

/* Sidebar Footer */
.ga-sidebar-footer {
  padding: 13px 16px;
  border-top: 1px solid var(--ga-sidebar-footer-border, rgba(255,255,255,0.08));
}

.ga-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ga-sidebar-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ga-primary), #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.74rem;
  flex-shrink: 0;
}

.ga-sidebar-user-info {
  overflow: hidden;
}

.ga-sidebar-user-name {
  color: var(--ga-sidebar-user-name-color, #fff);
  font-weight: 600;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ga-sidebar-user-role {
  color: var(--ga-sidebar-user-role-color, rgba(255,255,255,0.5));
  font-size: 0.66rem;
}

/* ========================================
   Header / Top Bar
   ======================================== */
.ga-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--ga-card-bg);
  border-bottom: 1px solid var(--ga-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1030;
  box-shadow: var(--ga-shadow-sm);
  transition: left var(--ga-transition);
}

.ga-header-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ga-hamburger {
  display: flex;
  background: none;
  border: none;
  color: var(--ga-text);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--ga-radius);
  transition: background 0.2s;
}

.ga-hamburger:hover { background: rgba(0,0,0,0.05); }
.ga-hamburger svg { width: 20px; height: 20px; }

.ga-header-search {
  position: relative;
}

.ga-header-search input {
  background: var(--ga-body-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  padding: 7px 10px 7px 30px;
  font-size: 0.715rem;
  color: var(--ga-text);
  width: 230px;
  transition: all 0.2s;
  font-family: inherit;
}

.ga-header-search input:focus {
  outline: none;
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.15);
}

.ga-header-search input::placeholder { color: var(--ga-text-muted); }

.ga-header-search svg {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ga-text-muted);
}

.ga-header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  box-shadow: var(--ga-shadow-lg);
  padding: 5px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 1060;
}

.ga-header-search-results.show {
  display: block;
}

.ga-header-search-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 7px 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
}

.ga-header-search-item:hover,
.ga-header-search-item.active {
  background: rgba(var(--ga-primary-rgb), 0.08);
}

.ga-header-search-title {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--ga-text);
}

.ga-header-search-meta {
  font-size: 0.66rem;
  color: var(--ga-text-muted);
}

.ga-header-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ga-header-btn {
  position: relative;
  background: none;
  border: none;
  width: 33px;
  height: 33px;
  border-radius: var(--ga-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ga-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.ga-header-btn:hover {
  background: var(--ga-body-bg);
  color: var(--ga-text);
}

.ga-header-btn svg { width: 18px; height: 18px; }

.ga-notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--ga-card-bg);
}

.ga-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ga-primary), #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.66rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.ga-header-avatar:hover {
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.3);
}

/* ========================================
   Main Content
   ======================================== */
.ga-main {
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  min-height: 100vh;
  transition: margin-left var(--ga-transition);
}

.ga-content {
  padding: var(--ga-content-pad);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
}

/* Breadcrumb */
.ga-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.695rem;
  color: var(--ga-text-muted);
  margin-bottom: 7px;
}

.ga-breadcrumb a { color: var(--ga-text-secondary); transition: color 0.2s; }
.ga-breadcrumb a:hover { color: var(--ga-primary); }
.ga-breadcrumb svg { width: 11px; height: 11px; }

.ga-page-title {
  font-size: 1.23rem;
  font-weight: 700;
  color: var(--ga-text);
  margin-bottom: 20px;
}

.ga-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 7px;
}

.ga-page-header .ga-breadcrumb {
  margin-bottom: 0;
}

.ga-page-header .ga-page-title {
  margin-bottom: 0;
}

/* ========================================
   Cards
   ======================================== */
.ga-card {
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius-lg);
  box-shadow: var(--ga-shadow-sm);
  transition: box-shadow 0.2s;
}

.ga-card:hover {
  box-shadow: var(--ga-shadow);
}

.ga-card-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ga-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ga-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ga-text);
}

.ga-card-body { padding: 16px; }

/* ========================================
   Stat Cards
   ======================================== */
.ga-stat-card {
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius-lg);
  padding: 16px 20px;
  box-shadow: var(--ga-shadow-sm);
  display: flex;
  align-items: center;
  gap: 13px;
  transition: all 0.2s;
}

.ga-stat-card:hover {
  box-shadow: var(--ga-shadow-md);
  transform: translateY(-2px);
}

.ga-stat-icon {
  width: 39px;
  height: 39px;
  border-radius: var(--ga-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ga-stat-icon svg { width: 20px; height: 20px; }

.ga-stat-icon.bg-primary-soft { background: rgba(var(--ga-primary-rgb), 0.12); color: var(--ga-primary); }
.ga-stat-icon.bg-blue-soft { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.ga-stat-icon.bg-purple-soft { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.ga-stat-icon.bg-orange-soft { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.ga-stat-icon.bg-red-soft { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.ga-stat-icon.bg-teal-soft { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }

.ga-stat-info { flex: 1; min-width: 0; }

.ga-stat-label {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ga-text-muted);
  margin-bottom: 4px;
}

.ga-stat-value {
  font-size: 1.23rem;
  font-weight: 700;
  color: var(--ga-text);
  line-height: 1.2;
}

.ga-stat-change {
  font-size: 0.66rem;
  font-weight: 600;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ga-stat-change.up { color: #10b981; }
.ga-stat-change.down { color: #ef4444; }
.ga-stat-change svg { width: 11px; height: 11px; }

/* ========================================
   Tables
   ======================================== */
.ga-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ga-table thead th {
  background: var(--ga-body-bg);
  color: var(--ga-text-secondary);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 13px;
  border-bottom: 1px solid var(--ga-border);
  white-space: nowrap;
}

.ga-table tbody td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--ga-border);
  font-size: 0.74rem;
  color: var(--ga-text);
  vertical-align: middle;
}

.ga-table tbody tr:last-child td { border-bottom: none; }

.ga-table tbody tr:hover td {
  background: rgba(var(--ga-primary-rgb), 0.03);
}

.ga-table-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

/* Status badges */
.ga-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 600;
}

.ga-badge-success { background: rgba(16,185,129,0.12); color: #059669; }
.ga-badge-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.ga-badge-danger { background: rgba(239,68,68,0.12); color: #dc2626; }
.ga-badge-info { background: rgba(59,130,246,0.12); color: #2563eb; }
.ga-badge-primary { background: rgba(var(--ga-primary-rgb),0.12); color: var(--ga-primary-dark); }

.ga-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ========================================
   Buttons
   ======================================== */
.ga-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: var(--ga-radius);
  font-size: 0.715rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.ga-btn svg { width: 15px; height: 15px; }

.ga-btn-primary {
  background: var(--ga-primary);
  color: #fff;
}

.ga-btn-primary:hover {
  background: var(--ga-primary-dark);
  box-shadow: 0 4px 12px rgba(var(--ga-primary-rgb), 0.3);
}

.ga-btn-outline {
  background: transparent;
  border-color: var(--ga-border);
  color: var(--ga-text-secondary);
}

.ga-btn-outline:hover {
  border-color: var(--ga-primary);
  color: var(--ga-primary);
  background: rgba(var(--ga-primary-rgb), 0.05);
}

.ga-btn-sm { padding: 4px 10px; font-size: 0.66rem; }
.ga-btn-icon { padding: 5px; }

/* ========================================
   Forms
   ======================================== */
.ga-form-group { margin-bottom: 16px; }

.ga-form-label {
  display: block;
  font-size: 0.695rem;
  font-weight: 600;
  color: var(--ga-text);
  margin-bottom: 5px;
}

.ga-form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  font-size: 0.74rem;
  color: var(--ga-text);
  background: var(--ga-card-bg);
  font-family: inherit;
  transition: all 0.2s;
}

.ga-form-control:focus {
  outline: none;
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.15);
}

.ga-form-control::placeholder { color: var(--ga-text-muted); }

textarea.ga-form-control { resize: vertical; min-height: 82px; }

select.ga-form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 30px;
}

.ga-form-hint {
  font-size: 0.66rem;
  color: var(--ga-text-muted);
  margin-top: 4px;
}

.ga-form-inline-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.ga-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ga-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--ga-border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.66rem;
  color: var(--ga-text-secondary);
  background: var(--ga-body-bg);
}

.ga-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ga-primary);
}

.ga-security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ga-border);
}

.ga-security-item:last-child {
  border-bottom: none;
}

.ga-otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.ga-otp-input {
  width: 100%;
  height: 41px;
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  background: var(--ga-card-bg);
  color: var(--ga-text);
  text-align: center;
  font-size: 0.985rem;
  font-weight: 700;
  font-family: inherit;
}

.ga-otp-input:focus {
  outline: none;
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.15);
}

.ga-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.ga-strength span {
  height: 5px;
  border-radius: 999px;
  background: var(--ga-border);
}

.ga-strength[data-level="1"] span:nth-child(-n+1),
.ga-strength[data-level="2"] span:nth-child(-n+2),
.ga-strength[data-level="3"] span:nth-child(-n+3),
.ga-strength[data-level="4"] span:nth-child(-n+4) {
  background: var(--ga-primary);
}

/* Switch Toggle */
.ga-switch {
  position: relative;
  width: 36px;
  height: 20px;
}

.ga-switch input { opacity: 0; width: 0; height: 0; }

.ga-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--ga-border);
  border-radius: 24px;
  transition: 0.3s;
}

.ga-switch-slider::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: var(--ga-shadow-sm);
}

.ga-switch input:checked + .ga-switch-slider {
  background: var(--ga-primary);
}

.ga-switch input:checked + .ga-switch-slider::before {
  transform: translateX(20px);
}

/* ========================================
   Chart Placeholder
   ======================================== */
.ga-chart-container {
  position: relative;
  width: 100%;
  min-height: 246px;
}

.ga-chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* ========================================
   Progress Bar
   ======================================== */
.ga-progress {
  height: 5px;
  background: var(--ga-body-bg);
  border-radius: 6px;
  overflow: hidden;
}

.ga-progress-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

/* ========================================
   Overlay (Mobile sidebar)
   ======================================== */
.ga-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1035;
  opacity: 0;
  transition: opacity 0.3s;
}

.ga-overlay.show {
  display: block;
  opacity: 1;
}

/* ========================================
   Footer
   ======================================== */
.ga-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--ga-border);
  font-size: 0.66rem;
  color: var(--ga-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.ga-footer a { color: var(--ga-primary); }
.ga-footer a:hover { text-decoration: underline; }

/* ========================================
   Desktop Sidebar Collapsed
   ======================================== */
body.sidebar-collapsed .ga-sidebar {
  width: var(--sidebar-collapsed);
}

body.sidebar-collapsed .ga-sidebar .ga-sidebar-brand,
body.sidebar-collapsed .ga-sidebar .ga-nav-label,
body.sidebar-collapsed .ga-sidebar .ga-nav-item span,
body.sidebar-collapsed .ga-sidebar .ga-nav-item .ga-chevron,
body.sidebar-collapsed .ga-sidebar .ga-nav-badge,
body.sidebar-collapsed .ga-sidebar .ga-sidebar-user-info {
  display: none;
}

body.sidebar-collapsed .ga-sidebar .ga-sidebar-header {
  justify-content: center;
  padding: 16px 10px;
}

body.sidebar-collapsed .ga-sidebar .ga-nav-item {
  justify-content: center;
  padding: 8px;
  gap: 0;
}

body.sidebar-collapsed .ga-sidebar .ga-nav-icon {
  width: 20px;
  height: 20px;
}

body.sidebar-collapsed .ga-sidebar .ga-submenu,
body.sidebar-collapsed .ga-sidebar .ga-submenu-l3 {
  display: none;
}

body.sidebar-collapsed .ga-sidebar .ga-sidebar-footer {
  padding: 13px 10px;
  justify-content: center;
}

body.sidebar-collapsed .ga-sidebar .ga-sidebar-user {
  justify-content: center;
}

body.sidebar-collapsed .ga-header {
  left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .ga-main {
  margin-left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .ga-sidebar .ga-nav-item.active::before {
  display: none;
}

/* Tooltip on hover for collapsed sidebar */
body.sidebar-collapsed .ga-sidebar .ga-nav-item {
  position: relative;
}

body.sidebar-collapsed .ga-sidebar .ga-nav-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #f1f5f9;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.66rem;
  white-space: nowrap;
  z-index: 1050;
  box-shadow: var(--ga-shadow-lg);
  pointer-events: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .ga-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

  .ga-sidebar.open {
    transform: translateX(0);
  }

  .ga-sidebar.open .ga-sidebar-brand,
  .ga-sidebar.open .ga-nav-label,
  .ga-sidebar.open .ga-nav-item span,
  .ga-sidebar.open .ga-nav-item .ga-chevron,
  .ga-sidebar.open .ga-nav-badge,
  .ga-sidebar.open .ga-sidebar-user-info {
    display: initial;
  }

  .ga-sidebar.open .ga-sidebar-header {
    justify-content: flex-start;
    padding: 16px 20px;
  }

  .ga-sidebar.open .ga-nav-item {
    justify-content: flex-start;
    padding: 8px 10px;
    gap: 10px;
  }

  .ga-sidebar.open .ga-submenu,
  .ga-sidebar.open .ga-submenu-l3 {
    display: block;
  }

  .ga-header {
    left: 0 !important;
  }

  .ga-main {
    margin-left: 0 !important;
  }

  .ga-header-search input {
    width: 164px;
  }
}

@media (max-width: 640px) {
  .ga-content { padding: 13px; }

  .ga-header { padding: 0 13px; }

  .ga-header-search { display: none; }

  .ga-stat-card { padding: 13px; }

  .ga-stat-value { font-size: 1.025rem; }

  .ga-footer { justify-content: center; text-align: center; }
  .ga-page-header { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ========================================
   Utilities
   ======================================== */
.ga-text-primary { color: var(--ga-primary) !important; }
.ga-text-muted { color: var(--ga-text-muted) !important; }
.ga-bg-primary { background: var(--ga-primary) !important; }
.ga-rounded { border-radius: var(--ga-radius) !important; }
.ga-rounded-lg { border-radius: var(--ga-radius-lg) !important; }
.ga-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Simple Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ga-border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ga-text-muted); }

/* ========================================
   Auth Pages (TailAdmin Split Layout)
   ======================================== */
.ga-auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.ga-auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c2434 0%, #0f172a 100%);
  padding: 39px;
  position: relative;
  overflow: hidden;
}

.ga-auth-left::before {
  content: '';
  position: absolute;
  width: 328px;
  height: 328px;
  border-radius: 50%;
  background: rgba(var(--ga-primary-rgb), 0.06);
  top: -100px;
  left: -100px;
}

.ga-auth-left::after {
  content: '';
  position: absolute;
  width: 246px;
  height: 246px;
  border-radius: 50%;
  background: rgba(var(--ga-primary-rgb), 0.04);
  bottom: -80px;
  right: -80px;
}

.ga-auth-left-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
}

.ga-auth-left-inner h2 {
  color: #fff;
  font-size: 1.64rem;
  font-weight: 800;
  margin-bottom: 13px;
  line-height: 1.3;
}

.ga-auth-left-inner p {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  line-height: 1.7;
}

.ga-auth-illustration {
  width: 100%;
  max-width: 320px;
  margin: 26px auto 0;
}

.ga-auth-illustration svg {
  width: 100%;
  height: auto;
}

.ga-auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 39px;
  background: var(--ga-card-bg);
}

.ga-auth-card {
  width: 100%;
  max-width: 440px;
}

/* Legacy single-card login (backward compat) */
.ga-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c2434 0%, #0f172a 100%);
  padding: 20px;
}

.ga-login-card {
  background: var(--ga-card-bg);
  border-radius: var(--ga-radius-lg);
  box-shadow: var(--ga-shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 33px;
}

.ga-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.ga-login-divider,
.ga-auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ga-text-muted);
  font-size: 0.66rem;
  margin: 16px 0;
}

.ga-login-divider::before,
.ga-login-divider::after,
.ga-auth-divider::before,
.ga-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ga-border);
}

@media (max-width: 768px) {
  .ga-auth-wrapper { flex-direction: column; }
  .ga-auth-left { display: none; }
  .ga-auth-right { min-height: 100vh; padding: 20px; }
}

/* ========================================
   Error / Special Pages
   ======================================== */
.ga-error-wrapper,
.ga-special-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: var(--ga-body-bg);
}

.ga-error-code {
  font-size: 6.56rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--ga-primary), #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 13px;
}

.ga-special-icon {
  width: 98px;
  height: 98px;
  margin: 0 auto 20px;
  background: rgba(var(--ga-primary-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ga-special-icon svg {
  width: 46px;
  height: 46px;
  color: var(--ga-primary);
}

.ga-countdown {
  display: flex;
  gap: 13px;
  justify-content: center;
  margin: 20px 0;
}

.ga-countdown-item {
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius-lg);
  padding: 13px 16px;
  min-width: 66px;
  box-shadow: var(--ga-shadow-sm);
}

.ga-countdown-value {
  font-size: 1.64rem;
  font-weight: 800;
  color: var(--ga-text);
  line-height: 1;
}

.ga-countdown-label {
  font-size: 0.66rem;
  color: var(--ga-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ========================================
   Dropdown (simple)
   ======================================== */
.ga-dropdown {
  position: relative;
}

.ga-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 164px;
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  box-shadow: var(--ga-shadow-lg);
  padding: 7px;
  z-index: 1050;
  display: none;
}

.ga-dropdown-menu.show { display: block; }

.ga-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.695rem;
  color: var(--ga-text);
  cursor: pointer;
  transition: background 0.15s;
}

.ga-dropdown-item:hover { background: var(--ga-body-bg); }
.ga-dropdown-item svg { width: 15px; height: 15px; color: var(--ga-text-muted); }
.ga-dropdown-divider { height: 1px; background: var(--ga-border); margin: 5px 0; }

/* ========================================
   DataTable Styles
   ======================================== */
.ga-dt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  flex-wrap: wrap;
  padding: 13px 16px;
}

.ga-dt-search {
  position: relative;
}

.ga-dt-search input {
  background: var(--ga-body-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  padding: 7px 10px 7px 30px;
  font-size: 0.695rem;
  color: var(--ga-text);
  width: 213px;
  font-family: inherit;
  transition: all 0.2s;
}

.ga-dt-search input:focus {
  outline: none;
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.15);
}

.ga-dt-search svg {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--ga-text-muted);
}

.ga-dt-per-page {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.695rem;
  color: var(--ga-text-secondary);
}

.ga-dt-per-page select {
  padding: 5px 7px;
  border: 1px solid var(--ga-border);
  border-radius: 6px;
  background: var(--ga-card-bg);
  color: var(--ga-text);
  font-size: 0.695rem;
  font-family: inherit;
}

.ga-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 23px;
}

.ga-table thead th.sortable::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ga-text-muted);
  opacity: 0.4;
}

.ga-table thead th.sortable.asc::after {
  border-top: none;
  border-bottom: 5px solid var(--ga-primary);
  opacity: 1;
}

.ga-table thead th.sortable.desc::after {
  border-top: 5px solid var(--ga-primary);
  opacity: 1;
}

.ga-dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--ga-border);
}

.ga-dt-info {
  font-size: 0.67rem;
  color: var(--ga-text-muted);
}

.ga-dt-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ga-dt-pagination button {
  background: transparent;
  border: 1px solid var(--ga-border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.67rem;
  color: var(--ga-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.ga-dt-pagination button:hover {
  border-color: var(--ga-primary);
  color: var(--ga-primary);
  background: rgba(var(--ga-primary-rgb), 0.05);
}

.ga-dt-pagination button.active {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
  color: #fff;
}

.ga-dt-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================
   Alert Styles
   ======================================== */
.ga-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 15px;
  border-radius: var(--ga-radius);
  border-left: 4px solid;
  margin-bottom: 10px;
  font-size: 0.74rem;
}

.ga-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.ga-alert-success { background: rgba(16,185,129,0.08); border-color: #10b981; color: #065f46; }
.ga-alert-warning { background: rgba(245,158,11,0.08); border-color: #f59e0b; color: #92400e; }
.ga-alert-danger { background: rgba(239,68,68,0.08); border-color: #ef4444; color: #991b1b; }
.ga-alert-info { background: rgba(59,130,246,0.08); border-color: #3b82f6; color: #1e40af; }

/* Dark alert text colors - handled by css/theme.css */

.ga-alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  padding: 0;
  transition: opacity 0.2s;
}

.ga-alert-close:hover { opacity: 1; }

/* ========================================
   Profile / Avatar
   ======================================== */
.ga-profile-cover {
  height: 164px;
  background: linear-gradient(135deg, #1c2434 0%, var(--ga-primary-dark) 50%, var(--ga-primary) 100%);
  border-radius: var(--ga-radius-lg) var(--ga-radius-lg) 0 0;
  position: relative;
}

.ga-profile-avatar {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 4px solid var(--ga-card-bg);
  background: linear-gradient(135deg, var(--ga-primary), #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.05rem;
  font-weight: 800;
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--ga-shadow-lg);
}

/* ========================================
   Calendar Grid
   ======================================== */
.ga-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--ga-border);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  overflow: hidden;
}

.ga-calendar-header {
  background: var(--ga-body-bg);
  padding: 8px 4px;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ga-text-secondary);
}

.ga-calendar-day {
  background: var(--ga-card-bg);
  padding: 7px;
  min-height: 66px;
  font-size: 0.67rem;
  position: relative;
}

.ga-calendar-day.other-month {
  color: var(--ga-text-muted);
  background: var(--ga-body-bg);
}

.ga-calendar-day.today .ga-calendar-num {
  background: var(--ga-primary);
  color: #fff;
  border-radius: 50%;
  width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ga-calendar-num {
  font-weight: 600;
  margin-bottom: 4px;
}

.ga-calendar-event {
  font-size: 0.66rem;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Inbox / Messages
   ======================================== */
.ga-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ga-border);
  cursor: pointer;
  transition: background 0.15s;
}

.ga-inbox-item:hover { background: rgba(var(--ga-primary-rgb), 0.03); }

.ga-inbox-item.unread {
  background: rgba(var(--ga-primary-rgb), 0.04);
}

.ga-inbox-item.unread .ga-inbox-subject { font-weight: 700; }

.ga-inbox-subject {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ga-text);
  margin-bottom: 2px;
}

.ga-inbox-preview {
  font-size: 0.67rem;
  color: var(--ga-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ga-inbox-time {
  font-size: 0.66rem;
  color: var(--ga-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========================================
   Pricing Cards
   ======================================== */
.ga-pricing-card {
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius-lg);
  padding: 26px 23px;
  text-align: center;
  transition: all 0.2s;
}

.ga-pricing-card:hover {
  box-shadow: var(--ga-shadow-lg);
  transform: translateY(-4px);
}

.ga-pricing-card.featured {
  border-color: var(--ga-primary);
  position: relative;
  overflow: hidden;
}

.ga-pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: 13px;
  right: -28px;
  background: var(--ga-primary);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 4px 30px;
  transform: rotate(45deg);
}

.ga-pricing-price {
  font-size: 2.05rem;
  font-weight: 800;
  color: var(--ga-text);
  line-height: 1;
  margin: 13px 0;
}

.ga-pricing-price small {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ga-text-muted);
}

.ga-pricing-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: left;
}

.ga-pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.72rem;
  color: var(--ga-text-secondary);
  border-bottom: 1px solid var(--ga-border);
}

.ga-pricing-features li:last-child { border-bottom: none; }

.ga-pricing-features li svg {
  width: 15px;
  height: 15px;
  color: var(--ga-primary);
  flex-shrink: 0;
}

/* ========================================
   FAQ Accordion
   ======================================== */
.ga-faq-item {
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  margin-bottom: 7px;
  overflow: hidden;
}

.ga-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ga-text);
  transition: background 0.15s;
}

.ga-faq-question:hover { background: rgba(var(--ga-primary-rgb), 0.03); }

.ga-faq-question svg {
  width: 15px;
  height: 15px;
  color: var(--ga-text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.ga-faq-item.open .ga-faq-question svg { transform: rotate(180deg); }

.ga-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ga-faq-item.open .ga-faq-answer { max-height: 300px; }

.ga-faq-answer-inner {
  padding: 0 16px 13px;
  font-size: 0.74rem;
  color: var(--ga-text-secondary);
  line-height: 1.7;
}

/* ========================================
   Ribbons
   ======================================== */
.ga-ribbon-wrapper {
  position: relative;
  overflow: hidden;
}

.ga-ribbon {
  position: absolute;
  padding: 4px 20px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}

.ga-ribbon-top-left {
  top: 13px;
  left: -8px;
  border-radius: 0 4px 4px 0;
}

.ga-ribbon-top-left::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  border-width: 3px 4px;
  border-style: solid;
  border-color: transparent;
}

.ga-ribbon-top-right {
  top: 13px;
  right: -8px;
  border-radius: 4px 0 0 4px;
}

.ga-ribbon-top-right::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: -6px;
  border-width: 3px 4px;
  border-style: solid;
  border-color: transparent;
}

.ga-ribbon-corner {
  top: 11px;
  right: -32px;
  padding: 4px 33px;
  transform: rotate(45deg);
}

.ga-ribbon-primary { background: var(--ga-primary); }
.ga-ribbon-primary.ga-ribbon-top-left::before { border-top-color: var(--ga-primary-dark); border-right-color: var(--ga-primary-dark); }
.ga-ribbon-primary.ga-ribbon-top-right::before { border-top-color: var(--ga-primary-dark); border-left-color: var(--ga-primary-dark); }
.ga-ribbon-danger { background: #ef4444; }
.ga-ribbon-danger.ga-ribbon-top-left::before { border-top-color: #b91c1c; border-right-color: #b91c1c; }
.ga-ribbon-warning { background: #f59e0b; }
.ga-ribbon-info { background: #3b82f6; }
.ga-ribbon-dark { background: #1e293b; }

/* ========================================
   Custom Tabs (ga-tabs)
   ======================================== */
.ga-tabs {
  display: flex;
  border-bottom: 2px solid var(--ga-border);
  gap: 0;
  margin-bottom: 16px;
}

.ga-tab {
  padding: 8px 16px;
  font-size: 0.715rem;
  font-weight: 600;
  color: var(--ga-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-family: inherit;
}

.ga-tab:hover { color: var(--ga-text); }

.ga-tab.active {
  color: var(--ga-primary);
}

.ga-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ga-primary);
  border-radius: 2px 2px 0 0;
}

.ga-tab-content { display: none; }
.ga-tab-content.active { display: block; }

/* ========================================
   Responsive ga-tabs for Mobile
   ======================================== */
@media (max-width: 767.98px) {
  .ga-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: none;
  }

  .ga-tab {
    flex: 1 1 auto;
    min-width: 100px;
    max-width: 50%;
    padding: 10px 8px;
    font-size: 0.74rem;
    text-align: center;
    border-bottom: 2px solid var(--ga-border);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ga-tab.active {
    border-bottom-color: var(--ga-primary);
  }

  .ga-tab.active::after {
    display: none;
  }
}

/* ========================================
   Notification Toasts
   ======================================== */
.ga-toast-container {
  position: fixed;
  top: 66px;
  right: 20px;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ga-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  box-shadow: var(--ga-shadow-lg);
  padding: 11px 15px;
  min-width: 262px;
  max-width: 420px;
  animation: slideInRight 0.3s ease;
}

.ga-toast-icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.ga-toast-body { flex: 1; }
.ga-toast-title { font-weight: 600; font-size: 0.72rem; color: var(--ga-text); margin-bottom: 2px; }
.ga-toast-message { font-size: 0.67rem; color: var(--ga-text-muted); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ga-animate-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ========================================
   SVG Icon System (ga-icon-*)
   Icons callable via CSS class names
   ======================================== */
.ga-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ga-icon-sm { width: 13px; height: 13px; }
.ga-icon-md { width: 16px; height: 16px; }
.ga-icon-lg { width: 20px; height: 20px; }
.ga-icon-xl { width: 26px; height: 26px; }
.ga-icon-2xl { width: 33px; height: 33px; }
.ga-icon-3xl { width: 39px; height: 39px; }

/* Icon with background circle */
.ga-icon-circle {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ga-icon-circle .ga-icon { width: 16px; height: 16px; }

.ga-icon-circle-sm { width: 26px; height: 26px; }
.ga-icon-circle-sm .ga-icon { width: 13px; height: 13px; }

.ga-icon-circle-lg { width: 46px; height: 46px; }
.ga-icon-circle-lg .ga-icon { width: 23px; height: 23px; }

/* Icon circle color variants */
.ga-icon-circle-primary { background: rgba(var(--ga-primary-rgb), 0.12); color: var(--ga-primary); }
.ga-icon-circle-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.ga-icon-circle-red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.ga-icon-circle-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.ga-icon-circle-yellow { background: rgba(234, 179, 8, 0.12); color: #eab308; }
.ga-icon-circle-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.ga-icon-circle-teal { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.ga-icon-circle-dark { background: rgba(30, 41, 59, 0.12); color: #1e293b; }

/* Icon Gallery Styles */
.ga-icon-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ga-icon-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 7px;
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  background: var(--ga-card-bg);
}

.ga-icon-gallery-item:hover {
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.1);
  transform: translateY(-2px);
}

.ga-icon-gallery-item .ga-icon,
.ga-icon-gallery-item .ga {
  width: 20px;
  height: 20px;
  color: var(--ga-text);
}

.ga-icon-gallery-item:hover .ga-icon,
.ga-icon-gallery-item:hover .ga {
  color: var(--ga-primary);
}

.ga-icon-gallery-item span {
  font-size: 0.66rem;
  color: var(--ga-text-muted);
  word-break: break-all;
}

/* ========================================
   Input with Icon
   ======================================== */
.ga-input-icon {
  position: relative;
}

.ga-input-icon .ga-form-control {
  padding-left: 34px;
}

.ga-input-icon.icon-right .ga-form-control {
  padding-left: 11px;
  padding-right: 34px;
}

.ga-input-icon .ga-input-icon-el {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ga-text-muted);
  display: flex;
  pointer-events: none;
}

.ga-input-icon.icon-right .ga-input-icon-el {
  left: auto;
  right: 11px;
}

.ga-input-icon .ga-input-icon-el svg {
  width: 15px;
  height: 15px;
}

/* ========================================
   Validation States
   ======================================== */
.ga-form-control.is-valid {
  border-color: #10b981;
}

.ga-form-control.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.ga-form-control.is-invalid {
  border-color: #ef4444;
}

.ga-form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.ga-form-feedback {
  font-size: 0.66rem;
  margin-top: 4px;
}

.ga-form-feedback.valid { color: #10b981; }
.ga-form-feedback.invalid { color: #ef4444; }

/* ========================================
   Input Group
   ======================================== */
.ga-input-group {
  display: flex;
  align-items: stretch;
}

.ga-input-group .ga-form-control {
  border-radius: 0;
  flex: 1;
}

.ga-input-group .ga-form-control:first-child {
  border-radius: var(--ga-radius) 0 0 var(--ga-radius);
}

.ga-input-group .ga-form-control:last-child {
  border-radius: 0 var(--ga-radius) var(--ga-radius) 0;
}

.ga-input-addon {
  display: flex;
  align-items: center;
  padding: 0 11px;
  background: var(--ga-body-bg);
  border: 1px solid var(--ga-border);
  color: var(--ga-text-secondary);
  font-size: 0.715rem;
  white-space: nowrap;
}

.ga-input-addon:first-child {
  border-right: none;
  border-radius: var(--ga-radius) 0 0 var(--ga-radius);
}

.ga-input-addon:last-child {
  border-left: none;
  border-radius: 0 var(--ga-radius) var(--ga-radius) 0;
}

.ga-input-addon svg {
  width: 15px;
  height: 15px;
}

.ga-input-group .ga-btn:first-child {
  border-radius: var(--ga-radius) 0 0 var(--ga-radius);
}

.ga-input-group .ga-btn:last-child {
  border-radius: 0 var(--ga-radius) var(--ga-radius) 0;
}

/* ========================================
   Dropzone
   ======================================== */
.ga-dropzone {
  border: 2px dashed var(--ga-border);
  border-radius: var(--ga-radius-lg);
  padding: 33px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--ga-body-bg);
}

.ga-dropzone:hover,
.ga-dropzone.dragover {
  border-color: var(--ga-primary);
  background: rgba(var(--ga-primary-rgb), 0.03);
}

.ga-dropzone svg {
  width: 39px;
  height: 39px;
  color: var(--ga-text-muted);
  margin-bottom: 10px;
}

.ga-dropzone p {
  color: var(--ga-text-secondary);
  font-size: 0.74rem;
  margin: 0;
}

.ga-dropzone .ga-dropzone-hint {
  color: var(--ga-text-muted);
  font-size: 0.66rem;
  margin-top: 4px;
}

/* ========================================
   Custom Checkbox & Radio
   ======================================== */
.ga-checkbox,
.ga-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.715rem;
  color: var(--ga-text);
}

.ga-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ga-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  flex-shrink: 0;
  background: var(--ga-card-bg);
}

.ga-checkbox input[type="checkbox"]:checked {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
}

.ga-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ga-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ga-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  flex-shrink: 0;
  background: var(--ga-card-bg);
}

.ga-radio input[type="radio"]:checked {
  border-color: var(--ga-primary);
}

.ga-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ga-primary);
}

/* Disabled form control */
.ga-form-control:disabled,
.ga-form-control[readonly] {
  background: var(--ga-body-bg);
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========================================
   DataTable Checkbox & Enhancements
   ======================================== */
.ga-dt-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ga-dt-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 2px solid var(--ga-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  background: var(--ga-card-bg);
}

.ga-dt-checkbox input[type="checkbox"]:checked {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
}

.ga-dt-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ga-table tbody tr.selected td {
  background: rgba(var(--ga-primary-rgb), 0.06);
}

/* DataTable Action Dropdown */
.ga-dt-action {
  position: relative;
}

.ga-dt-action-btn {
  background: none;
  border: 1px solid var(--ga-border);
  padding: 4px 7px;
  cursor: pointer;
  color: var(--ga-text-muted);
  border-radius: 6px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.67rem;
  font-family: inherit;
}

.ga-dt-action-btn:hover {
  background: var(--ga-body-bg);
  color: var(--ga-text);
  border-color: var(--ga-primary);
}

.ga-dt-action-btn svg {
  width: 13px;
  height: 13px;
}

.ga-dt-action-menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 123px;
  background: var(--ga-card-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  box-shadow: var(--ga-shadow-lg);
  padding: 5px;
  z-index: 10;
  display: none;
}

.ga-dt-action-menu.show {
  display: block;
}

.ga-dt-action-menu a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  font-size: 0.67rem;
  border-radius: 4px;
  color: var(--ga-text);
  transition: background 0.15s;
}

.ga-dt-action-menu a:hover {
  background: var(--ga-body-bg);
}

.ga-dt-action-menu a svg {
  width: 11px;
  height: 11px;
  color: var(--ga-text-muted);
}

/* DataTable with no header border variant */
.ga-card.ga-dt-card .ga-card-header {
  border-bottom: none;
  padding-bottom: 0;
}

/* Wizard Steps */
.ga-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 26px;
  counter-reset: step;
}

.ga-wizard-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.695rem;
  font-weight: 600;
  color: var(--ga-text-muted);
  position: relative;
}

.ga-wizard-step .ga-wizard-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ga-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  transition: all 0.2s;
  background: var(--ga-card-bg);
}

.ga-wizard-step.active .ga-wizard-num {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
  color: #fff;
}

.ga-wizard-step.active {
  color: var(--ga-text);
}

.ga-wizard-step.completed .ga-wizard-num {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
  color: #fff;
}

.ga-wizard-line {
  width: 49px;
  height: 2px;
  background: var(--ga-border);
  margin: 0 10px;
}

.ga-wizard-line.active {
  background: var(--ga-primary);
}

/* Floating Label */
.ga-floating-label {
  position: relative;
}

.ga-floating-label .ga-form-control {
  padding-top: 16px;
  padding-bottom: 5px;
}

.ga-floating-label label {
  position: absolute;
  top: 50%;
  left: 11px;
  transform: translateY(-50%);
  color: var(--ga-text-muted);
  font-size: 0.74rem;
  pointer-events: none;
  transition: all 0.2s;
}

.ga-floating-label .ga-form-control:focus ~ label,
.ga-floating-label .ga-form-control:not(:placeholder-shown) ~ label {
  top: 8px;
  font-size: 0.66rem;
  color: var(--ga-primary);
}

/* Color Input */
.ga-color-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ga-color-input input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ga-border);
  border-radius: var(--ga-radius);
  cursor: pointer;
  padding: 2px;
  background: var(--ga-card-bg);
}

.ga-color-input input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.ga-color-input input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

/* ========================================
   jQuery DataTables 2.x Theme Overrides
   Selectors follow the DataTables 2 markup (dt-container / dt-length /
   dt-search / dt-info / dt-paging / dt-orderable-*).
   ======================================== */
.ga-card-body div.dt-container {
  padding: 0;
}

div.dt-container .dt-layout-row {
  align-items: center;
}

div.dt-container .dt-length label,
div.dt-container .dt-search label {
  font-size: 0.695rem;
  color: var(--ga-text-secondary);
  margin: 0;
  white-space: nowrap;
}

div.dt-container .dt-length select,
div.dt-container .dt-search input {
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  background: var(--ga-card-bg);
  color: var(--ga-text);
  font-size: 0.695rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

div.dt-container .dt-length select {
  padding: 5px 23px 5px 10px;
  appearance: auto;
  min-width: 49px;
}

div.dt-container .dt-search input {
  padding: 7px 11px;
  margin-left: 7px;
}

div.dt-container .dt-length select:focus,
div.dt-container .dt-search input:focus {
  border-color: var(--ga-primary);
  box-shadow: 0 0 0 3px rgba(var(--ga-primary-rgb), 0.12);
}

div.dt-container .dt-info {
  font-size: 0.67rem;
  color: var(--ga-text-muted);
  padding: 13px 0 0 0;
}

div.dt-container .dt-paging {
  padding: 13px 0 0 0;
}

div.dt-container .dt-paging .pagination {
  margin: 0;
  justify-content: flex-end;
}

div.dt-container .dt-paging .page-link {
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  margin: 0 2px;
  background: var(--ga-card-bg);
  color: var(--ga-text-secondary);
  font-size: 0.67rem;
  transition: all 0.15s;
}

div.dt-container .dt-paging .page-link:hover {
  color: var(--ga-text);
  background: rgba(var(--ga-primary-rgb), 0.06);
  border-color: var(--ga-border);
}

div.dt-container .dt-paging .page-item.active .page-link {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
  color: #fff;
  font-weight: 600;
}

div.dt-container .dt-paging .page-item.disabled .page-link {
  opacity: 0.4;
  background: var(--ga-card-bg);
  color: var(--ga-text-muted);
}

table.dataTable {
  border-collapse: collapse !important;
  color: var(--ga-text);
}

table.dataTable > thead > tr > th {
  background-color: #f9fafb;
  color: var(--ga-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11.5px;
  text-align: center !important;
  vertical-align: middle !important;
  border-bottom: 2px solid var(--ga-primary) !important;
}

table.dataTable > thead > tr > th .dt-column-title {
  display: flex;
  justify-content: center;
  align-items: center;
}

table.dataTable > tbody > tr > td {
  border-bottom: 1px solid var(--ga-border) !important;
}

table.dataTable > tbody > tr:hover > td {
  background: rgba(var(--ga-primary-rgb), 0.03);
}

table.dataTable.no-footer {
  border-bottom: none !important;
}

/* Sort indicators: replace the built-in glyphs with themed chevrons.
   Positioning is left to DataTables default (absolute, right: 12px). */
table.dataTable > thead > tr > th.dt-orderable-asc span.dt-column-order,
table.dataTable > thead > tr > th.dt-orderable-desc span.dt-column-order,
table.dataTable > thead > tr > th.dt-ordering-asc span.dt-column-order,
table.dataTable > thead > tr > th.dt-ordering-desc span.dt-column-order {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
  height: 14px !important;
  width: 12px !important;
}

table.dataTable > thead > tr > th.dt-orderable-asc span.dt-column-order::before,
table.dataTable > thead > tr > th.dt-orderable-asc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-orderable-desc span.dt-column-order::before,
table.dataTable > thead > tr > th.dt-orderable-desc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-ordering-asc span.dt-column-order::before,
table.dataTable > thead > tr > th.dt-ordering-asc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-ordering-desc span.dt-column-order::before,
table.dataTable > thead > tr > th.dt-ordering-desc span.dt-column-order::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M7 15l5 5 5-5'/%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

table.dataTable > thead > tr > th.dt-orderable-asc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-orderable-desc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-ordering-asc span.dt-column-order::after,
table.dataTable > thead > tr > th.dt-ordering-desc span.dt-column-order::after {
  display: none;
}

table.dataTable > thead > tr > th.dt-ordering-asc span.dt-column-order::before {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2339d353' stroke-width='2.5'%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3C/svg%3E");
}

table.dataTable > thead > tr > th.dt-ordering-desc span.dt-column-order::before {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2339d353' stroke-width='2.5'%3E%3Cpath d='M7 15l5 5 5-5'/%3E%3C/svg%3E");
}


/* ========================================
   Typography Utility Classes (Tailwind-compatible)
   ======================================== */

/* Font Size */
.text-xs { font-size: 0.66rem; line-height: 1rem; }
.text-sm { font-size: 0.715rem; line-height: 1.25rem; }
.text-base { font-size: 0.82rem; line-height: 1.5rem; }
.text-lg { font-size: 0.92rem; line-height: 1.75rem; }
.text-xl { font-size: 1.025rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.23rem; line-height: 2rem; }
.text-3xl { font-size: 1.54rem; line-height: 2.25rem; }
.text-4xl { font-size: 1.845rem; line-height: 2.5rem; }
.text-5xl { font-size: 2.46rem; line-height: 1; }
.text-6xl { font-size: 3.075rem; line-height: 1; }
.text-7xl { font-size: 3.69rem; line-height: 1; }
.text-8xl { font-size: 4.92rem; line-height: 1; }
.text-9xl { font-size: 6.56rem; line-height: 1; }

/* Font Weight */
.font-thin { font-weight: 100; }
.font-extralight { font-weight: 200; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Line Height (Leading) */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

/* Letter Spacing (Tracking) */
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Text Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Text Decoration */
.underline { text-decoration: underline; }
.overline { text-decoration: overline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* Font Style */
.italic { font-style: italic; }
.not-italic { font-style: normal; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text Overflow */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-words { overflow-wrap: break-word; word-break: break-word; }
.break-all { word-break: break-all; }

/* Font Smoothing */
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.subpixel-antialiased { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }

/* Numeric */
.tabular-nums { font-variant-numeric: tabular-nums; }
.proportional-nums { font-variant-numeric: proportional-nums; }
.oldstyle-nums { font-variant-numeric: oldstyle-nums; }
.lining-nums { font-variant-numeric: lining-nums; }

/* ========================================
   Compact Density Layer
   Bootstrap and DataTables ship on a 16px / 1rem-spacer scale. The rules below
   pull their components and spacing utilities onto the same compact scale the
   ga-* components use, without editing any vendor file.
   Tune via the --ga-space-* / --ga-font-size-base variables in :root.
   ======================================== */

/* --- Bootstrap base typography --- */
body {
  --bs-body-font-size: var(--ga-font-size-base);
  --bs-body-line-height: var(--ga-line-height);
}

h1, .h1 { font-size: 1.45rem; }
h2, .h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.1rem; }
h4, .h4 { font-size: 0.98rem; }
h5, .h5 { font-size: 0.88rem; }
h6, .h6 { font-size: 0.8rem; }
p { margin-bottom: var(--ga-space-3); }
.lead { font-size: 1rem; }
.small, small { font-size: 0.72rem; }

/* --- Bootstrap spacing utilities: compact scale --- */
.m-1 { margin: var(--ga-space-1) !important; }
.m-2 { margin: var(--ga-space-2) !important; }
.m-3 { margin: var(--ga-space-3) !important; }
.m-4 { margin: var(--ga-space-4) !important; }
.m-5 { margin: var(--ga-space-5) !important; }

.mt-1, .my-1 { margin-top: var(--ga-space-1) !important; }
.mt-2, .my-2 { margin-top: var(--ga-space-2) !important; }
.mt-3, .my-3 { margin-top: var(--ga-space-3) !important; }
.mt-4, .my-4 { margin-top: var(--ga-space-4) !important; }
.mt-5, .my-5 { margin-top: var(--ga-space-5) !important; }

.mb-1, .my-1 { margin-bottom: var(--ga-space-1) !important; }
.mb-2, .my-2 { margin-bottom: var(--ga-space-2) !important; }
.mb-3, .my-3 { margin-bottom: var(--ga-space-3) !important; }
.mb-4, .my-4 { margin-bottom: var(--ga-space-4) !important; }
.mb-5, .my-5 { margin-bottom: var(--ga-space-5) !important; }

.ms-1, .mx-1 { margin-left: var(--ga-space-1) !important; }
.ms-2, .mx-2 { margin-left: var(--ga-space-2) !important; }
.ms-3, .mx-3 { margin-left: var(--ga-space-3) !important; }
.ms-4, .mx-4 { margin-left: var(--ga-space-4) !important; }
.ms-5, .mx-5 { margin-left: var(--ga-space-5) !important; }

.me-1, .mx-1 { margin-right: var(--ga-space-1) !important; }
.me-2, .mx-2 { margin-right: var(--ga-space-2) !important; }
.me-3, .mx-3 { margin-right: var(--ga-space-3) !important; }
.me-4, .mx-4 { margin-right: var(--ga-space-4) !important; }
.me-5, .mx-5 { margin-right: var(--ga-space-5) !important; }

.p-1 { padding: var(--ga-space-1) !important; }
.p-2 { padding: var(--ga-space-2) !important; }
.p-3 { padding: var(--ga-space-3) !important; }
.p-4 { padding: var(--ga-space-4) !important; }
.p-5 { padding: var(--ga-space-5) !important; }

.pt-1, .py-1 { padding-top: var(--ga-space-1) !important; }
.pt-2, .py-2 { padding-top: var(--ga-space-2) !important; }
.pt-3, .py-3 { padding-top: var(--ga-space-3) !important; }
.pt-4, .py-4 { padding-top: var(--ga-space-4) !important; }
.pt-5, .py-5 { padding-top: var(--ga-space-5) !important; }

.pb-1, .py-1 { padding-bottom: var(--ga-space-1) !important; }
.pb-2, .py-2 { padding-bottom: var(--ga-space-2) !important; }
.pb-3, .py-3 { padding-bottom: var(--ga-space-3) !important; }
.pb-4, .py-4 { padding-bottom: var(--ga-space-4) !important; }
.pb-5, .py-5 { padding-bottom: var(--ga-space-5) !important; }

.ps-1, .px-1 { padding-left: var(--ga-space-1) !important; }
.ps-2, .px-2 { padding-left: var(--ga-space-2) !important; }
.ps-3, .px-3 { padding-left: var(--ga-space-3) !important; }
.ps-4, .px-4 { padding-left: var(--ga-space-4) !important; }
.ps-5, .px-5 { padding-left: var(--ga-space-5) !important; }

.pe-1, .px-1 { padding-right: var(--ga-space-1) !important; }
.pe-2, .px-2 { padding-right: var(--ga-space-2) !important; }
.pe-3, .px-3 { padding-right: var(--ga-space-3) !important; }
.pe-4, .px-4 { padding-right: var(--ga-space-4) !important; }
.pe-5, .px-5 { padding-right: var(--ga-space-5) !important; }

.gap-1 { gap: var(--ga-space-1) !important; }
.gap-2 { gap: var(--ga-space-2) !important; }
.gap-3 { gap: var(--ga-space-3) !important; }
.gap-4 { gap: var(--ga-space-4) !important; }
.gap-5 { gap: var(--ga-space-5) !important; }

/* --- Row gutters --- */
.row { --bs-gutter-x: var(--ga-space-3); }
.g-1, .gx-1 { --bs-gutter-x: var(--ga-space-1); }
.g-1, .gy-1 { --bs-gutter-y: var(--ga-space-1); }
.g-2, .gx-2 { --bs-gutter-x: var(--ga-space-2); }
.g-2, .gy-2 { --bs-gutter-y: var(--ga-space-2); }
.g-3, .gx-3 { --bs-gutter-x: var(--ga-space-3); }
.g-3, .gy-3 { --bs-gutter-y: var(--ga-space-3); }
.g-4, .gx-4 { --bs-gutter-x: var(--ga-space-4); }
.g-4, .gy-4 { --bs-gutter-y: var(--ga-space-4); }
.g-5, .gx-5 { --bs-gutter-x: var(--ga-space-5); }
.g-5, .gy-5 { --bs-gutter-y: var(--ga-space-5); }

/* --- Bootstrap cards --- */
.card {
  --bs-card-spacer-y: 0.8rem;
  --bs-card-spacer-x: 1rem;
  --bs-card-cap-padding-y: 0.6rem;
  --bs-card-cap-padding-x: 1rem;
  --bs-card-title-spacer-y: 0.4rem;
}

/* --- Bootstrap tables --- */
.table {
  --bs-table-cell-padding-y: 0.4rem;
  --bs-table-cell-padding-x: 0.6rem;
  font-size: 0.76rem;
}
.table-sm {
  --bs-table-cell-padding-y: 0.25rem;
  --bs-table-cell-padding-x: 0.4rem;
}
.table > :not(caption) > * > * { vertical-align: middle; }

/* --- Bootstrap buttons --- */
.btn {
  --bs-btn-padding-y: 0.32rem;
  --bs-btn-padding-x: 0.7rem;
  --bs-btn-font-size: 0.76rem;
  --bs-btn-border-radius: 6px;
}
.btn-sm {
  --bs-btn-padding-y: 0.2rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.7rem;
}
.btn-lg {
  --bs-btn-padding-y: 0.45rem;
  --bs-btn-padding-x: 0.9rem;
  --bs-btn-font-size: 0.88rem;
}

/* --- Bootstrap forms --- */
.form-control, .form-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  min-height: 0;
}
.form-control-sm, .form-select-sm { padding: 0.22rem 0.45rem; font-size: 0.72rem; }
.form-control-lg, .form-select-lg { padding: 0.5rem 0.8rem; font-size: 0.9rem; }
.form-label { margin-bottom: 0.3rem; font-size: 0.76rem; }
.form-text { font-size: 0.7rem; margin-top: 0.2rem; }
.form-check { margin-bottom: 0.2rem; min-height: 1.2rem; }
.form-check-label { font-size: 0.78rem; }
.input-group-text { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
textarea.form-control { min-height: 68px; }
.col-form-label { padding-top: 0.35rem; padding-bottom: 0.35rem; font-size: 0.76rem; }

/* --- Bootstrap modals --- */
.modal {
  --bs-modal-padding: 1rem;
  --bs-modal-header-padding: 0.7rem 1rem;
  --bs-modal-margin: 0.6rem;
  --bs-modal-title-line-height: 1.3;
  --bs-modal-border-radius: 10px;
}
.modal-title { font-size: 0.95rem; }
.modal-footer { padding: 0.6rem 1rem; gap: 0.4rem; }
.modal-footer > * { margin: 0; }

/* --- Bootstrap nav / tabs / pills --- */
.nav-link { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
.nav-tabs { --bs-nav-tabs-border-radius: 6px; }

/* --- Bootstrap dropdowns --- */
.dropdown-menu {
  --bs-dropdown-padding-y: 0.25rem;
  --bs-dropdown-item-padding-y: 0.3rem;
  --bs-dropdown-item-padding-x: 0.7rem;
  --bs-dropdown-font-size: 0.78rem;
  --bs-dropdown-border-radius: 8px;
}
.dropdown-divider { margin: 0.25rem 0; }

/* --- Bootstrap alerts / badges / list groups --- */
.alert { --bs-alert-padding-y: 0.6rem; --bs-alert-padding-x: 0.8rem; font-size: 0.78rem; }
/* rem, not em: an em-based badge compounds inside .small and drops below 9px */
.badge { --bs-badge-padding-y: 0.25rem; --bs-badge-padding-x: 0.45rem; --bs-badge-font-size: 0.68rem; }
.list-group { --bs-list-group-item-padding-y: 0.45rem; --bs-list-group-item-padding-x: 0.7rem; font-size: 0.78rem; }

/* --- Bootstrap accordion --- */
.accordion {
  --bs-accordion-btn-padding-y: 0.6rem;
  --bs-accordion-btn-padding-x: 0.8rem;
  --bs-accordion-body-padding-y: 0.7rem;
  --bs-accordion-body-padding-x: 0.8rem;
}
.accordion-button { font-size: 0.8rem; }

/* --- Bootstrap misc --- */
.progress, .progress-stacked { --bs-progress-height: 0.75rem; --bs-progress-font-size: 0.65rem; }
.breadcrumb { --bs-breadcrumb-item-padding-x: 0.4rem; --bs-breadcrumb-margin-bottom: 0.5rem; font-size: 0.76rem; }
.pagination { --bs-pagination-padding-y: 0.25rem; --bs-pagination-padding-x: 0.55rem; --bs-pagination-font-size: 0.76rem; }
.toast { --bs-toast-padding-x: 0.7rem; --bs-toast-padding-y: 0.45rem; --bs-toast-font-size: 0.78rem; }
.popover { --bs-popover-font-size: 0.75rem; --bs-popover-body-padding-y: 0.5rem; --bs-popover-body-padding-x: 0.7rem; }
.tooltip { --bs-tooltip-font-size: 0.72rem; }
.carousel-caption { padding-top: 0.7rem; padding-bottom: 1rem; }
.figure-caption { font-size: 0.72rem; }
.blockquote { font-size: 0.95rem; }
pre, code, kbd, samp { font-size: 0.74rem; }

/* --- jQuery DataTables density --- */
div.dt-container { font-size: 0.76rem; }
div.dt-container .dt-length, div.dt-container .dt-search,
div.dt-container .dt-info, div.dt-container .dt-paging { font-size: 0.74rem; }
div.dt-container .dt-length select,
div.dt-container .dt-search input { padding: 0.22rem 0.45rem; font-size: 0.74rem; }
div.dt-container .dt-layout-row { margin-bottom: 0.5rem; }
table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td { padding: 0.45rem 0.6rem; font-size: 0.72rem; }
table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td { padding: 0.4rem 0.6rem; }
div.dt-buttons .dt-button { padding: 0.2rem 0.5rem; font-size: 0.7rem; }

/* --- Keep the footer clear of the floating theme button ---
   The FAB is 39px wide and sits 20px from the viewport edge, so the last
   footer item needs room or it renders underneath it. */
.ga-footer { padding-right: 52px; }

@media (max-width: 640px) {
  .ga-footer { padding-right: 16px; padding-bottom: 46px; }
}

/* --- Wider desktop content --- */
@media (min-width: 1400px) {
  :root { --ga-content-pad: 22px; }
}

@media (min-width: 1920px) {
  :root { --ga-content-pad: 26px; }
}
