/*
 * HR Electricity Bill Plugin — Stylesheet v2.0.0
 * All classes prefixed .hreb- to prevent theme/plugin conflicts
 */

/* ── Variables scoped inside wrapper ── */
.hreb-wrap {
  --hb: #003087;
  --hbm: #004aad;
  --hbl: #e8f0fb;
  --hbxl: #f2f6ff;
  --ho: #f26522;
  --hod: #d4531a;
  --hol: #fff3ec;
  --hg: #1a7a3c;
  --hgl: #e8f5ee;
  --ht: #0d1b2e;
  --htm: #2d4163;
  --hmu: #546278;
  --hbr: #c8d8f0;
  --hbrl: #dde8f6;
  --hbg: #eef3fb;
  --hw: #ffffff;
  --heb: #fff0f0;
  --he: #c0392b;
  --hwb: #fffae6;

  font-family: 'Segoe UI', Arial, sans-serif !important;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ht);
  background: var(--hbg);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.hreb-wrap *, .hreb-wrap *::before, .hreb-wrap *::after {
  box-sizing: border-box !important;
  margin: 0; padding: 0;
}

/* ── Topbar ── */
.hreb-topbar {
  width: 100%; background: var(--hb);
  padding: .6rem 1.4rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.hreb-logo {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 900; color: var(--hb);
}
.hreb-topbar-text { color: #fff; }
.hreb-t1 { font-size: .88rem; font-weight: 700; line-height: 1.2; }
.hreb-t2 { font-size: .62rem; opacity: .72; }

/* Tricolor */
.hreb-tribar {
  width: 100%; height: 4px;
  background: linear-gradient(to right,#ff9933 33.33%,#fff 33.33% 66.66%,#138808 66.66%);
}

/* ── Main layout ── */
.hreb-main {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.4rem 1rem 2rem;
}

/* ── Card ── */
.hreb-card {
  width: 100%; max-width: 700px;
  background: var(--hw);
  border: 1px solid var(--hbr);
  border-radius: .75rem;
  box-shadow: 0 4px 28px rgba(0,48,135,.1);
  overflow: hidden;
}

.hreb-card-head {
  background: var(--hbxl); border-bottom: 1px solid var(--hbr);
  padding: 1rem 1.4rem;
  display: flex; align-items: center; gap: .85rem;
}
.hreb-head-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ho); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(242,101,34,.28);
}
.hreb-head-title { font-size: 1.02rem; font-weight: 700; color: var(--hb); line-height: 1.25; }
.hreb-head-sub   { font-size: .71rem; color: var(--hmu); margin-top: .12rem; }

.hreb-card-body { padding: 1.3rem 1.4rem 1.5rem; }

/* ── Step labels ── */
.hreb-step-lbl {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--hb);
  display: flex; align-items: center; gap: .42rem;
  margin-bottom: .65rem;
}
.hreb-step-lbl::after { content:''; flex:1; height:1px; background:var(--hbrl); }
.hreb-sn {
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--hb); color: #fff;
  font-size: .6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hreb-sect { margin-bottom: 1.2rem; }

/* ── Board Cards ── */
.hreb-board-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.hreb-bc {
  background: var(--hbxl); border: 2px solid var(--hbr);
  border-radius: .55rem; padding: .9rem .7rem;
  text-align: center; cursor: pointer;
  transition: all .18s; user-select: none; position: relative;
}
.hreb-bc:hover  { border-color: var(--ho); background: var(--hol); }
.hreb-bc.hreb-active {
  border-color: var(--hb); background: var(--hbl);
  box-shadow: 0 0 0 3px rgba(0,48,135,.11);
}
.hreb-badge {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--hb); color: #fff;
  margin: 0 auto .45rem;
  display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 800;
}
.hreb-bc.hreb-active .hreb-badge { background: var(--ho); }
.hreb-bc-name { font-size: .93rem; font-weight: 700; color: var(--hb); }
.hreb-bc-full { font-size: .63rem; color: var(--hmu); margin-top: .1rem; line-height: 1.35; }
.hreb-bc-dist { font-size: .6rem; color: var(--hmu); margin-top: .2rem; line-height: 1.45; font-style: italic; }
.hreb-tick {
  position: absolute; top: .42rem; right: .48rem;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--hb); color: #fff;
  font-size: .5rem; display: none; align-items: center; justify-content: center;
}
.hreb-bc.hreb-active .hreb-tick { display: flex; }

/* ── Input ── */
.hreb-flabel { font-size: .79rem; font-weight: 700; color: var(--htm); margin-bottom: .38rem; display: block; }
.hreb-fnote  { font-weight: 400; color: var(--hmu); }
.hreb-iwrap  { position: relative; }
.hreb-input {
  width: 100% !important;
  padding: .76rem 2.5rem .76rem .9rem !important;
  border: 1.5px solid var(--hbr) !important;
  border-radius: .4rem !important;
  font-size: 1.08rem !important;
  font-family: 'Courier New', monospace !important;
  text-align: center !important;
  letter-spacing: 2.5px !important;
  color: var(--ht) !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color .18s, box-shadow .18s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.hreb-input::placeholder { font-family: 'Segoe UI',sans-serif !important; letter-spacing: 0 !important; font-size: .83rem !important; color: #aab4c4 !important; }
.hreb-input:focus { border-color: var(--hbm) !important; box-shadow: 0 0 0 3px rgba(0,74,173,.13) !important; outline: none !important; }
.hreb-input.hreb-ok  { border-color: var(--hg)  !important; background: #f4fdf7 !important; }
.hreb-input.hreb-err { border-color: var(--he)  !important; background: var(--heb)  !important; }

.hreb-iclr {
  position: absolute !important; right: .78rem; top: 50%; transform: translateY(-50%);
  background: none !important; border: none !important; color: #94a3b8 !important;
  cursor: pointer; font-size: .88rem; padding: 0; display: none; line-height: 1;
  box-shadow: none !important; outline: none !important;
}
.hreb-iclr:hover { color: var(--he) !important; }

.hreb-ifoot { display: flex; justify-content: space-between; margin-top: .3rem; }
.hreb-ihint { font-size: .67rem; color: var(--hmu); font-style: italic; }
.hreb-charc { font-size: .67rem; color: var(--hmu); }
.hreb-charc.hreb-full { color: var(--hg); font-weight: 700; }
.hreb-charc.hreb-over { color: var(--he); font-weight: 700; }

/* ── Category Pills — fixed 2-col grid ── */
.hreb-catgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .52rem; }
.hreb-pill {
  display: flex; align-items: center; gap: .38rem;
  padding: .48rem .82rem;
  border: 1.5px solid var(--hbr); border-radius: 2rem;
  font-size: .79rem; font-weight: 600;
  cursor: pointer; background: var(--hbxl); color: var(--htm);
  transition: all .16s; user-select: none;
}
.hreb-pill:hover { border-color: var(--ho); background: var(--hol); color: var(--hod); }
.hreb-pill input[type="radio"] { display: none !important; }
.hreb-pill.hreb-sel { background: var(--hb); border-color: var(--hb); color: #fff; box-shadow: 0 2px 8px rgba(0,48,135,.2); }
.hreb-pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--hbr); flex-shrink: 0; transition: background .16s; }
.hreb-pill.hreb-sel .hreb-pdot { background: rgba(255,255,255,.55); }

/* ── Portal Box ── */
.hreb-pbox {
  background: var(--hbl); border: 1px solid var(--hbr);
  border-left: 4px solid var(--hb); border-radius: .45rem;
  padding: .65rem .9rem; margin-bottom: .9rem;
}
.hreb-plbl { font-size: .67rem; color: var(--hmu); }
.hreb-pval { font-size: .88rem; font-weight: 700; color: var(--hb); margin-top: .1rem; }
.hreb-mwarn {
  margin-top: .35rem; padding: .28rem .52rem;
  background: #fffae6; color: #7c4700;
  border: 1px solid #f5dfa2; border-radius: .3rem;
  font-size: .7rem; line-height: 1.5;
}

/* ── Prefix Guide ── */
.hreb-guide { border: 1px solid var(--hbr); border-radius: .45rem; overflow: hidden; margin-bottom: .9rem; }
.hreb-ghead {
  background: var(--hb); color: #fff;
  padding: .65rem .9rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none; font-size: .77rem; font-weight: 600;
}
.hreb-gl { display: flex; align-items: center; gap: .4rem; }
.hreb-chev { transition: transform .22s; font-size: .7rem; opacity: .82; }
.hreb-ghead.hreb-open .hreb-chev { transform: rotate(180deg); }

.hreb-swipetip {
  display: none; align-items: center; gap: .3rem;
  font-size: .66rem; color: var(--hod); font-weight: 600;
  padding: .36rem .88rem 0; background: #fff;
}
.hreb-swipetip i { animation: hreb-sw 2s ease-in-out infinite; }
@keyframes hreb-sw {
  0%,100%{ transform:translateX(0);opacity:1 }
  45%    { transform:translateX(6px);opacity:.35 }
  85%    { transform:translateX(-3px);opacity:.72 }
}

.hreb-tblwrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: .62rem .88rem .58rem;
  scrollbar-width: thin; scrollbar-color: var(--hb) #dde8f6;
}
.hreb-tblwrap::-webkit-scrollbar { height: 3px; }
.hreb-tblwrap::-webkit-scrollbar-thumb { background: var(--hb); border-radius: 2px; }

.hreb-tbl { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .75rem; }
.hreb-tbl th {
  background: var(--hbxl); color: var(--hb);
  padding: .4rem .68rem; border: 1px solid var(--hbrl);
  text-align: left; font-weight: 700; white-space: nowrap;
}
.hreb-tbl td { border: 1px solid var(--hbrl); padding: .4rem .68rem; white-space: nowrap; }
.hreb-tbl tbody tr:nth-child(even) td { background: #f9fbff; }
.hreb-tbl tbody tr:hover td { background: var(--hbl); }
.hreb-tdesc { white-space: normal !important; min-width: 150px; color: var(--hmu); }
.hreb-tag  { display: inline-block; padding: .05rem .38rem; border-radius: 1rem; font-size: .59rem; font-weight: 700; margin-left: .13rem; }
.hreb-tr   { background: #dbeafe; color: #1d4ed8; }
.hreb-tn   { background: #d1fae5; color: #065f46; }
.hreb-to   { background: #fde8d8; color: #9a3412; }
.hreb-trtip td { background: #fffde7 !important; text-align: center; font-size: .7rem; white-space: normal !important; padding: .5rem .85rem; color: #7c5e10; }

/* ── Download Button ── */
.hreb-btn-dl {
  display: flex !important; align-items: center; justify-content: center; gap: .55rem;
  width: 100% !important; padding: .92rem 1rem;
  border: none !important; border-radius: .4rem;
  background: var(--ho) !important; color: #fff !important;
  font-size: .98rem; font-weight: 700;
  font-family: inherit !important; cursor: pointer;
  box-shadow: 0 3px 14px rgba(242,101,34,.3);
  transition: all .18s; margin-bottom: .68rem;
  outline: none !important; -webkit-appearance: none !important; appearance: none !important;
  line-height: 1.5 !important; text-decoration: none !important;
}
.hreb-btn-dl:hover  { background: var(--hod) !important; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(212,83,26,.36); color: #fff !important; }
.hreb-btn-dl:active { transform: translateY(0); }

/* ── Secondary Buttons — strict 2-col ── */
.hreb-secrow { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.hreb-btn-sec {
  display: flex !important; align-items: center; justify-content: center;
  gap: .35rem; padding: .62rem .55rem;
  border: 1.5px solid !important; border-radius: .4rem;
  background: #fff !important; font-size: .79rem; font-weight: 700;
  font-family: inherit !important; cursor: pointer;
  text-decoration: none !important; transition: all .16s;
  white-space: nowrap; outline: none !important;
  -webkit-appearance: none !important; appearance: none !important;
  line-height: 1.5 !important;
}
.hreb-btn-pay  { border-color: var(--hg) !important; color: var(--hg) !important; }
.hreb-btn-pay:hover  { background: var(--hgl) !important; color: var(--hg) !important; text-decoration: none !important; }
.hreb-btn-know { border-color: var(--hb) !important; color: var(--hb) !important; }
.hreb-btn-know:hover { background: var(--hbl) !important; color: var(--hb) !important; }

/* ── Message ── */
.hreb-msg {
  padding: .65rem .9rem; border-radius: .4rem;
  font-size: .77rem; line-height: 1.55; border: 1px solid; margin-top: .82rem;
}
.hreb-ok   { background: var(--hgl); border-color: #a7d7b8; color: #0d5c2e; }
.hreb-bad  { background: var(--heb); border-color: #f5b7b1; color: #7f0000; }
.hreb-warn { background: var(--hwb); border-color: #f5dfa2; color: #7c4700; }

/* ── Recent ── */
.hreb-recent { margin-top: .95rem; padding-top: .85rem; border-top: 1px solid var(--hbrl); }
.hreb-rhead  { font-size: .71rem; font-weight: 700; color: var(--hmu); margin-bottom: .4rem; display: flex; justify-content: space-between; align-items: center; }
.hreb-rclr   { background: none !important; border: none !important; color: var(--he) !important; cursor: pointer; font-size: .67rem; font-weight: 600; padding: 0 !important; outline: none !important; box-shadow: none !important; }
.hreb-rlist  { display: flex; flex-wrap: wrap; gap: .36rem; }
.hreb-ritem  {
  background: var(--hbxl); padding: .25rem .7rem;
  border-radius: .25rem; font-size: .69rem; cursor: pointer;
  font-family: 'Courier New', monospace; border: 1px solid var(--hbr);
  color: var(--hb); font-weight: 600; transition: all .13s; user-select: none;
}
.hreb-ritem:hover { background: var(--hb); color: #fff; border-color: var(--hb); }

/* ════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════ */

/* Mobile ≤480px */
@media (max-width: 480px) {
  .hreb-wrap    { font-size: 14px; }
  .hreb-topbar  { padding: .48rem .9rem; }
  .hreb-main    { padding: .85rem .7rem 1.4rem; }
  .hreb-card-head { padding: .82rem .95rem; }
  .hreb-card-body { padding: .95rem .95rem 1.1rem; }
  .hreb-head-icon { width: 38px; height: 38px; font-size: 1rem; }
  .hreb-head-title { font-size: .92rem; }
  .hreb-head-sub   { font-size: .65rem; }
  .hreb-input  { font-size: .97rem !important; letter-spacing: 2px !important; padding: .7rem 2.3rem .7rem .82rem !important; }
  .hreb-btn-dl { font-size: .9rem; padding: .85rem; }
  .hreb-btn-sec { font-size: .73rem; padding: .58rem .38rem; gap: .25rem; }
  .hreb-badge  { width: 36px; height: 36px; font-size: .7rem; }
  .hreb-swipetip { display: flex; }
}

/* Small mobile ≤380px */
@media (max-width: 380px) {
  .hreb-main { padding: .7rem .55rem 1.2rem; }
  .hreb-card-body { padding: .85rem .82rem 1rem; }
  .hreb-btn-sec { font-size: .7rem; padding: .55rem .3rem; }
  .hreb-bc-dist { display: none; }
}

/* Tablet 481–767px */
@media (min-width: 481px) and (max-width: 767px) {
  .hreb-main { padding: 1.1rem .85rem 1.7rem; }
  .hreb-swipetip { display: flex; }
}

/* Desktop ≥768px */
@media (min-width: 768px) {
  .hreb-main      { padding: 1.8rem 1.4rem 2.8rem; }
  .hreb-card      { border-radius: .88rem; }
  .hreb-card-head { padding: 1.1rem 1.55rem; }
  .hreb-card-body { padding: 1.45rem 1.55rem 1.6rem; }
}

/* Large desktop ≥1200px */
@media (min-width: 1200px) {
  .hreb-main      { padding: 2.2rem 1.8rem 3.2rem; }
  .hreb-card-body { padding: 1.65rem 1.8rem 1.85rem; }
}

/* ── Elementor / theme conflict resets ── */
.hreb-wrap a { text-decoration: none; }
.hreb-wrap button { font-family: inherit; }
.hreb-wrap .elementor-widget-container { padding: 0 !important; }
.hreb-wrap p { margin: 0 !important; }
