/* A compact, authenticated-only control in the site header. */
.admin-access { position: relative; flex: 0 0 auto; z-index: 22; }
.admin-access-box { border: 1px solid #bdcbb5; border-radius: 6px; background: #f1f4ec; }
.admin-access-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 5px; background: transparent; color: #3e5739; font-family: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; text-align: left; cursor: pointer; transition: background .2s ease; }
.admin-access-toggle:hover { background: #e7eee2; }
.admin-access-icon { color: #6d9460; font-size: 18px; line-height: 1; }
.admin-access-arrow { margin-left: 2px; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s ease; }
.admin-access.is-open .admin-access-arrow { transform: rotate(225deg) translateY(-2px); }
.admin-access-dropdown { position: absolute; top: calc(100% + 7px); right: 0; width: 240px; max-width: calc(100vw - 36px); display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; overflow: hidden; border: 1px solid #cbd7c6; border-radius: 6px; background: #f8faf5; box-shadow: 0 8px 24px rgb(54 73 49 / 12%); transform: translateY(-4px); transition: grid-template-rows .25s ease, opacity .2s ease, transform .25s ease, visibility 0s linear .25s; }
.admin-access.is-open .admin-access-dropdown { grid-template-rows: 1fr; opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.admin-access-inner { overflow: hidden; min-height: 0; }
.admin-access-inner a, .admin-access-logout { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; background: transparent; color: #344c31; font-family: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.admin-access-logout { border-top: 1px solid #dce5d7; color: #8b493f; }
.admin-access-inner a:hover, .admin-access-logout:hover { background: #e5eddf; }
.admin-access :focus-visible { outline: 2px solid #617d58; outline-offset: -3px; }
.admin-access-error { margin: 0; padding: 0 14px; color: #a53c35; font-size: 13px; }
.admin-access-error:not(:empty) { padding: 5px 14px 12px; }
/* Make room for the control without squeezing or overlapping the navigation. */
@media (max-width: 1100px) {
  .site-header.has-admin-access .nav-wrap { min-height: 0; flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding-block: 10px; }
  .site-header.has-admin-access .brand-cluster { margin-right: auto; }
  .site-header.has-admin-access .menu-toggle { display: flex; flex: 0 0 46px; }
  .site-header.has-admin-access .main-nav { position: static; flex: 1 0 100%; order: 3; display: flex; align-items: stretch; flex-direction: column; gap: 0; max-height: 0; overflow: hidden; margin-top: 0; padding: 0; border-top: 1px solid transparent; opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: max-height .42s cubic-bezier(.2,.7,.2,1), opacity .28s ease, transform .38s cubic-bezier(.2,.7,.2,1), border-color .28s ease, visibility 0s linear .42s; }
  .site-header.has-admin-access .main-nav.is-open { max-height: 420px; margin-top: 8px; padding-bottom: 12px; border-color: var(--line); opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
  .site-header.has-admin-access .main-nav a { min-height: 48px; justify-content: space-between; border-bottom: 1px solid #e9e4db; font-size: 15px; }
}
@media (max-width: 500px) {
  .site-header.has-admin-access .brand-social-link span { display: none; }
  .site-header.has-admin-access .brand-social-link { min-width: 22px; }
  .admin-access-toggle { gap: 7px; padding-inline: 10px; }
  .admin-access-label { font-size: 0; }
  .admin-access-label::after { content: "Админ"; font-size: 13px; }
}
@media (max-width: 380px) {
  .admin-access-toggle { min-width: 44px; justify-content: center; }
  .admin-access-label, .admin-access-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .admin-access-dropdown, .admin-access-arrow, .admin-access-toggle { transition: none; } }
html.motion-disabled .admin-access-dropdown, html.motion-disabled .admin-access-arrow, html.motion-disabled .admin-access-toggle { transition: none; }
