/* ============================================================
   ginibooster — unified header (Variant B · Floating pill)
   Single source of truth. Imported on every page.
   ============================================================ */

/* Header chrome -------------------------------------------------- */
.gb-header{
  position:sticky;top:0;z-index:100;
  height:72px;
  display:flex;align-items:center;
  padding:0 24px;
  gap:14px;
  background:rgba(10,15,13,0.72);
  backdrop-filter:blur(20px) saturate(150%);
  -webkit-backdrop-filter:blur(20px) saturate(150%);
  border-bottom:1px solid transparent;
  transition:background .25s ease, border-color .25s ease, box-shadow .25s ease;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.gb-header.is-scrolled{
  background:rgba(10,15,13,0.86);
  border-bottom-color:rgba(255,255,255,0.06);
  box-shadow:0 8px 24px -16px rgba(0,0,0,0.7);
}

/* Brand */
.gb-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;text-decoration:none;color:inherit;line-height:1}
.gb-brand img{height:30px;width:30px;border-radius:7px;display:block}
.gb-brand-name{font-weight:700;font-size:0.98rem;letter-spacing:-0.01em;color:#f1f5f4}
.gb-brand:hover .gb-brand-name{color:#fff}

.gb-divider-v{width:1px;height:18px;background:rgba(255,255,255,0.1);flex-shrink:0}

/* Page tag (e.g. "Bank Statements") */
.gb-page-tag{
  display:inline-flex;align-items:center;gap:6px;
  height:26px;padding:0 10px;
  font-size:0.72rem;font-weight:600;
  letter-spacing:0.04em;text-transform:uppercase;
  color:#4ade80;
  background:rgba(74,222,128,0.06);
  border:1px solid rgba(74,222,128,0.18);
  border-radius:7px;flex-shrink:0;
}
.gb-page-tag .dot{width:5px;height:5px;border-radius:50%;background:#4ade80;box-shadow:0 0 8px rgba(74,222,128,0.6)}

.gb-spacer{flex:1}

/* Floating pill nav (centered between brand and right cluster) */
.gb-nav{
  display:flex;align-items:center;
  height:42px;padding:4px;gap:2px;
  background:rgba(255,255,255,0.035);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.04) inset,
    0 8px 22px -10px rgba(0,0,0,0.5);
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
}
.gb-nav-link{
  position:relative;
  display:inline-flex;align-items:center;
  height:34px;padding:0 14px;
  font:500 0.85rem/1 'Inter',sans-serif;
  color:#9aa6a0;
  text-decoration:none;
  border-radius:999px;
  background:transparent;border:0;cursor:pointer;
  transition:color .15s ease, background .2s ease;
  white-space:nowrap;
}
.gb-nav-link:hover{color:#f1f5f4}
.gb-nav-link.active{
  color:#06200f;
  background:linear-gradient(180deg,#5dea93,#22c55e);
  box-shadow:
    0 0 0 1px rgba(74,222,128,0.5) inset,
    0 1px 0 0 rgba(255,255,255,0.18) inset,
    0 4px 12px -4px rgba(74,222,128,0.45);
  font-weight:600;
}

/* Dropdown */
.gb-dd{position:relative}
.gb-dd-toggle .chev{display:inline-block;margin-left:4px;transition:transform .2s ease;font-size:0.72rem;opacity:0.7}
.gb-dd:hover .gb-dd-toggle .chev,.gb-dd.open .gb-dd-toggle .chev{transform:translateY(1px) rotate(180deg)}
.gb-dd-menu{
  position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%,-4px);
  min-width:260px;padding:6px;
  background:rgba(15,23,20,0.96);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:14px;
  box-shadow:0 16px 40px -12px rgba(0,0,0,0.6),0 0 0 1px rgba(74,222,128,0.04) inset;
  backdrop-filter:blur(16px);
  opacity:0;visibility:hidden;
  transition:opacity .15s ease, transform .15s ease, visibility .15s linear .15s;
}
.gb-dd-menu::before{
  content:'';position:absolute;top:-6px;left:0;right:0;height:6px;
}
.gb-dd:hover .gb-dd-menu,.gb-dd:focus-within .gb-dd-menu{
  opacity:1;visibility:visible;transform:translate(-50%,0);
  transition:opacity .15s ease, transform .15s ease, visibility 0s linear 0s;
}
.gb-dd-item{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:10px;color:#e2e8f0;text-decoration:none;transition:background .12s ease}
.gb-dd-item:hover{background:rgba(74,222,128,0.07)}
.gb-dd-item .ic{width:30px;height:30px;flex-shrink:0;display:grid;place-items:center;background:rgba(74,222,128,0.12);color:#4ade80;border-radius:8px;font-size:0.78rem;font-weight:700}
.gb-dd-item .label{font-weight:600;font-size:0.88rem;color:#f1f5f4;line-height:1.2}
.gb-dd-item .desc{font-weight:400;font-size:0.74rem;color:#9aa6a0;margin-top:2px;line-height:1.35}

/* Right cluster (auth + lang) */
.gb-right{display:flex;align-items:center;gap:8px;margin-left:auto;position:relative;z-index:2}

/* Buttons */
.gb-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:34px;padding:0 14px;
  font:600 0.85rem/1 'Inter',sans-serif;
  border-radius:999px;
  border:1px solid transparent;
  cursor:pointer;text-decoration:none;
  transition:all .15s ease;
  white-space:nowrap;
}
.gb-btn-ghost{color:#e2e8f0;background:transparent;border-color:rgba(255,255,255,0.1)}
.gb-btn-ghost:hover{background:rgba(255,255,255,0.04);border-color:rgba(255,255,255,0.16)}
.gb-btn-cta{
  color:#06200f;
  background:linear-gradient(180deg,#5dea93,#22c55e);
  box-shadow:
    0 0 0 1px rgba(74,222,128,0.4) inset,
    0 1px 0 0 rgba(255,255,255,0.18) inset,
    0 6px 16px -6px rgba(74,222,128,0.45);
}
.gb-btn-cta:hover{
  background:linear-gradient(180deg,#6df0a0,#2ace6c);
  transform:translateY(-1px);
}

/* Auth blocks (mutually exclusive — JS toggles) */
.gb-auth.guest{display:flex;align-items:center;gap:8px}
.gb-auth.guest.hide{display:none}
.gb-user{display:none;align-items:center;gap:8px}
.gb-user.show{display:flex}
.gb-user-chip{
  display:inline-flex;align-items:center;gap:8px;
  height:34px;padding:0 12px 0 5px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:999px;
  color:#e2e8f0;text-decoration:none;
  font-size:0.85rem;font-weight:500;
}
.gb-user-chip:hover{border-color:rgba(255,255,255,0.1);background:rgba(255,255,255,0.05)}
.gb-user-chip .av{
  width:26px;height:26px;border-radius:50%;
  background:linear-gradient(135deg,#22c55e,#0e8a45);
  display:grid;place-items:center;
  font-size:0.74rem;font-weight:700;color:#06200f;
}

/* Lang switch */
.gb-lang{
  display:flex;align-items:center;
  height:34px;padding:3px;gap:2px;
  background:rgba(255,255,255,0.025);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:999px;
}
.gb-lang button,
.gb-lang-link{
  display:grid;place-items:center;
  width:34px;height:26px;padding:0;
  background:transparent;border:0;cursor:pointer;
  border-radius:999px;
  text-decoration:none;
  transition:background .12s ease;
}
.gb-lang button img,
.gb-lang-link img{width:20px;height:14px;object-fit:cover;border-radius:2px;display:block;opacity:0.85;transition:opacity .12s ease}
.gb-lang button:hover img,
.gb-lang-link:hover img{opacity:1}
.gb-lang button.active{background:rgba(255,255,255,0.06)}
.gb-lang button.active img{opacity:1}
.gb-lang-link:hover{background:rgba(255,255,255,0.06)}

/* Mobile */
.gb-burger{
  display:none;width:36px;height:36px;
  align-items:center;justify-content:center;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);border-radius:999px;
  color:#e2e8f0;font-size:1.05rem;cursor:pointer;
}

/* Logout link inside nav dropdown — visible only on narrow screens (≤500px) when authenticated */
.gb-nav-logout{
  display:none;
  font-family:inherit;text-align:left;
  color:#fca5a5;
  border-top:1px solid rgba(255,255,255,0.06);
  margin-top:4px;padding-top:10px;
}
.gb-nav-logout:hover{color:#f87171;background:rgba(248,113,113,0.06)}

@media (max-width: 1080px){
  .gb-nav{position:static;transform:none}
  .gb-spacer{display:none}
}
@media (max-width: 880px){
  .gb-header{padding:0 16px;gap:10px}
  .gb-divider-v.d-page,.gb-page-tag{display:none}
  .gb-nav{
    position:absolute;top:calc(100% + 8px);right:16px;left:16px;transform:none;
    flex-direction:column;align-items:stretch;
    height:auto;padding:8px;border-radius:14px;
    background:rgba(15,23,20,0.98);
    box-shadow:0 20px 40px -12px rgba(0,0,0,0.6);
    display:none;
  }
  .gb-header.menu-open .gb-nav{display:flex}
  .gb-nav-link{height:42px;padding:0 12px;width:100%;border-radius:9px}
  .gb-dd-menu{position:static;transform:none;box-shadow:none;border:0;background:transparent;padding:0 0 0 8px;opacity:1;visibility:visible}
  .gb-burger{display:inline-flex}
  .gb-auth.guest .gb-btn-ghost{display:none}
}
@media (max-width: 500px){
  .gb-header{padding:0 12px;gap:8px}
  .gb-brand-name{display:none}
  /* hide outside-nav user chip + logout — chip stays accessible via /profile, logout moves into burger menu */
  .gb-user .gb-btn-ghost{display:none}
  .gb-user-chip{padding:0;background:transparent;border:0}
  .gb-user-chip #gbUserName{display:none}
  /* logout link inside nav dropdown — only when authenticated */
  .gb-nav-logout.show{display:inline-flex;align-items:center}
  /* tighten lang switcher */
  .gb-lang{padding:2px}
  .gb-lang button{width:28px;height:24px}
  .gb-divider-v{display:none}
}
