:root{
  --bg: #0b1220;
  --panel: rgba(12,20,40,.92);
  --stroke: rgba(255,255,255,.12);
  --text: #05297c;
  --muted: rgba(233,238,252,.72);
  --accent: rgba(79,140,255,.95);
  --accent2: rgba(149,85,255,.80);
  --gold: #f2b233;

  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --maxw: 1160px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 10% 0%, rgba(79,140,255,.25), transparent 55%),
    radial-gradient(900px 450px at 90% 10%, rgba(149,85,255,.18), transparent 60%),
    var(--bg);
}

/* Main */
.opco-app{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 14px 44px;
}

/* Header */
.pba-header{
  position: sticky;
  top: 0;
  z-index: 2000;
  background: rgba(10,16,30,.76);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.pba-header__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Brand bloc (left) */
.pba-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 240px;
}
.pba-brand__logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(79,140,255,.18);
}
.pba-brand__texts{ display:flex; flex-direction: column; gap: 2px; }
.pba-brand__title{
  letter-spacing: .25em;
  font-weight: 800;
  font-size: 14px;
}
.pba-brand__subtitle{
  color: var(--muted);
  font-size: 13px;
}
.pba-brand__chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(242,178,51,.45);
  color: rgba(242,178,51,.95);
  margin-top: 6px;
  font-weight: 700;
  font-size: 12px;
}

/* Right bloc (user + hamburger) */
.pba-right{
  margin-left: auto;
  display:flex;
  align-items:center;
  gap: 12px;
}

/* User chip */
.pba-userchip{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  min-width: 240px;
}
.pba-userchip__avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  background: rgba(79,140,255,.18);
  border: 1px solid rgba(79,140,255,.35);
}
.pba-userchip__meta{ display:flex; flex-direction: column; line-height: 1.1; }
.pba-userchip__email{
  max-width: 220px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
}
.pba-userchip__role{
  color: var(--muted);
  font-size: 12px;
}

/* Desktop nav (optional) */
.pba-nav{
  width: 100%;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}
.pba-nav__link{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pba-nav__link:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--stroke);
  color: var(--text);
}
.pba-nav__link.is-active{
  background: rgba(79,140,255,.16);
  border-color: rgba(79,140,255,.35);
  color: var(--text);
}

/* Hamburger */
.pba-menu-btn{
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  color: var(--text);
  display:none; /* visible in mobile only */
}
.pba-menu-btn:focus{
  outline: 2px solid rgba(79,140,255,.65);
  outline-offset: 2px;
}
.pba-menu-btn__bars{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  position: relative;
  border-radius: 2px;
}
.pba-menu-btn__bars::before,
.pba-menu-btn__bars::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.pba-menu-btn__bars::before{ top: -6px; }
.pba-menu-btn__bars::after{ top: 6px; }

/* Overlay + drawer */
.pba-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9998;
}
.pba-drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--stroke);
  z-index: 9999;
  box-shadow: var(--shadow);
  transform: translateX(110%);
  transition: transform .18s ease;
}
.pba-drawer.is-open{ transform: translateX(0); }

.pba-drawer__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.pba-drawer__title{ font-weight: 800; }
.pba-drawer__close{
  width: 44px; height: 44px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}
.pba-drawer__content{
  padding: 10px 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.pba-drawer__link{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: var(--muted);
  border: 1px solid transparent;
}
.pba-drawer__link:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--stroke);
  color: var(--text);
}
.pba-drawer__link.is-active{
  background: rgba(79,140,255,.16);
  border-color: rgba(79,140,255,.35);
  color: var(--text);
}

/* Footer */
.pba-footer{
  border-top: 1px solid var(--stroke);
  background: rgba(10,16,30,.72);
  backdrop-filter: blur(10px);
}
.pba-footer__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 14px;
  display:flex;
  justify-content: space-between;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px){
  .pba-nav--desktop{ display:none; }
  .pba-menu-btn{ display:inline-flex; align-items:center; justify-content:center; }
  .pba-userchip{ min-width: 0; }
  .pba-userchip__email{ max-width: 140px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .pba-drawer{ transition:none; }
  .pba-nav__link{ transition:none; }
}