/* Header Styles */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  z-index: 1100;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(18, 35, 62, 0.96) 100%);
  border-bottom: 1px solid rgba(201, 146, 58, 0.22);
  box-shadow: 0 18px 40px rgba(10, 22, 40, 0.22);
  backdrop-filter: blur(16px);
}

.header-top-loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(201, 146, 58, 0.12) 0%, rgba(201, 146, 58, 0.9) 35%, rgba(255, 255, 255, 0.9) 50%, rgba(201, 146, 58, 0.9) 65%, rgba(201, 146, 58, 0.12) 100%);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.header-top-loader.visible {
  opacity: 1;
}

.header-top-loader.is-finishing {
  opacity: 0;
}

.header-inner {
  max-width: 1482px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #ced4da;
  border-radius: 10px;
  background: #f8f9fa;
  color: #495057;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: #e9ecef;
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #495057;
  border-radius: 2px;
}

.sidebar-toggle span + span {
  margin-top: 4px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #f8fafc;
}

.header-brand-logo,
.header-brand-fallback {
  width: 172px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(201, 146, 58, 0.2);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 24px rgba(10, 22, 40, 0.18);
}

.header-brand-logo {
  display: block;
  object-fit: contain;
  padding: 8px 14px;
}

.header-brand-fallback {
  display: none;
  place-items: center;
  color: #0a1628;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #d8a859 0%, #c9923a 100%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-admin-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 6px;
}

.header-admin-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.header-admin-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(10, 22, 40, 0.16);
}

.visit-website-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.visit-website-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.logout-button {
  background: linear-gradient(135deg, #d8a859 0%, #c9923a 100%);
  color: #0a1628;
  border-color: rgba(201, 146, 58, 0.4);
  font-weight: 700;
}

.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(201, 146, 58, 0.28);
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .header-admin-meta {
    display: none;
  }
}
