/* ============================================
   Portail Réseau Agences — Style principal
   ============================================ */

:root {
  --blue-deep: #0f2d5e;
  --blue-royal: #1a56db;
  --blue-light: #3b82f6;
  --cyan: #06b6d4;
  --cyan-light: #e0f7fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --green: #10b981;
  --green-light: #d1fae5;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fee2e2;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --sidebar-width: 260px;
  --header-height: 64px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-50);
}

a { color: var(--blue-royal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================
   LAYOUT
   ============================================ */

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

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

.sidebar {
  width: var(--sidebar-width);
  background: var(--blue-deep);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--blue-royal), var(--cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand .brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-brand .brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  text-decoration: none;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--blue-royal), #1e40af);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26,86,219,0.4);
}

.nav-item i {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
}

.sidebar-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-royal), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

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

.sidebar-user .user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}

.sidebar-user .logout-btn {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-user .logout-btn:hover {
  color: var(--red);
  text-decoration: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

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

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}

.header-search {
  max-width: 320px;
  width: 100%;
}

.header-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  background: var(--gray-50);
  color: var(--gray-700);
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--blue-royal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.search-wrapper {
  position: relative;
}

.search-wrapper i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  position: relative;
  text-decoration: none;
}

.header-btn:hover {
  background: var(--gray-200);
  color: var(--gray-800);
  text-decoration: none;
}

.header-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--white);
}

.header-agency {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: 8px;
  font-size: 12px;
  color: var(--gray-600);
}

.header-agency .agency-name {
  font-weight: 600;
  color: var(--gray-800);
}

/* ============================================
   PAGE CONTENT
   ============================================ */

.page-content {
  flex: 1;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.page-header-title p {
  font-size: 13px;
  color: var(--gray-500);
}

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2,
.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* Stat Cards */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: #dbeafe; color: var(--blue-royal); }
.stat-icon.green { background: var(--green-light); color: var(--green); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.red { background: var(--red-light); color: var(--red); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.cyan { background: var(--cyan-light); color: var(--cyan); }

.stat-info { flex: 1; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ============================================
   GRIDS
   ============================================ */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

th {
  background: var(--gray-50);
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-success { background: var(--green-light); color: #065f46; }
.badge-warning { background: var(--orange-light); color: #92400e; }
.badge-danger { background: var(--red-light); color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e3a8a; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-purple { background: var(--purple-light); color: #5b21b6; }
.badge-cyan { background: var(--cyan-light); color: #0e7490; }

/* Priority badges */
.badge-urgente { background: var(--red-light); color: #991b1b; }
.badge-importante { background: var(--orange-light); color: #92400e; }
.badge-normale { background: var(--green-light); color: #065f46; }
.badge-basse { background: var(--gray-100); color: var(--gray-600); }

/* Status badges */
.badge-publie, .badge-active, .badge-disponible, .badge-complete, .badge-paye, .badge-approuve { background: var(--green-light); color: #065f46; }
.badge-brouillon, .badge-nouveau, .badge-recue { background: var(--gray-100); color: var(--gray-600); }
.badge-en_traitement, .badge-en_integration, .badge-beta { background: #dbeafe; color: #1e3a8a; }
.badge-en_attente, .badge-en_revision, .badge-demande { background: var(--orange-light); color: #92400e; }
.badge-archive, .badge-inactive, .badge-suspendue, .badge-ferme, .badge-refuse { background: var(--red-light); color: #991b1b; }
.badge-expediee { background: var(--purple-light); color: #5b21b6; }
.badge-bientot { background: var(--cyan-light); color: #0e7490; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:focus { outline: none; }

.btn-sm { padding: 5px 10px; font-size: 12px; gap: 5px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { padding: 8px; gap: 0; }

.btn-primary { background: var(--blue-royal); color: var(--white); border-color: var(--blue-royal); }
.btn-primary:hover { background: #1e40af; border-color: #1e40af; color: var(--white); }

.btn-success { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-success:hover { background: #059669; color: var(--white); }

.btn-danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-danger:hover { background: #dc2626; color: var(--white); }

.btn-warning { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-warning:hover { background: #d97706; color: var(--white); }

.btn-secondary { background: var(--white); color: var(--gray-600); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); color: var(--gray-800); }

.btn-outline { background: transparent; color: var(--blue-royal); border-color: var(--blue-royal); }
.btn-outline:hover { background: var(--blue-royal); color: var(--white); }

.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

/* ============================================
   FORMS
   ============================================ */

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue-royal);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.08);
}

.form-control::placeholder { color: var(--gray-400); }

select.form-control { cursor: pointer; }

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

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input { cursor: pointer; }
.form-check label { font-size: 13px; color: var(--gray-600); cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert i { margin-top: 1px; flex-shrink: 0; font-size: 15px; }

.alert-success { background: var(--green-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: var(--orange-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: var(--red-light); color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }

/* ============================================
   FILTERS BAR
   ============================================ */

.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.filters-bar select,
.filters-bar input {
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-700);
  background: var(--gray-50);
  transition: var(--transition);
  min-width: 140px;
}

.filters-bar select:focus,
.filters-bar input:focus {
  outline: none;
  border-color: var(--blue-royal);
  background: var(--white);
}

/* ============================================
   NEWS CARDS
   ============================================ */

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 18px;
  transition: var(--transition);
  cursor: pointer;
  display: block;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-royal);
  text-decoration: none;
}

.news-card.pinned { border-left: 4px solid var(--blue-royal); }
.news-card.urgente { border-left: 4px solid var(--red); }
.news-card.importante { border-left: 4px solid var(--orange); }

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.news-date {
  font-size: 11px;
  color: var(--gray-400);
}

.news-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 13px;
  color: var(--gray-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   TOOL CARDS
   ============================================ */

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-royal);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe, var(--cyan-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--blue-royal);
}

.tool-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.tool-description {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
  flex: 1;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   GROUP CARDS
   ============================================ */

.group-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
}

.group-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.group-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-royal));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.group-card-image .destination-icon {
  font-size: 60px;
  opacity: 0.3;
}

.group-card-image .destination-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: white;
}

.group-card-image .destination-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.group-card-body {
  padding: 16px;
}

.group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
}

.group-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.group-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-500);
}

.group-meta-item i { color: var(--blue-royal); font-size: 12px; width: 14px; }

.group-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-royal);
}

.group-price span {
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-400);
}

.spots-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 8px 0;
  overflow: hidden;
}

.spots-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 2px;
}

/* ============================================
   SUPPLIER CARD
   ============================================ */

.supplier-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supplier-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-royal);
}

.supplier-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-royal);
}

/* ============================================
   PRODUCT CARDS (Shop)
   ============================================ */

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-image {
  height: 180px;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--gray-400);
}

.product-body {
  padding: 16px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.product-description {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-royal);
}

/* ============================================
   CHART CONTAINER
   ============================================ */

.chart-container {
  position: relative;
  height: 220px;
  width: 100%;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: var(--gray-300);
}

.empty-state p {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 8px;
}

/* ============================================
   COMMISSION TABLE
   ============================================ */

.commission-total-row td {
  font-weight: 700;
  background: var(--gray-50);
}

/* ============================================
   MODAL (simple)
   ============================================ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.show {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 520px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue-deep) 0%, #0a1628 50%, #071020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(26,86,219,0.12) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(6,182,212,0.08) 0%, transparent 50%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--blue-royal), var(--cyan));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(26,86,219,0.4);
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.login-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 36px;
}

.login-card .form-label {
  color: rgba(255,255,255,0.7);
}

.login-card .form-control {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--white);
}

.login-card .form-control::placeholder { color: rgba(255,255,255,0.3); }
.login-card .form-control:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--blue-royal);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.25);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--blue-royal), #1e40af);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26,86,219,0.4);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
}

.login-footer p {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.demo-accounts {
  margin-top: 20px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}

.demo-accounts p {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-btn {
  display: block;
  width: 100%;
  padding: 7px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  margin-bottom: 6px;
  transition: var(--transition);
}

.demo-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

.demo-btn:last-child { margin-bottom: 0; }

/* ============================================
   AGENT CARD
   ============================================ */

.agent-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.agent-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--blue-royal);
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-royal), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ============================================
   DOCUMENT CARD
   ============================================ */

.doc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.doc-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--blue-royal);
}

.doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--red);
  flex-shrink: 0;
}

/* ============================================
   MARKETING CARD
   ============================================ */

.marketing-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
}

.marketing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.marketing-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}

.marketing-body { padding: 14px; }

/* ============================================
   MISC
   ============================================ */

.text-muted { color: var(--gray-400); }
.text-small { font-size: 12px; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.fw-bold { font-weight: 700; }
.fw-600 { font-weight: 600; }

.color-blue { color: var(--blue-royal); }
.color-green { color: var(--green); }
.color-orange { color: var(--orange); }
.color-red { color: var(--red); }

.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 20px 0;
}

/* Urgent banner */
.urgent-banner {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.urgent-banner i { color: var(--red); font-size: 18px; }
.urgent-banner strong { color: #991b1b; }
.urgent-banner p { color: #7f1d1d; font-size: 13px; }

/* Stats breakdown */
.stats-breakdown {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stats-breakdown-item {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 220px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 20px; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .header { padding: 0 16px; }
  .mobile-menu-btn { display: flex; }
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 4px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.show { display: block; }

/* Commission summary cards */
.commission-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.commission-summary-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.commission-summary-card .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.commission-summary-card .amount {
  font-size: 22px;
  font-weight: 700;
}

/* Admin cards */
.admin-module-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.admin-module-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-royal);
  text-decoration: none;
}

.admin-module-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* Scrollbar global */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Print */
@media print {
  .sidebar, .header { display: none; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; }
}
