/* ── Sidebar ── */

.admin-sidebar {
  display: flex;
  flex: 0 0 12rem;
  flex-direction: column;
}

.admin-sidebar__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.5em 1em;
  border: 1px solid var(--adm-blue);
  border-radius: var(--adm-radius);
  color: var(--adm-blue);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-sidebar__back:hover {
  background: var(--adm-blue);
  color: #fff;
}

.admin-sidebar__link,
.admin-sidebar__footer-link {
  display: block;
  margin-bottom: 0.25rem;
  padding: 0.6em 0.6em;
  border-radius: var(--adm-radius);
  color: var(--adm-grey-7);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-sidebar__link:hover,
.admin-sidebar__footer-link:hover {
  background: var(--adm-grey-1);
}

.admin-sidebar__link--active {
  font-weight: 700;
}

.admin-sidebar__footer {
  display: flex;
  flex-direction: column;
  /* margin-top: auto; */
  padding-top: .25rem;
  border-top: var(--adm-border);
}

/* "Exclude my visits" and "Sign out" are <button>s: drop the native button look so
   they match the links above */
.admin-sidebar__footer-link {
  width: 100%;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* Site name on top of the sidebar. The <details> wrapper is always open on desktop; on phones it
   becomes a top bar whose "Menu" toggles the links. */
.admin-sidebar > summary {
  list-style: none;
}

.admin-sidebar > summary::-webkit-details-marker {
  display: none;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  pointer-events: none;
}

.admin-sidebar__site {
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar__menu {
  display: none;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
}

.admin-sidebar__heading {
  margin: 1rem 0 0.35rem;
  padding: 0 0.6em;
  color: var(--adm-hint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .admin-shell {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .admin-sidebar {
    flex: none;
  }

  .admin-sidebar__brand {
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    cursor: pointer;
    pointer-events: auto;
  }

  .admin-sidebar__menu {
    display: inline-block;
    padding: 0.3em 0.8em;
    border: var(--adm-border);
    border-radius: var(--adm-radius);
    font-size: 0.85rem;
  }

  .admin-sidebar__nav {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
  }

  .admin-shell .admin-card__header,
  .admin-shell .admin-card__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-shell .admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .admin-shell .admin-stat {
    min-width: 0;
    padding: 1rem 0.5rem;
  }
}
