/* Independent admin pages share a navigation shell, never a scrolling dashboard. */
.admin-page.is-hidden, .admin-page[hidden] { display: none !important; }
.admin-content { min-width: 0; }
.admin-theme .table-wrap { position: relative; }
.admin-detail-shell > header, .admin-detail-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-detail-shell > header { margin-bottom: 1.2rem; }
.admin-detail-shell > footer { justify-content: flex-end; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--soft-line); }
.admin-detail-shell > header .button { flex-shrink: 0; }
.admin-detail-page .detail-item strong, .admin-detail-page .audit-meta dd { overflow-wrap: anywhere; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1.3rem; }
.admin-shortcuts a { position: relative; display: flex; flex-direction: column; gap: .4rem; min-width: 0; padding: 1.3rem 2.6rem 1.3rem 1.2rem; border: 1px solid #dcdfe6; border-radius: .9rem; background: #fff; text-decoration: none; }
.admin-shortcuts a:hover, .admin-shortcuts a:focus-visible { border-color: #9ba9d5; background: #fafbff; }
.admin-shortcuts strong { color: #2e3f57; font-size: .9rem; }
.admin-shortcuts span { color: #748096; font-size: .75rem; line-height: 1.6; }
.admin-shortcuts b { position: absolute; top: 50%; right: 1.2rem; color: #6377b1; transform: translateY(-50%); }
.admin-theme a.mini-button { display: inline-flex; align-items: center; text-decoration: none; }
.admin-theme .side-nav a[aria-current="page"] .nav-symbol { color: #a3bbff; }
.admin-search-wrap .search-field { min-width: min(21rem, 28vw); }
.admin-detail-page .review-actions { position: sticky; bottom: 0; z-index: 2; padding: .85rem; border: 1px solid #e1e5ed; border-radius: .8rem; background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 16px rgba(31, 48, 87, .04); }
.power-policy-cell { min-width: 10rem; }
.power-policy-cell .mini-button { margin-top: .45rem; }
.power-policy-dialog { width: min(calc(100% - 2rem), 42rem); }
.power-policy-dialog .modal-shell { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.power-policy-intro, .power-policy-note { color: #6e7b8d; font-size: .76rem; line-height: 1.7; }
.power-policy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.power-policy-fields .field { min-width: 0; }
.power-policy-fields .field small { color: #8490a1; font-size: .65rem; font-weight: 400; line-height: 1.55; }
.power-policy-dialog select { min-height: 2.65rem; border: 1px solid #d5dae3; border-radius: .6rem; padding: .5rem .7rem; color: #42536b; background: #fff; font: inherit; }
.power-policy-dialog .detail-item strong { overflow-wrap: anywhere; }
.power-policy-dialog :disabled { cursor: not-allowed; opacity: .65; }
.admin-theme .status-label.sleeping { color: #5f718e; background: #ecf1f8; }
.admin-theme .status-label.waking, .admin-theme .status-label.waiting_capacity, .admin-theme .status-label.sleeping_pending { color: #9a650f; background: #fff3de; }
.admin-theme .status-label.wake_failed { color: #a43d3d; background: #fdecec; }
@media (min-width: 681px) and (max-width: 980px) {
  .admin-shell { grid-template-columns: 12.5rem minmax(0, 1fr); }
  .admin-sidebar { padding-inline: .7rem; }
  .admin-sidebar .brand { justify-content: flex-start; gap: .55rem; }
  .admin-sidebar .brand > span:last-child { display: block; }
  .admin-sidebar .brand strong { font-size: .81rem; }
  .admin-sidebar .brand-mark { flex-shrink: 0; }
  .admin-sidebar .side-nav a { justify-content: flex-start; }
  .admin-sidebar .side-nav a span { display: inline; }
  .admin-sidebar .side-nav a::before { content: none; }
  .admin-content { padding-inline: 1.25rem; }
  .admin-search-wrap .search-field { min-width: 0; }
}
@media (max-width: 680px) {
  .admin-sidebar { display: block; padding: .85rem 1rem .55rem; }
  .admin-sidebar .brand { justify-content: flex-start; }
  .admin-sidebar .sidebar-foot { display: none; }
  .admin-sidebar .side-nav { display: flex; gap: .3rem; overflow-x: auto; margin: .85rem -1rem 0; padding: 0 1rem .25rem; scrollbar-width: thin; }
  .admin-sidebar .side-nav a { flex: 0 0 auto; min-height: 2.4rem; padding-inline: .8rem; white-space: nowrap; }
  .admin-sidebar .side-nav a span { display: inline; }
  .admin-sidebar .side-nav a .nav-symbol { display: none; }
  .admin-sidebar .side-nav a > span:nth-child(2) { margin-left: 0; }
  .admin-sidebar .side-nav a::before { content: none; }
  .admin-sidebar .side-nav a.active { box-shadow: inset 0 -2px #829cff; }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .admin-search-wrap { flex-direction: row; flex-wrap: wrap; }
  .admin-search-wrap .search-field { flex-basis: 100%; min-height: 2.6rem; }
  .admin-search-wrap > .button { flex: 1; }
  .admin-detail-shell > header { align-items: flex-start; flex-direction: column; }
  .admin-detail-page .review-actions { flex-wrap: wrap; gap: .5rem; }
  .admin-detail-page .review-actions button { flex: 1 1 auto; padding-inline: .65rem; font-size: .72rem; }
  .admin-detail-page .dialog-section-heading { flex-direction: column; align-items: flex-start; }
  .admin-detail-page { padding: .85rem; }
  .admin-theme .review-summary { align-items: flex-start; }
  .power-policy-fields { grid-template-columns: 1fr; }
}
