/* SafeBet V2.1 — Layout applicatif */
/* ─── LAYOUT ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--sf);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 24px rgba(11,31,51,.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .24s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.main { margin-left: 240px; flex: 1; }
.topbar {
  height: 62px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(11,31,51,.05);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.content { padding: 28px 28px 40px; max-width: 1160px; }
.panel { display: none; animation: panelIn .18s ease-out; }
.panel.on { display: block; }
@keyframes panelIn { from { opacity:.5; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sb-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff 0%, #F5FCF9 100%);
}
.logo-row { display: flex; align-items: center; gap: 11px; }
.logo-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(14,155,111,.2);
  flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-name { font-size: 18px; font-weight: 900; color: var(--green); letter-spacing: -.4px; }
.logo-tag { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .3px; margin-top: 1px; }
.sb-sec { padding: 8px 12px; margin-top: 4px; }
.sb-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .9px;
  padding: 0 8px;
  margin: 10px 0 5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: all .14s;
  border: 1px solid transparent;
  user-select: none;
}
.nav:hover { background: var(--green-bg); color: var(--green); }
.nav.on {
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  border-color: var(--green-b);
  box-shadow: var(--sh-sm);
}
.nav .ti { font-size: 17px; flex-shrink: 0; }
.nav .nb {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 20px;
  padding: 1px 7px;
}
.sb-foot {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--s2);
}
.uchip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--sf);
  transition: all .14s;
}
.uchip:hover { background: var(--green-bg); border-color: var(--green-b); }
.av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #09755A);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.sb-uname { font-size: 13px; font-weight: 700; color: var(--ink2); }
.sb-umail { font-size: 11px; color: var(--muted); }

/* ─── TOPBAR ─────────────────────────────────────────────── */
.tb-brand { display: flex; align-items: center; gap: 8px; }
.tb-logo { font-size: 15px; font-weight: 900; color: var(--green); }
.tb-sep { color: var(--dim); font-size: 16px; }
.tb-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.tb-r { display: flex; align-items: center; gap: 10px; }
.ib {
  width: 36px; height: 36px;
  background: var(--sf);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all .14s;
  box-shadow: var(--sh-sm);
  position: relative;
}
.ib:hover { background: var(--green-bg); color: var(--green); border-color: var(--green-b); }
.hamburger { display: none; }
.alert-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* ─── SECTION HEADER ─────────────────────────────────────── */
.sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.sh-title { font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -.5px; }
.sh-sub { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ─── AUTH PAGE ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 20% 10%, #D9F5EB 0%, #EEF7FF 40%, #FFFFFF 100%);
  padding: 20px;
}
.auth-card {
  background: rgba(255,255,255,.97);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(11,31,51,.14);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}
.auth-logo {
  width: 70px; height: 70px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(14,155,111,.2);
  margin: 0 auto 14px;
}
.auth-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-title { font-size: 24px; font-weight: 900; color: var(--green); text-align: center; letter-spacing: -.5px; }
.auth-sub   { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; margin-bottom: 28px; }
.auth-sw    { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.auth-sw a  { color: var(--green); font-weight: 700; cursor: pointer; }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; }

/* ─── DASHBOARD PRIORITAIRE ──────────────────────────────── */
.kgrid-priority .kpi:nth-child(-n+3){padding:22px 22px;box-shadow:var(--sh-md)}
.kgrid-priority .kpi:nth-child(-n+3) .kpi-v{font-size:26px}
.kpi-secondary{opacity:.94}
@media(max-width:768px){.kgrid-priority .kpi:nth-child(-n+3) .kpi-v{font-size:24px}.kpi-secondary{display:block}}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .kgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: 8px 0 40px rgba(11,31,51,.14); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .kgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fgrid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
  .tb-r .btn-green span { display: none; }
  .auth-card { padding: 28px 22px; }
  .card { padding: 16px; }
}
@media (max-width: 480px) {
  .kgrid { grid-template-columns: 1fr; }
}
