/* Lingéo — administration */
body.admin { padding-bottom: calc(var(--adminbar-h) + 26px + env(safe-area-inset-bottom)); background: #F6F8FB; }
:root { --adminbar-h: 64px; }

.admin-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-head img { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px; }
.admin-head .ah-title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--navy); line-height: 1.2; }
.admin-head .ah-sub { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.admin-head .ah-actions { margin-left: auto; display: flex; gap: 8px; }

.admin-main { max-width: 1000px; margin: 0 auto; padding: 18px 16px 30px; }
.admin-main h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); margin-bottom: 4px; }
.admin-main .sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }

.admin-tabbar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  height: var(--adminbar-h);
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 26px;
  box-shadow: 0 8px 30px rgba(11, 37, 69, .16);
  border: 1px solid rgba(11, 37, 69, .06);
  padding: 0 4px;
}
.admin-tabbar a, .admin-tabbar button {
  flex: 1;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  margin: 6px 2px;
  cursor: pointer;
}
.admin-tabbar a:active, .admin-tabbar button:active { transform: scale(.97); }
.admin-tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.admin-tabbar .on { color: var(--blue-dark); background: var(--blue-soft); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.kpi { background: #fff; border-radius: 16px; padding: 15px 16px; box-shadow: 0 4px 16px rgba(11, 37, 69, .06); }
.kpi .kv { font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.kpi .kl { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.kpi.warn .kv { color: var(--amber); }

.admin-card { background: #fff; border-radius: 18px; box-shadow: 0 4px 16px rgba(11, 37, 69, .06); padding: 18px; margin-bottom: 16px; }
.admin-card h2 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 12px; letter-spacing: -.01em; }
.admin-card h3 { font-size: 14px; font-weight: 750; color: var(--navy); }

.list-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-main { flex: 1; min-width: 180px; }
.list-row .lr-title { font-weight: 650; font-size: 14.5px; color: var(--ink); }
.list-row .lr-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.list-row .lr-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.role-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--blue-soft); color: var(--blue-dark); }
.role-tag.off { background: var(--red-soft); color: var(--red); }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.form-row input, .form-row select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 15px; font-family: inherit; background: #fff; }
.check-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.check-list label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; background: var(--bg-soft); padding: 10px 12px; border-radius: 10px; }
.check-list input { width: 18px; height: 18px; }

.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); background: linear-gradient(160deg, #0B2545, #1559B8); }
.gate-card { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 24px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.gate-card .g-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; text-align: center; }
.gate-card .g-brand img { width: 60px; height: 60px; border-radius: 16px; }
.gate-card .g-brand .gn { font-weight: 800; font-size: 19px; color: var(--navy); letter-spacing: -.02em; }
.gate-card .g-brand .gs { font-size: 12px; color: var(--ink-3); }
.gate-card h1 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.gate-card p { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }

@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .check-list { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 26px 24px 40px; }
}
