/* Minimal admin styles */
body.admin-body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #fbfbfb; margin: 0; }
.admin-header { background: #111; color: #fff; padding: 12px 16px; }
.admin-header a { color: #fff; margin-left: 10px; text-decoration: none; }
.admin-main { padding: 16px; }
.admin-card { padding: 10px; border: 1px solid #eee; border-radius: 6px; margin: 10px 0; background: #fff; }
.admin-header nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-header .site-brand { display: inline-flex; align-items: center; gap: 8px; }
.admin-header .site-brand .site-logo { height: 28px; width: auto; display: block; }
.admin-header .site-brand .site-name { font-size: 0.95rem; font-weight: 600; color: #fff; }

/* Admin subnav spacing */
.admin-subnav { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; border-top: 2px solid rgba(79, 70, 229, 0.12); }
.admin-subnav a { margin-left: 0; padding: 4px 8px; }
@media (max-width: 480px) { .admin-subnav { gap: 8px; } }

/* Admin badge near brand */
.admin-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.2; background: #1a1a1a; color: #fff; border: 1px solid rgba(255,255,255,0.22); }

/* Subtle Admin badge inside subnav and active accent */
.admin-subnav::after { content: "Admin"; display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; line-height: 1.2; background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.admin-subnav a[aria-current="page"] { color: #4f46e5; background: #eef2ff; border-radius: 4px; }

/* Breadcrumb label under page title */
.admin-breadcrumb { display: block; margin: 8px 0 0; font-size: 0.85rem; color: #cbd5e1; }
.admin-breadcrumb a { text-decoration: underline; }

/* Mobile tap target sizing for admin nav */
@media (max-width: 600px) {
  .admin-header .main-nav a,
  .admin-subnav a {
    display: inline-block;
    padding: 12px 10px;
    min-height: 44px; /* touch-friendly tap target */
  }
}

/* Accessibility focus outlines for keyboard users */
.admin-header .main-nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}
.admin-subnav a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Keyboard-only skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  z-index: 1000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}
.using-pointer .skip-link:focus {
  left: -999px; /* ensure hidden when using mouse/touch */
}

/* Hide focus outlines on header nav when using pointer (mouse/touch) */
.using-pointer .admin-header .main-nav a:focus-visible,
.using-pointer .admin-subnav a:focus-visible,
.using-pointer .admin-header .main-nav a:focus,
.using-pointer .admin-subnav a:focus {
  outline: none;
}

/* Suppress outline on programmatic focus of main content */
.admin-main:focus {
  outline: none;
}

/* Admin footer */
.admin-footer { margin-top: 16px; padding: 8px 16px; color: #5f5f5f; font-size: 12px; border-top: 1px solid #e6e6e6; }
.admin-footer .admin-footer-sep { margin: 0 8px; color: #8c8c8c; }
.admin-footer .admin-footer-env { color: #444; }
.admin-footer .admin-footer-env.env-local { color: #455a64; }
.admin-footer .admin-footer-env.env-dev { color: #0f6b86; }
.admin-footer .admin-footer-env.env-staging { color: #6d4c0b; }
.admin-footer .admin-footer-env.env-prod { color: #7a5b00; }

/* Admin styles */
.admin-container { padding: 1rem; }
.admin-subnav { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid #eee; padding-bottom: .5rem; position: relative; }
.admin-subnav a { color: #333; text-decoration: none; padding: .25rem .5rem; border-radius: 4px; }
.admin-subnav a[aria-current="page"] { background: #f3f4f6; color: #111; }
.admin-subnav::after { content: "Admin"; position: absolute; right: 0; top: 0; transform: translateY(-100%); font-size: 11px; color: #6b7280; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 3px; padding: 2px 4px; }

/* Count badge for unread items */
.admin-subnav .count-badge { display: inline-block; margin-left: 4px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600; text-align: center; background: #fee2e2; /* rose-200 */ color: #b91c1c; /* red-700 */ border: 1px solid #fecaca; /* rose-300 */ }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .5rem; border: 1px solid #ddd; }
.table th { background: #f9fafb; }
.badge { font-size: .8rem; padding: .15rem .4rem; border-radius: 3px; }
.badge-new { background: #dcfce7; color: #065f46; }
.dashboard-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dashboard-card { padding: 12px; border: 1px solid #eee; border-radius: 6px; background: #fff; }
.dashboard-card h3 { margin: 0 0 6px; font-size: 1rem; }
.dashboard-card p { margin: 0; font-size: 0.9rem; color: #555; }