/* KOnekt Portal - SvelteForge Dashboard & List Design System */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Dark mode default - Strictly pure black backgrounds, no blue tints or gradients */
  --bg-body: #000000;
  --bg-sidebar: #000000;
  --bg-card: #000000;
  --bg-card-hover: #121214;
  --bg-input: #121214;
  --bg-table-header: #000000;
  --bg-table-row-hover: #121214;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --border-color: #27272a;
  --border-light: #3f3f46;
  
  --brand-purple: #6366f1;
  --brand-cyan: #06b6d4;
  --brand-green: #10b981;
  --brand-amber: #f59e0b;
  --brand-red: #ef4444;
  --konekt-orange: #FF9800;
  --brand-orange: #FF9800;
  --konekt-orange-rgb: 255, 152, 0;

  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-green-text: #34d399;
  --badge-amber-bg: rgba(245, 158, 11, 0.15);
  --badge-amber-text: #fbbf24;
  --badge-grey-bg: rgba(113, 113, 122, 0.2);
  --badge-grey-text: #a1a1aa;
  --badge-purple-bg: rgba(99, 102, 241, 0.15);
  --badge-purple-text: #818cf8;
  --badge-red-bg: rgba(239, 68, 68, 0.15);
  --badge-red-text: #f87171;

  --chart-grid: rgba(255, 255, 255, 0.08);
  --chart-text: #71717a;
  --chart-purple-line: #6366f1;
  --chart-purple-gradient-start: rgba(99, 102, 241, 0.35);
  --chart-purple-gradient-end: rgba(99, 102, 241, 0.0);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"], html.dark {
  --bg-body: #000000;
  --bg-sidebar: #000000;
  --bg-card: #000000;
  --bg-card-hover: #121214;
  --bg-input: #121214;
  --bg-table-header: #000000;
  --bg-table-row-hover: #121214;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --border-color: #27272a;
  --border-light: #3f3f46;
  
  --brand-purple: #6366f1;
  --brand-cyan: #06b6d4;
  --brand-green: #10b981;
  --brand-amber: #f59e0b;
  --brand-red: #ef4444;

  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-green-text: #34d399;
  --badge-amber-bg: rgba(245, 158, 11, 0.15);
  --badge-amber-text: #fbbf24;
  --badge-grey-bg: rgba(113, 113, 122, 0.2);
  --badge-grey-text: #a1a1aa;
  --badge-purple-bg: rgba(99, 102, 241, 0.15);
  --badge-purple-text: #818cf8;
  --badge-red-bg: rgba(239, 68, 68, 0.15);
  --badge-red-text: #f87171;

  --chart-grid: rgba(255, 255, 255, 0.08);
  --chart-text: #71717a;
  --chart-purple-line: #6366f1;
  --chart-purple-gradient-start: rgba(99, 102, 241, 0.35);
  --chart-purple-gradient-end: rgba(99, 102, 241, 0.0);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="light"], html.light, html[data-theme="light"], body.light {
  --bg-body: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-table-header: #f8fafc;
  --bg-table-row-hover: #f1f5f9;

  --text-primary: #09090b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;

  --badge-green-bg: #dcfce7;
  --badge-green-text: #15803d;
  --badge-amber-bg: #fef3c7;
  --badge-amber-text: #b45309;
  --badge-grey-bg: #f1f5f9;
  --badge-grey-text: #475569;
  --badge-purple-bg: #e0e7ff;
  --badge-purple-text: #4338ca;
  --badge-red-bg: #fee2e2;
  --badge-red-text: #dc2626;

  --chart-grid: rgba(0, 0, 0, 0.07);
  --chart-text: #64748b;
  --chart-purple-line: #6366f1;
  --chart-purple-gradient-start: rgba(99, 102, 241, 0.25);
  --chart-purple-gradient-end: rgba(99, 102, 241, 0.0);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* App Shell Layout */
.app-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Left Sidebar */
.app-sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 40;
}

.app-sidebar.collapsed {
  width: 68px;
}

.app-sidebar.collapsed .menu-group-label,
.app-sidebar.collapsed .menu-item span,
.app-sidebar.collapsed .menu-badge,
.app-sidebar.collapsed .sidebar-fai-container,
.app-sidebar.collapsed .user-details,
.app-sidebar.collapsed .user-chevron {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 1.15rem 0.5rem;
}

.app-sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 0.6rem;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 64px;
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.sidebar-brand::before,
.sidebar-brand::after {
  display: none !important;
  content: none !important;
}

.portal-logo-wrapper {
  display: flex;
  align-items: center;
  max-width: 100%;
  height: 44px;
}

.sidebar-site-logo {
  max-height: 36px;
  max-width: 105px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  display: block;
}

.sidebar-logo-divider,
.navbar-logo-divider {
  flex-shrink: 0;
}

.navbar-site-logo {
  max-height: 28px;
  max-width: 85px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  display: block;
}

.portal-header-custom-logo {
  max-height: 44px;
  max-width: 190px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 1rem 0.5rem;
}

.app-sidebar.collapsed .sidebar-site-logo,
.app-sidebar.collapsed .sidebar-logo-divider {
  display: none !important;
}

.app-sidebar.collapsed .portal-header-custom-logo {
  max-width: 44px;
  max-height: 36px;
}

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

.menu-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.85rem 0.75rem 0.35rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 0.15rem;
}

.menu-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.menu-item.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

[data-theme="light"] .menu-item.active {
  background-color: #f1f5f9;
  color: #09090b;
}

.menu-item i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.menu-item:hover i,
.menu-item.active i {
  color: var(--text-primary);
}

.menu-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* FAI Partner Logo Container */
.sidebar-fai-container {
  margin: 0.75rem 0.85rem 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: none !important;
  background-color: transparent !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  overflow: hidden;
}

.sidebar-fai-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-fai-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 42px;
  max-width: 100%;
}

.sidebar-fai-logo {
  max-height: 38px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.app-sidebar.collapsed .sidebar-fai-container {
  display: none !important;
}

/* User Footer Card */
.sidebar-user {
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0.65rem 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-sidebar);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
}

.sidebar-user:hover {
  background-color: var(--bg-card-hover);
}

.user-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--border-color);
  flex-shrink: 0;
}

.user-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background-color: var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-chevron {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-body);
}

/* Top Header Navbar */
.top-navbar {
  height: 56px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background-color: var(--bg-sidebar);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon-nav {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-icon-nav:hover {
  color: var(--text-primary);
  background-color: var(--bg-card-hover);
}

.nav-separator {
  width: 1px;
  height: 16px;
  background-color: var(--border-color);
  margin: 0 0.25rem;
}

.breadcrumb-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-box {
  position: relative;
  width: 220px;
}

.search-input {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  font-size: 0.825rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--brand-purple);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kbd-shortcut {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.675rem;
  background-color: var(--border-color);
  color: var(--text-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.notification-bell-btn {
  position: relative;
}

.notification-dot-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.navbar-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

/* Main Body View Container */
.page-container {
  padding: 1.5rem 1.75rem;
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-title,
h1.page-title,
.account-page h1,
.account-layout h1,
#app-root .view-header h1,
#app-root .page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--konekt-orange, #FF9800) !important;
  margin-bottom: 0.25rem;
}

.page-title *,
h1.page-title *,
.account-page h1 *,
.account-layout h1 *,
#app-root .view-header h1 *,
#app-root .page-header h1 * {
  color: inherit;
}

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

.page-date {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Stat Cards Grid (4 columns as in SvelteForge Dashboard) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  border-color: var(--border-light);
}

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

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-icon {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.trend-badge-down {
  color: var(--badge-red-text);
  background: var(--badge-red-bg);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.725rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.trend-badge-up {
  color: var(--badge-green-text);
  background: var(--badge-green-bg);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.725rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.trend-subtext {
  color: var(--text-muted);
  font-size: 0.725rem;
}

/* Charts & Widgets Grids */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .dashboard-widgets-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .dashboard-recent-grid {
    grid-template-columns: 1fr;
  }
}

.widget-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.widget-header {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.widget-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

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

.link-view-all {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.link-view-all:hover {
  color: var(--text-primary);
}

/* Chart SVGs */
.chart-svg-wrap {
  width: 100%;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 4px;
}

/* System Overview rows */
.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.overview-row:last-child {
  border-bottom: none;
}

.overview-row-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
}

.overview-row-label i {
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

.overview-row-val {
  font-weight: 600;
  color: var(--text-primary);
}

.badge-operational {
  background-color: var(--badge-green-bg);
  color: var(--badge-green-text);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Recent Activity & Notification Alert */
.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.activity-info {
  flex: 1;
}

.activity-user {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-action {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.notification-card-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background-color: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.notification-warn-icon {
  color: #f59e0b;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.notification-card-content {
  flex: 1;
}

.notification-card-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.badge-new {
  background-color: var(--text-primary);
  color: var(--bg-body);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.notification-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Data Table Component (Matching list.png) */
.data-table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  gap: 1rem;
}

.table-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 360px;
  position: relative;
}

.search-pages-input {
  width: 220px;
  padding: 0.45rem 0.75rem 0.45rem 2.1rem;
  font-size: 0.825rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-pages-input:focus {
  border-color: var(--konekt-orange, #FF9800);
}

.search-pages-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-count-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-export-ghost {
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid var(--border-color);
  color: var(--konekt-orange, #FF9800) !important;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-export-ghost:hover,
.btn-export-ghost:focus,
.btn-export-ghost:active {
  border-color: var(--konekt-orange, #FF9800) !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--konekt-orange, #FF9800) !important;
}

.btn-action-ghost {
  background: #000000;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-ghost:hover {
  background: #18181b;
  border-color: var(--konekt-orange, #FF9800);
  color: var(--konekt-orange, #FF9800);
}

.btn-receipt-action {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.3);
  color: var(--konekt-orange, #FF9800) !important;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-receipt-action:hover {
  background: var(--konekt-orange, #FF9800) !important;
  border-color: var(--konekt-orange, #FF9800) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.25);
}

.btn-receipt-action:active {
  transform: translateY(0);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background-color: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.825rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: var(--bg-table-row-hover);
}

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

.mono-cell {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Custom Checkbox Styling matching SvelteForge */
.data-table input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background-color: var(--bg-input);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  vertical-align: middle;
  transition: all 0.15s ease;
}

.data-table input[type="checkbox"]:hover {
  border-color: var(--brand-purple);
}

.data-table input[type="checkbox"]:checked {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
}

.data-table input[type="checkbox"]:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* Status Pill Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 500;
}

.status-published, .status-active, .status-completed, .status-paid {
  background-color: var(--badge-green-bg);
  color: var(--badge-green-text);
}

.status-draft, .status-pending {
  background-color: var(--badge-amber-bg);
  color: var(--badge-amber-text);
}

.status-archived, .status-expired, .status-disabled {
  background-color: var(--badge-grey-bg);
  color: var(--badge-grey-text);
}

.btn-table-action-delete {
  color: #ef4444;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.btn-table-action-delete:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

/* Pagination Bar */
.table-pagination {
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rows-per-page {
  color: var(--text-primary);
  font-weight: 500;
  margin-right: 0.75rem;
  cursor: pointer;
  font-size: 0.825rem;
}

.btn-page {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.775rem;
  transition: all 0.15s ease;
}

.btn-page:hover {
  border-color: var(--border-light);
  background-color: var(--bg-card-hover);
}

.page-indicator {
  margin: 0 0.35rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.825rem;
}


/* Buttons & Form Elements */
.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-body);
  border: none;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  background-color: var(--bg-card-hover);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
}

.form-control:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Modern Modal Animations */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  animation: modalFadeIn 0.22s ease-out;
  box-sizing: border-box;
}

.modal-content-payment {
  width: 95%;
  max-width: 580px;
  height: 86vh;
  max-height: 720px;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content-payment.modal-dialog-card {
  height: auto;
  max-width: 440px;
  padding: 2.25rem 1.75rem;
  text-align: center;
}

.modal-header-payment {
  padding: 1rem 1.35rem;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-payment-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-payment-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 102, 0, 0.1);
  color: #FF6600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.modal-payment-heading {
  font-weight: 700;
  font-size: 0.98rem;
  color: #0f172a;
  line-height: 1.25;
}

.modal-payment-subheading {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.modal-payment-chip {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  color: #334155;
}

.modal-payment-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  outline: none;
}

.modal-payment-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.08);
}

.payment-modal-status-bar {
  background: #000000;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1.35rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  flex-shrink: 0;
}

.ticket-voucher-box {
  background: #000000;
  border: 2px dashed #000000;
  border-radius: 14px;
  padding: 1.25rem;
  margin: 1.25rem 0;
  position: relative;
}

.ticket-voucher-code {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  user-select: all;
  word-break: break-all;
}

.ticket-voucher-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Active borders strictly black */
.menu-item.active,
[data-theme="light"] .menu-item.active,
.tab-btn.active,
.ticket-nav-tab.active,
.ticket-offer-card.active,
.ticket-offer-chip.active,
.plan-card.active,
.btn-primary:active,
.btn-primary:focus,
.form-control:focus,
.search-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #000000 !important;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Responsive Media Queries for Mobile, Tablet & Desktop Viewports */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .widget-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .app-layout {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px !important;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .app-sidebar.collapsed {
    transform: translateX(-100%) !important;
  }

  .app-sidebar.collapsed .menu-group-label,
  .app-sidebar.collapsed .menu-item span,
  .app-sidebar.collapsed .menu-badge,
  .app-sidebar.collapsed .sidebar-fai-container,
  .app-sidebar.collapsed .user-details,
  .app-sidebar.collapsed .user-chevron {
    display: initial !important;
  }

  .app-main {
    width: 100% !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .top-navbar {
    padding: 0 1rem;
    width: 100%;
  }

  .page-container {
    padding: 1rem 0.85rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  .page-title,
  h1.page-title,
  .account-page h1,
  .account-layout h1,
  #app-root .view-header h1,
  #app-root .page-header h1 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .widget-grid-2 {
    grid-template-columns: 1fr;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .data-table {
    min-width: 580px;
  }

  .search-box {
    display: none;
  }

  .btn-primary, .btn-outline, .form-control {
    min-height: 44px;
  }

  /* Modals & Dialogs responsive */
  .modal-dialog,
  .modal-payment-card {
    max-width: 95vw !important;
    width: 100% !important;
    margin: 1rem auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 480px) {
  .page-title,
  h1.page-title,
  .account-page h1,
  .account-layout h1,
  #app-root .view-header h1,
  #app-root .page-header h1 {
    font-size: 1.1rem !important;
    line-height: 1.25 !important;
  }

  .top-navbar {
    padding: 0 0.65rem;
  }

  .page-container {
    padding: 0.75rem 0.5rem;
  }

  .card, .widget-card {
    padding: 1rem 0.85rem;
  }

  .login-form-box {
    padding: 1.25rem 0.85rem !important;
  }
}

/* Public Auth Layout (No left sidebar menu for login pages) */
.public-auth-layout {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
}

.public-auth-header {
  height: 64px;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-body);
}

.public-auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.card-footer-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.card-footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.card-footer-link:hover {
  color: var(--brand-purple);
}

/* Public Header Nav Tabs */
.public-nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  text-decoration: none;
  background: transparent;
  border: none;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.nav-tab-btn.active {
  color: var(--brand-purple);
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

/* Top Segmented Card Pills */
.auth-card-pills {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.5rem;
}

.auth-pill-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
}

.auth-pill-item:hover {
  color: var(--text-primary);
}

.auth-pill-item.active {
  background: var(--bg-card);
  color: var(--brand-purple);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .public-auth-header {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .public-nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding-top: 0.25rem;
  }
}

/* ==========================================================================
   3-COLUMN LOGIN LAYOUT (col-6 | col-3 | col-3)
   - Extrémités col-6 et col-3 totalement transparentes
   - col-3 au milieu en fond blanc unique portant la zone des formulaires
   - Sur petit écran : col-12 portant simplement la zone des formulaires
   - Images de fond aléatoires issues de brains/login_img
   ========================================================================== */

.three-col-login-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  position: relative;
  background-color: #f8fafc;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow-x: hidden;
  box-sizing: border-box;
}

.login-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* Col-6 : Extrémité gauche totalement transparente */
.login-col-left {
  flex: 6;
  width: 50%;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3rem;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.login-col-left-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-col-left-logo {
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.login-col-left-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #212529;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Col-3 Milieu : Légèrement transparent sur grand écran avec effet de flou */
.login-col-middle {
  flex: 3;
  width: 25%;
  min-width: 360px;
  max-width: 440px;
  background-color: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 1.75rem 1.75rem;
  box-sizing: border-box;
  position: relative;
  z-index: 3;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  overflow-y: auto;
  max-height: 100vh;
}

.login-form-box {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  margin: auto 0;
}

/* Col-3 : Extrémité droite totalement transparente */
.login-col-right {
  flex: 3;
  width: 25%;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   FOLDER TABS ("CLASSEUR DE DOSSIER") — COULEURS DE KONEKT — SANS DEGRADE
   ========================================================================== */

.folder-tabs-header {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
  padding-left: 0;
}

.folder-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #495057;
  background-color: rgba(241, 243, 245, 0.95);
  border: 1px solid #ced4da;
  border-bottom: 1px solid #ced4da;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
  text-decoration: none;
  user-select: none;
}

.folder-tab-btn:hover {
  background-color: #e9ecef;
  color: #212529;
}

.folder-tab-btn.active {
  background-color: #ffffff;
  color: var(--konekt-orange, #FF9800);
  font-weight: 600;
  border-color: #ced4da;
  border-bottom: 2px solid #ffffff;
  border-top: 2px solid var(--konekt-orange, #FF9800);
  padding-top: 6px;
  border-radius: 6px 6px 0 0;
  z-index: 3;
}

.folder-body {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(206, 212, 218, 0.85);
  border-radius: 0 6px 6px 6px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.folder-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.2rem;
}

.folder-subtitle {
  font-size: 0.78rem;
  color: #6c757d;
  margin-bottom: 1.15rem;
}

/* Konekt Buttons & Controls inside Folder — Orange Konekt (var(--konekt-orange, #FF9800)), pas de dégradé */
.btn-bootstrap-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  background-color: var(--konekt-orange, #FF9800);
  border: 1px solid var(--konekt-orange, #FF9800);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-bootstrap-primary:hover {
  background-color: color-mix(in srgb, var(--konekt-orange, #FF9800) 85%, #000);
  border-color: color-mix(in srgb, var(--konekt-orange, #FF9800) 75%, #000);
}

.btn-bootstrap-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  color: #495057;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  margin-top: 0.65rem;
}

.btn-bootstrap-secondary:hover {
  background-color: #e9ecef;
  color: #212529;
  border-color: #b0b8c1;
}

.folder-form-pane {
  animation: fadeInPane 0.22s ease-in-out;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Controls — Arrondis légers 6px, focus aux couleurs de Konekt (Orange var(--konekt-orange, #FF9800)) */
.three-col-login-wrapper .form-control {
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  color: #212529;
}

.three-col-login-wrapper .form-control:focus {
  border-color: var(--konekt-orange, #FF9800);
  outline: none;
  box-shadow: 0 0 0 1px var(--konekt-orange, #FF9800);
}

.three-col-login-wrapper .form-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.25rem;
}

.three-col-login-wrapper .card-footer-links {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.three-col-login-wrapper .card-footer-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--konekt-orange, #FF9800);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.three-col-login-wrapper .card-footer-link:hover {
  color: color-mix(in srgb, var(--konekt-orange, #FF9800) 75%, #000);
  text-decoration: underline;
}

/* Responsive adjustment for Mobile screens (le col-12 est totalement transparent) */
.site-custom-logo {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

@media (max-width: 991px) {
  .three-col-login-wrapper {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem 1rem;
    min-height: 100vh;
  }

  .login-col-left {
    display: flex !important;
    width: 100% !important;
    max-width: 420px !important;
    padding: 0 0 1.25rem 0 !important;
    justify-content: center !important;
    align-items: center !important;
    flex: none !important;
  }

  .login-col-left-header {
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .login-col-left-header > div:first-child {
    justify-content: center !important;
  }

  .login-col-right {
    display: none !important;
  }

  .login-col-middle {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 420px !important;
    min-width: auto !important;
    border-radius: 0 !important;
    padding: 0 !important;
    flex: none !important;
  }
}

/* ==========================================================================
   TICKET COMPATIBLE OFFERS ZONE & CARDS
   ========================================================================== */
.ticket-compatible-offers-zone {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(206, 212, 218, 0.85);
}

.ticket-offers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.ticket-offers-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #343a40;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ticket-offers-action-hint {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 500;
}

.ticket-offers-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.ticket-offers-grid::-webkit-scrollbar {
  width: 4px;
}

.ticket-offers-grid::-webkit-scrollbar-track {
  background: transparent;
}

.ticket-offers-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.ticket-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  user-select: none;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ticket-offer-card:hover {
  border-color: var(--konekt-orange, #FF9800);
  background: rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.04);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.15);
}

.ticket-offer-card:active {
  transform: translateY(0);
}

.ticket-offer-card-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.ticket-offer-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.12);
  color: var(--konekt-orange, #FF9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background-color 0.18s, color 0.18s;
}

.ticket-offer-card:hover .ticket-offer-icon {
  background: var(--konekt-orange, #FF9800);
  color: #ffffff;
}

.ticket-offer-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.ticket-offer-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-offer-meta {
  font-size: 0.68rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-offer-card-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: 0.45rem;
}

.ticket-offer-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--konekt-orange, #FF9800);
  white-space: nowrap;
}

.ticket-offer-price small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #868e96;
}

.ticket-offer-arrow {
  font-size: 0.68rem;
  color: #adb5bd;
  transition: transform 0.18s, color 0.18s;
}

.ticket-offer-card:hover .ticket-offer-arrow {
  color: var(--konekt-orange, #FF9800);
  transform: translateX(2px);
}

/* Offer Chips inside Buy Ticket Form */
.ticket-offer-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.ticket-offer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: left;
}

.ticket-offer-chip:hover {
  border-color: var(--konekt-orange, #FF9800);
  color: var(--konekt-orange, #FF9800);
  background: rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.05);
}

.ticket-offer-chip.active {
  background: var(--konekt-orange, #FF9800);
  border-color: var(--konekt-orange, #FF9800);
  color: #ffffff;
  font-weight: 600;
}

.ticket-offer-chip.active strong {
  color: #ffffff;
}

/* Cadre de sélection du forfait (Achat de ticket) — Design sobre et moderne */
.ticket-selection-frame {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.85rem;
  background: #ffffff;
  margin-bottom: 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ticket-selection-frame:focus-within {
  border-color: var(--konekt-orange, #FF9800);
  box-shadow: 0 0 0 1px var(--konekt-orange, #FF9800);
}

.ticket-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.ticket-selection-header .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.ticket-selection-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--konekt-orange, #FF9800);
}

.ticket-selection-price small {
  font-size: 0.68rem;
  font-weight: 500;
  color: #6c757d;
}

.ticket-selection-frame select.form-control {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background-color: #f8f9fa;
  color: #212529;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ticket-selection-frame select.form-control:focus {
  background-color: #ffffff;
  border-color: var(--konekt-orange, #FF9800);
  outline: none;
  box-shadow: none;
}

.ticket-selection-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #6c757d;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid #f1f3f5;
}

/* Dark mode pour le cadre de sélection */
body.dark .ticket-selection-frame {
  background: rgba(33, 37, 41, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark .ticket-selection-frame:focus-within {
  border-color: var(--konekt-orange, #FF9800);
  box-shadow: 0 0 0 1px var(--konekt-orange, #FF9800);
}

body.dark .ticket-selection-header .form-label {
  color: #f8f9fa;
}

body.dark .ticket-selection-price small {
  color: #adb5bd;
}

body.dark .ticket-selection-frame select.form-control {
  background-color: #1a1d20;
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8f9fa;
}

body.dark .ticket-selection-frame select.form-control:focus {
  background-color: #212529;
  border-color: var(--konekt-orange, #FF9800);
}

body.dark .ticket-selection-meta {
  color: #adb5bd;
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Dark mode adjustments */
body.dark .ticket-compatible-offers-zone {
  border-top-color: rgba(255, 255, 255, 0.12);
}

body.dark .ticket-offers-title {
  color: #f1f3f5;
}

body.dark .ticket-offers-action-hint {
  color: #adb5bd;
}

body.dark .ticket-offer-card {
  background: rgba(30, 32, 38, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark .ticket-offer-card:hover {
  background: rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.1);
  border-color: var(--konekt-orange, #FF9800);
}

body.dark .ticket-offer-name {
  color: #f8f9fa;
}

body.dark .ticket-offer-meta {
  color: #adb5bd;
}

body.dark .ticket-offer-chip {
  background: rgba(40, 42, 50, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e9ecef;
}

body.dark .ticket-offer-chip.active {
  background: var(--konekt-orange, #FF9800);
  border-color: var(--konekt-orange, #FF9800);
  color: #ffffff;
}

/* ==========================================================================
   DataTables & Responsive Integration (Theme Adaptive)
   ========================================================================== */
.dataTables_wrapper {
  color: var(--text-secondary);
  font-size: 0.84rem;
  padding: 1rem 1.25rem;
}

.data-table-dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.data-table-dt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

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

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.dataTables_wrapper .dataTables_length select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.dataTables_wrapper .dataTables_filter input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s ease;
  min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--konekt-orange, #FF9800);
}

:root {
  --dt-row-selected: 0, 0, 0 !important;
  --dt-row-selected-text: 255, 255, 255 !important;
}

table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after {
  color: var(--text-primary, #ffffff) !important;
}

table.dataTable tbody tr.selected:hover > * {
  box-shadow: inset 0 0 0 9999px #000000 !important;
}

.dataTables_wrapper table.dataTable {
  width: 100% !important;
  margin: 0.5rem 0 1rem 0 !important;
  border-collapse: collapse !important;
  border: none !important;
}

.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table.dataTable thead td {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  position: relative;
  box-sizing: border-box;
}

.dataTables_wrapper table.dataTable tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
  background: transparent;
}

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

.dataTables_wrapper table.dataTable tbody tr:hover {
  background-color: var(--bg-table-row-hover, rgba(255, 255, 255, 0.03)) !important;
}

.dataTables_wrapper table.dataTable.no-footer {
  border-bottom: 1px solid var(--border-color);
}

.dataTables_wrapper .dataTables_info {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 0.75rem;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  background: #000000 !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem !important;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.15) !important;
  color: var(--konekt-orange, #FF9800) !important;
  border-color: var(--konekt-orange, #FF9800) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--konekt-orange, #FF9800) !important;
  color: #ffffff !important;
  border: 1px solid var(--konekt-orange, #FF9800) !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(var(--konekt-orange-rgb, 255, 152, 0), 0.4);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  background: #000000 !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
  position: relative;
  padding-left: 30px !important;
  cursor: pointer;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
  top: 50%;
  left: 8px;
  height: 16px;
  width: 16px;
  margin-top: -8px;
  display: block;
  position: absolute;
  color: #ffffff;
  border: 1px solid var(--konekt-orange, #FF9800);
  border-radius: 4px;
  text-align: center;
  line-height: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  box-sizing: content-box;
  content: '+';
  background-color: var(--konekt-orange, #FF9800);
  font-weight: 700;
  font-size: 12px;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
  content: '-';
  background-color: #000000;
  color: #ef4444;
  border-color: #ef4444;
}

table.dataTable > tbody > tr.child {
  background-color: var(--bg-input) !important;
}

table.dataTable > tbody > tr.child ul.dtr-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px;
  list-style: none;
  margin: 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
  border-bottom: 1px solid var(--border-color);
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
  border-bottom: none;
}

table.dataTable > tbody > tr.child span.dtr-title {
  font-weight: 600;
  color: var(--text-secondary);
}

table.dataTable > tbody > tr.child span.dtr-data {
  color: var(--text-primary);
  font-weight: 500;
}


