/* Admin styles */
body { margin: 0; font-family: 'Source Sans 3', system-ui, sans-serif; background: #f4f4f1; color: #1c1c1c; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side { background: #0b3d5c; color: #fff; padding: 1rem; }
.admin-side a { display: block; color: #fff; text-decoration: none; padding: .45rem .55rem; border-radius: 3px; margin-bottom: 2px; }
.admin-side a.is-active, .admin-side a:hover { background: rgba(255,255,255,.12); }
.admin-side__brand { font-family:'Playfair Display', serif; font-size: 1.2rem; margin-bottom: .8rem; }
.admin-side__group { margin-top: 1.2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #b9d6ec; }
.admin-main { padding: 1.5rem 2rem; }
.admin-top { display: flex; justify-content: space-between; margin-bottom: 1rem; align-items:center; }
.admin-top h1 { margin: 0; font-family:'Playfair Display', serif; font-size: 1.5rem; }

table.admin-table { width:100%; border-collapse: collapse; background:#fff; }
table.admin-table th, table.admin-table td { padding: .55rem .7rem; border-bottom: 1px solid #eee; text-align: left; }
table.admin-table th { background: #f8f5ee; }

form .field { margin-bottom: .9rem; }
form label   { display:block; font-weight: 600; margin-bottom:.2rem; }
form input[type=text], form input[type=email], form input[type=password], form input[type=number],
form input[type=date], form select, form textarea {
  width: 100%; padding: .5rem; border: 1px solid #cfcfcf; border-radius: 3px; background:#fff; font: inherit;
}
form textarea { min-height: 5em; }
.btn { display:inline-block; padding: .5rem 1rem; background: #0b3d5c; color:#fff; border: 0; cursor: pointer; text-decoration: none; border-radius: 3px; }
.btn--danger { background: #a8201a; }
.btn:hover { opacity: .9; }
.flash { padding: .55rem .8rem; margin: .5rem 0; border-radius: 3px; }
.flash--success { background: #e3f4e1; color: #2c5d2a; }
.flash--error   { background: #fde8e8; color: #8a1f1f; }

.dropzone { padding: 1rem; border: 2px dashed #bbb; text-align: center; background: #fafafa; }
.dropzone.is-drag { background: #eef6ff; border-color: #0b3d5c; }

.ap-result ul { padding-left: 1.3rem; }
.ap-result li { margin-bottom: .3rem; }

.role-pill { display:inline-block; padding: .15rem .45rem; background:#eee; border-radius: 3px; font-size:.8rem; }
.status-pill { display:inline-block; padding:.12rem .4rem; border-radius:3px; font-size:.75rem; font-weight:700; text-transform: uppercase; }
.status-pill--draft     { background:#ddd; color:#333; }
.status-pill--pending   { background:#fdecc8; color:#7a4a00; }
.status-pill--published { background:#cfe9c8; color:#244a14; }
.status-pill--archived  { background:#e5e5e5; color:#666; }

@media (max-width: 700px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { padding: .6rem; }
}

/* ---------- v45: center-screen permission toast ---------- */
.toast-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 20, 30, .35);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; transition: opacity .18s ease-out;
  cursor: pointer;
}
.toast-backdrop.is-open { opacity: 1; }
.toast {
  position: relative;
  min-width: 280px; max-width: 460px;
  padding: 1.5rem 2.4rem 1.4rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.10);
  font-size: 1.05rem; line-height: 1.4;
  text-align: center;
  transform: translateY(8px) scale(.97);
  transition: transform .18s ease-out;
  cursor: default;
}
.toast-backdrop.is-open .toast { transform: translateY(0) scale(1); }
.toast--error   { border-top: 4px solid #a8201a; }
.toast--info,
.toast--success { border-top: 4px solid #2c5d2a; }
.toast__msg { color: #222; }
.toast__close {
  position: absolute; top: .35rem; right: .55rem;
  background: transparent; border: 0;
  color: #888; font-size: 1.4rem; line-height: 1;
  cursor: pointer; padding: .15rem .35rem;
}
.toast__close:hover { color: #222; }

@media (max-width: 700px) {
  .toast { min-width: 240px; margin: 1rem; }
}
