/* CoinFlip Preferred - BitGo Portal v5.5
   Matches the Australia portal colour system.
   BitGo navigation remains on the RIGHT.
*/

#cfPortalSwitcher {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;

  display: flex;
  gap: 4px;

  padding: 4px;

  background: #101b2c;
  border: 1px solid #263750;
  border-radius: 14px;

  box-shadow: 0 8px 28px rgba(0,0,0,.30);
}

#cfPortalSwitcher button {
  border: 0;
  background: transparent;
  color: #eef4ff;

  padding: 10px 18px;
  border-radius: 10px;

  font-weight: 800;
  cursor: pointer;
}

#cfPortalSwitcher button:hover {
  background: #24344d;
  color: #eef4ff;
}

#cfPortalSwitcher button.active {
  background: #FFAB09;
  color: #182740;
}

#cfPortalSwitcher b,
#cfBitGoPortal aside b {
  font-size: 9px;
  background: #FFAB09;
  color: #182740;

  padding: 2px 5px;
  border-radius: 5px;
}


/* ============================================================
   BITGO PORTAL
   ============================================================ */

#cfBitGoPortal {
  position: fixed;
  inset: 0;
  z-index: 10000;

  overflow: auto;

  padding-right: 260px;

  background: #07101d;
  color: #eef4ff;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}


/* MAIN CONTENT */

#cfBitGoPortal main {
  max-width: 1320px;
  margin: auto;

  padding: 85px 38px 60px;
}


/* HEADER */

#cfBitGoPortal header {
  display: flex;
  justify-content: space-between;
  align-items: end;

  margin-bottom: 25px;

  border: 0;
  background: transparent;
  height: auto;
  padding: 0;
}

#cfBitGoPortal header small {
  color: #f4b942;

  font-weight: 800;
  letter-spacing: .13em;
}

#cfBitGoPortal h1 {
  margin: 4px 0 0;
  font-size: 34px;
  color: #eef4ff;
}


/* CONNECTION STATUS */

#bgState {
  display: inline-block;

  background: #213149;
  color: #cdd8eb;

  border: 1px solid #263750;

  padding: 7px 11px;
  border-radius: 999px;

  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}


/* ============================================================
   RIGHT NAVIGATION
   Same visual language as Australia navigation
   ============================================================ */

#cfBitGoPortal aside {
  position: fixed;

  right: 0;
  top: 0;
  bottom: 0;

  width: 260px;

  box-sizing: border-box;

  background: #182740;

  color: #ffffff;

  padding: 82px 20px 25px;

  border-left: 1px solid rgba(255,255,255,.10);

  box-shadow:
    -16px 0 40px rgba(24,39,64,.18);
}

#cfBitGoPortal aside h2 {
  color: #ffffff;

  margin: 0 0 22px;
  padding: 8px 10px 18px;

  border-bottom: 1px solid rgba(255,255,255,.12);

  font-size: 18px;
}

#cfBitGoPortal aside nav {
  display: grid;
  gap: 4px;
}

#cfBitGoPortal aside nav button {
  width: 100%;

  display: flex;
  align-items: center;

  border: 1px solid transparent;

  background: transparent;

  color: rgba(255,255,255,.78);

  text-align: left;

  padding: 11px 12px;

  border-radius: 10px;

  font-weight: 700;

  cursor: pointer;
}

#cfBitGoPortal aside nav button:hover {
  background: rgba(35,101,165,.45);
  color: #ffffff;
}

#cfBitGoPortal aside nav button.active {
  background: #FFAB09;
  color: #182740;
}

#cfBitGoPortal aside footer {
  position: absolute;

  bottom: 24px;
  left: 30px;

  color: #9eabc4;

  font-size: 11px;
  line-height: 1.6;
}


/* ============================================================
   DASHBOARD CARDS
   ============================================================ */

.cards {
  display: grid;

  grid-template-columns:
    repeat(4,minmax(0,1fr));

  gap: 16px;

  margin-bottom: 18px;
}

.cards article,
.panel {
  background: #101b2c;

  border: 1px solid #263750;

  border-radius: 16px;

  box-shadow: none;
}

.cards article {
  padding: 20px;
}

.cards span,
.cards small {
  display: block;

  color: #9eabc4;

  font-size: 12px;
}

.cards strong {
  display: block;

  color: #eef4ff;

  font-size: 27px;

  margin: 6px 0;
}


/* PANELS */

.panel {
  padding: 20px;

  margin-bottom: 16px;

  color: #eef4ff;
}

.panel h2 {
  color: #eef4ff;

  margin-top: 0;
}

.panel p {
  color: #eef4ff;
}


/* CODE / WALLET ADDRESSES */

.panel code {
  display: block;

  overflow-wrap: anywhere;

  background: #091323;

  border: 1px solid #263750;

  padding: 12px;

  border-radius: 10px;

  color: #eef4ff;
}


/* BUTTONS */

.panel button {
  margin-top: 15px;

  border: 0;

  background: #FFAB09;

  color: #182740;

  padding: 11px 15px;

  border-radius: 10px;

  font-weight: 800;

  cursor: pointer;
}

.panel button:hover {
  filter: brightness(1.06);
}


/* DETAILS */

.details {
  display: grid;

  grid-template-columns:
    repeat(2,minmax(0,1fr));

  gap: 10px 24px;
}

.details p {
  padding: 12px 0;

  border-bottom: 1px solid #263750;

  color: #9eabc4;
}

.details b {
  color: #eef4ff;
}


/* STATUS MESSAGES */

.bgerr,
.warn,
.ok {
  padding: 13px;

  border-radius: 10px;

  margin: 12px 0;
}

.bgerr {
  color: #ff9aa4;

  background: #29151d;

  border: 1px solid #51222b;
}

.warn {
  color: #f4b942;

  background: #211b10;

  border: 1px solid #59471d;
}

.ok {
  color: #36c98f;

  background: #10251f;

  border: 1px solid #235a47;
}


/* ============================================================
   ADMIN CUSTOMER -> BITGO MAPPING
   ============================================================ */

.customer {
  display: grid;

  grid-template-columns:
    1fr 90px 2fr 70px 100px;

  gap: 8px;

  align-items: center;

  padding: 12px 4px;

  border-bottom: 1px solid #263750;
}

.customer b {
  color: #eef4ff;
}

.customer input {
  width: 100%;

  padding: 12px 13px;

  background: #0b1626;

  border: 1px solid #263750;

  border-radius: 10px;

  color: #eef4ff;

  font-size: 14px;
}

.customer input:focus {
  outline: none;

  border-color: #2365A5;

  box-shadow:
    0 0 0 3px rgba(35,101,165,.14);
}

.customer button {
  margin: 0;

  background: #FFAB09;

  color: #182740;
}

.customer em {
  color: #36c98f;

  font-size: 12px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media(max-width:920px) {

  #cfBitGoPortal {
    padding-right: 0;
    padding-bottom: 150px;
  }

  #cfBitGoPortal main {
    padding:
      80px 16px 30px;
  }

  #cfBitGoPortal aside {
    top: auto;
    left: 0;

    width: auto;
    height: 140px;

    padding: 10px;

    border-left: 0;
    border-top:
      1px solid rgba(255,255,255,.10);
  }

  #cfBitGoPortal aside h2,
  #cfBitGoPortal aside footer {
    display: none;
  }

  #cfBitGoPortal aside nav {
    display: flex;

    gap: 6px;

    overflow-x: auto;
  }

  #cfBitGoPortal aside nav button {
    width: auto;

    flex: 0 0 auto;

    white-space: nowrap;
  }

  .cards {
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .customer {
    grid-template-columns: 1fr;
  }
}


@media(max-width:560px) {

  .cards {
    grid-template-columns: 1fr;
  }

  .details {
    grid-template-columns: 1fr;
  }

  #cfPortalSwitcher button {
    padding: 9px 11px;

    font-size: 12px;
  }
}
