/**
 * Shared site header — dashboard + auth (orange bar, white brand)
 */

.rs-mheader,
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  min-height: calc(var(--rs-header-h) + var(--rs-safe-top) + 8px);
  box-sizing: border-box;
  padding-top: calc(var(--rs-safe-top) + 8px);
  padding-bottom: 10px;
  padding-left: max(12px, var(--rs-safe-left));
  padding-right: max(12px, var(--rs-safe-right));
  background: var(--rs-brand-sidebar);
  border-bottom: none;
  box-shadow: 0 2px 14px rgba(194, 65, 12, 0.22);
}

.rs-mheader-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 1.1;
}

.rs-app-brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  text-align: left;
  line-height: 1.15;
}

.rs-app-brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}

.rs-app-brand__mark {
  display: block;
  width: 38px;
  height: 38px;
  padding: 6px;
  box-sizing: border-box;
  object-fit: contain;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: none;
}

a.rs-app-brand {
  transition: opacity 0.15s ease;
}

a.rs-app-brand:hover,
a.rs-app-brand:focus-visible {
  opacity: 0.92;
  outline: none;
  text-decoration: none;
}

.rs-app-brand--header .rs-app-brand__line {
  display: block;
  font-family: var(--rs-font-display);
  font-size: clamp(0.84rem, 3.1vw, 0.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

.rs-app-brand--header .rs-app-brand__line:last-child {
  font-size: clamp(0.84rem, 3.1vw, 0.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #ffffff;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .rs-app-brand--header .rs-app-brand__line {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
  }
}

.rs-app-brand--header .rs-app-brand__text .rs-app-brand__line:first-child::after {
  display: none;
}

.rs-menu-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rs-menu-btn:hover,
.rs-menu-btn:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.rs-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
}

/* Auth topbar actions on orange bar */
.auth-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.auth-topbar-link {
  flex-shrink: 0;
  box-sizing: border-box;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-topbar-link:hover,
.auth-topbar-link:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  outline: none;
}

.auth-topbar-action {
  flex-shrink: 0;
  box-sizing: border-box;
  color: var(--rs-orange-dark) !important;
  font-weight: 800;
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 8px 16px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-topbar-action:hover,
.auth-topbar-action:focus-visible {
  background: #fff7ed;
  outline: none;
}

.auth-topbar-action:active {
  transform: scale(0.98);
}

.auth-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.auth-topbar__inner--admin {
  max-width: min(1120px, 100%);
  margin: 0 auto;
}

body.auth-page {
  padding-top: calc(var(--rs-header-h) + var(--rs-safe-top) + 10px);
  box-sizing: border-box;
}

.auth-topbar-link--quiet {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
}

.auth-topbar-link--quiet:hover,
.auth-topbar-link--quiet:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  outline: none;
}
