/* ══════════════════════════════════════════
   CREATIF PRO — ESPACE EMPLOYÉ
   Style Flutter / Native App
══════════════════════════════════════════ */

:root {
  --primary:       #1A6BFF;
  --primary-dark:  #0F4FCC;
  --primary-light: #E8F0FF;
  --purple:        #7C5CFC;
  --green:         #00C48C;
  --amber:         #FFB800;
  --red:           #FF4D6A;
  --bg:            #F5F8FF;
  --surface:       #FFFFFF;
  --border:        rgba(26,107,255,0.12);
  --text:          #0D1B3E;
  --text-muted:    #6B7FA3;
  --text-light:    #A0B0CC;
  --topbar-h:      64px;
  --bnav-h:        72px;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 2px 16px rgba(26,107,255,0.08);
  --shadow-md:     0 8px 32px rgba(26,107,255,0.14);
}

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

html, body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overscroll-behavior: none;
}

/* ══ ÉCRAN LOGIN ══ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0D1B3E 0%, #1A3070 60%, #0F4FCC 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.login-bg-circles { position:absolute; inset:0; pointer-events:none; }
.login-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  background: #fff;
}
.login-circle.c1 { width:320px; height:320px; top:-80px; right:-60px; }
.login-circle.c2 { width:200px; height:200px; bottom:60px; left:-80px; }
.login-circle.c3 { width:100px; height:100px; bottom:200px; right:30px; }

.login-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #1A6BFF, #7C5CFC);
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(26,107,255,0.4);
  flex-shrink: 0;
}
.login-brand { font-size:20px; font-weight:700; color:#fff; letter-spacing:-.3px; }
.login-brand-sub { font-size:11px; color:rgba(255,255,255,0.5); font-weight:500; margin-top:2px; }

.login-title { font-size:22px; font-weight:700; color:#fff; margin-bottom:6px; }
.login-subtitle { font-size:13px; color:rgba(255,255,255,0.55); margin-bottom:24px; }

.login-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .7px;
  margin-bottom: 7px;
}
.login-field input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border .2s;
}
.login-field input:focus { border-color: rgba(26,107,255,0.7); }
.login-field input::placeholder { color: rgba(255,255,255,0.3); }

.eye-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  user-select: none;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1A6BFF, #7C5CFC);
  border: none;
  border-radius: 13px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26,107,255,0.38);
  transition: opacity .2s, transform .1s;
  margin-top: 8px;
}
.login-btn:active { transform: scale(0.98); opacity: .9; }
.login-btn:disabled { opacity: .6; cursor: wait; }

/* ══ APP SCREEN ══ */
.app-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── TOP BAR ── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(26,107,255,0.07);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.topbar-avatar img { width:100%; height:100%; object-fit:cover; }
.topbar-info { min-width: 0; }
.topbar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-center {
  flex: 1;
  text-align: center;
}
.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

.topbar-right { flex: 1; display: flex; justify-content: flex-end; }
.topbar-notif {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.topbar-notif:active { background: var(--primary-light); color: var(--primary); }

/* ── CONTENU PRINCIPAL ── */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px calc(var(--bnav-h) + 16px);
  -webkit-overflow-scrolling: touch;
}

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* ── BOTTOM NAV BAR ── */
.bottom-nav {
  height: var(--bnav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(26,107,255,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: color .2s;
  padding: 8px 4px;
  position: relative;
}
.bnav-item.active { color: var(--primary); }
.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}

.bnav-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.bnav-item.active .bnav-icon { transform: scale(1.1); }
.bnav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ── SÉLECTEUR DE PÉRIODE ── */
.period-bar {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 14px;
}
.period-btn {
  flex: 1;
  padding: 8px 4px;
  border: none;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.period-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(26,107,255,.3);
}

.custom-date-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.date-range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-range-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .5px;
  margin-bottom: 5px;
}
.date-range-field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  color: var(--text);
  outline: none;
}

/* ── KPI CARDS ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  bottom: -14px; right: -14px;
  width: 52px; height: 52px;
  border-radius: 50%;
  opacity: 0.07;
}
.kpi-blue   { border-top: 3px solid var(--primary); }
.kpi-blue::before   { background: var(--primary); }
.kpi-purple { border-top: 3px solid var(--purple); }
.kpi-purple::before { background: var(--purple); }
.kpi-green  { border-top: 3px solid var(--green); }
.kpi-green::before  { background: var(--green); }

.kpi-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-blue .kpi-icon   { background: rgba(26,107,255,.1); color: var(--primary); }
.kpi-purple .kpi-icon { background: rgba(124,92,252,.1); color: var(--purple); }
.kpi-green .kpi-icon  { background: rgba(0,196,140,.1);  color: var(--green); }

.kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.kpi-val {
  font-size: 18px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  line-height: 1;
}
.kpi-lbl {
  font-size: 8.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── SECTION CARD ── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.section-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.section-card-title svg { color: var(--primary); }

.prod-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── ÉTAT DE CHARGEMENT ── */
.prod-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ÉTAT VIDE ── */
.prod-empty {
  text-align: center;
  padding: 40px 20px;
}
.prod-empty-icon { font-size: 36px; margin-bottom: 10px; }
.prod-empty-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.prod-empty-sub   { font-size: 12px; color: var(--text-muted); }

/* ── LISTE DE PRODUCTION ── */
.prod-list { display: flex; flex-direction: column; }

.prod-entry {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.prod-entry:last-child { border-bottom: none; }
.prod-entry:active { background: var(--bg); }

.prod-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.prod-entry-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}
.prod-entry-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}
.badge-present { background: rgba(0,196,140,.12); color: var(--green); }
.badge-absent  { background: rgba(255,77,106,.1);  color: var(--red); }

.prod-entry-articles { display: flex; flex-direction: column; gap: 6px; }

.prod-article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.prod-article-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.prod-article-qty {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--purple);
  font-weight: 700;
  margin-right: 10px;
}
.prod-article-sal {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--green);
  font-weight: 700;
}

.prod-entry-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.prod-total-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.prod-total-val {
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--green);
}

/* ── GRAPHIQUE ── */
.bar-chart {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transition: width .5s ease;
}
.bar-count {
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  min-width: 30px;
  text-align: right;
}

/* ══ PAGE PROFIL ══ */
.profil-header {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(26,107,255,0.3);
}
.profil-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 130px; height: 130px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.profil-header::after {
  content: '';
  position: absolute;
  bottom: -50px; right: 60px;
  width: 90px; height: 90px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.profil-avatar-wrap {
  position: relative;
  cursor: pointer;
  z-index: 1;
  flex-shrink: 0;
}
.profil-avatar {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.profil-avatar img { width:100%; height:100%; object-fit:cover; }
.profil-avatar-edit {
  position: absolute;
  bottom: -4px; right: -4px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.profil-info { z-index: 1; }
.profil-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.profil-poste { font-size: 12px; color: rgba(255,255,255,0.75); margin-bottom: 4px; font-weight: 500; }
.profil-date { font-size: 10.5px; color: rgba(255,255,255,0.55); }

/* ── Photo upload ── */
.photo-preview-wrap {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.photo-preview-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.photo-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
}

/* ── FORMULAIRES ── */
.form-group { padding: 14px 16px 0; }
.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .6px;
  margin-bottom: 7px;
}
.input-wrap { position: relative; }
.form-input {
  width: 100%;
  padding: 13px 44px 13px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border .2s;
}
.form-input:focus { border-color: var(--primary); background: #fff; }
.eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  color: var(--text-muted);
}

/* Barre de force */
.strength-bar-wrap {
  height: 4px;
  background: var(--bg);
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width .35s, background .35s;
}
.strength-label {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
  margin-bottom: 12px;
}

.form-msg {
  margin: 10px 16px 0;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}

/* ── BOUTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,107,255,0.3);
  transition: opacity .2s, transform .1s;
}
.btn-primary:active { opacity: .9; transform: scale(0.98); }
.btn-primary:disabled { opacity: .6; cursor: wait; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:active { background: var(--primary-light); color: var(--primary); }

.btn-full { width: calc(100% - 32px); margin: 14px 16px 16px; }

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255,77,106,0.07);
  border: 1px solid rgba(255,77,106,0.2);
  border-radius: 12px;
  color: var(--red);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  margin: 16px;
  width: calc(100% - 32px);
}
.btn-logout:active { background: rgba(255,77,106,0.14); }

/* ── TOAST ── */
.emp-toast {
  position: fixed;
  bottom: calc(var(--bnav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.emp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.emp-toast.success { background: var(--green); }
.emp-toast.error   { background: var(--red); }
.emp-toast.info    { background: var(--primary); }

/* ── RESPONSIVE ── */
@media (max-width: 360px) {
  .kpi-row { gap: 6px; }
  .kpi-val { font-size: 16px; }
  .kpi-lbl { font-size: 7.5px; }
  .kpi-icon { width: 28px; height: 28px; border-radius: 8px; }
}
@media (min-width: 600px) {
  .app-main { max-width: 560px; margin: 0 auto; }
  .bottom-nav { max-width: 560px; left: 50%; transform: translateX(-50%); }
}
/* ══ MODAL CONFIRMATION DÉCONNEXION ══ */
#empConfirmOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(13,27,62,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#empConfirmBox {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(13,27,62,0.2);
  overflow: hidden;
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.emp-cm-header {
  padding: 24px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.emp-cm-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: rgba(255,184,0,0.1);
  color: #FFB800;
  display: flex; align-items: center; justify-content: center;
}
.emp-cm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.emp-cm-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 0 4px;
}
.emp-cm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px;
  margin-top: 8px;
}
#empConfirmCancel {
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
#empConfirmCancel:active { background: var(--bg); }
#empConfirmOk {
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FFB800, #e09f00);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,184,0,0.3);
  transition: opacity .15s, transform .1s;
}
#empConfirmOk:active { opacity: .9; transform: scale(.97); }

/* ── Spinner SVG ── */
@keyframes empSpin {
  to { transform: rotate(360deg); }
}
.eye-btn svg { display: block; }
/* ══ CARTE SOLDE ══ */
.solde-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0F4FCC 0%, #1A6BFF 50%, #7C5CFC 100%);
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 28px rgba(26,107,255,0.35);
}
.solde-card.solde-negatif {
  background: linear-gradient(135deg, #c0152e 0%, #FF4D6A 100%);
  box-shadow: 0 8px 28px rgba(255,77,106,0.35);
}
.solde-card-shimmer {
  position: absolute;
  top: -50px; right: -50px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}
.solde-card-shimmer::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.solde-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.solde-card-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.solde-card-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.solde-card-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .1px;
}
.solde-card-right {
  z-index: 1;
  text-align: right;
  flex-shrink: 0;
}
.solde-card-amount {
  font-size: 26px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: #fff;
  line-height: 1;
  letter-spacing: -.5px;
}
.solde-card-currency {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  margin-top: 3px;
  text-align: right;
}
.solde-detail {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}
.solde-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
}
.solde-detail-row span:last-child {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.solde-detail-avance span:last-child {
  color: #FF8FA3;
}
/* ── Blocs conteneurs ── */
.sal-bloc { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:16px; overflow:hidden; }
.sal-bloc-header { display:flex; align-items:center; gap:8px; padding:14px 16px; border-bottom:1px solid var(--border); }
.sal-bloc-header svg { color:var(--primary); flex-shrink:0; }
.sal-bloc-header span { font-size:13px; font-weight:700; color:var(--text); }

/* ── Spinner ── */
.sal-loading { display:flex; align-items:center; justify-content:center; gap:10px; padding:32px 0; color:var(--text-muted); font-size:13px; }
.sal-spinner { width:20px; height:20px; border:2.5px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin .7s linear infinite; }

/* ── Empty inline ── */
.sal-inner-empty { text-align:center; padding:20px 16px; font-size:12px; color:var(--text-muted); font-style:italic; }

/* ── Historique scroll ── */
.sal-scroll-body { display:flex; flex-direction:column; max-height:280px; overflow-y:auto; }
.sal-month-card { border-bottom:1px solid var(--border); flex-shrink:0; }
.sal-month-card:last-child { border-bottom:none; }
.sal-month-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--border); background:var(--bg); }
.sal-month-label { font-size:13px; font-weight:700; color:var(--text); text-transform:capitalize; }
.sal-badge { font-size:9.5px; font-weight:700; padding:3px 9px; border-radius:20px; letter-spacing:.3px; }
.sal-badge-regle { background:rgba(0,196,140,0.12); color:var(--green); }
.sal-badge-attente { background:rgba(255,184,0,0.12); color:#C98A00; }
.sal-month-body { padding:12px 16px; display:flex; flex-direction:column; gap:8px; }
.sal-row { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--text-muted); font-weight:500; }
.sal-row-net { border-top:1px dashed var(--border); padding-top:8px; margin-top:2px; font-weight:700; font-size:13px; color:var(--text); }
.sal-row-total-av { font-size:11px; }
.sal-val-green { color:var(--green); font-weight:700; font-family:'DM Mono',monospace; font-size:12px; }
.sal-val-red { color:var(--red); font-weight:700; font-family:'DM Mono',monospace; font-size:12px; }
.sal-val-net { font-family:'DM Mono',monospace; font-size:13px; font-weight:700; color:var(--primary); }
.sal-val-regle { color:var(--green); }
.sal-avances-block { background:var(--bg); border-radius:8px; padding:8px 10px; display:flex; flex-direction:column; gap:5px; }
.sal-avances-title { font-size:10px; font-weight:700; color:var(--red); letter-spacing:.4px; text-transform:uppercase; margin-bottom:2px; }
.sal-avance-row { display:flex; justify-content:space-between; font-size:11px; color:var(--text-muted); }
.sal-avance-val { color:var(--red); font-weight:600; font-family:'DM Mono',monospace; }

/* ── Tableau avances ── */
.sal-table-wrap { display:flex; flex-direction:column; }
.sal-table-head { display:grid; grid-template-columns:28px 1fr 100px; padding:9px 16px; background:var(--bg); border-bottom:1px solid var(--border); gap:8px; }
.sal-th { font-size:10px; font-weight:700; color:var(--text-muted); letter-spacing:.5px; text-transform:uppercase; }
.sal-th-num { text-align:center; }
.sal-th-mnt { text-align:right; }
.sal-table-body { max-height:210px; overflow-y:auto; }
.sal-table-row { display:grid; grid-template-columns:28px 1fr 100px; padding:10px 16px; border-bottom:1px solid var(--border); gap:8px; align-items:center; transition:background .12s; }
.sal-table-row:last-child { border-bottom:none; }
.sal-table-row:active { background:var(--bg); }
.sal-td { font-size:12px; color:var(--text); font-weight:500; }
.sal-td-num { text-align:center; color:var(--text-muted); font-size:11px; font-weight:700; font-family:'DM Mono',monospace; }
.sal-td-date { color:var(--text-muted); font-size:11px; font-family:'DM Mono',monospace; }
.sal-td-mnt { text-align:right; color:var(--red); font-weight:700; font-family:'DM Mono',monospace; font-size:12px; }
.sal-filter-bar{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;margin-bottom:14px;box-shadow:var(--shadow);}
.sal-filter-group{display:flex;flex-direction:column;gap:3px;flex:1;}
.sal-filter-label{font-size:9px;font-weight:700;color:var(--text-muted);letter-spacing:.5px;text-transform:uppercase;}
.sal-filter-input{border:none;outline:none;font-family:'Sora',sans-serif;font-size:12px;font-weight:600;color:var(--text);background:transparent;width:100%;cursor:pointer;}
.sal-filter-sep{width:1px;height:32px;background:var(--border);}
.sal-filter-reset{flex-shrink:0;width:32px;height:32px;border:none;border-radius:8px;background:var(--bg);color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.sal-htable-wrap{display:flex;flex-direction:column;overflow:hidden;}
.sal-htable-head{display:grid;grid-template-columns:22px 48px 1fr 1fr 1fr 40px;padding:8px 12px;background:var(--bg);border-bottom:1px solid var(--border);gap:4px;}
.sal-hth{font-size:9px;font-weight:700;color:var(--text-muted);letter-spacing:.4px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sal-htable-body{max-height:320px;overflow-y:auto;}
.sal-htable-row{display:grid;grid-template-columns:22px 48px 1fr 1fr 1fr 40px;padding:10px 12px;border-bottom:1px solid var(--border);gap:4px;align-items:center;}
.sal-htable-row:last-child{border-bottom:none;}
.sal-htable-row:active{background:var(--bg);}
.sal-htd{font-size:11px;font-weight:600;color:var(--text);font-family:'DM Mono',monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sal-htd-num{color:var(--text-muted);font-size:10px;text-align:center;}
.sal-htd-mois{color:var(--text);font-weight:700;font-family:'Sora',sans-serif;font-size:11px;}
.sal-htd-sal{color:var(--green);}
.sal-htd-av{color:var(--red);}
.sal-htd-net{color:var(--primary);font-weight:700;}
.sal-htd-net-regle{color:var(--green);}
.sal-htd-st{display:flex;justify-content:center;}
.sup-table-head{display:grid;grid-template-columns:22px 1fr auto auto;padding:8px 14px;background:var(--bg);border-bottom:1px solid var(--border);gap:6px;}
.sup-th{font-size:9px;font-weight:700;color:var(--text-muted);letter-spacing:.5px;text-transform:uppercase;}
.sup-table-body{max-height:260px;overflow-y:auto;}
.sup-table-row{display:grid;grid-template-columns:22px 1fr auto auto;padding:11px 14px;border-bottom:1px solid var(--border);gap:6px;align-items:center;}
.sup-table-row:last-child{border-bottom:none;}
.sup-table-row:active{background:var(--bg);}
.sup-td{font-size:12px;font-weight:600;color:var(--text);font-family:'DM Mono',monospace;}
.sup-td-num{color:var(--text-muted);font-size:10px;text-align:center;}
.sup-td-mois{color:var(--text-muted);font-size:11px;white-space:nowrap;}
.sup-td-mnt{color:var(--green);font-weight:700;white-space:nowrap;}
.sup-td-red{color:var(--red);}
.sup-td-st{display:flex;justify-content:flex-end;}


.sup-inner-sep{display:flex;align-items:center;gap:7px;padding:12px 14px 10px;border-top:1px solid var(--border);margin-top:4px;}
.sup-inner-sep svg{color:var(--primary);flex-shrink:0;}
.sup-inner-sep span{font-size:12px;font-weight:700;color:var(--text);}