/* ==========================================================================
   GYM SYSTEM — MODERN ENTERPRISE LIGHT THEME DESIGN SYSTEM
   Inspired by Reference Images 1 & 2:
   - Dark Slate Authoritative Sidebar (#0f172a)
   - Ultra-Clean Light Workspace (#f8fafc body, #ffffff cards, #e2e8f0 borders)
   - 6 Vibrant High-Impact KPI Blocks (Image 2 style)
   - High-Contrast Modern Typography (Plus Jakarta Sans)
   ========================================================================== */

:root {
  /* Layout Colors — Pure Light Workspace */
  --ff-bg-main: #f8fafc;
  --ff-bg-card: #ffffff;
  --ff-bg-card-hover: #f1f5f9;
  --ff-bg-sidebar: #0f172a;
  --ff-bg-topbar: #ffffff;
  --ff-bg-input: #ffffff;
  --ff-border: #e2e8f0;
  --ff-border-subtle: #f1f5f9;
  --ff-border-focus: #3b82f6;
  
  /* Text Colors — High Contrast */
  --ff-text-main: #0f172a;
  --ff-text-sub: #334155;
  --ff-text-muted: #64748b;
  
  /* Brand Action Buttons — Master UI/UX Modern Bluish Tone (No Red Shadow) */
  --ff-btn-primary: #2563eb;
  --ff-btn-primary-hover: #1d4ed8;
  --ff-btn-primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --ff-btn-primary-hover-gradient: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  --ff-btn-primary-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  --ff-btn-primary-hover-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);

  /* Brand Accents — PRO★FIT Electric Lime */
  --ff-primary: #2563eb;
  --ff-primary-hover: #1d4ed8;
  --ff-primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --ff-primary-glow: 0 4px 14px rgba(37, 99, 235, 0.28);
  --ff-lime-neon: #a3e635;
  --ff-lime-light: #ecfccb;
  --ff-dark-slate: #0f172a;
  
  /* Module Colors */
  --ff-accent-green: #10b981;
  --ff-accent-blue: #3b82f6;
  --ff-accent-purple: #8b5cf6;
  --ff-accent-amber: #f59e0b;
  --ff-accent-rose: #f43f5e;
  --ff-accent-cyan: #06b6d4;
  
  /* Radii & Shadows — Modern Soft Corners (Image 4 Standard) */
  --ff-radius-sm: 6px;
  --ff-radius-md: 8px;
  --ff-radius-lg: 12px;
  --ff-radius-pill: 8px;
  
  --ff-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ff-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --ff-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  
  --ff-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Body Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--ff-bg-main) !important;
  color: var(--ff-text-main) !important;
  font-family: var(--ff-font-sans) !important;
  font-size: 0.925rem;
  line-height: 1.55;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--ff-text-main);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.text-dark-main {
  color: #0f172a !important;
}

.text-muted {
  color: #64748b !important;
}

.text-sub {
  color: #334155 !important;
}

/* Layout Architecture */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════
   1. SLEEK DARK SIDEBAR (Image 1 & 2 Style)
   ══════════════════════════════════════════════════════════ */
.app-sidebar {
  width: 260px;
  background-color: var(--ff-bg-sidebar) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--ff-transition);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1020;
  padding: 1.25rem 0.85rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.25rem;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ff-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  box-shadow: var(--ff-primary-glow);
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--ff-primary);
}

/* User Card in Sidebar (Image 2 style) */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  margin: 0 0.25rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff !important;
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: #94a3b8 !important;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 3px;
}

.online-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* Navigation Menu */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b !important;
  padding: 0.85rem 0.75rem 0.35rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.95rem;
  color: #94a3b8 !important;
  font-weight: 500;
  border-radius: var(--ff-radius-pill);
  text-decoration: none;
  transition: var(--ff-transition);
  font-size: 0.9rem;
}

.nav-link-custom i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: #94a3b8;
  transition: var(--ff-transition);
}

.nav-link-custom:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.07);
}

.nav-link-custom:hover i {
  color: #a3e635;
}

.nav-link-custom.active {
  background: rgba(163, 230, 53, 0.12) !important;
  color: #a3e635 !important;
  border: 1px solid rgba(163, 230, 53, 0.3) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(163, 230, 53, 0.15);
}

.nav-link-custom.active i {
  color: #a3e635 !important;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ══════════════════════════════════════════════════════════
   2. CLEAN LIGHT TOPBAR (Image 1 Style)
   ══════════════════════════════════════════════════════════ */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--ff-bg-main);
  color: #1e293b;
}

/* Global Light Theme Typography Enforcements */
.app-main h1, .app-main h2, .app-main h3, .app-main h4, .app-main h5, .app-main h6 {
  color: #0f172a !important;
}

.app-main .text-white:not(.badge):not(.btn):not(.btn-primary-ff):not(.avatar-circle):not(.user-avatar-initials):not(.bg-primary):not(.bg-primary *):not(.bg-success):not(.bg-success *):not(.bg-danger):not(.bg-danger *):not(.badge-status *) {
  color: #0f172a !important;
}

.app-main .border-secondary {
  border-color: #e2e8f0 !important;
}

.app-main .bg-dark:not(.app-sidebar *) {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}

.app-topbar {
  height: 68px;
  background-color: var(--ff-bg-topbar) !important;
  border-bottom: 1px solid var(--ff-border) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 1010;
  box-shadow: var(--ff-shadow-sm);
}

.topbar-search {
  position: relative;
  width: 360px;
  max-width: 100%;
}

.topbar-search input {
  width: 100%;
  background-color: #f8fafc !important;
  border: 1px solid var(--ff-border) !important;
  border-radius: var(--ff-radius-pill);
  padding: 0.55rem 1.25rem 0.55rem 2.65rem;
  color: var(--ff-text-main) !important;
  font-size: 0.88rem;
  outline: none;
  transition: var(--ff-transition);
}

.topbar-search input:focus {
  background-color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.topbar-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.branch-select-pill {
  background: #ffffff !important;
  border: 1px solid var(--ff-border) !important;
  border-radius: var(--ff-radius-pill);
  padding: 0.45rem 1rem;
  color: #334155 !important;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--ff-transition);
}

.branch-select-pill:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff !important;
  border: 1px solid var(--ff-border) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569 !important;
  cursor: pointer;
  position: relative;
  transition: var(--ff-transition);
  text-decoration: none;
}

.action-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.badge-pulse {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px #ffffff;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--ff-radius-pill);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--ff-border);
  background: #ffffff;
  transition: var(--ff-transition);
}

.user-profile-widget:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.user-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a !important;
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: #64748b !important;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #334155;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.app-content {
  padding: 1.75rem;
}

/* ══════════════════════════════════════════════════════════
   3. THE 6 HIGH-IMPACT CORE MODULE KPI BLOCKS (Image 2 Style)
   ══════════════════════════════════════════════════════════ */
a.kpi-tile-block,
.kpi-tile-block {
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none !important;
}

a.kpi-tile-block:hover,
.kpi-tile-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15);
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════
   PRO★FIT 3D NEON-LIME MODULE SHOWCASE TILES (Client Reference)
   ══════════════════════════════════════════════════════════ */
.module-showcase-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px;
  padding: 1.35rem 0.85rem 1.15rem;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none !important;
  color: #1e293b !important;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.module-showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.12), 0 0 20px rgba(163, 230, 53, 0.25);
  border-color: #a3e635 !important;
  color: #0f172a !important;
}

.module-showcase-card .icon-wrap {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.profit-tile {
  width: 82px;
  height: 82px;
  background: linear-gradient(145deg, #162035 0%, #0d1527 100%) !important;
  border: 2.5px solid #a3e635 !important;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
  box-shadow: 0 8px 18px -3px rgba(15, 23, 42, 0.35), 0 0 14px rgba(163, 230, 53, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.15) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.module-showcase-card:hover .profit-tile {
  transform: translateY(-3px) scale(1.04);
  border-color: #bef264 !important;
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.45), 0 0 22px rgba(190, 242, 100, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.25) !important;
}

.module-showcase-card .module-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.module-showcase-card .module-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.module-showcase-card:hover .module-pill {
  background: #ecfccb;
  color: #4d7c0f;
  border-color: #bef264;
}
  transition: all 0.2s ease;
}

.kpi-tile-block .tile-content {
  position: relative;
  z-index: 2;
}

.kpi-tile-block .tile-label {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.92;
  margin-bottom: 0.35rem;
}

.kpi-tile-block .tile-number {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.kpi-tile-block .tile-sub {
  font-size: 0.78rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.kpi-tile-block .tile-icon-circle {
  position: absolute;
  right: 1.4rem;
  top: 1.4rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  z-index: 2;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.kpi-tile-block:hover .tile-icon-circle {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.kpi-tile-block .tile-footer-bar {
  position: relative;
  z-index: 2;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
}

/* 6 Distinct Vibrant Color Themes (Inspired by Image 2) */
/* 1. Member Management — Emerald Green */
a.kpi-tile-block.kpi-bg-emerald,
.kpi-bg-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
}

/* 2. Membership — Royal Blue */
a.kpi-tile-block.kpi-bg-blue,
.kpi-bg-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
}

/* 3. Staff Management — Vibrant Purple */
a.kpi-tile-block.kpi-bg-purple,
.kpi-bg-purple {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%) !important;
  color: #ffffff !important;
}

/* 4. Attendance — Warm Amber */
a.kpi-tile-block.kpi-bg-amber,
.kpi-bg-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff !important;
}

/* 5. Store & POS — Crimson Rose */
a.kpi-tile-block.kpi-bg-rose,
.kpi-bg-rose {
  background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%) !important;
  color: #ffffff !important;
}

/* 6. Asset Management — Ocean Teal / Cyan */
a.kpi-tile-block.kpi-bg-cyan,
.kpi-bg-cyan {
  background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════
   4. CLEAN WHITE OPERATIONAL CARDS (Image 1 Style)
   ══════════════════════════════════════════════════════════ */
.ff-card {
  background-color: var(--ff-bg-card) !important;
  border: 1px solid var(--ff-border) !important;
  border-radius: var(--ff-radius-lg);
  padding: 1.5rem;
  transition: var(--ff-transition);
  box-shadow: var(--ff-shadow-sm);
}

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

.ff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ff-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ff-text-main) !important;
  margin-bottom: 0;
}

/* Custom & Bootstrap Buttons — Modern Bluish Action System */
.btn-primary-ff,
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-weight: 600;
  border-radius: var(--ff-radius-pill);
  padding: 0.55rem 1.35rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: var(--ff-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.btn-primary-ff:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38) !important;
  color: #ffffff !important;
}

.btn-primary-ff:active,
.btn-primary:active,
.btn-primary-ff:focus,
.btn-primary:focus {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25), 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  color: #ffffff !important;
}

.btn-secondary-ff,
.btn-secondary {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600;
  border-radius: var(--ff-radius-pill);
  padding: 0.55rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  transition: var(--ff-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-ff:hover,
.btn-secondary:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

/* Button Group Segmented Control styling */
.btn-group > .btn-primary-ff:first-child,
.btn-group > .btn-secondary-ff:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.btn-group > .btn-primary-ff:last-child,
.btn-group > .btn-secondary-ff:last-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   5. TABLES, BADGES & AVATARS
   ══════════════════════════════════════════════════════════ */
.ff-table-wrap {
  overflow-x: auto;
  border-radius: var(--ff-radius-md);
  border: 1px solid var(--ff-border) !important;
  background-color: #ffffff;
}

.ff-table {
  width: 100%;
  margin-bottom: 0;
  color: #1e293b !important;
  border-collapse: collapse;
}

.ff-table th {
  background-color: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--ff-border) !important;
}

.ff-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.9rem;
  vertical-align: middle;
  color: #1e293b !important;
}

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

/* Status Badges */
.badge-status {
  padding: 0.35rem 0.75rem;
  border-radius: var(--ff-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-status.active, .badge-status.paid, .badge-status.completed, .badge-status.present {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-status.expiring_soon, .badge-status.partial, .badge-status.scheduled {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}

.badge-status.expired, .badge-status.unpaid, .badge-status.cancelled, .badge-status.absent {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 1px solid #fecdd3 !important;
}

/* Avatar Circle */
.avatar-circle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  text-transform: uppercase;
  flex-shrink: 0 !important;
  aspect-ratio: 1 / 1;
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
  overflow: hidden;
  line-height: 1;
  padding: 0;
  margin: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.avatar-circle.sm {
  width: 34px;
  height: 34px;
  font-size: 0.75rem;
}

.avatar-circle.lg {
  width: 84px;
  height: 84px;
  font-size: 1.8rem;
}

.avatar-circle.xl {
  width: 100px;
  height: 100px;
  font-size: 2.2rem;
}

.user-avatar-initials {
  width: 38px;
  max-width: 38px;
  height: 38px;
  max-height: 38px;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

img.avatar-circle, img.user-avatar-initials {
  object-fit: cover !important;
}

/* Unified Brand Avatars (Zero Multi-Color Coding) */
.avatar-gradient-blue,
.avatar-gradient-green,
.avatar-gradient-gold,
.avatar-gradient-orange,
.avatar-gradient-purple,
.avatar-gradient-cyan {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
}

/* Forms & Modals */
.form-control-ff, .form-select-ff {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--ff-radius-sm);
  color: var(--ff-text-main) !important;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
  transition: var(--ff-transition);
}

.form-control-ff:focus, .form-select-ff:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid var(--ff-border) !important;
  color: var(--ff-text-main) !important;
  box-shadow: var(--ff-shadow-lg) !important;
}

.dropdown-item {
  color: #334155 !important;
  transition: all 0.15s ease-in-out;
}

.dropdown-item:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Branch switcher & dropdown active state with clear visibility (Item 10) */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 600 !important;
}

.dropdown-item.active i,
.dropdown-item.active .text-success,
.dropdown-item:active i {
  color: #2563eb !important;
}

.dropdown-item.active:hover {
  background-color: #dbeafe !important;
  color: #1e3a8a !important;
}

.dropdown-item.active:hover i,
.dropdown-item.active:hover .text-success {
  color: #1d4ed8 !important;
}

/* Force soft corner standard on all rounded-pill classes (Image 4 standard) */
.rounded-pill {
  border-radius: 8px !important;
}

/* ══════════════════════════════════════════════════════════
   6. RESPONSIVE MEDIA QUERIES
   ══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    z-index: 1050;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .app-sidebar.show {
    left: 0;
  }
  
  .sidebar-toggle {
    display: inline-block;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .topbar-search {
    display: none;
  }
}

@media (max-width: 576px) {
  .module-showcase-card {
    padding: 1rem 0.5rem 0.85rem !important;
    border-radius: 14px !important;
  }
  .module-showcase-card .icon-wrap {
    width: 74px !important;
    height: 74px !important;
    margin-bottom: 0.5rem !important;
  }
  .profit-tile {
    width: 68px !important;
    height: 68px !important;
    border-width: 2px !important;
    border-radius: 12px !important;
  }
  .profit-tile svg {
    width: 64px !important;
    height: 64px !important;
  }
  .module-showcase-card .module-title {
    font-size: 0.88rem !important;
  }
  .module-showcase-card .module-pill {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.5rem !important;
  }
}

@media (max-width: 768px) {
  .app-topbar {
    padding: 0 1rem;
    height: 60px;
  }
  
  .app-content {
    padding: 1rem;
  }
  
  .kpi-tile-block .tile-number {
    font-size: 1.75rem;
  }
}

/* ══════════════════════════════════════════════════════════
   STANDARD TOAST & NOTIFICATION POPUPS (PRO★FIT SAAS)
   ══════════════════════════════════════════════════════════ */
.toast-container-ff,
.pos-toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 48px);
}

.pos-toast,
.ff-toast {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.16), 0 6px 12px -2px rgba(15, 23, 42, 0.08);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: posToastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.pos-toast.toast-warning {
  border-left-color: #f59e0b;
}

.pos-toast.toast-error {
  border-left-color: #ef4444;
}

.pos-toast.hiding {
  opacity: 0 !important;
  transform: translateX(40px) scale(0.95) !important;
}

@keyframes posToastSlideIn {
  from {
    opacity: 0;
    transform: translateX(50px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.pos-toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pos-toast.toast-warning .pos-toast-icon {
  background: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}

.pos-toast.toast-error .pos-toast-icon {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

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

.pos-toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.pos-toast-desc {
  font-size: 0.82rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-toast-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.75rem;
}

.pos-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pos-toast-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.pos-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  width: 100%;
  animation: posToastProgress 2.5s linear forwards;
}

.pos-toast.toast-warning .pos-toast-progress {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.pos-toast.toast-error .pos-toast-progress {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

@keyframes posToastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

@media (max-width: 576px) {
  .toast-container-ff,
  .pos-toast-container {
    top: 70px;
    right: 16px;
    left: 16px;
    width: calc(100% - 32px);
    max-width: 100%;
  }
}
