/* ============================================
   Budget Pro v2 — app.css
   NK Collection — Design chic & lumineux
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --orange:    #ff6b35;
  --orange2:   #ff8c5a;
  --orange-lt: #fff4f0;
  --green:     #10b981;
  --green-lt:  #ecfdf5;
  --red:       #f43f5e;
  --red-lt:    #fff1f2;
  --blue:      #6366f1;
  --blue-lt:   #eef2ff;
  --purple:    #8b5cf6;
  --amber:     #f59e0b;

  --card:    #ffffff;
  --border:  rgba(0,0,0,.07);
  --border2: rgba(0,0,0,.04);
  --txt:     #0f172a;
  --txt2:    #64748b;
  --txt3:    #94a3b8;
  --bg:      #f8faff;
  --bg2:     #f1f5fd;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --shadow-orange: 0 6px 20px rgba(255,107,53,.3);
  --shadow-blue:   0 6px 20px rgba(99,102,241,.28);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--txt);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-wrap { min-height: 100vh; }

/* ==============================================
   LOGIN PAGE
============================================== */
.login-page {
  display: flex;
  min-height: 100vh;
}

/* ── Panneau gauche ── */
.login-left {
  width: 52%;
  background: linear-gradient(150deg, #fffaf8 0%, #ffeee6 45%, #ede9ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(255,107,53,.2) 0%, transparent 65%);
  top: -100px; right: -100px;
  border-radius: 50%;
  pointer-events: none;
  animation: orb-pulse 6s ease-in-out infinite;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,.15) 0%, transparent 65%);
  bottom: -80px; left: -80px;
  border-radius: 50%;
  pointer-events: none;
  animation: orb-pulse 8s ease-in-out infinite reverse;
}
@keyframes orb-pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: .7; }
}

.login-left-bg { position: absolute; inset: 0; pointer-events: none; }
.login-left-content { position: relative; z-index: 1; text-align: center; width: 100%; }

/* Brand */
.login-brand {
  display: flex; align-items: center;
  justify-content: center; gap: 14px;
  margin-bottom: 32px;
}
.login-brand-icon {
  width: 52px; height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff6b35, #ff9a6c);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(255,107,53,.35);
}
.login-brand-name {
  font-size: 23px; font-weight: 800;
  color: #0f172a; letter-spacing: -.5px;
}
.login-tagline { font-size: 12px; color: #64748b; margin-top: 3px; font-weight: 500; }

/* Stats */
.login-stats {
  display: flex; gap: 10px;
  justify-content: center; margin-top: 28px;
}
.login-stat {
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(255,107,53,.15);
  border-radius: 14px; padding: 12px 18px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  transition: transform .22s, box-shadow .22s;
}
.login-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.login-stat-val {
  font-size: 21px; font-weight: 800;
  background: linear-gradient(135deg, #ff6b35, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-stat-lbl { font-size: 11px; color: #64748b; margin-top: 3px; font-weight: 600; }

.login-quote {
  font-size: 13px; color: #64748b;
  line-height: 1.75; max-width: 280px;
  margin: 24px auto 0; font-style: italic;
}

/* ── Panneau droit ── */
.login-right {
  flex: 1; background: #ffffff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px; position: relative;
}
.login-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #ff6b35, #8b5cf6, #6366f1);
}

.login-right-title {
  font-size: 28px; font-weight: 800;
  color: #0f172a; margin-bottom: 7px;
  text-align: center; letter-spacing: -.6px;
}
.login-right-sub {
  font-size: 14px; color: #64748b;
  margin-bottom: 34px; text-align: center;
  max-width: 300px; line-height: 1.65;
}

/* Setup badge */
.setup-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #fff4f0, #ffe8dd);
  color: #ff6b35; padding: 7px 16px;
  border-radius: 99px; font-size: 12px; font-weight: 700;
  margin-bottom: 20px; border: 1px solid rgba(255,107,53,.2);
  box-shadow: 0 2px 10px rgba(255,107,53,.12);
}

/* PIN length toggle */
.pin-length-toggle { display: flex; gap: 7px; margin-bottom: 26px; }
.plen-btn {
  padding: 7px 20px; border-radius: 99px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1.5px solid rgba(0,0,0,.08);
  background: #f1f5fd; color: #64748b;
  font-family: 'Inter', sans-serif;
  transition: all .18s;
}
.plen-btn.active {
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(255,107,53,.3);
}
.plen-btn:hover:not(.active) { background: #fff; border-color: rgba(0,0,0,.14); }

/* PIN dots */
.pin-dots { display: flex; gap: 16px; justify-content: center; margin-bottom: 30px; }
.pin-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #e2e8f0; background: transparent;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pin-dot.filled {
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  border-color: transparent; transform: scale(1.2);
  box-shadow: 0 4px 14px rgba(255,107,53,.4);
}
.pin-dot.error   { background: #f43f5e; border-color: transparent; box-shadow: 0 4px 12px rgba(244,63,94,.35); }
.pin-dot.success { background: #10b981; border-color: transparent; box-shadow: 0 4px 12px rgba(16,185,129,.35); }

/* Message PIN */
.pin-msg {
  font-size: 13px; text-align: center;
  min-height: 22px; margin-bottom: 14px;
  font-weight: 700; letter-spacing: -.1px;
}
.pin-msg.error   { color: #f43f5e; }
.pin-msg.success { color: #10b981; }

/* Numpad */
.numpad {
  display: grid; grid-template-columns: repeat(3, 80px);
  gap: 13px; justify-content: center; margin-bottom: 18px;
}
.num-key {
  width: 78px; height: 78px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.1) 0%, rgba(255,255,255,.03) 100%);
  font-size: 24px; font-weight: 600; color: var(--login-txt); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  user-select: none; gap: 1px; position: relative; overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow:
    0 1px 0 rgba(255,255,255,.12) inset,
    0 -1px 0 rgba(0,0,0,.2) inset,
    0 6px 20px rgba(0,0,0,.3),
    0 2px 6px rgba(0,0,0,.2);
  transition: all .18s cubic-bezier(.16,1,.3,1);
}
.num-key:hover {
  border-color: rgba(255,107,53,.35);
  box-shadow: 0 5px 18px rgba(255,107,53,.18);
  transform: translateY(-2px);
}
.num-key:active {
  transform: scale(.92);
  background: linear-gradient(135deg, #fff4f0, #ffe8dd);
  border-color: #ff6b35;
  box-shadow: 0 2px 8px rgba(255,107,53,.25);
}
.num-key.special {
  font-size: 12px; font-weight: 700; color: #64748b;
  background: transparent; border-color: transparent;
  box-shadow: none; line-height: 1.3; text-align: center;
}
.num-key.special:hover {
  background: #f1f5fd; border-color: rgba(0,0,0,.08);
  transform: none; box-shadow: none;
}
.num-key-letters {
  font-size: 9px; color: #94a3b8;
  letter-spacing: .12em; font-weight: 700;
}

.reset-link {
  font-size: 12px; color: #ff6b35; cursor: pointer;
  font-weight: 600; border-bottom: 1px dashed rgba(255,107,53,.4);
  padding-bottom: 1px; transition: opacity .15s;
}
.reset-link:hover { opacity: .7; }

/* Shake animation */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-9px); }
  40%,80%  { transform: translateX(9px); }
}
.shake { animation: shake .35s ease; }

/* ==============================================
   DASHBOARD
============================================== */
.dashboard-page { display: none; padding: 26px; }
.dashboard-page.visible { display: block; }
.login-page.hidden { display: none; }

.dash { max-width: 980px; margin: 0 auto; }

/* Topbar */
.topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.6rem;
  flex-wrap: wrap; gap: 10px;
}
.topbar-title {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, #0f172a 30%, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.5px;
}
.topbar-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-btn {
  background: linear-gradient(160deg, #ffffff 0%, #f4f6f8 100%);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px; padding: 9px 15px; font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--txt);
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: all .2s cubic-bezier(.16,1,.3,1);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -1px 0 rgba(0,0,0,.05) inset,
    0 3px 10px rgba(0,0,0,.07),
    0 1px 3px rgba(0,0,0,.05);
}
.topbar-btn:hover {
  background: #f8faff; border-color: rgba(0,0,0,.12);
  box-shadow: 0 3px 10px rgba(0,0,0,.08); transform: translateY(-1px);
}
.topbar-btn.logout { color: #f43f5e; border-color: rgba(244,63,94,.15); }
.topbar-btn.logout:hover { background: #fff1f2; border-color: rgba(244,63,94,.25); }

/* Month nav */
.month-nav {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; padding: 6px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.mnbtn {
  width: 28px; height: 28px;
  border-radius: 8px; border: none;
  background: #f1f5fd; cursor: pointer;
  font-size: 14px; display: flex;
  align-items: center; justify-content: center;
  color: #64748b; transition: all .15s;
  font-family: 'Inter', sans-serif;
}
.mnbtn:hover {
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  color: #fff; box-shadow: 0 3px 10px rgba(255,107,53,.3);
}
.month-label {
  font-size: 13px; font-weight: 700; color: #0f172a;
  min-width: 104px; text-align: center; letter-spacing: -.2px;
}

/* Tabs */
.tabs {
  display: flex; gap: 3px;
  margin-bottom: 1.6rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 14px; padding: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  flex-wrap: wrap; width: fit-content;
}
.tab {
  padding: 8px 18px; font-size: 13px;
  cursor: pointer; color: #64748b;
  border-radius: 10px; font-weight: 600;
  transition: all .18s; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  box-shadow: 0 4px 14px rgba(255,107,53,.32);
}
.tab:hover:not(.active) { color: #0f172a; background: #f1f5fd; }

/* Sections */
.section { display: none; }
.section.active { display: block; }

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px; margin-bottom: 1.6rem;
}
.kpi {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px; padding: 20px 20px 18px;
  position: relative; overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -1px 0 rgba(0,0,0,.04) inset,
    0 6px 18px rgba(0,0,0,.07),
    0 2px 6px rgba(0,0,0,.05),
    0 0 0 1px rgba(0,0,0,.04);
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s;
}
.kpi:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -1px 0 rgba(0,0,0,.04) inset,
    0 18px 40px rgba(0,0,0,.11),
    0 6px 14px rgba(0,0,0,.07),
    0 0 0 1px rgba(0,0,0,.04);
}
.kpi::before {
  content: '';
  position: absolute; top: -24px; right: -24px;
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--kpi-color, #ff6b35);
  opacity: .07;
}
.kpi-label {
  font-size: 10px; color: #94a3b8;
  margin-bottom: 8px; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700;
}
.kpi-val   { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.kpi-sub   { font-size: 12px; margin-top: 7px; color: #64748b; }
.kpi-bar   {
  position: absolute; bottom: 0; left: 0;
  height: 3px; border-radius: 0 2px 0 16px;
  background: linear-gradient(90deg, var(--kpi-color, #ff6b35), transparent);
}

/* Cards */
.card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px; padding: 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 -1px 0 rgba(0,0,0,.04) inset,
    0 6px 20px rgba(0,0,0,.07),
    0 2px 6px rgba(0,0,0,.05),
    0 0 0 1px rgba(0,0,0,.04);
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 -1px 0 rgba(0,0,0,.04) inset,
    0 16px 36px rgba(0,0,0,.1),
    0 4px 10px rgba(0,0,0,.06),
    0 0 0 1px rgba(0,0,0,.04);
}
.card-title { font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 14px; letter-spacing: -.1px; }

/* Grids */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }

/* Chart legend */
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12px; color: #64748b; }
.leg-item { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.leg-dot  { width: 8px; height: 8px; border-radius: 50%; }

/* Category bars */
.cat-row { margin-bottom: 13px; }
.cat-head { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-bottom: 5px; }
.cat-name { color: #0f172a; font-size: 13px; font-weight: 700; }
.bar-bg   { background: #f1f5fd; border-radius: 99px; height: 7px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.4,0,.2,1); }

/* Revenue rows */
.rev-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.rev-row:last-child { border-bottom: none; }

/* Epargne ring */
.ring-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #ff6b35; }
.ep-row { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-bottom: 6px; }
.ep-val { color: #0f172a; font-weight: 700; }
.obj-track { background: #f1f5fd; border-radius: 99px; height: 10px; overflow: hidden; margin: 10px 0; }
.obj-fill  { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff6b35, #ff8c5a); transition: width .6s; box-shadow: 0 2px 6px rgba(255,107,53,.3); }
.alert-box { padding: 10px 14px; border-radius: 10px; font-size: 12px; margin-top: 10px; font-weight: 600; }

/* Health */
.health-dial  { text-align: center; padding: 10px 0; }
.hdial-num    { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.hdial-label  { font-size: 13px; color: #64748b; margin-top: 5px; font-weight: 600; }

/* Transaction rows */
.tx-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 10px; border-bottom: 1px solid rgba(0,0,0,.04);
  cursor: pointer; border-radius: 12px;
  transition: background .14s, transform .13s;
  margin: 0 -4px;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: #f8faff; transform: translateX(4px); }
.tx-left  { display: flex; align-items: center; gap: 12px; }
.tx-icon  { width: 38px; height: 38px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.tx-meta  { font-size: 13px; color: #0f172a; font-weight: 600; }
.tx-date  { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.tx-amt   { font-size: 14px; font-weight: 800; letter-spacing: -.3px; }
.tx-del   { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; padding: 5px 7px; opacity: .7; border-radius: 8px; transition: all .14s; }
.tx-del:hover { opacity: 1; color: #f43f5e; background: #fff1f2; }

/* FAB */
.fab { position: sticky; bottom: 20px; display: flex; justify-content: flex-end; gap: 10px; padding: 0 4px; margin-top: 14px; }
.fab-btn {
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  color: #fff; border: none; border-radius: 18px;
  padding: 14px 24px; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(255,107,53,.4);
  font-family: 'Inter', sans-serif;
  transition: transform .17s, box-shadow .17s;
  letter-spacing: -.1px;
}
.fab-btn:hover  { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(255,107,53,.5); }
.fab-btn:active { transform: scale(.97); }
.fab-btn.pdf    { background: linear-gradient(135deg, #4f46e5, #6366f1); box-shadow: 0 8px 24px rgba(99,102,241,.35); }
.fab-btn.pdf:hover { box-shadow: 0 14px 36px rgba(99,102,241,.45); }

/* ==============================================
   MODALS
============================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; transition: opacity .22s; padding: 16px;
}
.modal-overlay.open { opacity: 1; }
.modal-box {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 26px; width: 100%; max-width: 490px; overflow: hidden;
  transform: scale(.88) translateY(28px);
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .22s;
  opacity: 0; max-height: 90vh; overflow-y: auto;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 -1px 0 rgba(0,0,0,.05) inset,
    0 32px 80px rgba(0,0,0,.22),
    0 8px 24px rgba(0,0,0,.12),
    0 0 0 1px rgba(0,0,0,.04);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); opacity: 1; }
.modal-accent  { height: 4px; width: 100%; }
.modal-header  { padding: 22px 22px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-header-icon { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.modal-title   { font-size: 17px; font-weight: 800; color: #0f172a; margin-bottom: 3px; letter-spacing: -.3px; }
.modal-sub     { font-size: 12px; color: #64748b; }
.modal-close   { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); background: #f1f5fd; cursor: pointer; font-size: 15px; color: #64748b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .14s; }
.modal-close:hover { background: #fff1f2; color: #f43f5e; border-color: rgba(244,63,94,.2); }
.modal-body    { padding: 0 22px 10px; }
.modal-footer  { padding: 16px 22px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* Form fields */
.m-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.m-field label, .field-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .07em; }
.m-field input, .m-field select {
  background: #f8faff; border: 1.5px solid rgba(0,0,0,.08);
  border-radius: 12px; padding: 11px 14px;
  font-size: 14px; color: #0f172a;
  font-family: 'Inter', sans-serif; font-weight: 500;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .14s;
  width: 100%;
}
.m-field input:focus, .m-field select:focus {
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255,107,53,.1);
  background: #fff;
}
.m-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Type chips */
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.type-chip {
  padding: 8px 16px; border-radius: 99px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1.5px solid rgba(0,0,0,.08);
  background: #f8faff; color: #64748b;
  transition: all .17s; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.type-chip.active { color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.type-chip:hover:not(.active) { background: #fff; border-color: rgba(0,0,0,.14); transform: translateY(-1px); }

/* Buttons */
.btn-primary {
  padding: 11px 24px;
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  color: #fff; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .17s;
  box-shadow: 0 6px 18px rgba(255,107,53,.3);
  letter-spacing: -.1px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255,107,53,.4); }
.btn-secondary {
  padding: 11px 20px; background: #f1f5fd;
  color: #0f172a; border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all .15s;
}
.btn-secondary:hover { background: #fff; border-color: rgba(0,0,0,.12); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.btn-danger {
  padding: 11px 20px; background: #fff1f2;
  color: #f43f5e; border: 1.5px solid rgba(244,63,94,.2);
  border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all .17s;
}
.btn-danger:hover { background: #f43f5e; color: #fff; border-color: #f43f5e; box-shadow: 0 6px 18px rgba(244,63,94,.35); }

/* Detail modal */
.detail-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,.04); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: #64748b; font-weight: 500; }
.detail-val   { font-weight: 700; color: #0f172a; }

/* Confirm modal */
.confirm-icon { width: 68px; height: 68px; border-radius: 22px; background: #fff1f2; display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 14px; box-shadow: 0 4px 18px rgba(244,63,94,.15); }

/* Settings */
.settings-section       { margin-bottom: 18px; }
.settings-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #ff6b35; margin-bottom: 10px; }
.settings-hint          { font-size: 12px; color: #64748b; padding: 9px 14px; background: #f8faff; border-radius: 10px; margin-top: 5px; border: 1px solid rgba(0,0,0,.05); }

/* Categories */
.cat-chip-list  { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.cat-chip       { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1.5px solid; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.cat-chip-del   { background: none; border: none; cursor: pointer; font-size: 12px; opacity: .55; padding: 0; line-height: 1; transition: opacity .12s; }
.cat-chip-del:hover { opacity: 1; }
.color-swatches { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.color-swatch   { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: transform .12s, box-shadow .12s; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.active { border-color: #0f172a; transform: scale(1.22); box-shadow: 0 2px 10px rgba(0,0,0,.2); }

/* PDF modal */
.pdf-option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid rgba(0,0,0,.07); cursor: pointer; margin-bottom: 10px; transition: all .17s; background: #fff; }
.pdf-option:hover { border-color: rgba(99,102,241,.35); background: #eef2ff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.pdf-option.active { border-color: #6366f1; background: #eef2ff; }
.pdf-option-icon  { width: 42px; height: 42px; border-radius: 12px; background: #e0e7ff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(99,102,241,.15); }
.pdf-option-title { font-size: 13px; font-weight: 700; color: #0f172a; }
.pdf-option-sub   { font-size: 11px; color: #64748b; margin-top: 3px; }
.pdf-check { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(0,0,0,.1); display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all .16s; }
.pdf-option.active .pdf-check { background: #6366f1; border-color: #6366f1; color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.3); }

/* Confetti */
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(70px) rotate(400deg); opacity: 0; }
}
.confetti-piece { position: fixed; width: 8px; height: 8px; border-radius: 2px; animation: confetti-fall .8s ease-out forwards; z-index: 99999; }

/* ==============================================
   RESPONSIVE
============================================== */
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { padding: 36px 22px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .m-field-row { grid-template-columns: 1fr; }
  .topbar-actions { gap: 6px; }
  .dashboard-page { padding: 14px; }
  .tabs { width: 100%; }
  .tab  { padding: 7px 12px; font-size: 12px; }
  .numpad { grid-template-columns: repeat(3, 70px); gap: 10px; }
  .num-key { width: 70px; height: 70px; font-size: 20px; }
}/* LOGIN PAGE */
.login-page { display: flex; min-height: 100vh; background: var(--login-bg); overflow: hidden; }

/* ═══════════════════════════════════════════════
   LOGIN LEFT — Visual Premium Animé
═══════════════════════════════════════════════ */
.login-left {
  width: 55%; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* Particules canvas */
.ll-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* Orbes lumineux ambiants */
.ll-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none; z-index: 0;
}
.ll-orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,107,53,.22) 0%, transparent 70%);
  top: -80px; left: -80px;
  animation: orbDrift1 12s ease-in-out infinite alternate;
}
.ll-orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%);
  bottom: -60px; right: -60px;
  animation: orbDrift2 15s ease-in-out infinite alternate;
}
.ll-orb-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(59,130,246,.14) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: orbDrift3 9s ease-in-out infinite alternate;
}
@keyframes orbDrift1 { 0%{transform:translate(0,0)} 100%{transform:translate(40px,30px)} }
@keyframes orbDrift2 { 0%{transform:translate(0,0)} 100%{transform:translate(-30px,-40px)} }
@keyframes orbDrift3 { 0%{transform:translate(-50%,-50%) scale(1)} 100%{transform:translate(-50%,-50%) scale(1.25)} }

/* Grille décorative pointillée */
.ll-grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* Inner wrapper */
.ll-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 380px;
  padding: 44px 32px;
  display: flex; flex-direction: column; align-items: center;
  animation: llFadeUp .8s cubic-bezier(.16,1,.3,1) both;
}
@keyframes llFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand */
.ll-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px; width: 100%;
}
.ll-logo {
  width: 50px; height: 50px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b35, #f5a623);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,107,53,.3), 0 8px 32px rgba(255,107,53,.5);
  animation: logoPulse 3.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,107,53,.3), 0 8px 28px rgba(255,107,53,.45); }
  50%      { box-shadow: 0 0 0 6px rgba(255,107,53,.1), 0 8px 40px rgba(255,107,53,.7); }
}
.ll-brand-name {
  font-size: 22px; font-weight: 800; color: #f1f0fd; letter-spacing: -.5px;
}
.ll-brand-sub {
  font-size: 11px; color: rgba(241,240,253,.38); margin-top: 2px; letter-spacing: .04em;
}

/* ── CARTE 3D ─────────────────────────────────── */
.ll-card-scene {
  width: 100%; perspective: 900px;
  margin-bottom: 24px;
}
.ll-card {
  width: 100%; aspect-ratio: 1.586;
  border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a0e3a 0%, #2d1f5e 50%, #17104a 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 30px 60px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.06),
    inset 0 1px 0 rgba(255,255,255,.1);
  transform-style: preserve-3d;
  transition: transform .08s ease-out;
  cursor: pointer;
}
/* Reflet holographique */
.ll-card-holo {
  position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(circle at 50% 50%,
    rgba(255,255,255,.08) 0%,
    rgba(255,107,53,.04) 25%,
    rgba(124,58,237,.04) 50%,
    transparent 75%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.ll-card:hover .ll-card-holo { opacity: 1; }

/* Barre dégradée top */
.ll-card-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 3;
  background: linear-gradient(90deg, #ff6b35, #f5a623, #ec4899, #7c3aed);
}
/* Puce EMV */
.ll-chip {
  position: absolute; top: 22%; left: 7%;
  width: 14%; aspect-ratio: 1.4;
  background: linear-gradient(135deg, #f5a623, #f59e0b, #d97706);
  border-radius: 5px; overflow: hidden; z-index: 3;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2);
}
.ll-chip-h, .ll-chip-v {
  position: absolute; background: rgba(0,0,0,.15);
}
.ll-chip-h { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.ll-chip-v { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }

/* NFC */
.ll-nfc {
  position: absolute; top: 22%; right: 7%; z-index: 3;
}
/* Numéros carte */
.ll-card-num {
  position: absolute; bottom: 28%; left: 7%; right: 7%;
  display: flex; gap: 10%; align-items: center; z-index: 3;
  font-family: "DM Mono", monospace; font-size: clamp(11px, 2.5vw, 15px);
  color: rgba(255,255,255,.7); letter-spacing: .04em;
}
.ll-card-num span:last-child { color: rgba(255,255,255,.92); font-weight: 500; }

/* Footer carte */
.ll-card-foot {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 7% 6%; z-index: 3;
  display: flex; align-items: flex-end; gap: 8%;
}
.ll-card-label {
  font-size: 8px; color: rgba(255,255,255,.3);
  letter-spacing: .1em; margin-bottom: 2px;
}
.ll-card-val {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.88);
  white-space: nowrap;
}
.ll-mc { margin-left: auto; display: flex; position: relative; width: 36px; height: 22px; }
.ll-mc-r, .ll-mc-o {
  width: 22px; height: 22px; border-radius: 50%; position: absolute;
}
.ll-mc-r { background: #eb001b; opacity: .85; left: 0; }
.ll-mc-o { background: #f79e1b; opacity: .75; left: 14px; }

/* ── WIDGETS ──────────────────────────────────── */
.ll-widgets {
  width: 100%; display: flex; gap: 8px; margin-bottom: 16px;
}
.ll-w {
  flex: 1; border-radius: 18px; padding: 12px 11px;
  display: flex; align-items: center; gap: 9px;
  border: 1px solid;
  backdrop-filter: blur(12px);
  animation: llFadeUp .8s cubic-bezier(.16,1,.3,1) both;
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s;
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 4px 16px rgba(0,0,0,.25),
    0 1px 4px rgba(0,0,0,.2);
}
.ll-w:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 1px 0 rgba(255,255,255,.1) inset,
    0 12px 28px rgba(0,0,0,.35),
    0 4px 8px rgba(0,0,0,.25);
}
.ll-w--green {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.18);
  box-shadow: 0 4px 20px rgba(34,197,94,.08);
}
.ll-w--green:hover { box-shadow: 0 8px 28px rgba(34,197,94,.18); }
.ll-w--orange {
  background: rgba(255,107,53,.08);
  border-color: rgba(255,107,53,.18);
  box-shadow: 0 4px 20px rgba(255,107,53,.08);
}
.ll-w--orange:hover { box-shadow: 0 8px 28px rgba(255,107,53,.18); }
.ll-w--blue {
  background: rgba(59,130,246,.08);
  border-color: rgba(59,130,246,.18);
  box-shadow: 0 4px 20px rgba(59,130,246,.08);
}
.ll-w--blue:hover { box-shadow: 0 8px 28px rgba(59,130,246,.18); }
.ll-w-icon { font-size: 18px; }
.ll-w-label { font-size: 9px; color: rgba(255,255,255,.35); letter-spacing: .07em; font-weight: 700; text-transform: uppercase; }
.ll-w-val { font-size: 13px; font-weight: 800; margin-top: 1px; }

/* ── SPARKLINE ────────────────────────────────── */
.ll-chart-wrap {
  width: 100%; margin-bottom: 20px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 12px 14px;
}
.ll-chart-label {
  font-size: 9px; color: rgba(255,255,255,.3);
  letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 8px;
}
#ll-sparkline { width: 100%; display: block; }

/* ── QUOTE ────────────────────────────────────── */
.ll-quote {
  font-size: 12px; color: rgba(241,240,253,.35);
  text-align: center; line-height: 1.85; font-style: italic; font-weight: 300;
  border-top: 1px solid rgba(255,255,255,.07); padding-top: 16px; width: 100%;
}



/* ── DARK MODE ───────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --card:  #1e1e35;
    --border: rgba(255,255,255,.08);
    --txt:   #e2e8f0;
    --txt2:  #94a3b8;
    --bg2:   #0f0f1e;
  }
  .card, .kpi {
    background: linear-gradient(160deg, #252542 0%, #1c1c32 100%);
    border-color: rgba(255,255,255,.07);
    box-shadow:
      0 1px 0 rgba(255,255,255,.06) inset,
      0 -1px 0 rgba(0,0,0,.3) inset,
      0 8px 24px rgba(0,0,0,.38),
      0 2px 6px rgba(0,0,0,.28),
      0 0 0 1px rgba(0,0,0,.2);
  }
  .card:hover, .kpi:hover {
    box-shadow:
      0 1px 0 rgba(255,255,255,.08) inset,
      0 -1px 0 rgba(0,0,0,.3) inset,
      0 20px 44px rgba(0,0,0,.5),
      0 6px 14px rgba(0,0,0,.35),
      0 0 0 1px rgba(0,0,0,.2);
  }
  .tabs {
    background: linear-gradient(160deg, #252542 0%, #1c1c32 100%);
    border-color: rgba(255,255,255,.06);
  }
  .topbar-btn {
    background: linear-gradient(160deg, #252542 0%, #1c1c32 100%);
    border-color: rgba(255,255,255,.08);
    color: var(--txt);
    box-shadow:
      0 1px 0 rgba(255,255,255,.06) inset,
      0 -1px 0 rgba(0,0,0,.3) inset,
      0 3px 10px rgba(0,0,0,.3),
      0 1px 3px rgba(0,0,0,.2);
  }
  .modal-box {
    background: linear-gradient(160deg, #252542 0%, #1c1c32 100%);
    border-color: rgba(255,255,255,.07);
  }
  .m-field input, .m-field select { background: #0f0f1e; color: var(--txt); }
  .m-field input:focus, .m-field select:focus { background: #1a1a2e; }
  .pdf-option.active, .pdf-option:hover { background: rgba(59,130,246,.1); }
  .pdf-option-icon { background: rgba(59,130,246,.15); }
  .btn-danger { background: rgba(239,68,68,.1); }
  .confirm-icon { background: rgba(239,68,68,.1); }
  .tx-del:hover { background: rgba(239,68,68,.15); }
  .tab:hover:not(.active) { background: rgba(255,255,255,.06); }
  .bar-bg { background: rgba(255,255,255,.06); }
  .obj-track { background: rgba(255,255,255,.06); }
  .settings-hint { background: rgba(255,255,255,.04); }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { padding: 36px 24px; border-left: none; background: var(--login-bg); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .m-field-row { grid-template-columns: 1fr; }
  .topbar-actions { gap: 6px; }
  .dashboard-page { padding: 14px; }
  .numpad { grid-template-columns: repeat(3, 70px); gap: 11px; }
  .num-key { width: 70px; height: 70px; font-size: 22px; }
}
@media (max-width: 480px) {
  .topbar-btn span { display: none; }
  .tabs { gap: 1px; padding: 4px; }
  .tab { padding: 7px 12px; font-size: 12px; }
}

/* ── MODAL CATÉGORIES — onglets ─────────────── */
.cat-modal-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--bg2); border-radius: 12px; padding: 4px;
  border: 1px solid var(--border);
}
.cat-modal-tab {
  flex: 1; padding: 9px 14px; border-radius: 9px; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--txt2);
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.cat-modal-tab.active {
  background: var(--card); color: var(--txt);
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 2px 8px rgba(0,0,0,.08);
}
.cat-modal-tab:hover:not(.active) { color: var(--txt); }

/* ── RACCOURCIS REVENUS ──────────────────────── */
.rev-shortcuts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 10px; padding: 0 2px;
}
.rev-shortcut-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 99px;
  border: 1.5px solid; cursor: pointer;
  font-size: 13px; font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all .2s cubic-bezier(.16,1,.3,1);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 3px 10px rgba(0,0,0,.07);
}
.rev-shortcut-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 8px 20px rgba(0,0,0,.12);
  filter: brightness(1.08);
}
.rev-shortcut-btn:active { transform: scale(.97); }
.rev-shortcut-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
