:root {
  --ip-purple: #2f176f;
  --ip-purple-dark: #090622;
  --ip-purple-soft: #5a35b1;
  --ip-yellow: #ffc21a;
  --ip-yellow-2: #ffb300;
  --ip-text: #11142d;
  --ip-muted: #6b7280;
  --ip-border: rgba(17, 20, 45, .12);
}

.ip-login-html,
.ip-login-body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

.ip-login-body {
  padding: 0 !important;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ip-text);
  background:
    radial-gradient(circle at top left, rgba(255, 194, 26, .14), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(47, 23, 111, .18), transparent 34rem),
    #f5f6fb;
  overflow: hidden;
  overscroll-behavior: none;
}

.ip-login-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  overflow: hidden;
}

.ip-login-shell {
  width: min(1180px, 100%);
  height: min(720px, calc(100dvh - 44px));
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 28px 80px rgba(17, 20, 45, .16);
  backdrop-filter: blur(18px);
}

.ip-brand-panel {
  position: relative;
  padding: 54px 48px 38px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 4, 28, .93), rgba(47, 23, 111, .88)),
    url('../images/StockIP.webp') center / cover no-repeat;
  isolation: isolate;
}

.ip-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 38%, rgba(255, 194, 26, .20), transparent 12rem),
    linear-gradient(to bottom, rgba(7, 4, 28, .12), rgba(7, 4, 28, .78));
  z-index: -1;
}

.ip-brand-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -130px;
  bottom: 90px;
  border-radius: 50%;
  border: 44px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 0 0 18px rgba(0, 0, 0, .18), 0 22px 70px rgba(0, 0, 0, .30);
  z-index: -1;
}

.ip-logo {
  width: 190px;
  max-width: 64%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.ip-brand-content {
  margin-top: 86px;
  max-width: 520px;
}

.ip-brand-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -.045em;
  text-transform: uppercase;
  color: #fff;
}

.ip-brand-title span { color: var(--ip-yellow); }

.ip-brand-line {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: var(--ip-yellow);
  margin: 26px 0 28px;
}

.ip-brand-text {
  max-width: 340px;
  margin: 0;
  font-size: 1.13rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .88);
}

.ip-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ip-values-desktop {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 34px;
}

.ip-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: rgba(255, 255, 255, .86);
  font-size: .78rem;
}

.ip-value-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  color: var(--ip-yellow);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
}

.ip-value-icon svg,
.ip-field-icon svg,
.ip-password-toggle svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  overflow: visible;
}

.ip-value-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.ip-icon-stroke,
.ip-icon-stroke * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ip-field-icon .ip-icon-stroke,
.ip-password-toggle .ip-icon-stroke,
.ip-field-icon .ip-icon-stroke *,
.ip-password-toggle .ip-icon-stroke * {
  stroke-width: 2;
}

.ip-value strong {
  color: #fff;
  font-size: .93rem;
}

.ip-form-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .74)),
    radial-gradient(circle at 80% 20%, rgba(47, 23, 111, .08), transparent 16rem);
}

.ip-login-card {
  width: min(100%, 440px);
  padding: 46px 42px 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 22px 65px rgba(17, 20, 45, .14);
  animation: ipCardIn .45s ease both;
}

@keyframes ipCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ip-mobile-logo,
.ip-values-mobile { display: none; }

.ip-login-card h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  text-align: center;
  color: var(--ip-text);
}

.ip-login-card .subtitle {
  margin: 8px 0 30px;
  color: var(--ip-muted);
  text-align: center;
  font-size: 1rem;
}

.ip-field {
  position: relative;
  margin-bottom: 16px;
}

.ip-field-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  color: var(--ip-text);
  pointer-events: none;
}

.ip-login-card .form-control {
  min-height: 58px;
  padding-left: 52px;
  padding-right: 52px;
  border-radius: 14px !important;
  border: 1px solid var(--ip-border);
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
  font-size: .96rem;
}

.ip-login-card .form-control:focus {
  border-color: rgba(47, 23, 111, .42);
  box-shadow: 0 0 0 .22rem rgba(47, 23, 111, .10);
}

.ip-login-card .form-floating > label {
  padding-left: 52px;
  color: #7b8191;
}

.ip-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--ip-text);
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
}

.ip-password-toggle:hover { background: rgba(47, 23, 111, .07); }
.ip-password-toggle .ip-eye-icon { display: none; }
.ip-password-toggle.is-visible .ip-eye-icon { display: block; }
.ip-password-toggle.is-visible .ip-eye-off-icon { display: none; }

.forgot-link {
  color: var(--ip-purple) !important;
  text-decoration: none;
  font-weight: 700;
}

.forgot-link:hover { color: var(--ip-purple-soft) !important; }

.ip-submit-btn {
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ip-purple), var(--ip-purple-soft));
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 14px 28px rgba(47, 23, 111, .28);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.ip-submit-btn:hover,
.ip-submit-btn:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(47, 23, 111, .34);
}

.ip-submit-btn.is-loading {
  opacity: .82;
  pointer-events: none;
}

.ip-submit-btn.is-loading span::after {
  content: "";
  display: inline-block;
  width: .9rem;
  height: .9rem;
  margin-left: .6rem;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -.12rem;
  animation: ipSpin .7s linear infinite;
}

@keyframes ipSpin { to { transform: rotate(360deg); } }

.ip-card-footer {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 20, 45, .08);
  color: #8a91a3;
  font-size: .82rem;
  text-align: center;
}

#login-error {
  border: 0;
  border-radius: 14px;
  background: #fff0f1;
  color: #b4232b;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .ip-login-html,
  .ip-login-body {
    height: 100%;
    height: 100dvh;
    overflow: hidden !important;
    position: fixed;
    inset: 0;
  }

  .ip-login-page {
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    align-items: stretch;
  }

  .ip-login-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .ip-brand-panel { display: none; }

  .ip-form-panel {
    height: 100dvh;
    min-height: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px calc(env(safe-area-inset-bottom, 0px) + 14px);
    align-items: center;
    background:
      linear-gradient(180deg, rgba(18, 8, 54, .84), rgba(8, 5, 29, .95)),
      url('../images/StockIP.webp') center / cover no-repeat;
  }

  .ip-login-card {
    width: 100%;
    max-width: 430px;
    height: 100%;
    max-height: 760px;
    margin: 0 auto;
    padding: 18px 4px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #fff;
  }

  .ip-mobile-logo {
    display: block;
    width: clamp(128px, 42vw, 174px);
    margin: 0 auto clamp(18px, 4.8vh, 36px);
    filter: brightness(0) invert(1);
  }

  .ip-login-card h1 {
    color: #fff;
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .ip-login-card .subtitle {
    color: rgba(255, 255, 255, .84);
    margin-bottom: clamp(18px, 4.2vh, 32px);
  }

  .ip-login-card .form-control {
    min-height: clamp(52px, 7.2vh, 60px);
    border: 0;
    background: rgba(255, 255, 255, .96);
  }

  .ip-login-card .form-control:focus {
    box-shadow: 0 0 0 .22rem rgba(255, 194, 26, .22);
  }

  .ip-field { margin-bottom: 14px; }
  .ip-forgot-row { margin-bottom: clamp(18px, 4.2vh, 28px) !important; }

  .ip-submit-btn {
    min-height: clamp(52px, 7.2vh, 60px);
    background: linear-gradient(135deg, #ffd24a, #ffb300);
    color: #17120a;
    box-shadow: 0 14px 28px rgba(255, 179, 0, .22);
  }

  .ip-submit-btn:hover,
  .ip-submit-btn:focus { color: #17120a; }

  .ip-submit-btn.is-loading span::after {
    border-color: rgba(23, 18, 10, .25);
    border-top-color: #17120a;
  }

  .forgot-link { color: #fff !important; }

  .ip-values-mobile {
    display: grid;
    margin-top: clamp(22px, 4.8vh, 34px);
    padding-top: clamp(18px, 3.4vh, 24px);
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  .ip-value { font-size: .72rem; }
  .ip-value strong { font-size: .82rem; }

  .ip-value-icon {
    width: clamp(34px, 9vw, 42px);
    height: clamp(34px, 9vw, 42px);
  }

  .ip-value-icon svg {
    width: clamp(1.05rem, 5vw, 1.35rem);
    height: clamp(1.05rem, 5vw, 1.35rem);
  }

  .ip-card-footer {
    margin-top: clamp(18px, 3.8vh, 30px);
    padding-top: 0;
    border: 0;
    color: rgba(255, 255, 255, .72);
  }
}

@media (max-width: 420px) {
  .ip-form-panel { padding-left: 14px; padding-right: 14px; }
  .ip-login-card .form-control { font-size: .92rem; }
  .ip-login-card .subtitle { font-size: .92rem; }
}

@media (max-height: 700px) and (max-width: 991.98px) {
  .ip-login-card { justify-content: space-between; padding-top: 12px; padding-bottom: 8px; }
  .ip-mobile-logo { margin-bottom: 10px; width: 132px; }
  .ip-login-card .subtitle { margin-bottom: 14px; }
  .ip-field { margin-bottom: 10px; }
  .ip-forgot-row { margin-bottom: 12px !important; }
  .ip-values-mobile { margin-top: 14px; padding-top: 12px; }
  .ip-card-footer { margin-top: 10px; font-size: .76rem; }
}
