.admin-body { background: var(--bg); }

/* Écran de connexion */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-card .brand-crest { width: 44px; height: 44px; margin: 0 auto 4px; }
.login-card h1 { font-size: 18px; margin: 0; }
.login-card p { font-size: 13px; color: var(--text-dim); margin: 0 0 10px; }
.login-card input[type="password"] {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px;
}
.login-error { color: var(--red); font-size: 12.5px; min-height: 16px; }
.back-link { font-size: 12.5px; color: var(--text-faint); text-decoration: none; margin-top: 4px; }
.back-link:hover { color: var(--indigo); }

/* Layout admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 16px;
}
.admin-tab {
  background: none; border: none; text-align: left; cursor: pointer; font-family: inherit; width: 100%;
}
.admin-main { flex: 1; padding: 28px 32px; max-width: 1000px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-header h2 { margin: 0; font-size: 20px; }

.admin-table { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
}
.admin-row .row-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.admin-row .row-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--indigo-light); color: var(--indigo); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.admin-row .row-icon svg { width: 18px; height: 18px; }
.admin-row .row-body { flex: 1; min-width: 0; }
.admin-row .row-body strong { display: block; font-size: 14px; }
.admin-row .row-body span { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.admin-row .row-meta { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.admin-row .row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.row-actions button {
  border: 1px solid var(--border); background: white; border-radius: 6px; padding: 6px 10px;
  font-size: 12px; cursor: pointer; color: var(--text-dim);
}
.row-actions button:hover { background: var(--bg); }
.row-actions button.danger { color: var(--red); border-color: #FCA5A5; }
.row-actions button.danger:hover { background: #FEF2F2; }
.pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: 8px; }
.pill.active { background: #ECFDF5; color: var(--green); }
.pill.scheduled { background: #EFF6FF; color: #2563EB; }
.pill.expired { background: #F3F4F6; color: var(--text-faint); }
.pill.banner { background: #FEF3C7; color: #92400E; }
.empty-state { color: var(--text-faint); font-size: 13px; padding: 20px; text-align: center; }

/* Modale */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,24,39,0.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; z-index: 50; overflow-y: auto;
}
.modal-card {
  background: white; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-card h3 { margin: 0 0 6px; font-size: 16px; }
.modal-card label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-top: 4px; }
.modal-card input[type="text"], .modal-card input[type="datetime-local"], .modal-card textarea, .modal-card select {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; font-family: inherit; width: 100%;
}
.modal-card textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--text-faint); font-size: 11px; display: block; margin-bottom: 3px; }
.image-preview { max-width: 100%; max-height: 140px; border-radius: 8px; object-fit: cover; margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); margin-top: 8px; }
.checkbox-row input { width: 16px; height: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.form-error { color: var(--red); font-size: 12.5px; min-height: 16px; }

@media (max-width: 800px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .admin-sidebar .nav { flex-direction: row; }
  .admin-sidebar .help-box { margin-top: 0; margin-left: auto; }
  .form-row { grid-template-columns: 1fr; }
}
