:root { --mc-header-h: 108px; }
body { padding-top: var(--mc-header-h); }

.mc-fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(88, 28, 135, 0.24) 0%, rgba(0, 0, 0, 0) 48%),
    radial-gradient(130% 200% at 100% 0%, rgba(126, 34, 206, 0.18) 0%, rgba(0, 0, 0, 0) 52%),
    linear-gradient(180deg, rgba(2, 2, 6, 0.94), rgba(0, 0, 0, 0.88));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.35);
  overflow: visible;
}

.mc-fixed-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 40%;
  height: 100%;
  background: linear-gradient(110deg, rgba(168,85,247,0) 0%, rgba(147,51,234,0.28) 50%, rgba(168,85,247,0) 100%);
  pointer-events: none;
  animation: mcShine 9s ease-in-out infinite;
}

@keyframes mcShine {
  0%, 100% { transform: translateX(0); opacity: 0; }
  10% { opacity: 0.55; }
  35% { transform: translateX(360%); opacity: 0; }
}

.mc-fixed-header .mc-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mc-brand { display:flex; flex-direction:column; gap:6px; min-width:0; }
.mc-brand .brand-logo {
  height: 52px;
  max-width: min(520px, 62vw);
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(56, 189, 248, 0.25)) brightness(1.08);
  mix-blend-mode: screen;
  isolation: isolate;
}
.mc-meta {
  color:#bfdbfe;
  font-size: 14px;
  letter-spacing: .02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mc-actions { display:flex; align-items:center; gap:10px; position:relative; }
.mc-page-title{
  color:#e9d5ff;
  font-size:18px;
  font-weight:700;
  letter-spacing:.02em;
  text-shadow:0 1px 12px rgba(147,51,234,.35);
}
.mc-page-role{
  color:#94a3b8;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.09em;
  margin-top:2px;
}
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #dbeafe;
  background: linear-gradient(180deg, rgba(3,7,18,.80), rgba(2,6,23,.65));
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.10), 0 6px 18px rgba(2, 6, 23, 0.25);
}

.user-menu { position:relative; }
.user-btn,
.mc-menu-btn {
  padding: 8px 12px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2,6,23,.90), rgba(2,6,23,.72));
  color: #dbeafe;
  font-size: 13px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.user-btn:hover,
.mc-menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.8);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}
.mc-menu-btn .icon { margin-right: 0; font-size:18px; line-height:1; }

.dropdown,
.mc-menu-panel {
  position:absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: linear-gradient(180deg, rgba(2,6,23,.96), rgba(2,6,23,.90));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  overflow: hidden;
  z-index: 6500;
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.5);
  display:none;
}
.dropdown.open,
.mc-menu-panel.open { display:block; }

.dropdown button {
  width:100%;
  text-align:left;
  background: transparent;
  color:#e2e8f0;
  border:none;
  border-bottom:1px solid rgba(30,41,59,.8);
  padding:10px;
  cursor:pointer;
}
.dropdown button:last-child { border-bottom:none; }
.dropdown button:hover { background: rgba(56,189,248,.12); }

.mc-menu-panel {
  right: 20px;
  max-height: 72vh;
  overflow: auto;
  padding: 10px;
  min-width: 300px;
}
.mc-group { margin-bottom: 10px; }
.mc-group:last-child { margin-bottom: 0; }
.mc-group-title {
  color:#94a3b8;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.10em;
  margin: 4px 6px;
}
.mc-menu-panel a {
  display:block;
  text-decoration:none;
  color:#dbeafe;
  border:1px solid rgba(30,41,59,.95);
  border-radius:10px;
  background: rgba(2, 6, 23, 0.75);
  padding:8px 10px;
  margin:6px 0;
  font-size:14px;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.mc-menu-panel a:hover {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(30, 64, 175, 0.20);
  transform: translateX(2px);
}
.mc-menu-panel a.active {
  border-color:#38bdf8;
  color:#38bdf8;
  box-shadow:0 0 0 1px rgba(14,165,233,0.30) inset;
}

.mc-legacy-hide { display:none !important; }

@media (max-width: 900px) {
  .mc-fixed-header .mc-inner { padding: 10px 12px; }
  .mc-brand .brand-logo { height: 44px; }
  .mc-meta { font-size: 12px; }
  .mc-actions { gap: 6px; }
  .badge { font-size: 11px; padding: 7px 10px; }
  .mc-menu-panel { right: 12px; left: 12px; min-width: 0; }
}
