/* =========================================================
   QUBNEER PREMIUM CUSTOMER PORTAL V1
   Scoped to body.qb-customer-portal
   Brand: #0B1A12 / #B4FF00 / #FFFFFF
   ========================================================= */

body.qb-customer-portal{
  --qb-matrix:#0B1A12;
  --qb-lime:#B4FF00;
  --qb-white:#FFFFFF;
  --qb-rail:244px;
  background:var(--qb-matrix)!important;
  color:var(--qb-white)!important;
}

body.qb-customer-portal main{
  min-height:calc(100vh - 76px);
  background:var(--qb-matrix)!important;
  padding:28px 28px 72px calc(var(--qb-rail) + 44px)!important;
}

body.qb-customer-portal .qb-portal-rail{
  position:fixed;
  left:18px;
  top:94px;
  bottom:18px;
  width:var(--qb-rail);
  z-index:90;
  display:flex;
  flex-direction:column;
  padding:18px;
  border:1px solid var(--qb-lime);
  border-radius:24px;
  background:var(--qb-matrix);
  overflow:auto;
}

body.qb-customer-portal .qb-portal-brand{
  display:flex;
  align-items:center;
  gap:11px;
  padding:4px 4px 18px;
  border-bottom:1px solid var(--qb-lime);
  text-decoration:none;
}

body.qb-customer-portal .qb-portal-brand img{
  width:38px;
  height:38px;
  object-fit:cover;
  border-radius:10px;
  flex:0 0 auto;
}

body.qb-customer-portal .qb-portal-brand strong{
  display:block;
  color:var(--qb-lime)!important;
  font-size:14px;
  letter-spacing:-.01em;
}

body.qb-customer-portal .qb-portal-brand small{
  display:block;
  color:var(--qb-white)!important;
  font-size:10px;
  margin-top:2px;
}

body.qb-customer-portal .qb-portal-nav{
  display:grid;
  gap:7px;
  margin-top:18px;
}

body.qb-customer-portal .qb-portal-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--qb-lime);
  border-radius:12px;
  color:var(--qb-white)!important;
  text-decoration:none!important;
  font-size:13px;
  font-weight:800;
}

body.qb-customer-portal .qb-portal-nav a:hover,
body.qb-customer-portal .qb-portal-nav a.is-active{
  background:var(--qb-lime)!important;
  color:var(--qb-matrix)!important;
}

body.qb-customer-portal .qb-portal-nav .qb-nav-icon{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border:1px solid currentColor;
  border-radius:7px;
  font-size:11px;
  font-weight:900;
}

body.qb-customer-portal .qb-portal-rail-foot{
  margin-top:auto;
  padding-top:18px;
}

body.qb-customer-portal .qb-portal-rail-foot a{
  display:block;
  text-align:center;
  padding:10px 12px;
  border:1px solid var(--qb-lime);
  border-radius:12px;
  color:var(--qb-lime)!important;
  text-decoration:none;
  font-size:12px;
  font-weight:850;
}

body.qb-customer-portal .qb-portal-hero{
  max-width:1180px;
  margin:0 auto 22px;
  padding:28px;
  border:1px solid var(--qb-lime);
  border-radius:26px;
  background:var(--qb-matrix);
  position:relative;
  overflow:hidden;
}

body.qb-customer-portal .qb-portal-hero::after{
  content:"";
  position:absolute;
  right:22px;
  top:22px;
  width:66px;
  height:7px;
  border-radius:999px;
  background:var(--qb-lime);
}

body.qb-customer-portal .qb-portal-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--qb-lime)!important;
  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
}

body.qb-customer-portal .qb-portal-hero h1{
  margin:10px 0 8px!important;
  color:var(--qb-lime)!important;
  font-size:clamp(30px,4vw,54px)!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}

body.qb-customer-portal .qb-portal-hero p{
  max-width:720px;
  margin:0!important;
  color:var(--qb-white)!important;
}

body.qb-customer-portal .qb-portal-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

body.qb-customer-portal .qb-portal-hero-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 15px;
  border:1px solid var(--qb-lime);
  border-radius:12px;
  text-decoration:none!important;
  font-size:12px;
  font-weight:900;
}

body.qb-customer-portal .qb-portal-hero-actions .primary{
  background:var(--qb-lime)!important;
  color:var(--qb-matrix)!important;
}

body.qb-customer-portal .qb-portal-hero-actions .secondary{
  background:var(--qb-matrix)!important;
  color:var(--qb-lime)!important;
}

/* Existing content: premium normalization */
body.qb-customer-portal main > div,
body.qb-customer-portal main > section{
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
}

body.qb-customer-portal .card,
body.qb-customer-portal .panel,
body.qb-customer-portal article,
body.qb-customer-portal .portal-card,
body.qb-customer-portal .stat-card,
body.qb-customer-portal .ticket-card,
body.qb-customer-portal .quote-card{
  background:var(--qb-matrix)!important;
  border:1px solid var(--qb-lime)!important;
  border-radius:20px!important;
  box-shadow:none!important;
}

body.qb-customer-portal h1,
body.qb-customer-portal h2,
body.qb-customer-portal h3,
body.qb-customer-portal h4{
  color:var(--qb-lime)!important;
  letter-spacing:-.025em!important;
}

body.qb-customer-portal p,
body.qb-customer-portal li,
body.qb-customer-portal label,
body.qb-customer-portal small,
body.qb-customer-portal .muted{
  color:var(--qb-white)!important;
}

body.qb-customer-portal input,
body.qb-customer-portal textarea,
body.qb-customer-portal select{
  background:var(--qb-matrix)!important;
  color:var(--qb-white)!important;
  border:1px solid var(--qb-lime)!important;
  border-radius:12px!important;
  min-height:48px;
}

body.qb-customer-portal input::placeholder,
body.qb-customer-portal textarea::placeholder{
  color:var(--qb-white)!important;
  opacity:.68;
}

body.qb-customer-portal button,
body.qb-customer-portal input[type="submit"],
body.qb-customer-portal .btn-primary,
body.qb-customer-portal a.btn-primary{
  background:var(--qb-lime)!important;
  color:var(--qb-matrix)!important;
  border:1px solid var(--qb-lime)!important;
  border-radius:12px!important;
  font-weight:900!important;
  box-shadow:none!important;
}

body.qb-customer-portal .btn-secondary,
body.qb-customer-portal a.btn-secondary{
  background:var(--qb-matrix)!important;
  color:var(--qb-lime)!important;
  border:1px solid var(--qb-lime)!important;
  border-radius:12px!important;
}

/* Tables */
body.qb-customer-portal table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden;
  border:1px solid var(--qb-lime)!important;
  border-radius:16px!important;
  background:var(--qb-matrix)!important;
}

body.qb-customer-portal th,
body.qb-customer-portal td{
  padding:13px 14px!important;
  border-bottom:1px solid var(--qb-lime)!important;
  color:var(--qb-white)!important;
  background:var(--qb-matrix)!important;
  vertical-align:top;
}

body.qb-customer-portal th{
  color:var(--qb-lime)!important;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

body.qb-customer-portal tr:last-child td{
  border-bottom:0!important;
}

/* Badges / status */
body.qb-customer-portal .badge,
body.qb-customer-portal [class*="status"],
body.qb-customer-portal [class*="pill"]{
  border-color:var(--qb-lime)!important;
}

body.qb-customer-portal .qb-portal-status-chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid var(--qb-lime);
  border-radius:999px;
  color:var(--qb-lime)!important;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

/* Auth pages */
body.qb-customer-portal.qb-portal-auth main{
  padding-left:28px!important;
}

body.qb-customer-portal.qb-portal-auth .qb-portal-rail{
  display:none!important;
}

body.qb-customer-portal.qb-portal-auth main > div{
  max-width:520px!important;
}

body.qb-customer-portal.qb-portal-auth .card,
body.qb-customer-portal.qb-portal-auth .panel{
  border-radius:26px!important;
  padding:32px!important;
}

/* Receipts */
body.qb-customer-portal.qb-portal-receipt main > div,
body.qb-customer-portal.qb-portal-receipt main > section{
  max-width:900px!important;
}

body.qb-customer-portal.qb-portal-receipt [class*="receipt"],
body.qb-customer-portal.qb-portal-receipt .card{
  border:1px solid var(--qb-lime)!important;
}

/* Support thread */
body.qb-customer-portal .qb-message-bubble{
  border:1px solid var(--qb-lime);
  border-radius:16px;
  padding:14px 16px;
  margin:10px 0;
  background:var(--qb-matrix);
}

/* Mobile portal navigation */
body.qb-customer-portal .qb-portal-mobile-nav{
  display:none;
}

@media(max-width:980px){
  body.qb-customer-portal main{
    padding:82px 16px 54px!important;
  }

  body.qb-customer-portal .qb-portal-rail{
    display:none!important;
  }

  body.qb-customer-portal .qb-portal-mobile-nav{
    position:fixed;
    display:flex;
    left:12px;
    right:12px;
    top:76px;
    z-index:95;
    gap:6px;
    overflow-x:auto;
    padding:8px;
    border:1px solid var(--qb-lime);
    border-radius:16px;
    background:var(--qb-matrix);
    scrollbar-width:none;
  }

  body.qb-customer-portal .qb-portal-mobile-nav::-webkit-scrollbar{display:none;}

  body.qb-customer-portal .qb-portal-mobile-nav a{
    flex:0 0 auto;
    min-height:36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 11px;
    border:1px solid var(--qb-lime);
    border-radius:10px;
    color:var(--qb-white)!important;
    text-decoration:none;
    font-size:11px;
    font-weight:850;
  }

  body.qb-customer-portal .qb-portal-mobile-nav a.is-active{
    background:var(--qb-lime)!important;
    color:var(--qb-matrix)!important;
  }

  body.qb-customer-portal .qb-portal-hero{
    padding:22px;
    border-radius:20px;
  }
}

@media(max-width:640px){
  body.qb-customer-portal main{
    padding-left:12px!important;
    padding-right:12px!important;
  }

  body.qb-customer-portal .qb-portal-hero{
    padding:20px;
  }

  body.qb-customer-portal .qb-portal-hero::after{
    width:44px;
    right:16px;
    top:16px;
  }

  body.qb-customer-portal table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }

  body.qb-customer-portal .card,
  body.qb-customer-portal .panel{
    padding:20px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.qb-customer-portal *,
  body.qb-customer-portal *::before,
  body.qb-customer-portal *::after{
    animation:none!important;
    transition:none!important;
  }
}
