/* Shared admin styles. Selectors stay inside the admin layout. */
.admin-shell {
  --admin-border: #e5e5e5;
  --admin-muted: #737373;
  background: #fafafa;
  color: #171717;
}
.admin-shell .admin-content {
  width: 100%;
  min-width: 0;
  padding: 1.5rem;
  font-size: .875rem;
  line-height: 1.6;
}
.admin-shell .admin-content > h1,
.admin-shell .admin-content > div > h1 {
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.025em;
}
.admin-shell .admin-content h2 { font-size: 1rem; font-weight: 600; }
.admin-shell .admin-content p { overflow-wrap: anywhere; }
.admin-shell .admin-panel,
.admin-shell .admin-filter {
  min-width: 0;
  margin-block: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--admin-border);
  border-radius: .875rem;
  background: #fff;
}
.admin-shell .admin-panel > p,
.admin-shell .admin-panel > h2 + p { margin-top: .5rem; color: var(--admin-muted); }
.admin-shell .admin-field { min-width: 0; }
.admin-shell .admin-field > label { display: block; margin-bottom: .375rem; font-weight: 500; }
.admin-shell :is(.admin-content, .admin-auth) :is(input, select, textarea):not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]) {
  min-width: 0;
  max-width: 100%;
  min-height: 2.5rem;
  padding: .55rem .75rem;
  border: 1px solid #d4d4d4;
  border-radius: .5rem;
  background: #fff;
  color: #171717;
  font-size: .875rem;
  line-height: 1.4;
}
.admin-shell .admin-field :is(input, select, textarea) { width: 100%; }
.admin-shell :is(input, select, textarea):focus-visible {
  outline: 2px solid #a3a3a3;
  outline-offset: 2px;
}
.admin-shell :is(input, select, textarea):disabled { background: #f5f5f5; color: #737373; }
.admin-shell .admin-button {
  display: inline-flex;
  min-height: 2.5rem;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font-size: .875rem;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.admin-shell .admin-button--primary { background: #171717; color: #fff; }
.admin-shell .admin-button--primary:hover:not(:disabled) { background: #404040; }
.admin-shell .admin-button--secondary { background: #fff; border-color: #d4d4d4; color: #404040; }
.admin-shell .admin-button--secondary:hover:not(:disabled) { background: #f5f5f5; border-color: #a3a3a3; }
.admin-shell .admin-button--danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.admin-shell .admin-button--danger:hover:not(:disabled) { background: #fef2f2; border-color: #f87171; }
.admin-shell .admin-button--warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.admin-shell .admin-button--warning:hover:not(:disabled) { background: #fef3c7; }
.admin-shell .admin-button--small { min-height: 2rem; padding: .35rem .75rem; font-size: .75rem; }
.admin-shell .admin-button:focus-visible { outline: 2px solid #737373; outline-offset: 3px; }
.admin-shell .admin-button:disabled,
.admin-shell .admin-button[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.admin-shell .admin-content .admin-table-wrap,
.admin-shell .admin-content div:has(> table) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: .875rem;
  background: #fff;
}
.admin-shell .admin-content table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-shell .admin-content table:not([class*="min-w-"]) { min-width: 40rem; }
.admin-shell .admin-content th { padding: .75rem 1rem; background: #fafafa; color: #737373; font-weight: 500; text-align: left; }
.admin-shell .admin-content td { padding: .875rem 1rem; vertical-align: top; overflow-wrap: anywhere; }
.admin-shell .admin-content tbody tr { border-top: 1px solid var(--admin-border); }
.admin-shell .admin-content tbody tr:hover { background: #fafafa; }
.admin-shell .admin-summary { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-shell .admin-summary dt { color: var(--admin-muted); font-size: .75rem; }
.admin-shell .admin-summary dd { margin-top: .25rem; overflow-wrap: anywhere; }
.admin-shell .admin-record { padding-block: .75rem; border-bottom: 1px solid var(--admin-border); }
@media (min-width: 1024px) {
  .admin-shell .admin-content { padding: 2rem; }
  .admin-shell .admin-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .admin-shell .admin-content { padding: 1rem; }
  .admin-shell .admin-summary { grid-template-columns: minmax(0, 1fr); }
}
.admin-shell .admin-panel[role=alert] { border-color: #fecaca; background: #fef2f2; }
.admin-shell .admin-content :is(th, td).text-right { text-align: right; }
.admin-shell .admin-content :is(th, td).text-center { text-align: center; }
@media (max-width: 767px) {
  /* Leave room for the existing mobile sidebar toggle. */
  .admin-shell .admin-content { padding-top: 4rem; }
}
