:root {
  --bg-app: #F4F6FA;
  --sidebar-bg: #FFFFFF;
  --surface: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-subtle: #F1F5F9;
  
  /* Brand & Accent Colors */
  --primary: #2563EB;
  --primary-light: #EFF6FF;
  --primary-dark: #1D4ED8;

  /* Card Palette from Preview */
  --card-teal: #00B69B;
  --card-amber: #FFA800;
  --card-coral: #FF5B5B;
  --card-blue: #2D74FF;

  /* Status Colors */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --info: #0EA5E9;
  --info-bg: #F0F9FF;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 20px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 35px -10px rgba(37, 99, 235, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

/* ================= LOGIN PAGE STYLES ================= */
.login-wrapper {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(0, 182, 155, 0.08) 0%, transparent 40%),
              #F4F6FA;
  padding: 24px;
}

.login-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-badge {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #2563EB, #38BDF8);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
  margin-bottom: 16px;
}
.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.login-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.72;
  margin-top: 4px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon svg.field-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-with-icon input {
  padding-left: 42px;
  padding-right: 42px;
}
.toggle-pwd-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.toggle-pwd-btn:hover { color: var(--text-primary); }

.login-alert {
  padding: 10px 14px;
  border-radius: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.remember-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.remember-checkbox input {
  cursor: pointer;
  accent-color: var(--primary);
}

/* ================= APP SHELL LAYOUT ================= */
.app-shell {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 40;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 32px 8px;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563EB, #38BDF8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: -0.5px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 14px 12px 6px 12px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}
.nav-item:hover {
  background: var(--bg-app);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.nav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
  flex-shrink: 0;
}
.nav-item.active svg {
  stroke: #FFFFFF;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.sidebar-badge-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
  border: 1px solid #DBEAFE;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.sidebar-badge-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.sidebar-badge-card p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #FEE2E2;
  background: #FFF5F5;
  color: #DC2626;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover {
  background: #FEE2E2;
}

/* Main Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 100vh;
}

/* Top Navigation Bar */
.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  background: transparent;
  gap: 20px;
}
.page-heading h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.page-heading p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-box {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 4px 6px 4px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  width: 280px;
  transition: all 0.2s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.icon-action-btn:hover {
  color: var(--primary);
  border-color: #BFDBFE;
  background: #F8FAFC;
}
.notif-badge-pill {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #60A5FA);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-info-text {
  display: flex;
  flex-direction: column;
}
.user-name { font-size: 12px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.user-role { font-size: 10px; color: var(--text-muted); }

/* Page Content Container */
.content-body {
  padding: 0 36px 36px 36px;
  flex: 1;
}

/* Vibrant Banner Alerts */
.banner-alert-box {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease;
}

/* Vibrant Stats Cards Grid */
.stat-grid-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) {
  .stat-grid-preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .stat-grid-preview { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; }
  .top-navbar { padding: 16px 20px; }
  .content-body { padding: 0 20px 20px 20px; }
}

.stat-card-vibrant {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  box-shadow: 0 8px 20px -4px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card-vibrant:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(0,0,0,0.18);
}

.stat-card-teal { background: linear-gradient(135deg, #00B69B 0%, #009688 100%); }
.stat-card-amber { background: linear-gradient(135deg, #FFA800 0%, #F57C00 100%); }
.stat-card-coral { background: linear-gradient(135deg, #FF5B5B 0%, #E53935 100%); }
.stat-card-blue { background: linear-gradient(135deg, #2D74FF 0%, #1E50E2 100%); }

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.stat-card-title {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.stat-card-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-circle-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-bottom-text {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* Section Card & Layout Blocks */
.card-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Chart & Middle Columns Grid */
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .grid-2-1 { grid-template-columns: 1fr; }
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Custom Modern Segmented Bar Chart Visual */
.segmented-chart-container {
  height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 20px;
  border-bottom: 1px dashed var(--border);
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.bar-pillar {
  width: 8px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
}
.bar-seg {
  border-radius: 4px;
  width: 100%;
  transition: height 0.5s ease;
}
.seg-teal { background: #38BDF8; }
.seg-yellow { background: #FBBF24; }
.seg-coral { background: #F87171; }
.chart-month-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Recent Added / Ending Contracts List */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F8FAFC;
  transition: background 0.2s;
}
.recent-item:hover { background: #F1F5F9; }
.recent-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.recent-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
}
.recent-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.recent-sub { font-size: 11px; color: var(--text-muted); }

/* Bottom Dual Grid */
.grid-1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .grid-1-1 { grid-template-columns: 1fr; }
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.activity-row:last-child { border-bottom: none; }
.activity-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #FFFFFF;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pill Buttons & Status Tags */
.tag-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-blue { background: #DBEAFE; color: #1D4ED8; }
.tag-green { background: #D1FAE5; color: #065F46; }
.tag-amber { background: #FEF3C7; color: #92400E; }
.tag-red { background: #FEE2E2; color: #991B1B; }
.tag-purple { background: #EDE9FE; color: #6D28D9; }
.tag-gray { background: #F1F5F9; color: #475569; }

/* Buttons */
.btn-ui {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.btn-block {
  width: 100%;
  padding: 12px 18px;
  font-size: 14px;
}
.btn-light {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-light:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.btn-danger-light {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}
.btn-danger-light:hover { background: #FCA5A5; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
table.custom-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #FAFBFD;
}
table.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
table.custom-table tr:hover td {
  background: #F8FAFC;
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.form-control {
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Calendar Pointage Grid */
.pointage-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.pointage-day-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s;
}
.pointage-day-box:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}
.day-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.day-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.day-wk {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 30px;
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card-lg {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Progress Bar UI */
.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: #E2E8F0;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* Photo Upload Box */
.photo-upload-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #F8FAFC;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.photo-preview-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.photo-preview-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Notifications Dropdown Panel */
.notif-panel {
  position: absolute;
  top: 70px;
  right: 80px;
  width: 360px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  z-index: 90;
  padding: 18px;
  animation: fadeIn 0.2s ease;
}

/* Empty state */
.empty-box {
  text-align: center;
  padding: 48px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: #FAFAFC;
  color: var(--text-muted);
}

/* Chips */
.code-badge-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}
/* Official GTP Paper Document Print & Display Styles */
.official-print-document {
  border: 2px solid #000000;
  padding: 16px;
  background: #FFFFFF;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
.gtp-header-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000000;
  margin-bottom: 24px;
}
.gtp-header-table td {
  border: 1px solid #000000;
  vertical-align: middle;
  padding: 4px 6px;
}
.gtp-logo-cell {
  width: 18%;
  text-align: center;
}
.gtp-circle-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gtp-title-cell {
  width: 56%;
  text-align: center;
}
.gtp-title-cell h1 {
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #000000;
  margin: 0;
  font-family: Arial, sans-serif;
}
.gtp-ref-cell {
  width: 26%;
  font-size: 11px;
  font-weight: normal;
  color: #000000;
  padding: 0 !important;
}
.gtp-ref-line {
  padding: 3px 8px;
  border-bottom: 1px solid #000000;
}
.gtp-ref-line:last-child {
  border-bottom: none;
}
.gtp-body-content {
  padding: 4px 0;
  flex: 1;
}
.gtp-reasons-block {
  margin-bottom: 22px;
}
.gtp-reason-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 10px;
  font-size: 13px;
}
.gtp-reason-row span {
  color: #000000;
}
.gtp-square {
  width: 14px;
  height: 14px;
  border: 1.5px solid #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}
.gtp-fields-grid {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gtp-line-row {
  display: flex;
  align-items: baseline;
  font-size: 13px;
  color: #000000;
}
.gtp-line-row .lbl {
  font-weight: normal;
  white-space: nowrap;
}
.gtp-line-row .dot-fill {
  flex: 1;
  border-bottom: 1px dotted #000000;
  padding-left: 8px;
  padding-bottom: 1px;
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  min-height: 18px;
}
.gtp-signature-area {
  text-align: right;
  margin-top: 45px;
  margin-bottom: 50px;
  padding-right: 10px;
}
.gtp-sig-text {
  font-size: 12px;
  font-weight: bold;
  text-decoration: underline;
  color: #000000;
}
.gtp-footer-section {
  margin-top: auto;
  padding-top: 10px;
}
.gtp-meta-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: normal;
  color: #000000;
  margin-bottom: 4px;
}
.gtp-divider-line {
  border-top: 1px solid #000000;
  margin-bottom: 4px;
}
.gtp-disclaimer-text {
  text-align: center;
  font-size: 8.5px;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.1px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .sidebar, .top-navbar, .no-print, nav, aside, header {
    display: none !important;
  }
  .modal-overlay {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .modal-card {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    animation: none !important;
  }
  .official-print-document {
    border: 2px solid #000000 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  .gtp-header-table, .gtp-header-table td {
    border-color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .dot-fill {
    border-bottom: 1px dotted #000000 !important;
  }
}
.stat-rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stat-rank-table th {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-rank-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 500;
}
.stat-rank-table tr:hover td { background: #F8FAFC; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  background: var(--primary-light);
  color: var(--primary);
}
.rank-badge.rank-1 { background: #FFF7E6; color: #D97706; }
.rank-badge.rank-2 { background: #F1F5F9; color: #475569; }
.rank-badge.rank-3 { background: #FFF1F2; color: #E11D48; }
.bon-sortie-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .bon-sortie-card-grid { grid-template-columns: 1fr; } }
.type-toggle-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.type-toggle-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: #FFFFFF;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.type-toggle-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
