/* style.css - Styles pour la plateforme de réservation Kiki Traiteur */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --primary-red: #E52424;
  --primary-red-hover: #C81E1E;
  --primary-red-glow: rgba(229, 36, 36, 0.2);
  --primary-dark: #0F172A;
  --bg-slate: #0B0F19;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-bg-solid: #1E293B;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-white: #F8FAFC;
  --text-gray: #94A3B8;
  --text-dark: #1E293B;
  --success-green: #10B981;
  --warning-orange: #F59E0B;
  --info-blue: #3B82F6;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-blur: blur(12px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-slate);
  color: var(--text-white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(229, 36, 36, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER & FOOTER ================= */
header.main-header {
  padding: 20px 5%;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: var(--glass-blur);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.logo-circle {
  width: 45px;
  height: 45px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.brand-wrapper:hover .logo-circle {
  transform: scale(1.05);
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFF 0%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--primary-red);
}

.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-link {
  color: var(--text-gray);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
}

.btn-cta {
  background: var(--primary-red);
  color: white;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--primary-red-glow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cta:hover {
  background: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 36, 36, 0.35);
}

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

footer.main-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-top: auto;
  background: rgba(15, 23, 42, 0.4);
}

footer.main-footer a {
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 600;
}

footer.main-footer a:hover {
  text-decoration: underline;
}

/* ================= CONTAINER ================= */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  width: 100%;
}

/* ================= HERO BANNER ================= */
.hero-banner {
  background: linear-gradient(rgba(11, 15, 25, 0.5), rgba(11, 15, 25, 0.8)), url('/uploads/worldcup.jpg') center/cover no-repeat;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 80px 40px;
  text-align: center;
  margin-bottom: 50px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-red-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary-red);
  margin-bottom: 15px;
  display: block;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  color: var(--text-gray);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 35px auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ================= SECTION HEADINGS ================= */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  position: relative;
  padding-bottom: 8px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-red);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-top: 5px;
}

/* ================= EVENT CARDS ================= */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  backdrop-filter: var(--glass-blur);
}

.event-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.event-image-wrapper {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--primary-dark);
}

.event-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.event-card:hover .event-image-wrapper img {
  transform: scale(1.05);
}

.event-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event-badge.category {
  color: var(--text-white);
}

.event-price-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: var(--primary-red);
  color: white;
  padding: 6px 14px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(229, 36, 36, 0.3);
}

.event-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-date-time {
  font-size: 0.75rem;
  color: var(--primary-red);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.event-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-white);
  line-height: 1.3;
}

.event-card-desc {
  font-size: 0.85rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 20px;
}

.event-info-items {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-gray);
}

.event-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-info-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--primary-red);
}

.event-card-footer {
  padding: 0 24px 24px 24px;
}

.btn-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-card:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
  box-shadow: 0 4px 10px var(--primary-red-glow);
}

/* ================= FILTERS BAR ================= */
.filters-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 35px;
  backdrop-filter: var(--glass-blur);
  width: 100%;
  max-width: 100%;
}

.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-gray);
  letter-spacing: 0.5px;
}

.filter-select, .filter-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-white);
  font-size: 0.88rem;
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
}

.filter-select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.filter-select:focus, .filter-input:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px var(--primary-red-glow);
}

.btn-reset-filter {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  align-self: flex-end;
  height: 38px;
  transition: var(--transition);
}

.btn-reset-filter:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

/* ================= DETAIL PAGE ================= */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
}

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

.detail-main {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
}

.detail-image {
  height: 350px;
  background: var(--primary-dark);
  position: relative;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  padding: 40px;
}

.detail-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.25rem;
  margin-bottom: 20px;
}

.detail-description {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 30px;
}

.detail-description p {
  margin-bottom: 15px;
}

.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.aside-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: var(--glass-blur);
}

.aside-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.info-row {
  display: flex;
  gap: 12px;
}

.info-icon-wrapper {
  width: 35px;
  height: 35px;
  background: rgba(229, 36, 36, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon-wrapper svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary-red);
}

.info-text-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  font-weight: 600;
}

.info-text-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-white);
  margin-top: 2px;
}

/* ================= FORMS & RESERVATIONS ================= */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
  backdrop-filter: var(--glass-blur);
}

.form-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 10px;
  text-align: center;
}

.form-subtitle {
  color: var(--text-gray);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-gray);
  letter-spacing: 0.5px;
}

.form-input, .form-textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-white);
  font-size: 0.92rem;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px var(--primary-red-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
  background: var(--primary-red);
  color: white;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-red-glow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-submit:hover {
  background: var(--primary-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 36, 36, 0.35);
}

/* ================= CONFIRMATION & TICKET ================= */
.ticket-wrapper {
  max-width: 500px;
  margin: 40px auto;
  perspective: 1000px;
}

.ticket {
  background: white;
  color: var(--primary-dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ticket-header {
  background: var(--primary-red);
  color: white;
  padding: 24px;
  text-align: center;
  position: relative;
}

.ticket-logo {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  padding: 2px;
}

.ticket-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ticket-header h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.ticket-header p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.ticket-divider {
  height: 20px;
  background: white;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-divider::before, .ticket-divider::after {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--bg-slate);
  border-radius: 50%;
  position: absolute;
}

.ticket-divider::before {
  left: -10px;
}

.ticket-divider::after {
  right: -10px;
}

.ticket-dashed-line {
  width: 100%;
  border-top: 2px dashed #E2E8F0;
  margin: 0 10px;
}

.ticket-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ticket-qr-code {
  background: #F8FAFC;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  margin-bottom: 25px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.ticket-qr-code img {
  width: 170px;
  height: 170px;
  display: block;
}

.ticket-details {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid #F1F5F9;
  padding-top: 20px;
  font-size: 0.85rem;
}

.ticket-label {
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
}

.ticket-value {
  color: var(--primary-dark);
  font-weight: 700;
  margin-top: 2px;
}

.ticket-value.full-width {
  grid-column: 1 / -1;
}

.ticket-footer {
  background: #F8FAFC;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #F1F5F9;
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 500;
}

/* ================= TOASTS & ALERTS ================= */
.alert-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #FCA5A5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--success-green);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ================= ADMIN INTERFACE ================= */
.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
  min-height: calc(100vh - 180px);
}

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

.admin-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
  backdrop-filter: var(--glass-blur);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-gray);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
  border-left: 3px solid var(--primary-red);
  border-radius: 0 10px 10px 0;
  background: rgba(229, 36, 36, 0.08);
  color: var(--text-white);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.admin-main {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 35px;
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  min-width: 0; /* Empêche le débordement du contenu (tableaux, filtres) */
}

/* Dashboard Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.stat-icon {
  width: 45px;
  height: 45px;
  background: rgba(229, 36, 36, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Charts / Gauges layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

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

.dashboard-panel {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 25px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title svg {
  color: var(--primary-red);
}

/* Custom SVG / Pure CSS progress bars for graphs */
.chart-bar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.chart-bar-name {
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.chart-bar-value {
  color: var(--text-gray);
  font-weight: 500;
}

.chart-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-red), #3B82F6);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* ================= TABLES ================= */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 100%;
}

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

table.admin-table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-white);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

table.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-gray);
  vertical-align: middle;
}

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

table.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-white);
}

/* Badges de Statuts */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-orange);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.confirmed {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge.present {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.draft {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-gray);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.published {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Actions Table Buttons */
.table-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

.btn-icon.edit:hover {
  background: var(--info-blue);
  border-color: var(--info-blue);
}

.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.8);
}

/* Modal form popup style */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 25px;
}

/* Pagination container styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.pagination-btn:hover:not(.disabled) {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

.pagination-btn.active {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* QR Camera Scanner Box */
#reader {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
}

#reader__scan_region {
  background: #000;
}

#reader__dashboard_section_csr button {
  background: var(--primary-red) !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.scan-result-card {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--success-green);
  border-radius: 16px;
  padding: 20px;
  max-width: 450px;
  margin: 25px auto 0 auto;
  display: none;
}

.scan-result-card.error-result {
  background: rgba(239, 68, 68, 0.12);
  border-color: #EF4444;
}

.scan-result-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-result-details {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scan-result-row {
  display: flex;
  justify-content: space-between;
}

.scan-result-label {
  color: var(--text-gray);
  font-weight: 500;
}

.scan-result-val {
  color: var(--text-white);
  font-weight: 600;
}

/* Audit logs scroll area */
.audit-logs-box {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.2);
}

.audit-log-item {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
}

.audit-log-item:last-child {
  border-bottom: none;
}

.audit-log-item:hover {
  background: rgba(255, 255, 255, 0.01);
}

.audit-log-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-log-action {
  font-weight: 700;
  color: var(--text-white);
}

.audit-log-details {
  color: var(--text-gray);
}

.audit-log-time {
  color: var(--text-gray);
  font-size: 0.75rem;
  text-align: right;
  align-self: center;
}

/* Responsive Mobile for Header and Navigation */
@media (max-width: 768px) {
  header.main-header {
    flex-direction: column;
    padding: 15px 20px;
    gap: 15px;
    align-items: center;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .brand-text h1 {
    font-size: 1.1rem;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .btn-cta {
    padding: 8px 16px;
    font-size: 0.82rem;
  }
}

/* Responsive Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Responsive Form Rows for Modals */
.form-row-2, .form-row-3 {
  display: grid;
  gap: 15px;
  margin-bottom: 0;
}
.form-row-2 {
  grid-template-columns: 1fr 1fr;
}
.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 600px) {
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
}

/* responsive refinements for admin panel */
@media (max-width: 991px) {
  .admin-main {
    padding: 25px;
  }
  .filters-bar {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 0 15px;
  }
  .admin-main {
    padding: 20px;
    border-radius: 16px;
  }
  .filters-bar {
    padding: 15px;
  }
  .filter-group {
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .admin-main {
    padding: 15px 12px;
    border-radius: 12px;
  }
  .filters-bar {
    padding: 12px 10px;
  }
}



