/* =========================================================
   PROFESSIONAL UI POLISH (v5.12)
   Loaded last. Fixes:
   1) The mobile menu ("3 lines") icon was hand-drawn from a
      background-gradient + 2 pseudo-elements added by an old
      patch (v5.9/v5.10-polish.css) — the 3 lines came out
      uneven/misaligned with no visible button around them.
      Replaced with one clean, evenly-spaced, centered icon
      that animates to a proper "X" on open, inside a real
      44x44 bordered button that matches the other header icons.
   2) Header icons/pills were different heights and spaced
      inconsistently on mobile - now they share one height
      and gap.
   3) Dashboard cards (welcome banner, KPI tiles, chart card)
      get consistent radius/shadow/spacing for a cleaner,
      premium admin-panel look.
   ========================================================= */

/* ---- 1) Clean hamburger / close icon, drawn once, no conflicts ---- */
.icon-btn .ui-menu,
#menuBtn .ui-menu{
  background:none !important;
}
.icon-btn .ui-menu:before,
.icon-btn .ui-menu:after{ content:none !important; }

#menuBtn{ position:relative; }
#menuBtn .menu-glyph{
  position:relative;
  display:block;
  width:18px;
  height:12px;
  margin:0 auto;
}
#menuBtn .menu-glyph span{
  position:absolute;
  left:0; right:0;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transition:transform .25s ease, opacity .2s ease, top .25s ease;
}
#menuBtn .menu-glyph span:nth-child(1){ top:0; }
#menuBtn .menu-glyph span:nth-child(2){ top:5px; }
#menuBtn .menu-glyph span:nth-child(3){ top:10px; }
#menuBtn[aria-expanded="true"] .menu-glyph span:nth-child(1){ top:5px; transform:rotate(45deg); }
#menuBtn[aria-expanded="true"] .menu-glyph span:nth-child(2){ opacity:0; }
#menuBtn[aria-expanded="true"] .menu-glyph span:nth-child(3){ top:5px; transform:rotate(-45deg); }

/* Give the button proper, consistent chrome — override the old
   34x36/padding:0 squeeze so it matches the other icon buttons */
.app-top #menuBtn{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  flex:0 0 44px !important;
  padding:0 !important;
  display:grid !important;
  place-items:center !important;
  border:1px solid var(--ui-line,#e2e8f0) !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#3d4d63 !important;
  box-shadow:0 1px 2px rgba(17,35,58,.05);
}
.app-top #menuBtn:hover{ background:#f4f7fb !important; border-color:#c9d6e5 !important; }

/* ---- 2) Even header rhythm on mobile ---- */
@media(max-width:760px){
  .app-top{ display:flex !important; align-items:center !important; gap:8px !important; padding:8px 12px !important; height:auto !important; min-height:64px !important; }
  .app-top > *{ flex:0 0 auto; }
  .app-top .balance-pill{ height:40px; min-height:40px; }
  .app-top .icon-btn{ width:40px; height:40px; min-width:40px; }
  .app-top .user-pill .avatar{ width:36px; height:36px; }
}

/* ---- 3) Cleaner, more "premium admin panel" cards ---- */
.hero-message{
  border-radius:16px !important;
  box-shadow:0 6px 20px rgba(15,45,80,.06) !important;
}
.hero-message .eyebrow{
  margin-top:10px;
  font-size:11px;
  letter-spacing:.06em;
}
.admin-kpi,.metric{
  border-radius:14px !important;
  box-shadow:0 3px 10px rgba(15,45,80,.05) !important;
}
.admin-kpi strong,.metric strong{ letter-spacing:-.02em; }
.chart-card{ border-radius:14px !important; }
.chart-card .panel-title,.panel .panel-title{ align-items:center; }

@media(max-width:760px){
  .hero-message{ padding:18px !important; }
  .admin-kpis,.metric-grid{ gap:10px !important; }
}

@media(prefers-reduced-motion:reduce){
  #menuBtn .menu-glyph span{ transition:none !important; }
}
