*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─────────────────────────────────────────
   MOBILE FIRST  (base = phone)
───────────────────────────────────────── */

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 22px;
  background-color: hsl(190,85%,32%);
  min-height: 100vh;
  cursor: default;
  -webkit-text-size-adjust: none;
  -webkit-tap-highlight-color: transparent;
}

#login-lower {
  background-color: hsl(0,0%,93%);
  min-height: calc(100dvh - 80px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Header ── */
#loginbar1 { display: none; }

#loginlogobg {
  width: 100%;
  height: 80px;
  background-color: hsl(190,85%,32%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#loginlogobg img {
  height: 46px;
  display: block;
}

/* ── Right nav (hidden on mobile) ── */
#rightnav { display: none; }

/* ── Screen / card area ── */
#screen {
  padding: 8px 10px 0;
  display: flex;
  justify-content: center;
}

/* ── White card ── */
.whitebox {
  display: block;
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  padding: 16px 0 24px;
  background-color: white;
}

/* ── Tab bar ── */
#tabspace {
  position: relative;
  border-radius: 20px;
  display: flex;
  margin: 0 18px;
  padding: 0 6px;
  background-color: hsl(190,100%,25%);
  user-select: none;
  height: 40px;
  align-items: center;
}

.logintab {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 6px 6px;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  white-space: nowrap;
}

/* The sliding pill indicator */
#tabselector {
  position: absolute;
  top: 0;
  height: 40px;
  border-radius: 20px;
  transition: left 0.2s, width 0.2s;
  z-index: 0;
}

#tabselector.sellit { background-color: hsl(190,60%,50%); }
#tabselector.selhi  { background-color: hsl(190,60%,62%); }

/* ── Alert / banner ── */
.alert {
  padding: 10px 16px;
  border-radius: 12px;
  white-space: normal;
  background-color: hsl(60,100%,85%) !important;
  color: black !important;
  margin: 16px 18px 0;
  text-align: center;
  font-size: 16px;
  line-height: 22px;
}

/* ── Form area ── */
form {
  margin: 20px 18px 0;
}

.fieldwrap { display: block; }

/* ── Text boxes ── */
.textboxp1 {
  position: relative;
  display: block;
  background-color: white;
  border: 1px solid hsl(190,60%,62%);
  border-radius: 6px;
  margin: 0;
  width: 100%;
  height: 44px;
}

.placeholder {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 12px;
  color: hsl(190,60%,62%);
  pointer-events: none;
  font-size: 16px;
  user-select: none;
  white-space: nowrap;
}

.textboxp2.inp {
  position: absolute;
  top: 0; left: 0;
  padding: 0 12px;
  height: 100%;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: black;
  -webkit-user-select: text;
  user-select: text;
}

/* Gap between fields */
.field-gap { height: 14px; }

/* ── State dropdown ── */
.menuspace {
  position: relative;
  display: block;
  width: 100%;
}

.menuclosed {
  position: relative;
  background-color: white;
  border: 1px solid hsl(190,60%,62%);
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
}

.menuclosed .placeholder {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 12px;
  font-size: 16px;
}

.menutriangle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.menutriangle svg { display: block; }
.widgetfill { fill: hsl(190,60%,62%); }

.menulabel {
  display: block;
  padding-left: 12px;
  padding-right: 28px;
  height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 22px;
  font-size: 16px;
  color: black;
  white-space: nowrap;
}

.menuopenspace {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 10000;
}

.menuopenbox {
  background-color: white;
  border: 1px solid hsl(190,60%,62%);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.menulist {
  padding: 6px 0;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.menurow {
  padding: 6px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font-size: 15px;
}

.menurow:hover, .menurow:active {
  background-color: hsl(190,60%,90%);
}

.menugap { height: 8px; border-top: 1px solid hsl(0,0%,90%); margin: 4px 0; }

/* ── Buttons ── */
#btn-row {
  position: relative;
  margin: 22px 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  height: 44px;
  border-radius: 22px;
  background-color: hsl(190,100%,25%);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: normal;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  user-select: none;
  -webkit-appearance: none;
}

.btn:active { background-color: hsl(190,85%,38%); }

#loginbtn { min-width: 130px; }

/* ── Mobile footer ── */
#mobilefooter {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 22px 0 36px;
}

#mobilefooter .rnav-link {
  color: hsl(190,85%,32%);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   DESKTOP  (≥ 600px)
───────────────────────────────────────── */
@media (min-width: 600px) {
  body {
    font-size: 12px;
    line-height: 16px;
    background: hsl(0,0%,93%);
  }

  #login-lower {
    background: transparent;
    min-height: 0;
    padding-bottom: 0;
  }

  /* Header bar */
  #loginbar1 {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 32px;
    background-color: hsl(190,85%,32%);
    z-index: 10005;
  }

  #loginlogobg {
    position: fixed;
    top: 0; left: 0;
    width: 220px; height: 46px;
    background-color: hsl(190,100%,25%);
    border-radius: 0 23px 23px 0;
    padding: 5px 0 0 18px;
    justify-content: flex-start;
    z-index: 10005;
  }

  #loginlogobg img { height: 36px; }

  /* Right nav */
  #rightnav {
    display: flex;
    position: fixed;
    top: 6px; right: 10px;
    z-index: 10005;
    gap: 2px;
  }

  .rnav-link {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 11px;
    color: white;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
  }

  .rnav-link:hover { background-color: hsl(190,60%,62%); }

  /* Mobile footer hidden on desktop */
  #mobilefooter { display: none; }

  /* Screen */
  #screen {
    padding: 58px 20px 20px;
    justify-content: center;
    align-items: flex-start;
  }

  /* Card */
  .whitebox {
    display: table;
    width: auto;
    border-radius: 12px;
    padding: 12px 0;
    margin: 10px 0 0;
  }

  /* Tabs */
  #tabspace {
    border-radius: 12px;
    display: table;
    margin: 0 20px;
    padding: 0 6px;
    height: auto;
    align-items: unset;
    flex: unset;
  }

  .logintab {
    display: inline-block;
    flex: unset;
    padding: 4px 12px;
    font-size: 12px;
  }

  #tabselector { height: 24px; border-radius: 12px; }

  /* Banner */
  .alert {
    font-size: 12px;
    line-height: 16px;
    padding: 4px 12px;
    border-radius: 5px;
    width: 272px;
    margin: 12px auto 0;
  }

  /* Form */
  form { display: table; margin: 20px auto 0; }

  /* Inputs */
  .textboxp1 {
    display: inline-block;
    width: 190px;
    height: auto;
    border-radius: 4px;
    margin: 1px 0;
  }

  .placeholder {
    position: absolute;
    top: 0;
    transform: none;
    left: 0;
    padding-left: 6px;
    padding-top: 1px;
    font-size: 12px;
    line-height: 16px;
  }

  .textboxp2.inp {
    position: relative;
    top: 0; left: 0;
    padding: 0 5px;
    height: 16px;
    width: 188px;
    font-size: 12px;
    display: block;
  }

  .field-gap { display: none; }

  /* State dropdown */
  .menuspace { display: inline-block; width: 190px; }

  .menuclosed {
    display: block;
    width: 190px;
    height: 18px;
    border-radius: 4px;
  }

  .menuclosed .placeholder {
    position: absolute;
    top: 1px;
    transform: none;
    font-size: 12px;
  }

  .menutriangle { top: 1px; transform: none; }

  .menulabel {
    padding-left: 5px;
    height: 16px;
    line-height: 16px;
    font-size: 12px;
    margin-top: 1px;
  }

  .menuopenspace { width: 190px; }

  .menurow { padding: 2px 5px; font-size: 12px; }

  /* Buttons */
  #btn-row {
    display: block;
    position: relative;
    margin: 20px auto 0;
    width: 272px;
    height: 24px;
  }

  .btn {
    display: inline-block;
    padding: 4px 10px;
    height: 24px;
    border-radius: 12px;
    font-size: 12px;
    align-items: unset;
    justify-content: unset;
  }

  .btn:hover { background-color: hsl(190,85%,38%); }

  #loginbtn { min-width: 100px; position: absolute; top: 0; right: 0; }
}
