/* ==========================================================================
   TrotRadar - Design System & Stylesheet
   Palette Thématique : Turf Premium (Deep Slate, Emerald, Gold, Cobalt, Coral)
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 37, 58, 0.85);
  --bg-header: rgba(11, 15, 25, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.12);
  --accent-blue: #3b82f6;
  --accent-blue-bg: rgba(59, 130, 246, 0.12);
  --accent-coral: #f43f5e;
  --accent-coral-bg: rgba(244, 63, 94, 0.12);
  --accent-purple: #8b5cf6;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 20px -5px rgba(16, 185, 129, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 10% 15%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 85%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.logo-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.logo-title .highlight {
  color: var(--accent-emerald);
  margin-left: 2px;
}

.logo-subtitle {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 600;
}

/* DRIVER SELECTOR CARD */
.header-center {
  display: flex;
  align-items: center;
}

.driver-selector-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.driver-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.driver-select-wrapper select {
  background: transparent;
  color: var(--accent-emerald);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 0.2rem 0.5rem;
}

.driver-select-wrapper select option {
  background: #111827;
  color: var(--text-primary);
}

.badge-status-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px var(--accent-emerald); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* HEADER RIGHT */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.last-sync-info {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sync-time {
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-refresh.spinning .refresh-icon {
  animation: rotate 0.8s linear infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.opportunities-list.syncing {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.25s ease;
  filter: blur(1px);
}

.badge-pulse {
  animation: badgeHighlight 1.5s ease;
}

@keyframes badgeHighlight {
  0% { background: rgba(16, 185, 129, 0.45); color: #34d399; }
  100% { background: transparent; }
}

.card-fade-in {
  animation: cardFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ==========================================================================
   MAIN CONTENT & KPI SECTION
   ========================================================================== */

.dashboard-main {
  flex: 1;
  padding: 1.75rem 2rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.kpi-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.kpi-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.05);
}

.kpi-card.kpi-active-filter {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2), var(--shadow-card);
  transform: translateY(-2px);
}

.kpi-card.kpi-urgent.kpi-active-filter,
.kpi-card.kpi-suspension.kpi-active-filter {
  border-color: var(--accent-coral);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.12);
}

.kpi-card.kpi-loyalty.kpi-active-filter {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.kpi-card.kpi-closing.kpi-active-filter {
  border-color: var(--accent-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.kpi-card.kpi-total.kpi-active-filter {
  border-color: var(--accent-blue);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.kpi-icon-wrap {
  font-size: 2.2rem;
  line-height: 1;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.kpi-urgent { border-left: 4px solid var(--accent-coral); }
.kpi-loyalty { border-left: 4px solid var(--accent-emerald); }
.kpi-closing { border-left: 4px solid var(--accent-gold); }
.kpi-total { border-left: 4px solid var(--accent-blue); }
.kpi-suspension { border-left: 4px solid var(--accent-coral); }

.kpi-value {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}

.kpi-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.kpi-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   LAYOUT GRID (2 COLUMNS)
   ========================================================================== */

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.75rem;
}

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

/* ==========================================================================
   TOOLBAR & FILTERS
   ========================================================================== */

.toolbar-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.phase-legend {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-dot.green { background-color: var(--accent-emerald); }
.badge-dot.blue { background-color: var(--accent-blue); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.search-input-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

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

.search-field {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-select:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   OPPORTUNITY CARDS
   ========================================================================== */

.opportunities-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.opportunity-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.opportunity-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Style de bordure gauche selon le type */
.opportunity-card.type-suspension {
  border-left: 5px solid var(--accent-coral);
}

.opportunity-card.type-loyalty {
  border-left: 5px solid var(--accent-emerald);
}

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

.header-badges-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-suspension {
  background: var(--accent-coral-bg);
  color: var(--accent-coral);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-loyalty {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-urgency {
  background: var(--accent-gold-bg);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-phase-blue {
  background: var(--accent-blue-bg);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-phase-green {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-discipline-attele {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-discipline-monte {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.card-closing-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

/* HORSE & RACE LINE */
.card-main-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.horse-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.race-meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.race-meta strong {
  color: var(--text-primary);
}

.allocation-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold);
}

/* CONTEXT BANNER (LE CROISEMENT DE DONNÉES) */
.context-alert {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.context-alert.suspension-style {
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.2);
}

.context-alert.loyalty-style {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.context-headline {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.context-headline.coral-text { color: var(--accent-coral); }
.context-headline.emerald-text { color: var(--accent-emerald); }

.context-description {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* FOOTER & ACTIONS */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.trainer-quick-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.trainer-icon {
  font-size: 1.3rem;
}

.trainer-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.trainer-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.status-a_contacter {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.status-contacte {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-confirme {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-refuse {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-coral);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-action-primary {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: var(--transition-smooth);
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   SIDEBAR WIDGETS
   ========================================================================== */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

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

.widget-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.widget-icon {
  font-size: 1.25rem;
}

.widget-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.widget-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-coral-bg);
  color: var(--accent-coral);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.widget-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.suspensions-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.suspension-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-coral);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition-smooth);
}

.suspension-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.susp-top-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.susp-jockey {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.susp-dates {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-coral);
}

.susp-source {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.susp-reason {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.susp-opp-link {
  margin-top: 0.45rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.susp-opp-link.matched {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.susp-opp-link.pending {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* GUIDE CONTENT */
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guide-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.step-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.step-text strong {
  color: var(--text-primary);
}

/* ==========================================================================
   MODALE DE CONTACT
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.hidden {
  display: none !important;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-badge-type {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.btn-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-horse-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.horse-title {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.race-info-line {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.allocation-badge {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.context-alert-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem;
  border-left: 4px solid var(--accent-emerald);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.trainer-card-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.trainer-avatar {
  font-size: 2.2rem;
  line-height: 1;
}

.trainer-role {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.trainer-fullname {
  display: block;
  font-size: 1.05rem;
  color: #ffffff;
  margin: 0.1rem 0;
}

.trainer-phone {
  display: block;
  font-size: 0.88rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

.status-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.status-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  outline: none;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: #ffffff;
  text-decoration: none;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-emerald);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   NAVIGATION BAR TABS
   ========================================================================== */

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: var(--accent-emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   DECISIONS MODULE STYLES
   ========================================================================== */

.decisions-hero {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2rem 2rem 1.5rem;
}

.decisions-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.decisions-hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 800px;
}

/* KPI BANNER GRID */
.kpi-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 0 2rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* DATE RANGE SELECTION BOX */
.date-selector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 2rem;
  box-shadow: var(--shadow-card);
}

.date-selector-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem;
}

.date-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 170px;
}

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

.date-input {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 0.65rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: var(--transition-smooth);
}

.date-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.quick-pills-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quick-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-pill:hover, .quick-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.trainer-chips-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trainer-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}

.trainer-chip:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
  color: #93c5fd;
  transform: translateY(-1px);
}

.trainer-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.chip-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.trainer-chip.active .chip-count {
  background: #3b82f6;
  color: #ffffff;
}

.btn-scan {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  white-space: nowrap;
}

.btn-scan:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-scan:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* PROGRESS BAR */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 1rem;
  display: none;
}

.progress-bar-container.active {
  display: block;
}

.progress-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6, #10b981);
  background-size: 200% 100%;
  animation: progressShimmer 1.5s infinite linear;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* MAIN CONTENT AREA */
.decisions-container {
  padding: 0 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* DAY GROUP */
.day-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.day-header {
  background: rgba(18, 24, 38, 0.95);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.day-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.day-icon {
  font-size: 1.35rem;
}

.day-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: capitalize;
}

.day-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* MEETINGS & RACES */
.day-meetings {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.meeting-card {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.meeting-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meeting-races-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* RACE CARD */
.races-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.race-decision-card {
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: var(--transition-smooth);
}

.race-decision-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

.race-info-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.race-course-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.race-title-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.race-meta-specs {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-letrot-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-letrot-link:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
}

/* DECISIONS LIST */
.race-decisions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.decision-box {
  background: rgba(11, 15, 25, 0.7);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.decision-box.cat-suspension {
  border-left-color: var(--accent-coral);
  background: rgba(244, 63, 94, 0.05);
}

.decision-box.cat-amende {
  border-left-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.05);
}

.decision-box.cat-veterinaire {
  border-left-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.decision-box.cat-avertissement {
  border-left-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.decision-top-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.decision-badge-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.badge-suspension-pill {
  background: rgba(244, 63, 94, 0.2);
  color: #ff6b81;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge-amende-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-veterinaire-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-avertissement-pill {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-autre-pill {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.person-tag-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.amount-tag-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.dates-tag-pill {
  background: rgba(244, 63, 94, 0.2);
  color: #ff6b81;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.decision-body-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #cbd5e1;
  font-style: normal;
}

/* =========================================================================
   CLICKABLE JOCKEY PILLS & INFONET OPPORTUNITY STYLES
   ========================================================================= */

.person-tag-pill.person-tag-clickable {
  background: rgba(244, 63, 94, 0.18);
  color: #ff6b81;
  border-color: rgba(244, 63, 94, 0.45);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.person-tag-pill.person-tag-clickable:hover {
  background: rgba(244, 63, 94, 0.35);
  border-color: var(--accent-coral);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

.person-action-tag {
  font-size: 0.72rem;
  opacity: 0.95;
  text-decoration: underline;
  margin-left: 0.2rem;
}

.susp-jockey-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.susp-jockey-link:hover {
  color: var(--accent-coral);
  text-decoration: underline;
}

/* Infonet Jockey Page Hero */
.jockey-hero-section {
  padding: 2rem 2rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.jockey-hero-content {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(244, 63, 94, 0.1);
}

.hero-top-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.badge-infonet-live {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 700;
  font-size: 0.75rem;
}

.jockey-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.jockey-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.jockey-rule-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-size: 0.88rem;
  color: #f1f5f9;
  line-height: 1.5;
}

.rule-icon {
  font-size: 1.25rem;
}

.infonet-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
}

.sync-status-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 600;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  display: inline-block;
  animation: pulseBlue 2s infinite;
}

@keyframes pulseBlue {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px #3b82f6; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.btn-external-infonet {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-external-infonet:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

.infonet-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.past-perfs-section {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.past-perfs-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.past-perfs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.past-perfs-table th {
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.past-perfs-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.highlight-target-driver-row {
  background: rgba(244, 63, 94, 0.12);
}

.highlight-target-driver-row td {
  border-bottom-color: rgba(244, 63, 94, 0.2);
}

.driver-target-match {
  color: #ff6b81;
  font-weight: 700;
}

.rank-cell {
  font-weight: 800;
  color: var(--accent-gold);
}

.btn-infonet-external {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-infonet-external:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.empty-state-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-back-decisions, .btn-back-dashboard {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-back-decisions {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-back-dashboard {
  background: var(--accent-emerald);
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1024px) {
  .date-selector-card {
    margin: 1.25rem 1.5rem;
  }

  .kpi-banner {
    padding: 0 1.5rem 1.25rem;
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar-section {
    margin: 0 1.5rem 1.25rem;
  }

  .decisions-container {
    padding: 0 1.5rem 2.5rem;
  }

  .jockey-hero-section {
    padding: 1.5rem 1.5rem 1rem;
  }
}

@media (max-width: 768px) {
  /* HEADER */
  .app-header {
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    align-items: center;
  }

  .header-left, .header-center, .header-right {
    width: 100%;
    justify-content: center;
  }

  .logo-container {
    gap: 0.65rem;
  }

  .logo-icon {
    font-size: 1.65rem;
  }

  .logo-title {
    font-size: 1.35rem;
  }

  .logo-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.8px;
  }

  .nav-tabs {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.25rem;
  }

  .nav-link {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .sync-status-box,
  .infonet-status-badge {
    width: auto;
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }

  /* HERO */
  .decisions-hero {
    padding: 1.25rem 1rem 1rem;
  }

  .decisions-hero-title {
    font-size: 1.35rem;
    flex-direction: row;
    gap: 0.5rem;
  }

  .decisions-hero-desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  /* DATE SELECTOR CARD */
  .date-selector-card {
    margin: 1rem;
    padding: 1rem;
  }

  .date-selector-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .date-group {
    min-width: 100%;
    width: 100%;
  }

  .date-input {
    width: 100%;
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem;
  }

  .quick-pills-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    width: 100%;
  }

  .quick-pill {
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.75rem;
  }

  .btn-scan {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
  }

  .trainer-chip {
    font-size: 0.78rem;
    padding: 0.38rem 0.75rem;
  }

  /* KPI BANNER */
  .kpi-banner {
    padding: 0 1rem 1rem !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .kpi-card {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
    border-radius: var(--radius-md);
  }

  .kpi-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.2rem;
  }

  .kpi-value {
    font-size: 1.35rem;
  }

  .kpi-title {
    font-size: 0.75rem;
  }

  .kpi-desc {
    font-size: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* TOOLBAR */
  .toolbar-section {
    margin: 0 1rem 1.25rem !important;
    padding: 0.85rem 1rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .search-input-box {
    min-width: 100%;
    width: 100%;
  }

  .search-field {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem 0.6rem 2.3rem;
  }

  .search-icon {
    left: 0.75rem;
    font-size: 0.85rem;
  }

  .filter-controls {
    flex-direction: column;
    width: 100%;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.35rem;
  }

  .filter-select {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }

  /* DECISIONS FEED CONTAINER */
  .decisions-container {
    padding: 0 1rem 2rem;
    gap: 1.25rem;
  }

  .day-header {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .day-title {
    font-size: 1.05rem;
  }

  .day-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  .day-meetings {
    padding: 0.75rem;
    gap: 1rem;
  }

  .meeting-card {
    padding: 0.85rem;
  }

  .meeting-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
  }

  .meeting-title {
    font-size: 0.95rem;
  }

  .meeting-races-count {
    font-size: 0.7rem;
  }

  .races-grid {
    gap: 0.75rem;
  }

  .race-decision-card {
    padding: 0.85rem;
  }

  .race-decision-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .race-title-text {
    font-size: 0.95rem;
  }

  .race-meta-specs {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .btn-letrot-link {
    width: 100%;
    justify-content: center;
    padding: 0.45rem;
    font-size: 0.75rem;
  }

  .decision-box {
    padding: 0.75rem;
    gap: 0.45rem;
  }

  .decision-top-meta {
    gap: 0.35rem;
  }

  .decision-badge-pill {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
  }

  .person-tag-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
  }

  .person-tag-pill.person-tag-clickable {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
    width: 100%;
    justify-content: center;
  }

  .amount-tag-pill,
  .dates-tag-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
  }

  .decision-body-text {
    font-size: 0.8rem;
    line-height: 1.5;
    word-break: break-word;
  }

  /* INFONET JOCKEY PAGE */
  .jockey-hero-section {
    padding: 1rem;
  }

  .jockey-hero-content {
    padding: 1.25rem 1rem;
  }

  .jockey-hero-title {
    font-size: 1.35rem;
  }

  .jockey-hero-desc {
    font-size: 0.88rem;
  }

  .jockey-rule-box {
    flex-direction: column;
    font-size: 0.8rem;
    padding: 0.75rem;
    gap: 0.35rem;
  }

  .infonet-cards-grid {
    gap: 1rem;
  }

  .opportunity-card {
    padding: 1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-badges-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .badge-pill {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
  }

  .card-closing-info {
    font-size: 0.75rem;
  }

  .card-main-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .horse-heading {
    font-size: 1.25rem;
  }

  .race-meta {
    font-size: 0.8rem;
  }

  .allocation-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .context-alert {
    padding: 0.85rem;
  }

  .context-headline {
    font-size: 0.88rem;
  }

  .context-subtext {
    font-size: 0.8rem;
  }

  .key-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .metric-box {
    padding: 0.65rem 0.5rem;
  }

  .metric-value {
    font-size: 1.15rem;
  }

  .metric-label {
    font-size: 0.68rem;
  }

  .past-perfs-section {
    padding: 0.65rem;
    margin: 0.85rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .past-perfs-table {
    font-size: 0.72rem;
    min-width: 460px;
  }

  .past-perfs-table th,
  .past-perfs-table td {
    padding: 0.4rem 0.5rem;
  }

  .action-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .action-btn-call,
  .btn-infonet-external,
  .btn-external-infonet {
    width: 100%;
    justify-content: center;
    padding: 0.65rem;
    font-size: 0.85rem;
  }

  .empty-state-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-back-decisions,
  .btn-back-dashboard {
    width: 100%;
    text-align: center;
  }

  /* MODAL */
  .modal-card {
    width: 95%;
    max-width: 95%;
    padding: 1.25rem;
    margin: 1rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-modal-call,
  .btn-modal-cancel {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .kpi-banner {
    grid-template-columns: 1fr !important;
  }

  .quick-pills-wrap {
    grid-template-columns: 1fr;
  }

  .trainer-chips-wrap {
    gap: 0.35rem;
  }

  .trainer-chip {
    font-size: 0.74rem;
    padding: 0.35rem 0.65rem;
  }

  .nav-tabs {
    flex-direction: column;
    width: 100%;
  }

  .nav-link {
    width: 100%;
  }
}

/* ====================================================================
   PAGE DE CONNEXION INFONET & DÉCONNEXION
   ==================================================================== */
.login-body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, rgba(10, 15, 29, 1) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.5rem;
}

.login-wrapper {
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 32px rgba(16, 185, 129, 0.08);
}

.login-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-logo-icon {
  font-size: 2.6rem;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));
}

.login-app-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
}

.login-app-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.login-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.login-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
}

.login-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.login-error-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fca5a5;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.25s ease-out;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.75;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem 0.75rem 2.45rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.login-input:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.btn-toggle-password {
  position: absolute;
  right: 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  opacity: 0.65;
  transition: opacity 0.2s;
  color: var(--text-primary);
}

.btn-toggle-password:hover {
  opacity: 1;
}

.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  margin-top: 0.4rem;
}

.btn-login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
}

.btn-login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-security-notice {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.login-security-notice .security-notice-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.login-security-notice strong {
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.2rem;
}

.login-security-notice p {
  margin: 0;
}

/* Bouton Déconnexion dans l'en-tête de l'application */
.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   PANNEAU D'ADMINISTRATION & TRAÇABILITÉ DES CONNEXIONS
   ========================================================================== */

.infonet-status-badge.admin-badge-active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.infonet-status-badge.admin-badge-active .pulse-dot {
  background-color: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.nav-link.nav-admin-tab {
  color: #fef08a;
}

.nav-link.nav-admin-tab:hover,
.nav-link.nav-admin-tab.active {
  color: #fff;
  border-bottom-color: var(--accent-gold);
}

/* Grille des KPIs statistiques */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto 2rem auto;
  padding: 0 2rem;
}

.admin-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.admin-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.admin-stat-icon {
  font-size: 2.2rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.admin-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.admin-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.admin-stat-value-sm {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.text-emerald { color: #34d399 !important; }
.text-coral { color: #f87171 !important; }

/* Barre d'outils et de filtrage */
.admin-toolbar-card {
  max-width: 1400px;
  margin: 0 auto 1.5rem auto;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 280px;
}

.admin-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.admin-search-wrapper .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.admin-search-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.admin-select {
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
}

.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Section Tableau d'Administration */
.admin-table-section {
  max-width: 1400px;
  margin: 0 auto 3rem auto;
  padding: 0 2rem;
}

.admin-table-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.4);
}

.table-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-header-title h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-count {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th {
  background: rgba(11, 15, 25, 0.75);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.admin-log-row {
  transition: background-color 0.2s ease;
}

.admin-log-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.time-wrap, .device-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.row-icon {
  font-size: 1.1rem;
}

.badge-account {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
}

.badge-ip {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.badge-status-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.badge-status-active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.badge-status-failed {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* Boîtes d'état */
.admin-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.admin-state-box h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
}

.admin-state-box p {
  color: var(--text-muted);
  max-width: 480px;
  font-size: 0.9rem;
}

/* Modale de purge */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalAppear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalAppear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-subtext {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.5);
}

/* Animation rotation bouton actualiser */
.spinning {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .admin-toolbar-card {
    flex-direction: column;
    align-items: stretch;
    margin: 0 1rem 1.5rem 1rem;
  }
  .admin-toolbar-left {
    flex-direction: column;
    min-width: 100%;
  }
  .admin-search-wrapper {
    max-width: 100%;
  }
  .admin-toolbar-right {
    justify-content: stretch;
  }
  .admin-toolbar-right button {
    flex: 1;
    justify-content: center;
  }
  .admin-table-section {
    padding: 0 1rem;
  }
}
