.admin-body {
  background: #f7f4ee;
  color: #1f2433;
  min-height: 100vh;
  font-family: var(--font, "Source Sans 3", "Segoe UI", sans-serif);
}

.admin-body h1,
.admin-body h2,
.admin-body h3 {
  color: #000820;
  opacity: 1;
  animation: none;
  transform: none;
}

.admin-body p {
  color: #5f6575;
}

.admin-top {
  background: #ffffff;
  border-bottom: 1px solid #ebe7df;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-top-inner {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  min-height: 68px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.admin-top .logo {
  flex-shrink: 0;
}

.admin-nav {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 1 1 280px;
  min-width: 0;
  position: static !important;
  inset: auto !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.admin-nav a {
  display: inline-flex !important;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;
  color: #000820 !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  background: #f7f4ee;
}

.admin-user {
  font-size: 0.88rem;
  color: #5f6575;
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
}

.admin-main {
  display: block !important;
  padding: 36px 0 64px;
  opacity: 1 !important;
  visibility: visible !important;
}

.admin-main .wrap {
  opacity: 1 !important;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-head h1 {
  margin-bottom: 6px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.admin-stats .card {
  background: #ffffff;
  border: 1px solid #ebe7df;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0, 8, 32, 0.04);
}

.admin-stats .card b {
  display: block;
  font-family: var(--display, "Outfit", "Segoe UI", sans-serif);
  font-size: 2rem;
  color: #000820;
  line-height: 1.1;
}

.admin-stats .card span {
  color: #5f6575;
  font-size: 0.92rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #ebe7df;
  border-radius: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #ebe7df;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6575;
  background: #f7f4ee;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.inline-form {
  display: inline;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
}

.btn-danger {
  background: #fdecea;
  color: #c91f0d;
}

.btn-danger:hover {
  background: #f8d4cf;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-live {
  background: #e8f8ee;
  color: #0b5c22;
}

.badge-draft {
  background: #f3f3f5;
  color: #5f6575;
}

.muted {
  color: #5f6575;
  font-size: 0.85rem;
  margin-top: 4px;
}

.admin-form {
  max-width: 720px;
  background: #ffffff;
  border: 1px solid #ebe7df;
  border-radius: 16px;
  padding: 22px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #1f2433;
}

.check-label input {
  width: auto;
}

.perm-set {
  border: 1px solid #ebe7df;
  border-radius: 10px;
  padding: 14px;
  margin: 0;
}

.perm-set legend {
  font-weight: 700;
  padding: 0 6px;
  color: #000820;
}

.admin-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.admin-login {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.admin-login-card {
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid #ebe7df;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 8, 32, 0.05);
}

.admin-hint {
  margin-top: 18px;
  font-size: 0.82rem;
  color: #5f6575;
}

.article-body {
  max-width: 720px;
}

.article-body p {
  margin-bottom: 1.1em;
  color: #1f2433;
  font-size: 1.05rem;
}

.editor-section {
  background: #ffffff;
  border: 1px solid #ebe7df;
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
}

.editor-section summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-family: var(--display, "Outfit", "Segoe UI", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: #000820;
  background: #f7f4ee;
}

.editor-section summary::-webkit-details-marker {
  display: none;
}

.editor-section summary::after {
  content: "+";
  float: right;
  color: #5f6575;
}

.editor-section[open] summary::after {
  content: "–";
}

.editor-fields {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.editor-field h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.editor-preview {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: #f7f4ee;
  border-radius: 10px;
  color: #1f2433;
  line-height: 1.35;
  word-break: break-word;
}

.sticky-save {
  position: sticky;
  bottom: 12px;
  background: rgba(247, 244, 238, 0.96);
  border: 1px solid #ebe7df;
  border-radius: 14px;
  padding: 12px;
  margin-top: 18px;
}

.admin-photo-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.admin-person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-person-cell img,
.admin-person-fallback {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-person-fallback {
  display: grid;
  place-items: center;
  background: #f4ae19;
  color: #000820;
  font-weight: 700;
}

.admin-body .mobile-cta {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-stats,
  .admin-split {
    grid-template-columns: 1fr;
  }

  .admin-user {
    margin-left: 0;
    width: 100%;
  }
}
